Locked out of MSSQL 2008

Have you lost administration control of your MSSQL 2008?

I lost control of my MSSQL 2008, unable to create new databases and change server settings… pretty annoying.

I think it happened because I upgraded from SQL Express 2005 to 2008. 

Well if you have the same problems, then you can either uninstall and then install the SQL Server 2008 again… or you can do as me :)

Before you start, make sure the current user is member of the administrators group.

  1. Shutdown the SQL server service, agent service, browser service etc.
  2. Open a Command prompt
  3. Navigate to the SQL 2008 installation directory. E.g.:
    "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn"
  4. Run "sqlservr -m -sSQLEXPRESS" (SQLEXPRESS should be the name of your instance)
  5. The SQL server should now be started in "Single User admin mode".
  6. Open "SQL Server Management Studio", remember, if you use Vista, to run as administrator.
  7. Open your instance and change your user to sysadmin.
  8. Close "SQL Server Management Studio"
  9. Goto the command prompt and shut down the SQL server instance (press CTRL-C, I think)
  10. Start the SQL service again

 

You should now be able to create databases again.

 

About Mikkel Ovesen

I am a .NET developer, primarily developing apps for the web. I have been working with ASP.NET and C# for more than 5 years, and web development for 10 years. I like open-source software and burgers ;)
This entry was posted in Software and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>