SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server Browser & DAC


SQL Server Browser & DAC

Author
Message
Nakul Vachhrajani
Nakul Vachhrajani
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2282 Visits: 2145
Comments posted to this topic are about the item SQL Server Browser & DAC

Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27659 Visits: 13268
Nice question.

The MSDN article Using a Dedicated Administrator Connection says the following:

SQL Server listens for the DAC on TCP port 1434 if available or a TCP port dynamically assigned upon Database Engine startup.


and

The DAC port is assigned dynamically by SQL Server during startup.


Which makes me assume that the DAC port is another port than the SQL Server port? Or am I reading this wrong?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Nakul Vachhrajani
Nakul Vachhrajani
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2282 Visits: 2145
Koen Verbeeck (6/12/2012)
Nice question.

The MSDN article Using a Dedicated Administrator Connection says the following:

SQL Server listens for the DAC on TCP port 1434 if available or a TCP port dynamically assigned upon Database Engine startup.


and

The DAC port is assigned dynamically by SQL Server during startup.


Which makes me assume that the DAC port is another port than the SQL Server port? Or am I reading this wrong?


You are correct. The DAC port is different than the SQL Server port. (Default values for SQL Server port = 1433, whereas that for the DAC is 1434). However, the SQL Server instance determines the DAC port at startup, and it can be different from 1434 even for a default installation.

Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27659 Visits: 13268
So it can be different, but there is no indication that it will be?
So there is a chance DAC will succeed for the default instance as it tries port 1434 first before consulting the SQL Server Browser?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Nakul Vachhrajani
Nakul Vachhrajani
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2282 Visits: 2145
Koen Verbeeck (6/13/2012)
So it can be different, but there is no indication that it will be?
So there is a chance DAC will succeed for the default instance as it tries port 1434 first before consulting the SQL Server Browser?


No, because the SQL Server instance only application that knows what the DAC port is. Because hiding the instance through the browser (or turning the browser off) will result in the client tools not being able to connect to the SQL Server, the DAC port cannot be fetched. Because the DAC port cannot be fetched, it cannot be connected to.

It's more like a chain reaction. Shutting down the Browser service causes the instance on a non-default port to be non-discoverable and therefore the DAC cannot be used for administrator connections.

Great line of thought, by the way. In fact, that was what prompted me to write up the QotD in the first place.

Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
heymiky
heymiky
SSC Eights!
SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)

Group: General Forum Members
Points: 921 Visits: 845
Couldn't the administrator initiate the DAC with a specific port number?

Edit: agree with the earlier comments from Koen good question
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27659 Visits: 13268
SQLDBA360 (6/13/2012)
Couldn't the administrator initiate the DAC with a specific port number?

Edit: agree with the earlier comments from Koen good question


Good remark. The admin could have specified the non-default port and the connection would have succeeded. The question doesn't specify an explicit statement, so it's up to us to decide how good the admin is in his job :-D

If the question stated this as the statement the admin executed, the question would have been 100% correct as no port is specified:

sqlcmd -S myServer -U sa -P myPassword –A 




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
heymiky
heymiky
SSC Eights!
SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)SSC Eights! (921 reputation)

Group: General Forum Members
Points: 921 Visits: 845
Koen Verbeeck (6/13/2012)
SQLDBA360 (6/13/2012)
Couldn't the administrator initiate the DAC with a specific port number?

Edit: agree with the earlier comments from Koen good question


Good remark. The admin could have specified the non-default port and the connection would have succeeded. The question doesn't specify an explicit statement, so it's up to us to decide how good the admin is in his job :-D

If the question stated this as the statement the admin executed, the question would have been 100% correct as no port is specified:

sqlcmd -S myServer -U sa -P myPassword –A 



Also need to remember by default that you need to use the DAC on the local machine, remote connections are not enabled
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSCrazy Eights
SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)SSCrazy Eights (9K reputation)

Group: General Forum Members
Points: 9015 Visits: 7283
Good question, thanks Nakul.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
ako58
ako58
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2314 Visits: 392
The DAC port is assigned dynamically by SQL Server during startup. When connecting to the default instance, the DAC avoids using a SQL Server Resolution Protocol (SSRP) request to the SQL Server Browser Service when connecting. It first connects over TCP port 1434. If that fails, it makes an SSRP call to get the port. If SQL Server Browser is not listening for SSRP requests, the connection request returns an error. Refer to the error log to find the port number DAC is listening on. If SQL Server is configured to accept remote administration connections, the DAC must be initiated with an explicit port number:

sqlcmd –Stcp:<server>,<port>

The SQL Server error log lists the port number for the DAC, which is 1434 by default. If SQL Server is configured to accept local DAC connections only, connect using the loopback adapter using the following command:

sqlcmd –S127.0.0.1,1434
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search