SQL: List Database Connections for specific user

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Want to list all connections to a database for a specific user? go read on.. Logo_Ms_SQL


Code (SQL Statement) starts here

select *
from master..sysprocesses
where loginame = ‘connexin.cim’ –and hostname=’COMPUTERNAME’
order by hostname

Code (SQL Statement) ends here

if you want to drop connections to a specific database, check this post

No Management Studio installed? Just use osql.exe to connect to the database server.. here’s an example ‘how to connect to Microsoft SQL using osql.exe’

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.