Solved

dbs_scheduler_job fails

Posted on 2011-09-07
6
630 Views
Last Modified: 2012-05-12
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

0
Comment
Question by:xoxomos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 

Author Comment

by:xoxomos
ID: 36499584
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??????
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36502314
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.
0
 

Author Comment

by:xoxomos
ID: 36504544
Thanks, I'll try it with an 'exit' instead of quit.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:xoxomos
ID: 36504579
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 :-)
0
 

Accepted Solution

by:
xoxomos earned 0 total points
ID: 36504825
I deleted that line 17, you know the one past the end of the script?
Now it's ok.  Must have been some unprintable there or something
0
 

Author Closing Comment

by:xoxomos
ID: 36527925
C grade because not excellent, not even good, just fair.  Should have looked for unprintable characters earlier:-)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question