Avatar of xoxomos
xoxomos

asked on 

dbs_scheduler_job fails

When I try scheduling a job through OEM , i'm getting this message:
' "Details      ORA-27369: job of type EXECUTABLE failed with exit code: Cannot assign requested address STANDARD_ERROR="/export/home/oracle/scripts/score_provider_delete.sh: line 17: /export/home/oracle: is a directory"  '

The script executes and the rows intended to be deleted are indeed deleted but i get this ORA-27369 error from running this script

#!/usr/bin/bash
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0.1/db_1
ORA_HOME_NAME=OraHomeBB
ORACLE_SID=BB60
export ORACLE_BASE ORACLE_HOME ORACLE_SID
/u01/app/oracle/product/10.2.0.1/db_1/bin/sqlplus xoxomos/0rion<< EOF
spool score_provider_delete;
DELETE FROM SCORE_PROVIDER_ACTION
    WHERE ACTION_URL LIKE '%.jsp'
    AND SCORE_PROVIDER_PK1=
    (SELECT PK1 FROM SCORE_PROVIDER
    WHERE HANDLE='resource/x-bb-assignment');
commit;
quit;
EOF

Oracle Database

Avatar of undefined
Last Comment
xoxomos
Avatar of xoxomos
xoxomos

ASKER

Strange.  If i leave off the quit from SQLPlus and the EOF to signal the end of the here document, the job executes and does not get the error??????
Avatar of slightwv (䄆 Netminder)
Using "<<EOF" is called a 'Here Script'.  They kind of expect the terminator, then ending EOF, to gracefully end the script.

Just a semi-educated guess here is the 'quit' prematurely killed the pipe and Unix didn't know how to handle it gracefully.
Avatar of xoxomos
xoxomos

ASKER

Thanks, I'll try it with an 'exit' instead of quit.
Avatar of xoxomos
xoxomos

ASKER

Pretty much the same with exit.  It does the commit, disconnects from SQLPlus, then gives me an error on line 17 which is one line longer than the script :-)
ASKER CERTIFIED SOLUTION
Avatar of xoxomos
xoxomos

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of xoxomos
xoxomos

ASKER

C grade because not excellent, not even good, just fair.  Should have looked for unprintable characters earlier:-)
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo