Another good reason to avoid AUTO_CLOSE

Does anybody need another good reason to avoid setting AUTO_CLOSE on a database? Looks like I found one.

Some days ago, all of a sudden, a database started to throw errors along the lines of “The log for database MyDatabase is not available”. The instance was an old 2008 R2 Express (don’t get me started on why an Express Edition is in production…) with some small databases.

The log was definitely there and the database looked online. Actually, I was able to query the tables, but every attempt to update the contents ended up with the “log unavailable” error.

[Read More]

SQL Server Agent in Express Edition

As you probably know, SQL Server Express doesn’t ship with SQL Server Agent.

This is a known limitation and many people offered alternative solutions to schedule jobs, including windows scheduler, free and commercial third-party applications.

My favourite SQL Server Agent replacement to date is Denny Cherry’s Standalone SQL Agent, for two reasons:

  1. It uses msdb tables to read job information. This means that jobs, schedules and the like can be scripted using the same script you would use in the other editions.
  2. It's open source and it was started by a person I highly respect.
However, while I still find it a great piece of software, there are a couple of downsides to take into account:
  1. It's still a beta version and the project hasn't been very active lately.
  2. There's no GUI tool to edit jobs or monitor job progress.
  3. It fails to install when UAC is turned on
  4. It's not 100% compatible with SQL Server 2012
  5. It doesn't restart automatically when the SQL Server instance starts
  6. It requires sysadmin privileges
The UAC problem during installation is easy to solve: open an elevated command prompt and run the installer msi. Easy peasy.

As far as SQL Server 2012 is concerned, the service fails to start when connected to a 2012 instance. In the ERRORLOG file (the one you find in the Standalone SQL Agent directory, not SQL Server’s) you’ll quickly find the reason of the failure: it can’t create the stored procedure sp_help_job_SSA. I don’t know why this happens: I copied the definition of the stored procedure from a 2008 instance and it worked fine.

[Read More]

SQL Server 2012 RTM

Today Microsoft announced that SQL Server 2012 codename “Denali” has Released To Manufacturing and will be available for download starting from April 1.

April fool’s? I don’t think so. Time will tell.

One thing is sure: each and every bug discovered in this version will be ascribed to that unusual release date. :-)

If you’re a MSDN/TechNet subscriber, you can download them as of March 7. Yes, tomorrow! Keep your fingers ready to push the download button!

[Read More]