i "use Windows autentication"
i execute this t-sql
use AdventureWorks
go
grant showplan to [SMI\elopezh]
the message is: Command(s) completed successfully.
i "included actual execution plan"
but i have this error
Msg 262, Level 14, State 4, Line 3
SHOWPLAN permission denied in database 'AdventureWorks'.
the t-sql code this
DECLARE @spexecutesqlStr NVARCHAR(1000) = 'EXEC [dbo].[GetCustomerInformation] @CustomerID = @CustID, @LastName = @Lname'
DECLARE @ParmDefinition NVARCHAR (500) = N'@CustID bigint, @LName varchar(30), @FName varchar(30), @MI char(1), @Email varchar(128), @RegionNo tinyint, @CustomerCode tinyint'
DECLARE @CustomerID BIGINT = 1
DECLARE @LastName VARCHAR(30) = 'Achong'
EXEC sp_executesql @spexecutesqlStr,
@ParmDefinition,
@CustID = @CustomerID,
@LName = @LastName,
@FName = null,
@MI = null,
@Email =null,
@RegionNo = null,
@CustomerCode= null
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.