How To Fix "Permission Denied" or "Object Does Not Exist" Errors When Enabling Or Disabling A Trigger



TODO:

Have you ever had the dreaded, "Object does not exist...or permission denied error" when you try to enable or disable a trigger?

 

SOULTION:

--get the user executing the SQL
select USER_NAME()

--now grant ALTER on that table to that user
GRANT ALTER ON Table TO User

 

NOTES:

This becomes useful when you are trying to disable a trigger in a Stored Procedure or another Trigger.



Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading