Showplan Privilege it’s granted for any one need to see the execution plane for SQL Server query to check the performance of the index or doing index analysis.

Grant Showplan for one user in one database  :

GRANT Showplan TO [DominName\username]

Grant Showplan for one user in All databases in one SQL instance:

 EXEC sp_MSforeachdb N’IF EXISTS
SELECT 1 FROM sys.databases WHERE name = ”?”
AND Is_read_only <> 1
print ”Use [?]; GRANT Showplan TO [DominName\username]”

after the execution take the Print scripts and run it in another session.

2 thoughts on “How to Grant Show Plan Privilege

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.