SQL Server Profiler: Get stored procedure name
Asked Answered
H

2

6

I am running SQL Server Profiler (SQL Server 2008). Is there a way to see the name of the stored procedure that is executing? I am profiling SP:Started and SP:Completed. The TextData column hasn't been helpful as my stored procedures are encrypted so TextData displays "-- Encrypted text".

Profiler Screenshot

Halfpenny answered 18/5, 2016 at 16:2 Comment(0)
Z
9

Have you tried adding column ObjectName? This should show stored procedure names. I haven't worked with encrypted procedures, but I'd be very surprised if the names are also encrypted ('cause how could you call the proc if you didn't know the name?)

Zea answered 18/5, 2016 at 16:40 Comment(1)
Adding ObjectName works perfectly! Thank you. File > Properties > Events Selection tab > Show All Columns checkbox > check ObjectName next to SP:StartedHalfpenny
O
1

It is possible that the stored procedure is encrypted, try searching for text containing 'WITH ENCRYPTION' in your db.

Additionally, perhaps there is a point in which there's too much data being passed into the sp where SSP will not display the text.

Orthographize answered 18/5, 2016 at 16:17 Comment(1)
I know that the stored procedures are encrypted. Does that mean that the name is encrypted as well and I cannot see the name in the profiler? The goal I have is to find out which procedure is slow. I have stored procedures calling other stored procedures and I need to know which of the inner procedures is slow.Halfpenny

© 2022 - 2024 — McMap. All rights reserved.