Hi,
Is there a way that I can capture user access to a specific database, into a table perhaps. I'm just looking to record date and time of login and which database is accessed.;
Any help would be appreciated.
Thanks
Hi,
Is there a way that I can capture user access to a specific database, into a table perhaps. I'm just looking to record date and time of login and which database is accessed.;
Any help would be appreciated.
Thanks
Depending on what version of SQL Server you are using you can use an Audit to track this information. You can also use extended events to watch for locks on the database. If there's a lock then they touched the database. If you want specific tables, using an Audit is probably better suited here.
I believe you can do database level login triggers even in the standard edition.
18 People are following this question.