Solved

Oracle Export error with crontab

Posted on 2009-05-11
1
911 Views
Last Modified: 2013-12-18
Hi there. I am using the exp command to backup my database into a dump file. When i execute the command from the cli it works. When i try to execute it via crontab it give me the following error. Any help would be appriciated. To resolve i have alredy set the $ORACLE_HOME but still the problem doesnt resolve.
The command is below
exp Full=y File=/u01/SequelMedBackups/BackupSet-1/Exports/ExpEver10gFull_FRI.dmp log=/u01/SequelMedBackups/BackupSet-1/Exports/ExpEver10gFull_FRI.log buffer=999999 Direct=y userid=system/sequel

The error is below:
From oracle@sequel4pak.com  Sat May  9 05:39:01 2009
Return-Path: <oracle@sequel4pak.com>
Received: from sequel4pak.com ([127.0.0.1])
        by sequel4pak.com (8.13.8/8.13.8) with ESMTP id n490aLNc007620
        for <oracle@sequel4pak.com>; Sat, 9 May 2009 05:39:01 +0500
Received: (from oracle@localhost)
        by sequel4pak.com (8.13.8/8.13.8/Submit) id n490Z1wP007617;
        Sat, 9 May 2009 05:35:01 +0500
Date: Sat, 9 May 2009 05:35:01 +0500
Message-Id: <200905090035.n490Z1wP007617@sequel4pak.com>
From: root@sequel4pak.com (Cron Daemon)
To: oracle@sequel4pak.com
Subject: Cron <oracle@sequel4pak> /u01/SequelMedBackups/BackupSet-1/Exports/FRI_Backup
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/oracle>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=oracle>
X-Cron-Env: <USER=oracle>

mv: cannot stat `/u01/SequelMedBackups/BackupSet-1/Exports/ExpEver10gFull_FRI.dmp': No such file or directory
mv: cannot stat `/u01/SequelMedBackups/BackupSet-1/Exports/ExpEver10gFull_FRI.log': No such file or directory

Message 206 not found; No message file for product=RDBMS, facility=EXP: Release 10.2.0.1.0 - Production on Sat May 9 05:35:01
2009

Copyright (c) 1982, 2005, Oracl

Invalid format of Export utility name

Verify that ORACLE_HOME is properly set

Export terminated unsuccessfully

EXP-00000: Message 0 not found; No message file for product=RDBMS, facility=EXP
0
Comment
Question by:nasirsh
[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
1 Comment
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 50 total points
ID: 24366337
You need to set the Oracle environment in your script!
Something like this:
 

#! /bin/ksh
#
ORACLE_SID=ORCL; export ORACLE_SID;
ORAENV_ASK=NO 
. /usr/local/bin/oraenv 
### Rest of backup script here ###
...

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

626 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