-
Problem in export dump files
Hi All,
My DB is Oracle 8.1.7 on RH Linux 6.2. One of our drives on production system is running out of space. I got all the raw data files which we get from the different client systems on a weekly basis and export dump files are located on this drive. I want to compress the export dumps while the export is performing. Here is the actual script which i'm running on a daily basis. Can any one please help me in modifying this script so as to compress my dump files using gzip and again using split command as Linux is having a limitation on 2G per each file.
my new script should be some thing like....
exp .......|gzip|split........
This Split command adds a unique identifier for each splitted file PREFIX. Lets say the Prefix is some thing like expdmp, then then compressed files created are exp
I know what exactly this gzip and split does, but couldn't implement them in a shell. Can any one help me please.....
SCRIPT:
==========
export_dl.sh:
ORACLE_HOME=/opt/oracle/product/8.1.6
ORACLE_SID=cmsrpt1
export ORACLE_HOME ORACLE_SID
/opt/oracle/product/8.1.6/bin/exp / PARFILE=/u05/mytools/expimp/exportparam_dl
exportparam_dl :
LOG=/u05/mytools/logs/export_dl.log
OWNER=dloader
CONSISTENT=Y
COMPRESS=N
FILE=/u09/mytools/expimp/expdat1.dmp,
......................../expdat10.dmp
FILESIZE=2G
====================================
Any help would be greatly appreciated
PNRDBA
-
Try something like this:
------------ cut -----------------------
# -- export_dl.sh:
ORACLE_HOME=/opt/oracle/product/8.1.6
ORACLE_SID=cmsrpt1
OUT_FILE=/u09/mytools/expimp/expdat.dmp.gz
export ORACLE_HOME ORACLE_SID OUT_FILE
#
# Create a pipe for output of export
#
PEXP=/tmp/exp$$
mknod $PEXP p
chmod 777 $PEXP
#
# Start export
#
cat $PEXP|gzip -c |split -b 2000m ${OUT_FILE} &
/opt/oracle/product/8.1.6/bin/exp FILE=$PEXP \
PARFILE=/u05/mytools/expimp/exportparam_dl
#
# End export
#
rm -f $PEXP
exit
------------ cut -----------------------
# -- exportparam_dl :
LOG=/u05/mytools/logs/export_dl.log
OWNER=dloader
CONSISTENT=Y
COMPRESS=N
------------ cut -----------------------
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
Thanks a lot LKBrwn_DBA!!! i'll try for that and get back to you......
PNRDBA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|