Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

import dump file with date crontab

RobeenJan 9 2018 — edited Jan 16 2018

Oracle database 11.2.0.4

Red Hat Linux 6.7

Hi,

I have an export script I use to export dump of users/tables from different databases.

export script

ORACLE_SID=imis

ORACLE_HOME=/oracle2/ora920

ORACLE_BASE=/oracle2/ora920

PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID ORACLE_HOME ORACLE_BASE PATH

exp OPS\$IMCC_5X/oracle10g TABLES=DOSLIG0,DEMANDE,DEM_ETAPE,MT_FTTH_PCUST,EQPT_RESEAU,PAIRE,P_ZONE_RS,DOSSIER,P_CATHORS,DOSLIGN,P_MOTIFIF,H_DEMLIG0,CLIENT FILE=/gaia_backup/dumpOTC/GAIAOPS`(date +"%d%m%Y%H%M")`.dmp log=/gaia_backup/dumpOTC/GAIAOPS`(date +"%d%m%Y%H%M")`.log

The dump file is in the format below

GAIAOPS090120182056.dmp

1. I want to add scp command to transfer the dump to destination.

scp GAIAOPS`(date +"%d%m%Y%H%M")`.dmp oracle@10.210.128.119:/u02/dump

will not work because the minute will be different.

Can anyone please advise how I can proceed?

2. On the destination, I want to schedule the import script in crontab so that it will pick the above dump file automatically. Please advise what would be the dump file name

imp \"/ as sysdba\" file=<dump file> fromuser=OPS\$IMCC_5X touser=OTC DATA_ONLY=y log=log131117.log

Regards,

Joe

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2018
Added on Jan 9 2018
7 comments
501 views