Tuesday, July 10, 2007

Using SQL Server 2005's Dedicated Administrator Connection (DAC)

Ramblings of a SQL SERVER DBA - What's DAC?

"In the past there have been many instances where the SQL Server (database engine) has become unresponsive which could result in users / administrators not being able to connect to the server to troubleshoot issues etc.  SQL 2005 has a new feature called " Dedicated Administrator Connection (DAC)". 

...

A DAC connection is created in 2 ways

a. SQLCMD utility or

b. Using SSMS (SQL Server Management Studio)

you must use the -A switch when using SQLCMD

E.g.

D:\> SQLCMD  -S <servername> -E (to use your NT authentication) or -U<usrname> -P <password> -A

..."

I want to remember this... There have been times in the past (on older SQL Server versions) where this could have come in handy.

It's very easy to use, which is nice...

3 comments:

Maykon said...

Hello,
I'm try connect with sqlcmd in admin mode "A" but not possible.
I'm runnig SQL Express.
Error:
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: An error occurred while obtaining the dedicated administ
rator connection (DAC) port. Make sure that SQL Browser is running, or check the
error log for the port number [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
-
Obs: DAC is enable and SQL Browser is running.
Thanks.

Greg said...

Maybe this?
http://support.microsoft.com/?kbid=914277&SD=tech

If not, Bing/google with the error messages. Seems like there's a number of possible solutions....

Maykon said...

Thanks Greg,
Windows firewall is not active;
Remote connections is allow on SQL Surface Area;
but is not solutions.