How do I enable "Include Actual Execution Plan" on SSMS

Rafael Bittar 0 Reputation points
2024-08-06T17:34:20.6133333+00:00

Hello,

I would like to know how to enable the "Include Actual Execution Plan" option in SSMS. The option in the menu is not selectable even though the user has the capability to do this. I don't understand if something very obvious is missing or if it is indeed impossible to do this. My intention is to monitor the performance of the queries to improve their efficiency.

User's image

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,689 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,625 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 33,696 Reputation points MVP
    2024-08-06T18:38:11.2366667+00:00

    Make a click inside the SQLQuery1 window you shared with us and then make a click on the SSMS Query menu option and make a click on the "Include Actual Execution Plan". The CTRL + M shortcut may do the trick also.

    User's image

    To use this feature, users must have the appropriate permissions to execute the Transact-SQL queries for which a graphical execution plan is being generated, and they must be granted the SHOWPLAN permission for all databases referenced by the query.

    Make sure you are in a query window connected to the database engine. The option won't be available in other types of windows. Once enabled, execute your query by clicking the "Execute" button or pressing F5. The actual execution plan will be displayed in the "Execution Plan" tab in the results pane.

    0 comments No comments

  2. Zahid Butt 956 Reputation points
    2024-08-06T18:49:12.1366667+00:00

    Hi,

    As Alberto Morillo said make sure, user should have SHOWPLAN permission.

    You may get help from below link:

    https://blog.sqlauthority.com/2019/08/22/sql-server-3-different-ways-to-explore-actual-execution-plans/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.