Amazon books

Friday, March 6, 2015

DBMS_SCHEDULER CREDENTIAL ORA-27486 privilegios insuficientes

If you create an external job and is using a credential that already exists in another schema you will face this error below if not provide the necessary privilege for the using running the job :

SQL> conn / as sysdba
SQL> exec dbms_scheduler.run_job('MY_JOB');
BEGIN dbms_scheduler.run_job('MY_JOB'); END;

*
ERROR at line 1:
ORA-27486: privilegios insuficientes
ORA-06512: em "SYS.DBMS_ISCHED", line 196
ORA-06512: em "SYS.DBMS_SCHEDULER", line 486
ORA-06512: em line 1


Fix:

You should connect with the credential owner and grant the execute on that credential to the other user:

--Connect with the credential owner:
SQL> conn edi/edi
SQL> grant execute on edi.edi_credential to sys;
--Connect back to SYS
SQL> conn / as sysdba
Connected.
SQL> exec dbms_scheduler.run_job('MY_JOB');

PL/SQL procedure successfully completed.

SQL>



Best Regards,
Paulo Portugal

No comments:

Post a Comment