Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql profiler

Author  Topic 

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-08-20 : 16:30:30
sql profiler. how do you find what stored procedure it is when u see a statement on textdata column? anyway to find out the stored procedure?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 16:32:52
Add ObjectName column to your trace.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-08-20 : 16:36:45
objectname says null
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 16:40:07
Try ObjectId.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 16:41:50
Oh wait, tell us what events you are tracing.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-08-20 : 16:44:17
all the events. I used the template tsql_sps
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 16:50:46
If they are null, then you aren't looking at a query in a stored procedure. Take a look at the ones with "eventclass = 44". I typically run a trace with only the completed ones in it rather than the starting ones like in yours.

I've been tracing a few hours today with RPC:Completed and SP:StmtCompleted. For me, I'd use "eventclass = 10" for the stored procedure level and then "eventclass = 45" for the statements inside.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-08-20 : 17:06:08
what do they hgave to do with finding what the stored procedure is called?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-20 : 17:10:32
Because ObjectName column should have a value for it "WHERE eventclass = 44".

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-21 : 17:35:49
You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -