Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I tell if a user is already logged into SQL 2000

Status
Not open for further replies.

keithinuk

Technical User
May 14, 2002
56
GB
Hello
I'm trying to find out if a user is already logged into SQL 2000 from another, or the same, terminal when they attempt to login. My application will allow specific users multiple logins.
I've browsed SP_ and books online but can't find anything specific.
Any ideas please ????
Thanks
Keith In case I forget to say "Thank you" I'll say it now - thank you for your help !!!
 
Hi,

have u tried

sp_who 'username'---information about a single current user by login name

this will give all active proceses
EXEC sp_who 'active'
hope it helps

Sunil
 
Hi Sunil
Thanks for the fast response.
I was just about to post a bit of extra information.
I can't use stored procedures (I know it sounds stupid) because my application has to be DBMS independant.
I looked at sp_who and saw that it accessed 'master'. Would I be able to use the relevant sql syntax from the sp_ in my application ???
Would I have to specifically open 'master' or am I right in assuming it will already be open as a result of logging in ???
I'm using VB.net as my development tool.
Thanks again !!!!!!!!
Keith In case I forget to say "Thank you" I'll say it now - thank you for your help !!!
 

Hi,

u should be able to use the SQL in sp_who from Vb.Net using ADO..... u should be able to execute the SP sp_who from Vb.Net using command objects......


hope it helps

Sunil







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top