Fix SQL Server error: SHOWPLAN permission denied in database ‘DBName’
top of page

Fix SQL Server error: SHOWPLAN permission denied in database ‘DBName’

Do you get the error "SHOWPLAN permission denied in database 'DBName'"? This error is due to SQL Server permissions. Find out how to fix SQL Server permissions and remove the error. Read more here.


Do you want a query execution plan in SQL Server for performance tuning and getting the following error?


Msg 262, Level 14, State 4, Line 2

SHOWPLAN permission denied in database ‘DBName’.




As per the error message, you do not have permission to view the execution plans. To resolve this error, run the following T-SQL script from the admin user or SA account.


USE DBName
GO
GRANT SHOWPLAN TO UserName
GO

Once you execute the GRANT SHOWPLAN, you can view the estimated and actual execution plan in SQL Server.




18,052 views0 comments
bottom of page