I have a DDLTrigger_Audit enabled in my database when I try executing a stored procedure having Drop and Create index statement in it fails with the below error.
database "XXX" failed on Jan 17 2019 10:36PM with error #297, severity 16", state 1 in procedure/trigger "DDLTrigger_Audit" , line # 29 while processing object "sp_XXX" with the following message: The user does not have permission to perform this action.
I have tried giving GRANT CONTROL SERVER permissions to the account executing the trigger and tried running the Stored procedure again. I got a different error this time.
The statement has been terminated. Msg 8152, Level 16, State 14, Procedure sp_XXX, Line 182 [Batch Start Line 2] String or binary data would be truncated. Mail (Id: 6500) queued.
I am confused if the issue is with a stored procedure or with the trigger.