SQL Server - Number of Insert,Update and Select happened in a database within 24 hours
Asked By santhosh on 15-Oct-12 03:36 AM
Kindly provide me a query to find the number of Insert,Update and Select happened in a database within 24 hours
Thanks in Advance,
Santhosh
Robbe Morris replied to santhosh on 15-Oct-12 09:26 AM
No such audit trail is kept for you. You'd need to create a schema and manage all of this yourself. That said, all of this is kept in the Log file but I'm not aware of a native SQL access to it. You may need to purchase a SQL Log reader from a third party.
Venkat K replied to santhosh on 15-Oct-12 01:44 PM
You can use the CDC (Change Data Capture) feature in SQL Server 2008, or you need to write a trigger wherein you can maintain the code a table which increments the value everytime you do a DML operations.