共计 1758 个字符,预计需要花费 5 分钟才能阅读完成。
本篇内容介绍了“SCHEDULER 的 ORA-27369 错误怎么解决”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让丸趣 TV 小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
新加的一个 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 错误怎么解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注丸趣 TV 网站,丸趣 TV 小编将为大家输出更多高质量的实用文章!