Friday, April 24, 2009

Set Number of Error Logs via code

In my ongoing effort to automate everything. I wanted to have a script that would change the default number of error logs. After some looking around in help and on the internet, I realized I was going to have come up with a solution on my own. I was complaining to Ryan about having to do some real work, when he suggested that I just run a trace when I make the change via Management Studio.

Here is the result:

EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', REG_DWORD, 10

I am sure using this is not recommended, but then MS should have provided me a better method to accomplish this.

Monday, April 6, 2009

32-bit to 64-bit SQL 2008 Upgrades

I am not sure if it is a symptom of my advanced age, but I am forgetting more and more. I know that you can't do an inplace upgrade from a 32-bit version of SQL 2005 to a 64-bit version, but I did indeed forget. I am running into this issue more frequently on SQL 2008 upgrades than I did with previous version, becuase SQL 2008 offers Workgroup Edition 64-bit for the first time. Many of the customers running Workgroup Edition SQL 2005 in a WOW configuration are looking to upgrade.

The only workaround that I knowis to:

  • Script out logins, jobs, and any objects that are stored in MSDB and Master
  • Detach user databases
  • Uninstall 32-bit version of SQL Server
  • Reboot Server, just to be sure
  • Install 64-bit version of SQL Server
  • Create logins, jobs and other server wide objects
  • Re-attach user databases

Thursday, April 2, 2009

New MVP

Congratulations to my friend Chris Shaw who was finally award an MVP for SQL Server. Chris has been working for years supporting the SQL Server Community and I am very happy for him.

ps. Chris is a non-douchebag MVP