SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Displaying Estimated Execution Plan for a Stored Procedure


Displaying Estimated Execution Plan for a Stored Procedure

Author
Message
MuraliKrishnan1980
MuraliKrishnan1980
SSC Veteran
SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)

Group: General Forum Members
Points: 211 Visits: 1409

Hi Friends,

I am in the process of fine tuning a stored procedure and hence I am trying to view the estimated execution plan for a stored procedure. However, when I select the Stored Procedure Name and select the option Display Estimated Execution Plan in SSMS I am getting the error message as mentioend below.

Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option.

Can someone please let me know the reason why this error is generated. This is the first time I am trying to view the execution plan for the stored procedure. Is this the right way to view the execution plan for an SP?


t.brown 89142
t.brown 89142
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 140
Yes that is the right way to get the estimated execution plan.

Some suggestions.

Can you display execution plans for other stored procs?

Also try getting the entire text of the stored proc into an SSMS window,
delete the create proc line
add 'DECLARE' for each parameter, and delete the 'AS'
then highlight the code and display estimated execution plan. If you still get the failure try selecting the declares plus the first statement etc, breaking it down to see which statement is at fault.

Also - the obvious - is the proc calling any CLR procs or CLR UDFs?

And - does it work if you enable the clr?
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