Trying to setup DAC for SQL 2017

  • Following Brent's Ozar's advice - I'm setting up the DAC login connector our sandbox.

    While attempting to connect via like this

    <CommandLine>sqlcmd -S <Server> -A
    I receive the following error:
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server..
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : TCP Provider: An existing connection was forcibly closed by the remote host.
    .
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Client unable to establish connection.
    Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Client unable to establish connection due to prelogin failure.

    Is the error from using the wrong version of  SQL to connect? I'm using the SQLCMD from 130 to connect to SQL 17.

    TIA,
    Doug

  • So the trick is to use your server's IP address, as well as the listening port.

    So for me, sqlcmd -S 127.0.0.1,1434 -E ( where 1434 is the default listening port - your mileage may vary ).

    Make sure there is no space between the IP address, the comma and the port or SQL will complain.

    Doug

  • Check out how can  you enable your DAC connection in SQL Server: 
    https://www.systoolsgroup.com/sql-decryptor/enable-dac-connection.html

  • DAC should work using the -A switch and a server name without having to specify an IP or Port #.

    Given the IP you've used is localhost, its possible you don't have remote DAC enabled, so you can only connect locally. Check sys.configurations for the option remote admin connections to see if remote DAC is enabled.

    Also check out the Microsoft Docs on DAC for some additional info on using the DAC.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply