env: all SQL Server
Dedicated Administrator Connection (DAC) : 管理員專用連線
1.預設只偵聽127.0.0.1上的1434埠
2.sqlcmd連接
command:請自行替換"ServerName"
SQLCMD -E -S ServerName -A
3.使用SSMS
在 ServerName輸入"admin:ServerName\InstanceName"
DAC連線錯誤:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)
原因: 因為DAC允許一個連線,當下可能已經有其他連線。此錯誤也可以從SQL Server Errorlog看到。
開啟遠端DAC:
sp_configure 'remote admin connections', 1;
GO
RECONFIGURE;
GO
沒有留言:
張貼留言