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
 General SQL Server Forums
 New to SQL Server Programming
 how can we find the login user role

Author  Topic 

boreddy
Posting Yak Master

172 Posts

Posted - 2009-03-12 : 09:10:50
In my database i have many users i want to find only the the user and that user role
how can we find the whether the user is logged in or not
if we find the login user we can get the that user role

thanks in advance

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-12 : 10:34:22
exec sp_who2 and exec sp_who will show connected users.
Your other question shows roles
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=121516
Do you need to join these 2 or is a manual check between the 2 enough?
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-12 : 10:35:57
You can also create a sp_who3 to give greater filtering:
http://www.sqlservercentral.com/scripts/Miscellaneous/31109/
Go to Top of Page

boreddy
Posting Yak Master

172 Posts

Posted - 2009-03-12 : 10:43:20
here my question is
how can we fined users and roles who are connected to sql server instance(in both sql and windows Authentication modes)
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-12 : 12:32:54
quote:
Originally posted by darkdusky

exec sp_who2 and exec sp_who will show connected users.
Your other question shows roles
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=121516
Do you need to join these 2 or is a manual check between the 2 enough?



This is the answer to your question
Go to Top of Page
   

- Advertisement -