I have dbms_scheduler jobs in an oracle database (11.2) in a schema (schema1), I would like to grant a system privilege to alter jobs from another schema (schema2) to schema1. How can I achieve this ?
There's not an easy way to grant privileges for all objects in another schema. But you have two other options I can think of:
GRANT ALTER myjob1 TO schema1;
- you can grant schema1 alter privileges for individual jobs in schema2.GRANT SCHEDULER_ADMIN TO schema1;
- this is a powerful DBA privilege allowing schema1 to create/alter any scheduler job (which allows them to execute code as any other user).I would recommend option 1.