December 23, 2008 at 12:41 am
Hi All,
Can you tell me the solution to find out the queries fired on SQL2005 database since 1 week/month. Can i get it from the .LDF files??
Thanks & Regards,
Sashikanta
December 23, 2008 at 1:02 am
Not without a trace running. (profiler/server-side)
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
December 23, 2008 at 2:38 am
Hi Gila,
But in Oracle there is a table which traces last 1000 queries fired on the same database. Can i get any kind of info from .LDF files
Thanks & Regard,
Sashikanta Mishra
December 23, 2008 at 4:43 am
sashikanta.mishra (12/23/2008)
But in Oracle there is a table which traces last 1000 queries fired on the same database.
That's Oracle.
Can i get any kind of info from .LDF files
You can get the data that was changed, not the exact queries that were run. Thing it, you're going to have to buy a log reader tool for that, and they're not cheap. Plus the tran log is not going to go back a month. Only to the last transaction log backup (in full or bulk logged recovery) or checkpoint (in simple)
You can get some of the queries from the plan cache (look ujp sys.dm_exec_query_stats), but that will be by no means a complete list (entries are discarded when the plan is removed from cache) and it's not a straightforward history.
Bottom line, if you want a log of queries run, use a server-side trace.
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
December 23, 2008 at 4:50 am
Hello Gail,
Nice to see your reply.
Thanks anyway.
Regards,
Sashikanta Mishra!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply