patternsqlMinor
Is there a way to see the access log of a table?
Viewed 0 times
thelogtablewayseethereaccess
Problem
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
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.
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.
Solution
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
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
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.Context
StackExchange Database Administrators Q#8618, answer score: 5
Revisions (0)
No revisions yet.