Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Displaying Estimated Execution Plan for a Stored Procedure Expand / Collapse
Author
Message
Posted Wednesday, September 12, 2012 10:54 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, March 10, 2014 3:09 AM
Points: 121, Visits: 1,386

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?

Post #1358336
Posted Thursday, September 13, 2012 1:46 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 27, 2012 9:02 AM
Points: 114, 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?

Post #1358369
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse