Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 953
  • Last Modified:

Oracle Export error with crontab

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
nasirsh
Asked:
nasirsh
1 Solution
 
MikeOM_DBACommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now