Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How can I check the Login history in sql server . Expand / Collapse
Author
Message
Posted Friday, November 21, 2008 5:58 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 1, 2010 7:55 AM
Points: 4, Visits: 20
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
Post #606446
Posted Friday, November 21, 2008 7:17 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
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'

Post #606503
Posted Friday, November 21, 2008 7:25 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 12:55 PM
Points: 11,297, Visits: 13,083
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

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

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
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #606512
Posted Friday, November 21, 2008 8:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 1, 2010 7:55 AM
Points: 4, Visits: 20
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
Post #606605
Posted Friday, November 21, 2008 9:39 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
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/


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!!!
Post #606643
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse