April 15, 2011 at 4:15 am
Hi,
I have transactions logs for last 3 days. Is there any tool to analyse these logs to find out how many Insert/Delete/select statements were run during a particular time period?
Ryan
//All our dreams can come true, if we have the courage to pursue them//
April 15, 2011 at 4:27 am
There are log reader tools, like Apex SQLLog, but they are not cheap.
The transaction log is not designed as an audit log. If you will need this info going forward, triggers or traces (or CDC, change tracking, SQL Audit) are better tools
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 15, 2011 at 6:44 am
Hi Gail,
One of the user wants the select, insert and delete statement during certain period of time of one month back. We dont have the transaction logs backup and we are not tracking these things in any tables. Is there any way or DMVs to find out these things?
Ryan
//All our dreams can come true, if we have the courage to pursue them//
April 15, 2011 at 6:49 am
No, not with any degree of accuracy.
You can query the query_stats dmv, but that is dependant on the plans for the queries still being in cache, and after a month it's highly unlikely that every single query plan is still in cache.
Selects aren't in the tran log, so that's not an option.
If you need this information, you need to set up some way of capturing it. CDC, change tracking or triggers for insert, update, delete. For select as well it'll need to be a server-side trace (and a month-long statement trace will be absolutely HUGE).
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 15, 2011 at 7:09 am
Please don't post multiple threads for the same question. It just wastes people's time.
No more replies to this thread please. Direct replies to http://www.sqlservercentral.com/Forums/Topic1093936-391-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply