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.
Author |
Topic |
sqljnp3
Starting Member
2 Posts |
Posted - 2011-10-17 : 10:25:05
|
Hello,I am new to SQL Server Programming. I am trying to figure out a way to track user logins to a SQL Database Application for a given period. The server is running SQL Server 2005 SP 3 and each user has an account to the application.Any help would be greatly appreciated.Thank you. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-17 : 10:40:14
|
have a look at LOGON triggershttp://msdn.microsoft.com/en-us/library/bb326598(v=SQL.90).aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
paultech
Yak Posting Veteran
79 Posts |
|
sqljnp3
Starting Member
2 Posts |
Posted - 2011-10-17 : 12:08:12
|
Thank you both for your quick replies.Paultech - It looks like I would have to set up Auditing on SQL Server Management Studio before I can specify the "lgnstats_trace" file below.However, Auditing does seem available on SQL 2005, while it is available on SQL 2008.-- Find @lastSuccessNewSELECT TOP(1) @lastSuccessNew = StartTime FROM #lgnstats_trace WHERE … LoginName = @login AND EventClass = 14 ORDER BY StartTime DESC |
|
|
|
|
|