Solved

Oracle Export error with crontab

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now