All scheduled jobs started suddenly to fail with ORA-01031: insufficient pr
I have a setup of gridcontrol 11g on windows 2008. I've been running successful for weeks until the other day when all my scheduled jobs started to fail with
ORA-01031: insufficient privileges (rman jobs)
ERROR: Invalid username and/or password (sql scripts).
I verified for the accounts being locked, pw correct, expired / grace period, etc.
all good when I try from the command line. running an rman backup from the command line works great, but the same one through the job scheduler fails with ORA-01031.
I've dropped the jobs completely, recreated them again. same thing.
I'm using preferred credentials and dropped and recreated them. same thing.
I don't know where else to look. Only grid control scheduled jobs fail, but all of them do.
I'm using SQLNET.AUTHENTICATION_SERVICES= (NTS) in my sql.ne (always have).
we use a windows domain server / domain authentication for logging into boxes. I haven't changed any of my passwords.
I am probably looking in the wrong places. Anybody able to help?
Hi,
ERROR: Invalid username and/or password (sql scripts).This error message clearly tells that password is incorrect and "insufficient privileges" shows that perhaps you are using SYS user for running the jobs and password for user SYS is incorrect.
If you are specifying passwords in your scripts, i don't think you need to set preferred credentials.
Try following
1) Remove preferred credentials
2) Don't check password of user sys by locally logging in (because if Os authentication is on, even wrong password will allow you loging into the database and you will think that password is correct). Try connecting database using SYS user from a remote machine and check whether it accepts your password and make sure you have same password for your jobs and in sql scripts
3) If still problem, just for test, remove SQLNET.AUTHENTICATION_SERVICES= (NTS) and try
Salman
Similar Messages
-
Resolving problem with ORA-01031: insufficient privileges
hello i just to write a few word about my installation of oracle database 9i
My installation is on a Red Hat AS3
I have a problem with the error :ORA-01031: insufficient privileges
The one who read this know what about i tell.
The authorization is only for the user which Group is DBA as you can read everywhere.
but me when i tried groupadd dba => it tells group already exist.
but i can't find the group dba in the file /etc/group.
So i tried to make my user 'oracle' works with the 'already group exist' dba .
useradd -g dba oracle
but when i tried to start the database i create i have the message. : ORA-01031: insufficient privileges
i tried to add manualy the group dba to /etc/group (as i can read in websites)
and add a user manualy (/etc/passwd).
But does works.
I try all i can during 1 days long.
I was really upset because nothing that i read work.
finaly I go to the RedHat Menu (things i don't really do normaly on LINUX) and go to 'SYSTEM SETTINGS' and choose 'User and Group'
Here i can see my user 'Oracle' I get the property of the user .
there is a tab group ( 'select the group that the user will be member of:')
None of them where name DBA so i decidied to select all of them and tried.
MAGIC!!! then it works!!!
ps: after when i see the list of the group I saw that one of them is named 'SYS' . I really think that it is the one group i had to select. but don't know.
Now It is working for me so... And good luck for you. bye.Errors
ORA-01031 "insufficient privileges"
Symptoms
During database upgrade phase using DBUA , it fails with error
ORA-1031 Insufficient privileges
Connection from sqlplus also fails with same error
$ sqlplus /nolog
SQLPLUS "conn / as sysdba"
ORA-1031 Insufficient privileges
Changing the REMOTE_LOGIN_PASSWORDFILE to SHARED / NONE does not make differen
Cause
ORACLE_HOME owner oramigts is part of OS group "dba" ,but config.s shows group "g680"
The 'OSDBA' and 'OSOPER' groups are chosen at installation time and usually both default to the group 'dba'.
These groups are compiled into the 'oracle' executable and so are the same for all databases running from a given ORACLE_HOME directory.
The actual groups being used for OSDBA and OSOPER can be checked thus:
cd $ORACLE_HOME/rdbms/lib
cat config.[cs]
Solution
To implement the solution, please execute the following steps:
1. Checked the ORACLE_HOME owner.
echo $ORACLE_HOME
/h02/app/oracle/product/9.2.0_64
cd / h02/app/oracle/product/
ls -l
drwxr-xr-x 58 oramigts dba 1024 Jan 2 2004 9.2.0_64
2.ORACLE_HOME software owner "oramigts" is part of group "dba"
3.Checked file $ORACLE_HOME/rdbms/lib/config.s
[If your platform has config.c:
Due to the way different compilers under different architectures generate
assembler code, it's not possible to give a universal rule.]
It shows dba group as "g680" where software owner is part of "dba" group
You can more find detail on config.s / config.c in the following doc.
Note 50507.1 SYSDBA and SYSOPER Privileges in Oracle
4. Modified the config.s for correct group.
.ascii "g680\0"
to
.ascii "dba\0"
7. mv config.o config.o.bak
8. make -f ins_rdbms.mk config.o ioracle
9. Checked the file config.o is created at $ORACLE_HOME/rdbms/lib
10. Connected / as sysdba thru Sqlplus from 9.2 Home, which connected sucessfully. -
Srvctl start service/stop throwing error ORA-01031: insufficient privileges
Hi Gurus,
When i try to start/stop the service getting below error.Please help me troubleshoot it.
AIX-6.1
11.2.0.1
Plato1:/u01/app/11.2.0/grid/network/admin>srvctl start service -d maxcv
PRCR-1079 : Failed to start resource ora.maxcv.maxcv.svc
CRS-2680: Clean of 'ora.maxcvuat.svc' on 'Plato1' failed
CRS-5807: Agent failed to process the message
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2680: Clean of 'ora.maxcvuat.svc' on 'Plato1' failed
ThanksSQL> execute dbms_service.start_service('maxcvuat');PL/SQL procedure successfully completed.
Output from alert.log
EMNC started with pid=32, OS id=1384660
2011-09-09 09:32:09.820000 -04:00
Starting background process CJQ0
CJQ0 started with pid=53, OS id=1429756
2011-09-09 09:37:00.698000 -04:00
Starting background process SMCO
SMCO started with pid=33, OS id=1687726
2011-09-09 09:52:59.212000 -04:00
ALTER SYSTEM SET service_names='maxcvuat' SCOPE=MEMORY SID='maxcv2';
~crsctl stat output:
plato2:/home/grid>crsctl stat res -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.CRS.dg
OFFLINE OFFLINE plato1
OFFLINE OFFLINE plato2
ora.CRS_DATA.dg
ONLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.CRS_DATA1.dg
ONLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.CRS_VDISK.dg
OFFLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.LISTENER.lsnr
ONLINE ONLINE plato1
ONLINE ONLINE plato2
ora.maxcv_DATA.dg
ONLINE INTERMEDIATE plato1
ONLINE ONLINE plato2
ora.maxcv_REC.dg
ONLINE INTERMEDIATE plato1
ONLINE ONLINE plato2
ora.asm
ONLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.eons
ONLINE ONLINE plato1
ONLINE ONLINE plato2
ora.gsd
OFFLINE OFFLINE plato1
OFFLINE OFFLINE plato2
ora.net1.network
ONLINE ONLINE plato1
ONLINE ONLINE plato2
ora.ons
ONLINE ONLINE plato1
ONLINE ONLINE plato2
Cluster Resources
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE plato2
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE plato1
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE plato1
ora.plato1.vip
1 ONLINE ONLINE plato1
ora.plato2.vip
1 ONLINE ONLINE plato2
ora.maxcv.db
1 ONLINE ONLINE plato2 Open
2 ONLINE ONLINE plato1 Open
ora.maxcv.maxcvuat.svc
1 OFFLINE UNKNOWN plato1
2 OFFLINE UNKNOWN plato1
ora.coscv.db
1 ONLINE ONLINE plato1 Open
2 ONLINE ONLINE plato2 Open
ora.coscv.coscvuat.svc
1 ONLINE UNKNOWN plato1
2 ONLINE UNKNOWN plato1
ora.oc4j
1 OFFLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE plato2
ora.scan2.vip
1 ONLINE ONLINE plato1
ora.scan3.vip
1 ONLINE ONLINE plato1
plato2:/home/grid>Stopping of database:
plato2:/home/oracle>srvctl stop database -d maxcv
PRCD-1124 : Failed to stop database maxcv and its services
PRCR-1065 : Failed to stop resource (((((NAME STARTS_WITH ora.maxcv.) && (NAME ENDS_WITH .svc)) && (TYPE == ora.service.type)) && ((STATE != OFFLINE) || (TARGET != OFFLINE))) || (((NAME == ora.maxcv.db) && (TYPE == ora.database.type)) && (STATE != OFFLINE)))
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
CRS-5807: Agent failed to process the message
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2675: Stop of 'ora.maxcv.db' on 'plato1' failed
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
CRS-5807: Agent failed to process the message
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2675: Stop of 'ora.maxcv.db' on 'plato1' failed
plato2:/home/oracle>ps -ef |grep pmon
oracle 892946 1818664 0 09:30:35 pts/0 0:00 grep pmon
grid 1360080 1 0 Sep 06 - 1:23 asm_pmon_+ASM2
oracle 1376428 1 0 Sep 06 - 1:42 ora_pmon_coscv2
plato2:/home/oracle>Thanks -
Not able to Start the oracle db error "ORA-01031: insufficient privileges"
Hi experts,
I have oracle 11g setup on so solaris. i changed the db_cache_size
& processes values and stopped the DB services after that i am not able to start the oracle DB. Listener is running.
when i start the db server its giving the below error(startup.log)
./dbstart: Starting up database "orcl"
Mon Sep 27 04:31:08 MDT 2010
SQL*Plus: Release 11.1.0.7.0 - Production on Mon Sep 27 04:31:08 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
SQL> ERROR:
ORA-01031: insufficient privileges
SQL> ORA-01031: insufficient privileges
SQL>
./dbstart: Database instance "orcl" warm started.
Please help me to ressolve this issue.
Thanks
Krishnayes, password file is there in /etc/passwd
here are the contents:
root:x:0:0:Super-User:/:/sbin/sh
lroot:x:0:0:Super-User:/:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:/bin/false
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:/bin/false
lp:x:71:8:Line Printer Admin:/usr/spool/lp:/bin/false
uucp:x:5:5:uucp Admin:/usr/lib/uucp:/bin/false
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
listen:x:37:4:Network Admin:/usr/net/nls:/bin/false
nobody:x:60001:60001:Nobody:/:/bin/false
noaccess:x:60002:60002:No Access User:/:/bin/false
nobody4:x:65534:65534:SunOS 4.x Nobody:/:/bin/false
itunix:x:50000:14:IT Unix Account:/export/home/itunix:/bin/csh
hharika:x:765:38:Harpal Harika:/export/home/hharika:/bin/csh
prsingh:x:795:38:Pradeep Singh:/export/home/prsingh:/bin/csh
mmir:x:1229:21:Mir Monis Ali:/export/home/mmir:/bin/csh
bogunnai:x:1207:21:Bose Ogunnaike:/export/home/bogunnai:/bin/ksh
mpokala:x:2117:21:Mahesh Pokala:/export/home/mpokala:/bin/ksh
apopov:x:2385:38:Anton Popov:/export/home/apopov:/bin/csh
kkeith:x:2629:227:Kevin Keith:/home/kkeith:/usr/bin/ksh
sshd:x:22:22:SSH Privsep:/var/empty:/bin/false
patrol:x:2784:10:Patrol User:/opt/bmc:/usr/bin/ksh
smmsp:x:25:25:Sendmail Submission user:/none:/bin/false
ldap:x:50001:1002::/export/home/ldap:/bin/sh
perfuser:x:884:268::/export/home/perfuser:/bin/csh
webservd:x:80:80::/home/webservd:/bin/pfsh
oracle:x:156:40:Oracle Software Owner:/export/home/oracle:/bin/bash
perfuser_idc:x:64383:1::/home/perfuser_idc:/bin/sh
idc_perf:x:64384:292::/home/idc_perf:/bin/sh -
ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
Hello DBAs,
I am trying to schedule a shell script through dbms_scheduler.CREATE_JOB
My database version is 10.2.0.3.0.
I can successfully schedule the job, but while running, it throwing ORA-27369 with out exit code.
Given below are the actions performed -
-- Created shel scripts-
$ cat shell01.sh
./test.sh >> test.log
$
$ cat test.sh
sqlplus -s "/ as sysdba" <<EOF
SELECT SUBSTR(host_name,0,10) host_name, instance_name, status,TO_CHAR(startup_time,'dd-mm-yy hh24:mi:ss') startup_time
FROM v\$instance;
disconnect;
exit;
EOF
-- Granting privileges - (eventhough I have tried from 'SYS' schema)
GRANT create Job, create external job, execute any class, execute any program , manage scheduler to sys;
-- Drop job with name RUN_SHELL01
BEGIN
dbms_scheduler.drop_job('RUN_SHELL01');
END;
-- Schedule job with name RUN_SHELL01
BEGIN
dbms_scheduler.CREATE_JOB
(job_name => 'RUN_SHELL01',
job_type => 'EXECUTABLE',
job_action => '/home/ora1023/shell01.sh',
start_date => '18-AUG-09 05:37:00 AM',
end_date => NULL,
repeat_interval => 'FREQ=MINUTELY',
enabled => false,
comments => 'Run shell-script');
END;
--Enable job
BEGIN
dbms_scheduler.enable('RUN_SHELL01');
END;
-- Checking status
SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
select JOB_NAME,STATUS,ERROR# from dba_scheduler_job_run_details where job_name='RUN_SHELL01';
-- Executing the job
SQL> exec dbms_scheduler.run_job('RUN_SHELL01');
BEGIN dbms_scheduler.run_job('RUN_SHELL01'); END;
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1
Anybody please suggest a solutions for this -My shell script will work as below -
user01@test01:/home/user01 : cat shell01.sh
./test.sh >> test.log
user01@test01:/home/user01 :
user01@test01:/home/user01 :
user01@test01:/home/user01 : cat test.sh
sqlplus -s "/ as sysdba" <<EOF
SELECT SUBSTR(host_name,0,10) host_name, instance_name, status,TO_CHAR(startup_time,'dd-mm-yy hh24:mi:ss') startup_time
FROM v\$instance;
disconnect;
exit;
EOF
user01@test01:/home/user01 : ./shell01.sh
user01@test01:/home/user01 : ls -ltr
-rw-r--r-- 1 ora1023 dba 155 Aug 26 05:28 test.log
user01@test01:/home/user01 : cat test.log
HOST_NAME INSTANCE_NAME STATUS STARTUP_TIME
test01 oft1 OPEN 18-08-09 08:22:45
user01@test01:/home/user01 :
** I think this shell script is working fine! ..its only for testing..
and while we are querying dba_scheduler_job_run_details for additional info-
SQL> select s.STATUS ,s.ADDITIONAL_INFO from dba_scheduler_job_run_details s where s.job_name='RUN_SHELL01';
STATUS
ADDITIONAL_INFO
STANDARD_ERROR="execve: Exec format error"
FAILED
ORA-27369: job of type EXECUTABLE failed with exit code: Unknown error
STANDARD_ERROR="execve: Exec format error"
I think Metalink Doc ID: 555160.1 (Schedular Job of Type 'EXECUTABLE' Fails with ORA-27369 "exit code: 255" STANDARD_ERROR="execve: Exec format error"). Will help me to solve this issue Since i am using ksh -
# echo $SHELL
/bin/ksh
Edited by: Rajesh Menon on Aug 25, 2009 9:21 PM -
ORA-27369: job of type EXECUTABLE failed with exit code: Is a name file
I am getting this error when I try to execute a file using /bin/sh , I create the file, do a chmod on the file and remove the file but I am have trouble executing it even though I can execute it form the command line.
ORA-27369: job of type EXECUTABLE failed with exit code: Is a name file
STANDARD_ERROR="Segmentation Fault"
139
EXTERNAL_LOG_ID="job_77927_1275",
ORA-27369: job of type EXECUTABLE failed with exit code: Transport endpoint is n
ot connected
STANDARD_ERROR="Abort - core dumped
here is the code
DBMS_SCHEDULER.CREATE_JOB(job_name=>'CHMOD_ON_CCL',
job_type=>'EXECUTABLE',
job_action=>'/bin/chmod',
number_of_arguments=>2,
enabled=>false,
auto_drop=>true);
DBMS_SCHEDULER.set_attribute('CHMOD_ON_CCL', 'credential_name', 'SCHED_USER');
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'CHMOD_ON_CCL',
argument_position=>1,
argument_value=>'777');
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'CHMOD_ON_CCL',
argument_position=>2,
argument_value=>l_directory || '/' || loc_file_name);
DBMS_SCHEDULER.ENABLE('CHMOD_ON_CCL');
--execute the CCL file, this will run the scheduler
DBMS_SCHEDULER.CREATE_JOB(job_name=>'EXECUTE_CCL',
job_type=>'EXECUTABLE',
job_action=>'/bin/sh',
number_of_arguments=>1,
enabled=>false,
auto_drop=>true);
DBMS_SCHEDULER.set_attribute('EXECUTE_CCL', 'credential_name', 'SCHED_USER');
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'EXECUTE_CCL',
argument_position=>1,
argument_value=>l_directory || '/' || loc_file_name);
DBMS_SCHEDULER.ENABLE('EXECUTE_CCL');
--remove CCL file after scheudler runs
DBMS_SCHEDULER.CREATE_JOB(job_name=>'REMOVE_CCL',
job_type=>'EXECUTABLE',
job_action=>'/bin/rm',
number_of_arguments=>1,
enabled=>false,
auto_drop=>true);
DBMS_SCHEDULER.set_attribute('REMOVE_CCL', 'credential_name', 'SCHED_USER');
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE(job_name=>'REMOVE_CCL',
argument_position=>1,
argument_value=>l_directory || '/' || loc_file_name);
DBMS_SCHEDULER.ENABLE('REMOVE_CCL');
"No problem at all, you can do the same by getting the output from env and unset the variables that are defined there manually. Start with
unset PATH
unset ORACLE_HOME
unset LD_LIBRATY_PATH
ad start your script again from this environment. The scheduler launches the jobs in an environment where hardly any variable is defined.
R. -
ORA-27369: job of type EXECUTABLE failed with exit code:No such file or dir
Hi all,
i am new with DBMS_SCHEDULER and my need is to create a job, without program and schedule, that i can call in an Apex app.
This job run a window *.bat* file via cmd.exe
I test the .bat with doubleclick and it work.
I test window run with the string c:\windows\system32\cmd.exe/c C:/mycompletepath/myfilename.bat > nul and it work.
I execute the following execute DBMS_SCHEDULER.create_job (
job_name=>'EIM_JOB',
job_type=>'EXECUTABLE',
job_action=>'c:\windows\system32\cmd.exe',
number_of_arguments=>1,
auto_drop=>FALSE,
enabled=>FALSE,
comments=>'Job Lancio EIM'
); and the job is created.
I execute this execute DBMS_SCHEDULER.set_job_argument_value('EIM_JOB',1,' /c C:/mycompletepath/myfilename.bat > nul');
execute DBMS_SCHEDULER.enable('EIM_JOB');
execute DBMS_SCHEDULER.PURGE_LOG(job_name=>'EIM_JOB');
execute DBMS_SCHEDULER.run_job('EIM_JOB');but the error ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory is raised
The argument is uge and reading about it here https://forums.oracle.com/forums/thread.jspa?threadID=701740 here https://forums.oracle.com/forums/thread.jspa?threadID=555102 and here http://www.oracle-base.com/articles/11g/SchedulerEnhancements11gR1.php_ i suppose that my problem is quite about credentials but i need some help or tips to clearly identify, verify and solve the problem.
Any kind of help will be appreciated.
Thanks
AlexHi Ravi,
thank you for your helpful reply.
I am changing my script in order to meet your advices but when i run this execute DBMS_SCHEDULER.CREATE_CREDENTIAL (
credential_name=>'SIECRMWIN',
username=>'myusername',
password=>'mypassword',
database_role=>NULL,
windows_domain=>'SIECRM',
comments=>'Windows credential to run job'); the error PLS-00302: component 'CREATE_CREDENTIAL' must be declared is raised.
My DB is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Productio
NLSRTL Version 10.2.0.5.0 - ProductionWhich is my mistakes?
Searchibg the internet i found this OracleJobScheduler Windows service, how i can verify if service exist and start it on my server?
Thanks again for any kind of help.
Edited by: OraclePSP on 23-mar-2012 5.59 -
ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
Hi
I defined the following Job on Linux Redhat 5.4 & Oracle DB 10.2.0.4:
BEGIN
dbms_scheduler.create_job(job_name => 'expjob',
job_type => 'executable',
job_action => '/EXPORT/scott_cmd',
enabled => TRUE,
auto_drop => FALSE);
END;
drwxrwxrwx 2 oracle oinstall 4096 Jul 10 19:19 EXPORTwhere:
/home/oracle>cat /EXPORT/scott_cmd
#!/bin/sh
exp parfile=./scott.par
/home/oracle>cat /EXPORT/scott.par
FILE=scott.dmp
USERID=STRMADMIN/STRMADMIN
OWNER=SCOTT
LOG=scott.log
/home/oracle>ls -l /EXPORT/scott_cmd
-rwxr-xr-x 1 oracle oinstall 34 Jul 10 19:16 /EXPORT/scott_cmd
/home/oracle>ls -l /u01/app/oracle/OraHome_1/rdbms/admin/externaljob.ora
-rw-r--r-- 1 root oinstall 1575 Jul 10 18:42 /u01/app/oracle/OraHome_1/rdbms/admin/externaljob.ora
(run_user = nobody
run_group = nobody)
/home/oracle>ls -l /u01/app/oracle/OraHome_1/bin/extjob
-rwsr-x--- 1 root oinstall 64842 Jul 8 14:21 /u01/app/oracle/OraHome_1/bin/extjob
/home/oracle>ls -l /u01/app/oracle/OraHome_1/bin/extjobo
-rwxr-xr-x 1 oracle oinstall 64842 Jul 8 14:21 /u01/app/oracle/OraHome_1/bin/extjoboWhen I executed as user STRMADMIN ( has DBA & CREATE JOB Privileg) the Job, I got always the error:
/EXPORT>sqlplus STRMADMIN/STRMADMIN
SQL*Plus: Release 10.2.0.4.0 - Production on Sun Jul 10 19:40:24 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exec dbms_scheduler.run_job('expjob');
BEGIN dbms_scheduler.run_job('expjob'); END;
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1
SQL>Please, help
regards
hqt200475
Edited by: hqt200475 on Jul 10, 2011 10:04 AM
Edited by: hqt200475 on Jul 10, 2011 10:05 AMHi Ronald,
I need the external Job in the 10.2.0.4-Environment because of the Online-Upgrade of a 10.2.0.4-Database to 11.2.0.2 with STREAMS. I want to start the old export from a PL/SQL-Procedure.
Now returning to my problem:
First: Change the run user to oracle:oinstall $ORACLE_HOME/rdbms/admin/externaljob.ora
# This configuration file is used by dbms_scheduler when executing external
# (operating system) jobs. It contains the user and group to run external
# jobs as. It must only be writable by the owner and must be owned by root.
# If extjob is not setuid then the only allowable run_user
# is the user Oracle runs as and the only allowable run_group is the group
# Oracle runs as.
#run_user = nobody
#run_group = nobody
run_user = oracle
run_group = oinstallsecond:
/EXPORT>cat scott_cmd
#!/bin/sh
ORACLE_SID=STB;export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/OraHome_1;export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
/u01/app/oracle/OraHome_1/bin/exp parfile=/EXPORT/scott.parand:
BEGIN
dbms_scheduler.create_job(job_name => 'expjob_r',
job_type => 'executable',
job_action => '/EXPORT/scott_cmd',
enabled => TRUE,
auto_drop => FALSE);
END;
/The manual execution of export as user oracle/oinstall was unproblematic, But I still got the error when running the following procedure :
SQL> exec dbms_scheduler.run_job('expjob_r');
BEGIN dbms_scheduler.run_job('expjob_r'); END;
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Operation not
permitted
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1regards
hqt200475 -
ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied
Guy's
I am getting the same error
my schema is having dba priveleges.
CREATE OR REPLACE procedure abc_1 as
begin
dbms_scheduler.create_job(
job_name=>'test_1',
job_type=>'executable',
job_action=>'/d02/oradata/shell_scripts/import_db_1.sh',
enabled=>false,
auto_drop=>true );
end;
CREATE OR REPLACE procedure abc_2 as
--http://www.dba-oracle.com/t_dbms_scheduler_examples.htm
--http://www.oradev.com/dbms_scheduler.jsp
--http://forums.oracle.com/forums/thread.jspa?messageID=1352558�
begin
dbms_scheduler.run_job (job_name=>'test_1');
end;
SQL>
SQL>
SQL> exec abc_1
PL/SQL procedure successfully completed.
SQL> exec abc_2
BEGIN abc_2; END;
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at "SYS.ABC_2", line 6
ORA-06512: at line 1
any one got the solution.pl pass it.
TIA,Hi,
If rdbms/admin/externaljob.ora exists (in 10.2.0.3 and up) then external jobs run as the user and group specified in this file which should be nobody by default.
If it does not exist (in releases prior to 10.2.0.3) then external jobs run as the owner of bin/extjob which should be nobody by default.
Because external jobs run as a lowly privileged user (nobody) by default, you need to make sure that this user can execute your script. Things to check for include
1) Use full paths to all binaries or scripts in job_action or program_action as well as calls inside the script.
2) Make sure all scripts start with #!/bin/sh or another command interpreter
3) Make sure all scripts have the executable bit set and are executable by the user that external jobs run as
4) Make sure that all required environment variables are set. External jobs by default do not have any environment variables set. For example, for an oracle import or export or sqlloader script you may need to set oracle_home, oracle_sid, ld_library_path and path environment variables in your script or source the required Oracle environment script.
Hope this helps,
Ravi. -
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function
Hello,
I am calling a windows bat file using dbms_scheduler and getting the following error. I have searched the forum and the internet and tried different switches and options. None of them solved my problem.
Oracle Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
OracleJobScheduler is running as a service
Error starting at line 1 in command:
execute GET_RESULTS();
Error report:
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
ORA-06512: at "SYS.DBMS_ISCHED", line 185
ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
ORA-06512: at "PS.GET_RESULTS", line 67
ORA-06512: at line 1
27369. 00000 - "job of type EXECUTABLE failed with exit code: %s"
*Cause: A problem was encountered while running a job of type EXECUTABLE.
The cause of the actual problem is identified by the exit code.
*Action: Correct the cause of the exit code and reschedule the job.
Here is the code for scheduler
dbms_output.put_line(os_commandline || utlPath || fileSeparator || 'get.bat >nul')
dbms_scheduler.create_job
( job_name =>'PS_GET_RESULTS'
, job_action => os_commandline || utlPath || fileSeparator || 'get.bat >nul'
, job_type =>'executable'
, enabled =>false
, auto_drop =>false
, start_date =>systimestamp
dbms_scheduler.run_job(job_name =>'PS_GET_RESULTS');The dbs_output prints a line which shows that the parameters os_commandline, utlPath and fileSeparator are set correctly.
C:\windows\system32\cmd.exe /q /c E:\UTLDir\get.bat >nulThe windows file (get.bat) is:
"C:\Program Files (x86)\WinSCP\Winscp.exe" /script=e:\utldir\get_resultsThis batch file passes a script file to the executable winscp.exe to get files from another server.
The script file (get_results) is:
option batch abort
option confirm off
open sftp://username:password@ipnumber:port -hostkey="ssh-rsa 1024 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
cd /usr/dropbox/
option transfer binary
get *.results E:\UTLDir\Results\
close
exitI tested the batch file directly and works fine and "gets" the files from the server. But, invoking from Oracle dbms_scheduler fails with ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
Appreciate your help and time in suggesting additional guidelines or pointers.
Thanks,
RoseHere is an update, if somebody else is having a similar problem.
The ftp command "cd" to change the directories should be an absolute path. I was given a path "/usr/dropbox/", but on the server it actually corresponds to "/usr/local/apps/dropbox/". After updating the directory path, the scheduler worked fine in invoking the batch file for transferring the files.
Thanks,
Rose -
ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
Hi,
I am using the scheduler to take backup of the dev database and it was working fine. Then I added notification to the scripts and then the scheduler started failing with the following code .
BEGIN dbms_scheduler.run_job('BACKUP_DEV'); END;
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: No such file or
directory
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1
Here' the original which has no issues
#!/bin/bash -x
echo $@
if [ -z "$ORACLE_HOME" ]; then
source /path/oracle/.bash_profile
fi
RMAN="${ORACLE_HOME}/bin/rman";
${RMAN} $@
exit $?
And here's the one which gives me the errors. Also if I run this script from command line it works perfectly fine
#!/bin/bash -x
echo $@
if [ -z "$ORACLE_HOME" ]; then
source /path/oracle/.bash_profile
fi
RMAN="${ORACLE_HOME}/bin/rman";
exec >> temp_log
${RMAN} $@
/usr/bin/mailx -s "Backup status of $ORACLE_SID " [email protected] < temp_log
/usr/bin/rm temp_log
exit $?
Pls let me know what could be the reason that the script fails with the scheduler.Hi,
The user oracle who owns the scheduler already has permissions for the mailx and the same script is able to send notifications when run manully. Do I need to set additional permissions for scheduler ?
Also the db version is 10.2.0.5.
Thanks -
ORA-27369: job of type EXECUTABLE failed with exit code: Not owner
Hi
I created a backup RAC database job using DBMS_SCHEDULER under RMANTEST schema (a DBA account) and I got the error as subject.
begin
dbms_scheduler.create_job(
job_name => 'scheduler_backup',
job_type => 'EXECUTABLE',
number_of_arguments => 2,
job_action => '/opt/oracle/admin/bin/rman_fullbackup_RAC_TEST_test.sh',
comments => 'backup via scheduler'
dbms_scheduler.SET_JOB_ARGUMENT_VALUE('scheduler_backup', 1, 'TEST');
dbms_scheduler.SET_JOB_ARGUMENT_VALUE('scheduler_backup', 2, 'TEST2');
dbms_scheduler.enable('scheduler_backup');
end;
Thanks,
KevinHi Ravi
Thanks for your input.
"ORA-27369: job of type EXECUTABLE failed with exit code: Not owner" is what I copied from ADDITIONAL_INFO of USER_SCHEDULER_JOB_RUB_DETAILS.
One thing I don't understand of your words is that
"On 10gR1 and 10gR2 you can redirect the stdout/stderr within your script and take a look at those log files."
In my script, I have log files but I cannot see it. I guess the job fails directly without hitting the redirection line in the script. Do you mean I shall write something like this
dbms_scheduler.create_job (
job_action => '/opt/oracle/admin/bin/backup.sh > backup.log'
Another one is
"make sure that the user that external jobs run as must be able to run your script"
But OS user and database user are two different accounts at different level.
I am using 10.2.0.2 RAC. The Unix script runs successfully every night. I just want to take advantage of DBMS_SCHEDULER to avoid host dependency.
Thanks,
Kevin -
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
I am trying to run a shell script through dbms_scheduler. The Shell scripts calls the oracle procedure which insert a record to the Debug table.
Code for generating the script
declare
begin
dbms_scheduler.create_job(
job_name=>'test_call_unix'
,job_type=>'executable'
,job_action=>'/carsd/Input/Current/BAM/calling_proc.sh'
,start_date => SYSDATE
,repeat_interval => 'FREQ=SECONDLY; INTERVAL=1'
,enabled=>TRUE
,auto_drop => TRUE
,comments=> 'Calling unxi sh'
end;
the shell script (calling_proc.sh)
touch called.log
sqlplus $ORA_USER/$ORA_PWD@$ORA_HOST << EOF1
exec p1_sh;
exit;
EOF1
I gave chmod 777 calling_proc.sh
this the error which i got in ALL_SCHEDULER_JOB_RUN_DETAILS table
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
STANDARD_ERROR="Oracle Scheduler error: Config file is not owned by root or is writable by group or other or extjob is not setuid and owned by root"
Thanks in advance
Jeeva.STANDARD_ERROR="Oracle Scheduler error: Config file is not owned by root or is writable by group or other or extjob is not setuid and owned by root"
I gave chmod 777 calling_proc.sh
comply with top line message! -
ORA-27369:job of type EXECUTABLE failed with exit code + rman???
Hi all,
I was trying to execute job from 10G (10.2.01) Enterprise Manager Database Control, and got error below
ORA-27369:job of type EXECUTABLE failed with exit code: Network is down STANDARD_ERROR="/home/oracle/scripts/backup/backupset_full:rman: command not found"
Here is the file contents of backupset_full
#!usr/bin/bash
rman <<EOF
connect catalog rman/rman@catrcv
connect target sys/sys@test
run{
EXECUTE SCRIPT global_backup_full;
quit
EOF
Here is the file content of global_backup_full script
CREATE SCRIPT global_backup_full
shutdown immediate;
startup mount;
allocate channel d1 device type DISK;
backup as compressed backupset database;
release channel d1;
NOTE: I am running on bash shell environment.
THANK YOU VERY MUCH in advance.
Rich,You need to set ORACLE_HOME inside backupset_full script and possibly change rman to $ORACLE_HOME/bin/rman
#!usr/bin/bash
export ORACLE_HOME=<your_oracle_home _directory>
$ORACLE_HOME/bin/rman <<EOF
connect catalog rman/rman@catrcv
connect target sys/sys@test
run{
EXECUTE SCRIPT global_backup_full;
quit
EOF
Here is the file content of global_backup_full script
CREATE SCRIPT global_backup_full
shutdown immediate;
startup mount;
allocate channel d1 device type DISK;
backup as compressed backupset database;
release channel d1;
} -
ORA-27369: job of type EXECUTABLE failed with exit code:Operation notpermit
I am getting this error
ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted.
We have been using this for such a long time without any problems.this is the plsql scheduler :
Please help
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
job_name => 'PROD_LOAD_SL_FILES'
,start_date => TO_TIMESTAMP_TZ('2005/12/02 17:05:00.000000 -05:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
,repeat_interval => NULL
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'EXECUTABLE'
,job_action => '/home/oracle/actual/payment_files/slc_prod/load_sl_files.sh'
,comments => 'Loads SL files, uploads logs to database and sends email to Disbursement and DBA teams'
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'RESTARTABLE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'LOGGING_LEVEL'
,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'MAX_FAILURES');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'MAX_RUNS');
BEGIN
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'STOP_ON_WINDOW_CLOSE'
,value => FALSE);
EXCEPTION
-- could fail if program is of type EXECUTABLE...
WHEN OTHERS THEN
NULL;
END;
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'JOB_PRIORITY'
,value => 1);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'SCHEDULE_LIMIT');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'AUTO_DROP'
,value => FALSE);
END;
and this is part of the unix script get executed:
[oracle@USAC-S009 slc_prod]$ cat load_sl_files.sh
#!/bin/sh
# FILEME: /home/oracle/actual/paytment_files/load_sl_files.sh
# PURPOSE: Load SL files, email .log files
# INSTRUCTIONS/COMMENTS/ASSUMPTIONS: Two SL files will be pulled down
# MAINTENANCE LOG
# REV# DATE AUTHOR QA-ed BY CHANGE DESCRIPTION KEY
DATE=`/bin/date +%d%b%y_%H%M`
HOME=/home/oracle
export HOME
ORACLE_HOME=/u01/app/oracle/product/10.2
export ORACLE_HOME
ORACLE_SID=em
export ORACLE_SID
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/etc:/usr/local/bin:/u01/app/oracle/product/10.2/bin:/bin:/sbin:/usr/bin:/usr/sbin; export PATH
SL_HOME=/home/oracle/actual/payment_files/slc_prod
FILE_HOME=/opt/u02/home/usair
# Call slc.sh to load files
ssh usac09.usacad.loc > /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
/u01/app/oracle/slc.sh 2>&1
sleep 120
EOT
# Move logs from usac09 to usac-s009
#ssh usac09.usacad.loc >> /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
# /u01/app/oracle/move_logs.sh 2>&1
# sleep 15
#EOT
.............Hi!
I have shell scripts with number of mandatory parameters.
How can I write it in sql procedure in order to create exact command line that shuold be executed in Linux?
the procedure looks like :
CREATE OR REPLACE procedure CRM.run_tts (p_tts_name in varchar2 )
is
v_tts_name varchar2(2000);
v_job_name varchar2(2000);
v_source varchar2(200);
v_target varchar2(200);
Begin
v_tts_name := upper(p_tts_name);
--if p_instance_type='P' then
v_source := 'psdwh';
v_target := 'pudwh';
--end if;
if v_tts_name is not null then
v_job_name := 'run_tts_'||v_tts_name;
v_source := '/-ssid/'||v_source;
v_target := '/-tsid/'||v_target;
v_tts_name := '/-tbsname/'||v_tts_name;
DBMS_SCHEDULER.create_job (
job_name => v_job_name,
job_type => 'EXECUTABLE',
job_action => '/tmp/trans_asm',
start_date => SYSTIMESTAMP,
number_of_arguments => 3,
enabled => false,
auto_drop => false);
--dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/software/oracle/dba/scripts/bin/trans_asm.sh'||' '||c_rec.id||' '||'"'||c_rec.view_name||'"'||' '||v_setnum||' '||'"'||V_MACHINE_TYPE||'"'||' '||'"'||p_mode||'"');
dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>v_source);
dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>2,argument_value=>v_target);
dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>3,argument_value=>v_tts_name);
-- dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/software/oracle/dba/scripts/bin/trans_asm_ps.sh');
--dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/tmp/test.sh');
-- trans_asm -ssid tsdwh -tsid tudwh -tbsname DW_BILLING_TTS
dbms_scheduler.enable(name=>v_job_name);
end if;
end;
the command looks like :
trans_asm -ssid psdwh -tsid pudwh -tbsname YOAV_TTS
Thank you !
Valerie
Maybe you are looking for
-
I'm getting the following error in iTunes when AppleTv syncs. "Some of the items in the iTunes library were not copied to AppleTv because they could not be found." And it lists about 50 podcasts. These podcasts have were deleted along time ago and ar
-
Any indicators for 3rd party Radio alarm clock docks and iPhone 5?
Has Apple created any guidelines for the iPhone 5 when using an older radio alarm clock dock, using the lightning to 30 pin adapter ? My iPad is no problem, but my iPhone 5 (when I have it in hand) might be. Any ideas?
-
Generate a Sales report filtered by US State
I need to generate a sales report by US state. Currently, I don't even see "state" as a data point on the sale reports. What can I do to make this work?
-
I am looking for an app for an epub reader that can easily highlight text in multiple colors.
-
I have 2 ipods (one 60 gb photo and one 8 gb nano). I must have screwed something up in itunes because when I connect the 60 gb now, many of my songs are missing when it syncs. That is one issue. Next one is I have my PC, and 2 external hard drives.