| Using Dedicated Admin Connection |
|
MS SQL Server 2005 provides new feature for DBAs - DAC or Dedicated Administrator Connection. This new type of connection can be used when sql server does not respond to standard connection. Even though SQL Server does everything to make DAC connection attempts successful this type of connection can also fail if SQL Server is completely screwed up. What is DACDAC is privileged connection type in SQL Server (starting from SQL Server 2005). SQL Server reserves special scheduller for this type of connection. Run the query
and notice scheduler with scheduler_id = 255. Its status is VISIBLE ONLINE (DAC). This is scheduler for DAC connection. There are some restrictions of DAC:
You should use DAC only to query dynamyc management views/functions (DMV), run basic DBCC commands and KILL abusive processes. How to use DACTo connect to the server with the name servername via SQL Server Management Studio (SSMS) using DAC you need only to write admin: prefix before server name in "Connect to Server" window in Server Name edit box Remember one thing connecting from SMSS using DAC: You cannot connect using DAC to a server using Object Browser pannel in yor SMSS becase only one dedicated admin connection is allowed but SMSS object explorer opens two. The only way to connect from SMSS using DAC is to press New Query button when there is no active connections in Object Browser panel. Otherwise you will get error Cannot connect to admin:servername. Another way to establish Dedicated Administrator Connection - via sqlcmd using -A parameter -A dedicated admin connection. For instance
When to use DACYou should use Dedicated Administrator Connection only in emergency cases. You should not everytime connect to the server via DAC just because you can use it. There are two major cases when you need use DAC:
How to enable or disable DACOnly local DAC is enabled by default. To enable Remote DAC connections you can use SQL Server Surface Area Configuration tool (Start->Programs->Microsoft SQL Server 2005->Configuration tools->SQL Server Surface Area Configuration) chose Surface are Configuration for Features and then mark Enable Remote DAC checkbox Since SQL Server Surface Area Configuration tool is gone in SQL Server 2008 you will need to run script
to enable remote DAC on your SQL Server 2008 instance.
Comments (0) |