葡京赌场 ag001,德国19号,案例
公司日常项目更新使用tfp,服务器一般维护用远程桌面管理,所以经常登录到服务器, 但有时由于某种原因,登录到服务器后,帐号没有及时注销,致使后面无法登录到服务器,显示错误如
出现这样的问题还真麻烦,跑机房光手续都要两三天才能搞好.还好公司一直保留有sa帐号,
这就好办了,用sql注销一个windows登录用户即可.
首先打开xp_cmdshell
--执行xp_cmdshell要开启xp_cmdshell
exec sp_configure 'show advanced options', 1
reconfigure with override
reconfigure
exec sp_configure 'xp_cmdshell', 1
reconfigure with override
reconfigure
查看当前windows已登录用户
exec xp_cmdshell 'query user'
注销id为2的administrator用户
exec xp_cmdshell 'logoff 2'
--关闭xp_cmdshell
exec sp_configure 'xp_cmdshell', 0
reconfigure with override
reconfigure
exec sp_configure 'show advanced options', 0
reconfigure with override
reconfigure
ok,搞定,又可以远程桌面了.
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
数据库SQL---数据库、基本表、视图、索引的定义、修改、删除
在 Azure CentOS VM 中配置 SQL Server 2019 AG - (上)
在 Azure CentOS VM 中配置 SQL Server 2019 AG - (下)
网友评论