Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle Export error with crontab

Posted on 2009-05-11
1
Medium Priority
?
941 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 200 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

704 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