The DAC (administrator-specific connection) is required when decrypting a stored procedure that is already encrypted. When an error occurs while connecting to the DAC, the following steps are described:
1. The following error occurred while connecting the DAC:
C:/> sqlcmd-a-S 10.0.0.211-u sa-p zxyz
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network interface: An error occurred while getting a dedicated administrator connection (DAC) port. Make sure that SQL browser is running, or
The user checks the error log for the port number [XFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client: An error occurred while establishing a connection to the server. Connect to
The fact that SQL Server does not allow remote connections while SQL Server 2005 may cause failure.
。
Sqlcmd: Error: Microsoft SQL Native Client: The logon timeout has expired.
2. According to the prompts, remote DAC is not enabled.
Actions are as follows: Open the SQL Server perimeter Application configurator, select the functional perimeter configurator, select DAC, and check the Enable remote DAC.
Or
Execute T-sql:
EXEC sys.sp_configure n ' remote admin connections ', n ' 1 '--enable
Reconfigure with OVERRIDE--installation
3. Reconnect the DAC with sqlcmd:
C:/> sqlcmd-a-S 10.0.0.211-u sa-p zxyz
1>--Prompt success
4. The connection with the query engine is also normal.
Open [Database Engine query],[server name] input admin:10.0.0.211, click [Options], select [Connection Properties],
In [Connect to database] Select the database you want to connect to, confirm it.