OSQL Command utility to know the login detail | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

OSQL Command utility to know the login detail

when i try to remotly TS in to a server I get the mssg the no of connections exceeded in the server. I know only 2 persons are allowed to TS in to the box at a time.
Question – Is there any utility available which can tell me the detail like login who is using the box, whether the connection active etc?
You can use SP_WHO or SP_WHO2 from SQL server using OSQL session.
For tS session from command line run
‘query user’
, you’ll get a list of the users who are logged on to your server. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Terminal Services Manager – you’ll find it in Administrative tools of your server installation. Or, if you want to remotely manage a remote session from the command prompt have a look on google for
tsecmd
. The ‘query user’ that Satya mentioned is also a good idea I wouldn’t be sure on how to remotely log off a specific session. You can do these things though with Terminal Services Manager or
tsecmd
. Karl Grambow www.sqldbcontrol.com
There are loads of undocumented commands available on Technet about the Terminal Services, but you need to make sure to allow EM to connect rather than TS to logon remotely. Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
also if you’re using 2003, then you can use the /console switch of Remote Desktop to allow a 3rd connection to the server, and one which is always available for another person to log on to i.e it is last person to log onto the console session wins. Once on the server you can again use terminal services manager to see who else is on and kick them off if need be Cheers
Twan
]]>