Sql-server – way to see the access log of a table

sql serversql-server-2008

I am using MS SQL Server 2008. I have a table in a database, in which records are being inserted and deleted.

E.g.

Initially the table is empty. A Java program (probably) inserts few records in it. Another Java program quickly access the table and deletes the records (All the records which were inserted). And then I manually run a select query on the table. So basically I can see only the "initial" and final state of the table, both of in which the table is empty.

I need to know that is there a way by which I can see those records, or at least check if something is being inserted/deleted?

Any help is appreciated.

Best Answer

You need to be granted the necessary permissions on the table that contains the audits. The minimum for you to achieve what you want is you need to be granted SELECT on that table.

As far as check if something is being inserted/deleted, you could always create a trace with SQL Profiler. At the same token though, you need ALTER TRACE permissions on the server, and if you don't have the former SELECT permission I doubt you have ALTER TRACE.