Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Introduction to Profiler


Introduction to Profiler

Author
Message
Jack Corbett
  Jack Corbett
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

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



Jack Corbett

Applications Developer

Don't 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 Question
How 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
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 2214
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
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1764 Visits: 3041
Thanks Jack, great introduction to Profiler. Looking forward to the next installment.
john.w.walker
john.w.walker
SSC Journeyman
SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)

Group: General Forum Members
Points: 93 Visits: 45
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
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 121
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
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12780 Visits: 14863
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

Applications Developer

Don't 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 Question
How 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
Say Hey Kid
Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)Say Hey Kid (687 reputation)

Group: General Forum Members
Points: 687 Visits: 4471
Profiler is great when tracking down problems with Service Broker.
john.w.walker
john.w.walker
SSC Journeyman
SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)

Group: General Forum Members
Points: 93 Visits: 45
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 Journeyman
SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)SSC Journeyman (93 reputation)

Group: General Forum Members
Points: 93 Visits: 45
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
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12780 Visits: 14863
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

Applications Developer

Don't 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 Question
How 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