ORA-27452 ORA-06512

同事反应他们常用的应用用户,调用job报错如下:
ORA-27452:  is an invalid name for a database object.
ORA-06512: at "SYS.DBMS_ISCHED", line 99
ORA-06512: at "SYS.DBMS_SCHEDULER", line 262
ORA-06512: at line 3
 
---- 事实上,在 PL/SQL 块中直接使用 Dbms_Scheduler 包创建 Job ,并未碰到权限问题。
---Create Job是从其他角色上继承而来,并没有显式对其授予该权限,而在存储过程或者函数中使用该包,得有显式授权才可以。
 
处理自然很简单了:
SQL> conn / as sysdba;
Connected.
SQL>  Select * From Session_Privs Where Privilege Like '%SCHEDULE%' Or Privilege
  2  Like '%JOB%';
PRIVILEGE
----------------------------------------
CREATE JOB
CREATE ANY JOB
MANAGE SCHEDULER
CREATE EXTERNAL JOB
 
SQL> Grant Create Job To lijie;
Grant succeeded.
 
后报错消失。
 
reference:
 
https://forums.oracle.com/forums/thread.jspa?threadID=395264
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2075545400346892635
http://yangtingkun.itpub.net/post/468/272716
http://blog.itpub.net/post/1284/496598

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13750068/viewspace-753127/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13750068/viewspace-753127/

你可能感兴趣的:(ORA-27452 ORA-06512)