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


Introduction to Profiler


Introduction to Profiler

Author
Message
Jack Corbett
  Jack Corbett
SSC Guru
SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)

Group: General Forum Members
Points: 133940 Visits: 15070
Comments posted to this topic are about the item Introduction to Profiler



Jack Corbett
Consultant Straight Path Solutions
Dont let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a QuestionHow to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Ross McMicken
Ross McMicken
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2877 Visits: 2275
Profiler is probably the most valuable tool I use for troubleshooting, especially with vendor provided applications. With Profiler, I can frequenetly determine the cause of an nissue and the fix in just a few minutes, rather than trying to work with the vendor. One of our vendor apps builds SQL code from a library, and Profiler allows us to determine not only what code is executed, but also where teh code was stored.
WILLIAM MITCHELL
WILLIAM MITCHELL
SSCrazy Eights
SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)

Group: General Forum Members
Points: 9811 Visits: 3208
Thanks Jack, great introduction to Profiler. Looking forward to the next installment.
john.w.walker
john.w.walker
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 47
I have been doing SQL Server development for 8 years and have never gone far enough with profiler to run a trace. I read through the article and setup my first trace. I use ColdFusion as my application server so all events are execution of prepared SQL. How can I find the actual SQL, I thought it would be in Text Data?
raj more-489942
raj more-489942
Old Hand
Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)Old Hand (318 reputation)

Group: General Forum Members
Points: 318 Visits: 123
Great intro. I like it.

I have seen tools like Intuit (now Quest S/w) Coefficient that do a phenomenal job of analyzing the output of a trace and posting the results in an extremely easy to use format.

Can you post some useful trace templates that you use for Profiler 2008 and how to use them?

Also, how do you baseline a server using Profiler and how can this info be best used when something starts acting up.
Jack Corbett
  Jack Corbett
SSC Guru
SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)

Group: General Forum Members
Points: 133940 Visits: 15070
john.w.walker (4/16/2009)
I have been doing SQL Server development for 8 years and have never gone far enough with profiler to run a trace. I read through the article and setup my first trace. I use ColdFusion as my application server so all events are execution of prepared SQL. How can I find the actual SQL, I thought it would be in Text Data?


John,

What events are you including in your trace?



Jack Corbett
Consultant Straight Path Solutions
Dont let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a QuestionHow to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
j.a.c
j.a.c
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1655 Visits: 4534
Profiler is great when tracking down problems with Service Broker.
john.w.walker
john.w.walker
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 47
I am pretty much including all events because I don't know how to choose what I really need. But 99% of what I see is prepared SQL execution and I expected as much due to my application configuration which sends SQL via Data Direct drivers from Java to SQL Server. I se some slower SQL, but I want to know what the SQL statement is or I can't track it down.
john.w.walker
john.w.walker
SSC Veteran
SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)SSC Veteran (292 reputation)

Group: General Forum Members
Points: 292 Visits: 47
The events I am seeing that I want to see the SQL for are RPC Completed. Object is sp_prepexec or sp_execute.
Jack Corbett
  Jack Corbett
SSC Guru
SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)SSC Guru (133K reputation)

Group: General Forum Members
Points: 133940 Visits: 15070
John,

I think the issue is that, if you started with the Standard Template, the TextData column is NOT selected for the RPC:Completed event. If you go in and modify the properties of the trace and check the TextData column under the RPC:Completed event I believe you will see something like this in the TextData column:


declare @p1 int
set @p1=1
exec sp_prepexec @p1 output,N'@contact_id int',N'Select Count(*) as persons from Person.Contact Where contactid = @contact_id',@contact_id=541
select @p1



This is from a quickie .NET application where I used Command.Prepare() and queried the AdventureWorks DB.



Jack Corbett
Consultant Straight Path Solutions
Dont let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a QuestionHow to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
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