SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL 2005 (Trace Template to capture all queries)


SQL 2005 (Trace Template to capture all queries)

Author
Message
balasach82
balasach82
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2163 Visits: 1085
What trace template (Standard, TSQL etc) can be used to capture all the queries in a server/db?
Shawn Melton
Shawn Melton
SSCertifiable
SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)SSCertifiable (6K reputation)

Group: General Forum Members
Points: 6003 Visits: 3537
The Standard Template should get you what you want. Although it is better practice to use a server-side trace for performance purposes.

Which is pretty easy to setup. Quick step is to:
1) Open Profiler
2) Select Standard Template
3) Click Run
4) Immediately Click Stop
5) File > Export > Script Trace Definition > SQL Server 2005...

Save the file and then you can open it up and take out the eventClass(s) that you don't care about. Check here for a list of those: http://msdn.microsoft.com/en-us/library/ms175481(SQL.90).aspx

This is a good SQL Tip to creating the trace as well: http://www.mssqltips.com/tip.asp?tip=1035

Shawn Melton
Twitter: @wsmelton
Blog: blog.wsmelton.info
free_mascot
free_mascot
SSCertifiable
SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)SSCertifiable (7.6K reputation)

Group: General Forum Members
Points: 7599 Visits: 2250
If you would like to capture all the actions on the instance refer "C2 Audit Mode Option".

HTH

---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
balasach82
balasach82
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2163 Visits: 1085
I had used the std template(with hostname included). When i ran sp_databases, the trace shows it as two records; one record with duration, starttime, endtime,Reads & CPU and another record has NULL for the same. Any idea to interpret it?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search