export dump on crontab

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

export dump on crontab

Roshan
Red Hat Linux 6
Oracle Database 11.2.0.4.0

Hi Erman,

I have scheduled a script on crontab. the content is shown below.

When I execute the script manually, it executes. But on crontab, it is not executing.


export ORACLE_HOME=/u01/oracle/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=RECONDB

expdp l2tcp/l2tcp  tables=gci_ref_bb_offer,gci_preorder,gci_iptv_zte,gci_premium_log,gci_ref_billing_ticket FILE=GCIEXPDNR`(date +"%d%m%Y%H%M")`.dmp log=GCIEXPDNR`(date +"%d%m%Y%H%M")`.log statistics=none directory=GCIDNR network_link=GCIDNR


I have checked the crontab log file, no error is seen.

cron.cron

Thanks,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: export dump on crontab

ErmanArslansOracleBlog
Administrator
What is the name of the script?
Also send me the related crontab line.
Does the crontab user have the execution permission for that script?
Anything that you see in /var/spool/mail/<your_cron_user> log?
Reply | Threaded
Open this post in threaded view
|

Re: export dump on crontab

Roshan
The crontab line is shown below:

45 13 * * * sh /oldbackup/DNRTOOL/cidnr/exportCI.sh

The name of the script is exportCI.sh

Please find below log content when I executed the script on crontab at 13:45 p.m

From oracle@RH-FTTH-DEV-DB1.mtg.local  Fri Mar 23 13:45:01 2018
Return-Path: <oracle@RH-FTTH-DEV-DB1.mtg.local>
Received: from RH-FTTH-DEV-DB1.mtg.local (localhost.localdomain [127.0.0.1])
        by RH-FTTH-DEV-DB1.mtg.local (8.13.8/8.13.8) with ESMTP id w2N9j1Jj012268
        for <oracle@RH-FTTH-DEV-DB1.mtg.local>; Fri, 23 Mar 2018 13:45:01 +0400
Received: (from oracle@localhost)
        by RH-FTTH-DEV-DB1.mtg.local (8.13.8/8.13.8/Submit) id w2N9j17n012265;
        Fri, 23 Mar 2018 13:45:01 +0400
Date: Fri, 23 Mar 2018 13:45:01 +0400
Message-Id: <201803230945.w2N9j17n012265@RH-FTTH-DEV-DB1.mtg.local>
From: root@RH-FTTH-DEV-DB1.mtg.local (Cron Daemon)
To: oracle@RH-FTTH-DEV-DB1.mtg.local
Subject: Cron <oracle@RH-FTTH-DEV-DB1> sh /oldbackup/DNRTOOL/cidnr/exportCI.sh
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>

expdp: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory




Reply | Threaded
Open this post in threaded view
|

Re: export dump on crontab

Roshan
Thanks a lot Erman

I set the LD_LIBRARY_PATH and it is ok
Reply | Threaded
Open this post in threaded view
|

Re: export dump on crontab

ErmanArslansOracleBlog
Administrator
Good.