如何在oracle中执行作业?
我有一个简单的工作,就是:如何在oracle中执行作业?,oracle,plsql,oracle11g,Oracle,Plsql,Oracle11g,我有一个简单的工作,就是: BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => 'offc.My_job1', job_type => 'STORED_PROCEDURE', job_action => 'offc.MYPROC', start_date => sysdate, repeat_interval => 'FREQ=SECONDLY;INTERVAL=5', end_date => '02-Jan-2020
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'offc.My_job1',
job_type => 'STORED_PROCEDURE',
job_action => 'offc.MYPROC',
start_date => sysdate,
repeat_interval => 'FREQ=SECONDLY;INTERVAL=5',
end_date => '02-Jan-2020 10:29:05 PM',
auto_drop => FALSE,
comments => 'My new job');
END;
/
现在,我尝试使用以下方法运行作业:
EXEC DBMS_SCHEDULER.ENABLE(‘My_job1’);
我得到的错误是:
PLS-00103: Encountered the symbol "‘" when expecting one of the following:
( ) - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table continue avg count current exists max min prior sql
stddev sum variance execute multiset the both leading
trailing forall merge year month day hour minute second
timezone_hour timezone_minute timezone_region timezone_abbr
time timestamp interval date
<a string literal with character set specification>
ORA-00900: invalid SQL statement
我得到的错误是:
PLS-00103: Encountered the symbol "‘" when expecting one of the following:
( ) - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table continue avg count current exists max min prior sql
stddev sum variance execute multiset the both leading
trailing forall merge year month day hour minute second
timezone_hour timezone_minute timezone_region timezone_abbr
time timestamp interval date
<a string literal with character set specification>
ORA-00900: invalid SQL statement
这两个都不起作用。为什么我的工作还没结束?我想你们又面临着单一报价的问题了
EXEC DBMS_SCHEDULER.ENABLE(‘My_job1’);
此处引用的“
不受oracle支持。它应该是”
EXEC DBMS_SCHEDULER.ENABLE('My_job1');
干杯 在检查代码中是否只使用简单的ASCII引号之前,请不要发布任何其他问题。@AnkitBajpai-这是OP今天提出的第二个问题,问题是由包含非标准引号字符的代码引起的,解决方法是用正确的引号字符替换它。就我个人而言,我不认为“展示努力”,但你有资格把你的酒吧设置为你喜欢的低。