gpt4 book ai didi

oracle - dbms_scheduler.run_job('jobName)无法运行

转载 作者:行者123 更新时间:2023-12-04 04:57:52 27 4
gpt4 key购买 nike

我正在尝试手动运行计划的作业,该作业看起来像这样

  DBMS_SCHEDULER.CREATE_JOB (
job_name => 'UPDATE_PLAYER_STATES',
job_type => 'STORED_PROCEDURE',
job_action => 'PLAYER_STATE_UPDATER',
repeat_interval => 'FREQ=DAILY;BYHOUR=0', /* every day at Midnight */
job_class => 'DEFAULT_JOB_CLASS',
enabled => true,
auto_drop => false);

现在,当我使用 execute PLAYER_STATE_UPDATER运行该过程时,我可以看到所需的结果,但是作业无法执行,如下所示
select log_date, job_name, status, run_duration
from dba_scheduler_job_run_details where job_name='UPDATE_PLAYER_STATES' or status='FAILED';


LOG_DATE JOB_NAME STATUS RUN_DURATION
------------- -----------------------------------------------------------------
23-AUG-11 00.20.24.288887000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
22-AUG-11 10.27.24.537659000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
22-AUG-11 10.28.50.447042000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
22-AUG-11 10.30.30.018891000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
25-AUG-11 10.59.02.332579000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
25-AUG-11 10.59.15.980730000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
25-AUG-11 10.59.27.823131000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
25-AUG-11 11.01.04.798364000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
24-AUG-11 00.20.24.419251000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
25-AUG-11 00.20.24.299180000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0
25-AUG-11 09.35.24.798535000 +01:00 UPDATE_PLAYER_STATES FAILED 0 0:0:0.0

并且手动执行作业也失败 dbms_scheduler.run_job('UPDATE_PLAYER_STATES');并显示错误
Error starting at line 1 in command:
dbms_scheduler.run_job('UPDATE_PLAYER_STATES')
Error report:
Unknown Command

我想念的是什么。

最佳答案

当您尝试手动运行作业时,您似乎根本没有在SQL Developer中使用正确的语法。您需要使用execute dbms_scheduler.run_job('UPDATE_PLAYER_STATES')。当然,这并不能解释为什么工作失败了。

我的猜测是作业配置有问题,以至于它甚至无法启动。但我看不出它是什么。您可以尝试在job_action中包含模式名称,以确保它没有在错误的模式中查找。
dba_scheduler_job_run_details的其他列中是否有任何有趣的东西-尤其是error#additional_info

关于oracle - dbms_scheduler.run_job('jobName)无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7188626/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com