顯示錯(cuò)誤如
出現(xiàn)這樣的問題還真麻煩,跑機(jī)房光手續(xù)都要兩三天才能搞好.還好公司一直保留有Sa帳號(hào),
這就好辦了,用SQL注銷一個(gè)Windows登錄用戶即可.
首先打開xp_cmdshell
--執(zhí)行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
查看當(dāng)前Windows已登錄用戶
EXEC xp_cmdshell 'query user'
注銷Id為2的Administrator用戶
EXEC xp_cmdshell 'logoff 2'
--關(guān)閉xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 0
RECONFIGURE WITH OVERRIDE
RECONFIGURE
EXEC sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
RECONFIGURE
Ok,搞定,又可以遠(yuǎn)程桌面了.
新聞熱點(diǎn)
疑難解答
圖片精選