Tuesday, 5 February 2013

How to connect the sql server through Dedicated Admin Connection and which situation we connect the sql through DAC...?


How to: Use the Dedicated Administrator Connection with SQL Server Management Studio

Microsoft SQL Server provides a dedicated administrator connection (DAC). The DAC allows an administrator to access a running instance of SQL Server Database Engine to troubleshoot problems on the server—even when the server is unresponsive to other client connections. The DAC is available through the sqlcmd utility and SQL Server Management Studio. The connection is only allowed from a client running on the server. No network connections are permitted.

To use SQL Server Management Studio with the DAC, connect to an instance of the SQL Server Database Engine with Query Editor by typing ADMIN: before the server name. Object Explorer cannot connect using the DAC.

To connect to a server using the DAC

  1. In SQL Server Management Studio, with no other DACs open, on the toolbar, click Database Engine Query.
  2. In the Connect to Database Engine dialog box, in the Server name box, type ADMIN: followed by the name of the server instance. For example, to connect to a server instance named ACCT\PAYABLE, type ADMIN:ACCT\PAYABLE.
  3. Complete the Authentication section, providing credentials for a member of the sysadmin group, and then click Connect.

The connection is made.

If the DAC is already in use, the connection will fail with an error indicating it cannot connect.

When the sql server is unresponsive:

The following are the situations

1)      When the long running queries are running and assume these queries are utilizing the all available works threads…means there is no work thread for new query and new connection…this time the sql server is in unresponsive stats…

When the works threads are available the sql server accepts the new connection…

In this situation we can connect the sql server through DAC and kill the unimportant long running queries and free the works threads…

2)      Assume we didn’t set the minimum and maximum sql server memory…in this situations the sql server have the chance to utilizing all available memory… as per the mechanism the sql server release the unused memory to the os when the os requests…but in the following combination of the os and sql server it won't release the unused memory to windows(os)…

2005 sql server running on the window server 2003…the sql server won’t release the occupied memory to window when it’s request for some memory…in this situation the windows forcefully get the memory from the sql server…in this position the sql server won’t accept the new connection…

In the above situation we need to restart the sql server or connect the sql server through DAC and configure the min and max memory to the sql server…
NOTE: I gather above information from multiple internet links...

J HAPPY LEARING J

No comments:

Post a Comment