Connect to SQL Server When SA or Service Account Credentials not Available

Connect to SQL Server When SA Account or Service Account Credentials not Available :

I recently inherited the SQL Serer which was running under a user account who left the company and no one knows the password for sa account.

My task was to fix the SQL Server to use the Service Account Credentials. The problem I had is I can’t even connect to the SQL Server.

Even though I am Administrator on the Machine, I just don’t have the access to the SQL Server.

Started the SQL Server with “-m” as start up parameter and then I added myself to sysadmin and and then removed start up parameter “-m”

Start the instance of SQL Server in single-user mode by using either the -m or -f options. Any member of the computer’s local Administrators group can then connect to the instance of SQL Server as a member of the sysadmin fixed server role.

When you start an instance of SQL Server in single-user mode, first stop the SQL Server Agent service. Otherwise, SQL Server Agent might connect first and prevent you from connecting as a second user.

When you use the -m option with sqlcmd or SQL Server Management Studio, you can limit the connections to a specified client application. For example, -m”sqlcmd” limits connections to a single connection and that connection must identify itself as the sqlcmd client program. Use this option when you are starting SQL Server in single-user mode and an unknown client application is taking the only available connection. To connect through the Query Editor in Management Studio, use -m”Microsoft SQL Server Management Studio – Query”.

Do not use this option as a security feature. The client application provides the client application name, and can provide a false name as part of the connection string.

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

You may also like...

Leave a Reply

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