今天收到开发人员一封邮件,使用plsql develop创建job时报ORA-01031,于是我将create job的权限授予了相应用户,结果错误依旧,接着我让开发人员把对应的sql发给我,sql如下:
begin
sys.dbms_scheduler.create_job(job_name => 'DBEC.J_FRESHBASEDATA',
job_type => 'STORED_PROCEDURE',
job_action => 'P_FreshBaseData',
start_date => to_date('15-07-2013 00:00:00', 'dd-mm-yyyy hh24:mi:ss'),
repeat_interval => 'sysdate+(1/1440)*10',
end_date => '',
job_class => '',
enabled => true,
auto_drop => false,
comments => '');
end;
运行上述sql后报如下错误:
ERROR at line 1:
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 2
开始我是通过修改job_name去除一些特殊字符,结果发现错误依旧,最终问题定位是在job_class这里赋值为空,解决方法为输入默认值,或者去掉这个参数!
运行上述sql后报如下错误:
ERROR at line 1:
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 2
开始我是通过修改job_name去除一些特殊字符,结果发现错误依旧,最终问题定位是在job_class这里赋值为空,解决方法为输入默认值,或者去掉这个参数!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20801486/viewspace-766460/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/20801486/viewspace-766460/