Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to find active users in database

Author  Topic 

hkurniawan
Starting Member

1 Post

Posted - 2008-12-21 : 21:07:48
Dear all,

Can somebody tell me how to write script to find an active user who accessing the database?

I have this issue :

My database at 8 AM to 10 AM only allowed to be accessed by some user, so i need some scipt to find if there are any other user who accessing my database in that time period, so i can kill that users session.

Thanks for your attention.

sanjnep
Posting Yak Master

191 Posts

Posted - 2008-12-21 : 21:56:43
USE master

sp_who2 'active'

Sanjeev Shrestha
12/17/1971
Go to Top of Page
   

- Advertisement -