Wednesday, 12 January 2011

Locked out of SQL Server 2008 Express

I was approached by somebody who had installed SQL Server Express 2008 R2 in Mixed Mode, provisioned an 'sa' account and then promptly forgot the password.

As 2008 does not automatically place BUILTIN/Administrator into the sysadmin group, I had no obvious way in to reset the password and unlock the 'sa' account.

The solution was to start SQL using the '-m' flag, which places the instance in Single User. This allows anybody who is a local administrator on the server to connect with sysadmin rights.

Simple when you know how....


References:
http://msdn.microsoft.com/en-us/library/dd207004.aspx

No comments:

Post a Comment

Please leave a comment.