Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

SQL Server Browser & DAC Expand / Collapse
Author
Message
Posted Tuesday, June 12, 2012 10:43 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:23 AM
Points: 1,410, Visits: 1,821
Comments posted to this topic are about the item SQL Server Browser & DAC

Thanks & Regards,
Nakul Vachhrajani.
http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Post #1314849
Posted Tuesday, June 12, 2012 11:56 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:41 AM
Points: 13,537, Visits: 10,405
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1314860
Posted Wednesday, June 13, 2012 12:08 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:23 AM
Points: 1,410, Visits: 1,821
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://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Post #1314863
Posted Wednesday, June 13, 2012 12:21 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:41 AM
Points: 13,537, Visits: 10,405
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1314866
Posted Wednesday, June 13, 2012 12:32 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:23 AM
Points: 1,410, Visits: 1,821
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://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx
Be courteous. Drive responsibly.

Follow me on
Twitter: @sqltwins
Google Plus: +Nakul
Post #1314874
Posted Wednesday, June 13, 2012 12:51 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 1:19 AM
Points: 728, Visits: 774
Couldn't the administrator initiate the DAC with a specific port number?

Edit: agree with the earlier comments from Koen good question
Post #1314881
Posted Wednesday, June 13, 2012 1:00 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:41 AM
Points: 13,537, Visits: 10,405
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

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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1314888
Posted Wednesday, June 13, 2012 1:10 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 1:19 AM
Points: 728, Visits: 774
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

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
Post #1314892
Posted Wednesday, June 13, 2012 1:39 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 8:10 AM
Points: 3,901, Visits: 5,068
Good question, thanks Nakul.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1314905
Posted Wednesday, June 13, 2012 1:55 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 25, 2014 3:40 AM
Points: 1,609, Visits: 242
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
Post #1314912
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse