`
burninglouis
  • 浏览: 35398 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

ORA-27452: %s is an invalid name for a database object

阅读更多

Trying to create this job:

1
2
3
4
5
6
7
8
9
10
11
12
13
begin
  -- Test statements here
  DBMS_SCHEDULER.CREATE_JOB (
   job_name             => 'JOB_1',
   job_type             => 'STORED_PROCEDURE',
   job_action           => 'BEGIN USER.PROCEDURE; END;',
   start_date           => sysdate,
   repeat_interval      => 'FREQ=MINUTELY; INTERVAL=5;',
 --  end_date             => NULL,
   enabled              =>  TRUE,
   comments             => 'Get data from api');
   commit;
end;

But i got this error: ORA-27452: %s is an invalid name for a database object
Found out that:
1) the action you are defineing, must be valid (duh)
2) if you are using the action as i am, the type is NOT STORED_PROCEDURE, its PLSQL_BLOCK

so changed it to:

1
2
3
4
5
6
7
8
9
10
11
12
13
begin
  -- Test statements here
  DBMS_SCHEDULER.CREATE_JOB (
   job_name             => 'JOB_1',
   job_type             => 'PLSQL_BLOCK',
   job_action           => 'BEGIN USER.PROCEDURE; END;',
   start_date           => sysdate,
   repeat_interval      => 'FREQ=MINUTELY; INTERVAL=5;',
 --  end_date             => NULL,
   enabled              =>  TRUE,
   comments             => 'Get data from api');
   commit;
end;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics