To see query plans, use:
set showplan on
To stop displaying query plans, use:
set showplan off
You can use showplan in conjunction with other set commands.
To display query plans for a stored procedure, but not execute them, use the set fmtonly command.
See Chapter 12, “Creating and Using Abstract Plans,” for information on how options interact.
Do not use set noexec with stored procedures—compilation and execution does not occur and you do not receive the necessary output.