Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / June 2005

Tip: Looking for answers? Try searching our database.

Last login

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
william.huang - 28 Jun 2005 07:11 GMT
Hello everybody!!
Do you know how to find out  the last login time for all acccounts  ?
please, to instruct for me.
thank you very much. :lol:
Hari Prasad - 28 Jun 2005 09:29 GMT
Hi,

SQL Server by default will not store the Last login time in any system
tables.

But you could go for any of the below 2 approaches to attain this:-

1. Enable the audit level for successful login and Faile Logins using
Enterprise manager ... SECURITY tab. This will put all the
  successful and failed logins to sql server in sql server error log. You
could open the log and identify the last login time.

2. Write a stored procedure and read the Master..sysprocesses table every 1
minute (use SQL Agent jobs)  and put it into a user defined table.
    Later you could read this table to identify the last login time..

Thanks
HARI
SQL Server MVP

> Hello everybody!!
> Do you know how to find out  the last login time for all acccounts  ?
> please, to instruct for me.
> thank you very much. :lol:
william.huang - 29 Jun 2005 04:26 GMT
thanks
the second one did help

"Hari Prasad" <hari_prasad_k@hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:OxxfTt7eFHA.3160@TK2MSFTNGP09.phx.gbl...
> Hi,
>
[quoted text clipped - 20 lines]
>> please, to instruct for me.
>> thank you very much. :lol:
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.