今天突然发现,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"'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。