November 21, 2008 at 5:58 am
Hi all,
I'm new in SQL server admin. Please show me how to check the history login for user because I have get the list of inactive or active users. I have the DB_owner role.
Thanks,
tigon
November 21, 2008 at 7:17 am
Hi,
What is it you are exactly looking for ?
you cna use this to get a list of users:
SELECT * FROM sys.database_principals
WHERE TYPE='S'
November 21, 2008 at 7:25 am
P_DBA (11/21/2008)
Hi,What is it you are exactly looking for ?
you cna use this to get a list of users:
SELECT * FROM sys.database_principals
WHERE TYPE='S'
THis query won't work unless you have 2005 or 2008.
In 2000 I don't know of a way to tell if or when a login was used. IN 2005 the default trace has that information.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
November 21, 2008 at 8:59 am
Thank you very much for help. I mean that I want to check when is the last time the user login so I can get the set for inactive or active.
Thanks,
tigonyeu
November 21, 2008 at 9:39 am
Hi,
I think you are situation is something like this if you are using SQL 2005 or 2008....
http://www.sqlservercentral.com/articles/SQL+Server+2005/64547/%5B/u%5D
As Jack said the default trace is a valuable tool for DBA's. It minimally impacts the system performance and will give you information about auditing events, database events and any errors....this is an awesome article by Adam Haines....
Please go through the above article....
cheers!!!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply