Home » RDBMS Server » Backup & Recovery » dbms_scheduler problem
dbms_scheduler problem [message #208293] Sat, 09 December 2006 02:51 Go to next message
baju
Messages: 12
Registered: December 2006
Junior Member
i want to take backup of the db using export and with dbms_scheduler that will automatically run the sh file.

here is my script:

BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name=>'OFFICE.EXPORT',
job_type => 'EXECUTABLE',
job_action =>'$ORACLE_BASE/exp.sh',
start_date=>'09-DEC-06 01.00.00 PM',
repeat_interval=>'TRUNC(SYSDATE+1)+23/24',
enabled => TRUE,
comments => 'export 118');
END;
/


and here is my exp.sh file:

exp office/xxxxx@xxxxx FILE="$ORACLE_BASE/exp/export.DMP" LOG="$ORACLE_BASE/exp/exp_export.log" OWNER=BDOFFICE DIRECT=Y FEEDBACK=10000 CONSISTENT=Y

but it is not working.
it gives the following error.
>SELECT JOB_NAME, STATUS, ERROR# FROM
DBA_SCHEDULER_JOB_RUN_DETAILS;

EXPORT FAILED 27369

can u plz help me?
what is the problem?
thanks in advance.
Re: dbms_scheduler problem [message #208296 is a reply to message #208293] Sat, 09 December 2006 03:09 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hello

job_action =>'$ORACLE_BASE/exp.sh',

i think you can provide complete path of ur exp.sh script file.

try this.


regards
Taj
Re: dbms_scheduler problem [message #208301 is a reply to message #208296] Sat, 09 December 2006 03:58 Go to previous messageGo to next message
baju
Messages: 12
Registered: December 2006
Junior Member
i have changed the path, but still it's not working.
i get the same error.
any idea?
plz help.

thanks
Re: dbms_scheduler problem [message #208324 is a reply to message #208301] Sat, 09 December 2006 09:22 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Have you tried running the exp command by itself ? Are the appropriate privileges set on the exp.sh file ?
Re: dbms_scheduler problem [message #208368 is a reply to message #208324] Sat, 09 December 2006 22:18 Go to previous messageGo to next message
baju
Messages: 12
Registered: December 2006
Junior Member
thanks a lot.
it's working.
Re: dbms_scheduler problem [message #208372 is a reply to message #208368] Sat, 09 December 2006 23:42 Go to previous messageGo to next message
baju
Messages: 12
Registered: December 2006
Junior Member
sorry, the problem is not yet solved.

i can run the .sh file from shell. it's working.
but with the scheduler it gives the same error(error# 27369).

thanks
Re: dbms_scheduler problem [message #208373 is a reply to message #208372] Sat, 09 December 2006 23:44 Go to previous messageGo to next message
baju
Messages: 12
Registered: December 2006
Junior Member
here is my scheduler script:

BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name=>'BDOFFICE.EXPORTA',
job_type => 'EXECUTABLE',
job_action =>'/u01/app/oracle/exp.sh',
start_date=>'10-DEC-06 05.00.00 AM',
repeat_interval => 'FREQ=DAILY',
enabled => TRUE,
comments => 'export daily');
END;
/

plz help me.
Re: dbms_scheduler problem [message #208640 is a reply to message #208373] Mon, 11 December 2006 11:14 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
What are the privileges on the file?
Re: dbms_scheduler problem [message #208690 is a reply to message #208293] Mon, 11 December 2006 22:06 Go to previous messageGo to next message
baju
Messages: 12
Registered: December 2006
Junior Member
thanks to all.

i have solved the problem.
it has some permission related problem & also i have to call bash profile to solve this issue.
Re: dbms_scheduler problem [message #208798 is a reply to message #208690] Tue, 12 December 2006 04:55 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Glad ya got it solved. Thanks for the feedback.
Previous Topic: TABLE gets in doubt locked in TWO PHASE COMMIT CASE (very challenging problem).
Next Topic: How to recover the data if the DUMP file is also corrupted.
Goto Forum:
  


Current Time: Sun Dec 11 00:09:06 CST 2016

Total time taken to generate the page: 0.09218 seconds