How to gather an Estimated Execution Plan for a Stored Procedure or Function in the SQL Server Management Studio

book

Article ID: 207484

calendar_today

Updated On:

Products

IT Management Suite IT Analytics

Issue/Introduction

How to gather an Estimated Execution Plan for a Stored Procedure or Function in the SQL Server Management Studio.

Environment

IT Management Suite 8.5

Microsoft SQL Server Management Suite.

Resolution

In the Microsoft SQL Server Management Studio (SSMS), go to the left panel and expand the Symantec_CMDB and then for the purposes of this document, expand Programmability>Stored Procedures, and choose the first stored procedure.

Right-click the Stored Procedure or Function of your choice (for the purposes of this document, we are looking at the first Stored Procedure). Choose Script Stored Procedure as>CREATE To>New Query Editor Windows. See image below.

 

You will then see the query appear in the right panel. 

Now click on the "Display Estimated Execution Plan" button (highlighted in orange in the image above). You will see the Estimated Execution Plan (highlighted in orange below).

Finally, right-click in blank space (highlighted in orange above). You will see a pop-up menu as shown in the image below. Chose "Save Execution Plan As", and choose a path and name and then click "Save". 

Send the file to the Support Engineer as per Engineer's instructions.

 

Attachments