ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied
新加的一個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
作業上線後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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2150423/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Permission denied Command PhaseScriptExecution failed with a nonzero exit codeAI
- Nginx: stat() failed (13: permission denied)NginxAI
- adb remount of system failed: Permission deniedREMAI
- WindowManager$BadTokenException: Unable to add window permission denied for this window typeException
- Android adb除錯出現:opendir failed, Permission deniedAndroid除錯AI
- FATAL: Failed to make swap directory /etc/squid/cache: (13) Permission deniedAIUI
- Command CompileSwift failed with a nonzero exit code in Xcode 10CompileSwiftAIXCode
- Hexo deploy git permission deniedHexoGit
- Nginx 日誌 failed (13: Permission denied) 錯誤(13:許可權被拒絕)NginxAI
- Angular macOS Err:EACCES: permission deniedAngularMac
- Permission Denied(publickey) 解決
- -bash: ./backup.sql: Permission deniedSQL
- mac vscode 更新失敗:Permission denied解決辦法MacVSCode
- PHP中 mkdir: Permission denied 問題PHP
- nginx部署(13:Permission denied)報錯Nginx
- 解決Xcode報錯:Command /usr/bin/codesign failed with exit code 1XCodeAI
- iOS linker command failed with exit code 1 (use v to see invocation)iOSAI
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- 解決“su: cannot open session: Permission denied”Session
- Error: Permission denied @ apply2filesErrorAPP
- PermissionError: [Errno 13] Permission denied 如何解決Error
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- Cannot restore segment prot after reloc:Permission deniedREST
- PermissionError: [Errno 13] Permission denied解決辦法Error
- Android10 建立檔案 Permission deniedAndroid
- 詳解Nginx 13: Permission denied 解決方案Nginx
- mysql [ERROR] Can't create IP socket: Permission deniedMySqlError
- Android Studio: /dev/kvm device permission deniedAndroiddev
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- Cargo invocation has failed: Error: exit code: 101.解決辦法CargoAIError
- iOS報錯:linker command failed with exit code 1 (use -v to see invocation)iOSAI
- iOS開發除錯之報錯:Command /usr/bin/codesign failed with exit code 1iOS除錯AI
- Xcode執行範例程式遇到的問題Command /bin/sh failed with exit code 1XCodeAI
- 解決centos 刪除資料夾 permission deniedCentOS
- git push出現Permission denied (publickey)錯誤Git
- git出現Permission denied的解決辦法Git
- Nginx報錯:Permission denied,沒有許可權!Nginx
- Hive JDBC:Permission denied: user=anonymous, access=EXECUTE, inode=”/tmp”HiveJDBC