Solved

Oracle Export error with crontab

Posted on 2009-05-11
1
884 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

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

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Row_number in SQL 6 58
SQL query for highest sequence 4 75
Deleting multiple child tables from parent in one SQL statement 20 56
Check for any ASM patches and install them. 1 25
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

751 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