顯示錯誤如
出現這樣的問題還真麻煩,跑機房光手續都要兩三天才能搞好.還好公司一直保留有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,搞定,又可以遠程桌面了.
新聞熱點
疑難解答