1. Open the Configuration Manager tool from the „SQL Server 2005| Configuration“ menu

2. Stop the SQL Server Instance you need to recover

3. Navigate to the “Advanced” tab, and in the Properties text box add “;–m” to the end of the list in the “Startup parameters” option

4. Click the “OK” button and restart the SQL Server Instance

NOTE: make sure there is no space between “;” and “-m”, the registry parameter parser is sensitive to such typos. You should see an entry in the SQL Server ERRORLOG file that says “SQL Server started in single-user mode.”

5. After the SQL Server Instance starts in single-user mode, the Windows Administrator account is able to connect to SQL Server using the sqlcmd utility using Windows authentication. You can use Transact-SQL commands such as „sp_addsrvrolemember“ to add an existing login (or a newly created one) to the sysadmin server role.
The following example adds the account „Buck“ in the „CONTOSO“ domain to the SQL Server „sysadmin“ role:

EXEC sp_addsrvrolemember ‚CONTOSO\Buck‘, ‚sysadmin‘;
GO

6. Once the sysadmin access has been recovered, remove the “;-m” from the startup parameters using the Configuration Manager and restart the SQL Server Instance

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • LinkedIn
  • Twitter
 

Leave a Reply

WordPress主题

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

WordPress Themes