oracle 为什么 DBMS_Scheduler 作业失败?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8502675/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:30:34  来源:igfitidea点击:

Why DBMS_Scheduler job failed?

oracledbms-scheduler

提问by Priya

I have written one procedure and one job. From job I am running procedure. Following is the script for creating job

我写了一个程序和一份工作。从工作中我正在运行程序。以下是创建作业的脚本

DBMS_SCHEDULER.create_job  (job_name  => 'IBPROD2.RUN_FETCH_ACCT_ALERTS',
job_type        => 'STORED_PROCEDURE',
job_action      => 'FETCH_ACCT_ALERTS',
start_date      => sysdate,
repeat_interval => 'FREQ=HOURLY;INTERVAL=2;',
enabled         => TRUE,
auto_drop       => FALSE
);

After creating job I am running following command to get job details for owner IBPROD2 where I can see failure_count column value as 1 for RUN_FETCH_ACCT_ALERTS job. There is no problem in procedure FETCH_ACCT_ALERTS when I run it manually.

创建作业后,我正在运行以下命令以获取所有者 IBPROD2 的作业详细信息,其中我可以看到 RUN_FETCH_ACCT_ALERTS 作业的 failure_count 列值为 1。当我手动运行它时,过程 FETCH_ACCT_ALERTS 没有问题。

Can anyone help me in why the job is failing? Am I missing something?

谁能帮助我解释为什么工作失败?我错过了什么吗?

回答by APC

Query the ALL_SCHEDULER_JOB_RUN_DETAILSview (or perhaps the DBA equivalent).

查询ALL_SCHEDULER_JOB_RUN_DETAILS视图(或者 DBA 等效视图)。

select *
from all_scheduler_job_run_details
where job_name = 'IBPROD2.RUN_FETCH_ACCT_ALERTS'

You'll be particularly interested in the error#which will give you an Oracle error number you can look up. Also, the additional_infocolumn might have some, er, additional info.

您会特别感兴趣的是,error#它会为您提供一个可以查找的 Oracle 错误号。此外,该additional_info列可能有一些,呃,附加信息。



The error code means this:

错误代码意味着

ORA-28179: client user name not provided by proxy
Cause: No user name was provided by the proxy user for the client user.
Action: Either specify a client database user name, a distinguished name or an X.509 certificate.

ORA-28179:代理未提供客户端用户名
原因:代理用户未为客户端用户提供用户名。
操作:指定客户端数据库用户名、专有名称或 X.509 证书。

So it's something to do with your security set up. Authentication is failing for reason. As I lack a detailed knowledge of your architecture (and I'm not a security specialist) I'm not in a position to help you.

所以这与您的安全设置有关。身份验证失败是有原因的。由于我对您的架构缺乏详细的了解(而且我不是安全专家),因此我无法为您提供帮助。

Because I have already created many jobs to run different procedures with same owner. All are running successfully.

因为我已经创建了许多作业来运行具有相同所有者的不同程序。都运行成功。

So in what way does this procedurediffer from all the others?

那么这个程序与其他所有程序有何不同?