SHOWPLAN permission is denied in the tempdb database. in SQL Server 2008

I have a query when I run the query below in "Include the actual execution plan", then it throws the following error:

Execution Result:

(1 row (s) affected)

(89 lines affected)

(affected by 1 row (s)) Msg 262, level 14, state 4, line 25 SHOWPLAN permission denied in the database 'tempdb'.

Note. Before creating CLUSTERED INDEX on temptables, it works fine. after creating CLUSTERED INDEX it showed the error above. how can I see the execution plan for the following request for any suggestions.

+4
source share
2 answers

tempdb:

GRANT SHOWPLAN TO <UserName>
GO

<UserName> - .

+8

with execute as 'dbo', . dbo , , SHOWPLAN tempdb. with execute as 'dbo' , .

+1

Source: https://habr.com/ru/post/1547870/


All Articles