April 15, 2011 at 10:53 am
I was wondering if there is some tool which could provide me same data as sql profiler does. The goal is to not touch production system for analysis instead copy the database and run the tool to capture the sql which happened since each and every action is recorded in the log file? Is that possible?
April 15, 2011 at 11:44 am
You have three options, all of them require you to run something on the production server.
You can set up a server side trace, which works just fine and as long as you output to a file and capture a reasonable set of events & columns doesn't cause any issues. As a matter of fact, this is my first choice in most situations.
You can set up to capture extended events. It's a bit of work to set up, but you get more control and flexibility than you do with a trace, but it still has to run against the server.
You can use dynamic management views to capture what's in cache on an ongoing basis. This can be problematic because it won't capture everything, but it can capture most things.
Those are basically your choices.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 9, 2017 at 1:15 pm
https://github.com/harvey007y/IdealSqlTracer is a free open source alternative to SQL Profiler. IdealSqlTracer uses sp_trace_create, sp_trace_filter, sp_trace_setstatus to create custom traces that can eliminate a lot of noise. The SQL that is generated behind each action is beautifully formatted and placed into notepad so it can be easily copied to SSMS.
July 9, 2017 at 1:50 pm
harvey007 - Sunday, July 9, 2017 1:15 PMhttps://github.com/harvey007y/IdealSqlTracer is a free open source alternative to SQL Profiler. IdealSqlTracer uses sp_trace_create, sp_trace_filter, sp_trace_setstatus to create custom traces that can eliminate a lot of noise. The SQL that is generated behind each action is beautifully formatted and placed into notepad so it can be easily copied to SSMS.
Please note: 6 year old thread.
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
July 10, 2017 at 7:27 am
GilaMonster - Sunday, July 9, 2017 1:50 PMharvey007 - Sunday, July 9, 2017 1:15 PMhttps://github.com/harvey007y/IdealSqlTracer is a free open source alternative to SQL Profiler. IdealSqlTracer uses sp_trace_create, sp_trace_filter, sp_trace_setstatus to create custom traces that can eliminate a lot of noise. The SQL that is generated behind each action is beautifully formatted and placed into notepad so it can be easily copied to SSMS.Please note: 6 year old thread.
Not sure the age of a thread matters here. Even though the OP may be long gone and no longer "listening", others that find the thread can benefit from even ages old threads.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply