Skip to content

Where’s my Showplan?

Isn’t that what we’re all asking in our own lives?

I know I am.

Yesterday I had a SQL Server 2005 connection running as SA and tried to get the Actual Execution plan for a stored procedure. The procedure should have returned a million rows, instead all I got was an empty result set. All the columns were there without the data, and the following message was in the output:

ERROR: 262 - SHOWPLAN permission denied in database 'secure'.

It turns out if the procedure has an ‘Execute As’ clause that user needs the SHOWPLAN permission. Which seems reasonable, but why did I get an empty result set? It gives the impression there is no data in the table.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*