July 22, 2008 at 3:26 am
Hi All
is there maybe a script in SQL to check how many times a day a login access a database?
Thanks
A
July 23, 2008 at 8:05 am
Hi,
If your goal is to track which account is logging in, a good start would be to enable auditing within SQL Server. This would allow you to see the login events in the Windows event viewer. See this article from Brian Kelley: http://www.sqlservercentral.com/articles/Security/sqlserverauditingpart1/1451/
You could also run a trace to track login activity and store the output in a log file. This may be easier to look at and search. But it's a bit more manual - it requires starting/stopping the trace.
Herve Roggero
hroggero@pynlogic.com
MCDBA, MCSE, MCSD
SQL Server Database Proxy/Firewall and Auditing
July 23, 2008 at 8:08 am
Herve has the only real solutions. This isn't tracked by default, so if you haven't enabled anything, you cannot go back in time.
July 25, 2008 at 2:28 am
I think there is no such script, bu tyou can create the DDL trigger on database to track the records
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply