TFP is used for daily project updates in the company, and Remote Desktop Management is generally used for server maintenance. Therefore, you often log on to the server. However, for some reason, after logging on to the server, the account is not logged out in time, as a result, you cannot log on to the server,
Display Error as shown in
It is really troublesome to have such a problem. It takes two or three days to complete the data center optical procedures. Fortunately, the company has always kept its Sa account,
This is easy to do. Simply use SQL to log out of a Windows login user.
First open xp_cmdshell
-- Run XP_CMDSHELL to enable xp_cmdshell.
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
RECONFIGURE
EXEC sp_configure 'xp _ Your shell', 1
RECONFIGURE WITH OVERRIDE
RECONFIGURE
View logged-on users in Windows
EXEC xp_query shell 'query user'
Log out of the Administrator user whose Id is 2
EXEC xp_mongoshell 'logoff 2'
-- Disable xp_cmdshell
EXEC sp_configure 'xp _ Your shell', 0
RECONFIGURE WITH OVERRIDE
RECONFIGURE
EXEC sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
RECONFIGURE
OK. You can get the Remote Desktop again.