今天突然发现,sqlserver服务器 远程桌面连不上了,但是数据库都能正常连接,记得是上次更改了远程桌面的端口,但是防火墙上没有开启规则。
现在通过数据库用户解决方法如下:作为备忘
--开启xp_cmdshell --SQL Server blocked access to procedure 'xp_cmdshell' exec sp_configure 'show advanced options', 1 go reconfigure go exec sp_configure 'xp_cmdshell', 1 go reconfigure go exec xp_cmdshell 'netsh advfirewall firewall add rule name="1234" protocol=TCP dir=in localport=1234 action=allow' exec xp_cmdshell 'netsh advfirewall firewall delete rule name="1234"'