本篇内容介绍了“SCHEDULER的ORA-27369错误怎么解决”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
新加的一个SCHEDULER作业,用普通用户执行报权限不足
作业上线后alter日志里面报:
ORA-12012: error on auto execute of job 318537
ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied
Tue Oct 15 10:31:00 2013
trace文件里记录:
*** 2013-10-15 10:30:10.920
*** SESSION ID:(717.33910) 2013-10-15 10:30:10.920
*** CLIENT ID:() 2013-10-15 10:30:10.920
*** SERVICE NAME:(SYS$USERS) 2013-10-15 10:30:10.920
*** MODULE NAME:(DBMS_SCHEDULER) 2013-10-15 10:30:10.920
*** ACTION NAME:(PRODUCT_UP131015103008879041) 2013-10-15 10:30:10.920
MODULE NAME:(DBMS_SCHEDULER)
ACTION NAME:(PRODUCT_UP131015103008879041)
从这两行可以看出来是SCHEDULER调度作业出现了问题,ACTION NAME其实就是SCHEDULER作业的job_name
检查这个作业
大概意思如下:
begin
dbms_scheduler.create_job(
job_name => 'goolen_job',
job_type => 'EXECUTABLE',
job_action => '/home/oracle/task/goolen.sh',
start_date => systimestamp,
number_of_arguments => 0,
enabled => true,
auto_drop => true,
comments => 'ShangJia');
end;
/
[oracle@goolen]$ cat goolen.sh
#!/bin/sh
source ~/.bash_profile
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
DATE=`date +%Y%m%d_%H%M%S`
LOGFILE=/tol/logs/product/goolen.log
$ORACLE_HOME/bin/sqlplus -S "newcourse/XXXXXX" << EOF
spool $LOGFILE
select sysdate from dual;
spool off
exit
EOF
刚开始怀疑是这个用户没有相应的执行权限,但是查看权限后并不是这个原因
后来查阅了一些资料,解决了这个问题
# cd $ORACLE_HOME/rdbms/admin/
# chown root:oinstall externaljob.ora
# chmod 640 externaljob.ora
# ll externaljob.ora
-rw-r----- 1 root oinstall 1534 Oct 15 17:51 externaljob.ora
# vim externaljob.ora
run_user = oracle
run_group = oinstall
# ll ../../bin/extjob
-rwxr-x--- 1 oracle oinstall 1223972 Nov 26 2012 ../../bin/extjob
# chmod 4750 ../../bin/extjob
# ll ../../bin/extjob
-rwsr-x--- 1 oracle oinstall 1223972 Nov 26 2012 ../../bin/extjob
“SCHEDULER的ORA-27369错误怎么解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。