How to Connect to an Unresponsive SQL Server Instance

How to Connect to an Unresponsive SQL Server Instance

How to Connect to an Unresponsive SQL Server Instance
How to Connect to an Unresponsive SQL Server Instance

 

There could also be instances when SQL Server stops responding to shopper connections however it’s nonetheless up. This generally is a irritating expertise, and the primary impulse is to bounce SQL Server and / or reboot the server itself. Whereas this may increasingly cease the symptom, this motion is not going to inform you something that will help you forestall the trigger.

For instance, let’s say that you simply arrive on Tuesday morning to find an unresponsive database. The earlier evening, your builders added new code to the applying servers. Coincidence or trigger? With no strategy to see what SQL Server is doing, you’ll by no means know. Enter the Direct Admin Connection …

Since SQL Server 2005, SQL Server has the Direct Admin Connection (DAC) to permit a again door for simply this kind of situation. On the server itself (no community connections with out the distant admins possibility was beforehand configured), a single login that may be a member of the sysadmin group that may hook up with SQL Server through a DAC so as to get an thought of ​​what is going on and have a chance to appropriate the problem. There are two strategies to connect with SQL Server with a DAC.

DAC Technique 1

The primary technique makes use of SQLCMD. On the server, open a command immediate and enter:

sqlcmd -S localhost -U sa -P password -d grasp -A

You could substitute the sa login (the -U parameter, getting into the password after -P) with one other login that may be a member of the sysadmin group.The parameter -A establishes the DAC, whereas the -d grasp parameter tells SQLCMD to make use of the grasp database because the default for this session. The grasp database is assured to be out there as long as the occasion is operating, whereas different databases might not be out there.

DAC Technique 2

The second technique makes use of SSMS. Once more, on the server, open SSMS, then click on ‘File’ -> ‘New’ -> ‘Database Engine Question’. Within the dialog field that seems (titled ‘Hook up with Database Engine’), sort ‘ADMIN:’ in entrance of the identify of the server occasion. For example, to login through a DAC to occasion PROD BOULDER, you’ll sort ‘ADMIN: PROD BOULDER’, then enter the remaining authentication info (remembering to make use of a login with the sysadmin position), and click on ‘Join’.

Keep in mind, neither of the above will succeed if the login you’re utilizing is just not a member of the sysadmin group or if there may be one other DAC already linked to the occasion.

As soon as linked with both technique, you possibly can run queries to find out the reason for the lock-up. I want technique # 2 above (utilizing SSMS), as I can shortly entry my commonplace set of queries saved on the server and / or copy and paste them from my native machine to the server through my RDP session.
How to Connect to an Unresponsive SQL Server Instance How to Connect to an Unresponsive SQL Server Instance Reviewed by Aam Admi Party Selu on 07:41 Rating: 5

2 comments:

Powered by Blogger.