Managing Terminal Services Sessions Remotely

Sometimes there are already sessions on remote server which made you unable to TS to server. There is a way to remove inactive session and enable you to TS.

command:

 qwinsta /server:****

Where **** is the IP address or name of the non-accessible machine.

This will display something like this:

> qwinsta /server:****

To disconnect session I would type this:

rwinsta /server:**** 3

Notice the 3 which is the session ID

db is in restricted mode

last night, PM ask me to check an error message like this “An error has occurred in the **** Application. Error details:

System.Data.SqlClient.SqlException: Database ‘****’ is in restricted mode. Only the database owner and members of the dbcreator and sysadmin roles can access it.

So I fired up SQL Managment studio and saw all db under that server was marked as “restrcited to user”(something like that , not exactly I remember). AFter I check with team mate who is located in India, was told he was doing restoring work of one of db on the server. After restoring is done, he will put them back to normal.