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.
There may be a way to query this, but I don't know what that is. I capture login activity from SQL Profiler events.
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.
How to enable Connection Pooling with Doctrine PHP framework please ?, all the DB connections from the application are NonPooled and hence causing high PREEMPTIVE_OS wait stats. Any advice on it would be greatly appreciated. Thanks