dbTalk Databases Forums  

how to trace a given t-sql-statement?

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss how to trace a given t-sql-statement? in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fritz Theiss
 
Posts: n/a

Default how to trace a given t-sql-statement? - 11-13-2008 , 01:40 PM






hi,

in order to troubleshoot a given scenario i have to find out, which stored
procedure, etc. is firing as a specific piece of t-sql code (which has been
written by different people). how can i figure this out? i am aware of sql
profiler, but in case this is the right tool, what to to do in detail/which
event is to monitor and how can i trace only, if the given t-sql statement
is fired assuming tons of t-sqls are fired a day?

or - if sql profiler is the wrong tool - here, how to proceed instead?

--
thanks in advance / danke im voraus - fritz

Fritz Theiss


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM






Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #5  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #6  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #7  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #8  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #9  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #10  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: how to trace a given t-sql-statement? - 11-13-2008 , 05:15 PM



Fritz Theiss (fritz (AT) anywhere (DOT) com) writes:
Quote:
in order to troubleshoot a given scenario i have to find out, which
stored procedure, etc. is firing as a specific piece of t-sql code
(which has been written by different people). how can i figure this out?
i am aware of sql profiler, but in case this is the right tool, what to
to do in detail/which event is to monitor and how can i trace only, if
the given t-sql statement is fired assuming tons of t-sqls are fired a
day?
You could set up a filter on TextData that includes some text from this
piece of code. Assuming that you know what code you are looking for
that is.

It could help if you describe you scenario in little more detail. Is this
T-SQL code a SELECT or an update action?


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.