I know this sounds weird but it's an old project that I'm trying to make work.
I have two schemas SchemaA and SchemaB each one with it's own user.
I'm writing a plsql script in a package in SchemaB, but in this script I need to delete records from a table in SchemaA. But there is a trigger that won't let the delete happen.
So to make it work I have to do this command:
EXECUTE IMMEDIATE 'ALTER TRIGGER SchemaA.TDA_K$TriggerA DISABLE';
But when I do that I get ORA-01031 which is logical since SchemaB cannot disable a trigger From SchemaA
My question is, how can I GRANT the permission on the trigger (or table utilizing that trigger), to SchemaB to be able to disable it.
CodePudding user response:
As per Oracle documentation " Prerequisites
The trigger must be in your own schema or you must have ALTER ANY TRIGGER system privilege.
In addition, to alter a trigger on DATABASE, you must have the ADMINISTER database events system privilege.
"