Following error Message
Msg 8199, Level 16, State 1, Line 3
In EXECUTE , procname can only be a literal or variable of type char, varchar, nchar, or nvarchar.
can occur on all versions of SQL Server. This error message appears when you try to EXECUTE a variable that is not of one of the types listed in the error message. To resolve the error, the variable to be executed must be of a type listed in the error message.
Following is an example to generate the error
DECLARE @i INT SET @i = 1 EXECUTE @i
In the above error message we try to execute a variable of the type INT. This raises the error.