DG ,
Check this out
******************* SCRIPT STARTS ********************
Using Unix compress pipe to export database
This script has been tested on Oracle 7.3.4 and 8.0.5
on HP-UX.
The script works regardless of whether there are
multiple versions of Oracle installed, and relies on
your oratab file being installed and set up correctly,
as per OFA guidelines.
This script should only be run by a user with the
EXP_FULL_DATABASE role.
This is a unix korn shell script, and you feed the
script the name of the database you wish to export as
a parameter ($1), and this name is case insensitive,
as it will pickup the correct case from oratab.
A trick to hiding the password for the user, is to
place the password for the user in a file and give
read permission only to the user or group (dba) on
that file, then instead of hard coding the password as
in the example below, one would change the line with
'PASSWD=' to
PASSWD=`cat /home/user/secretplace/exportusr.pw`
where the above file contains a single line with the
password for the export user. If you are using Solaris
(Sun), modify the first line to read
"ORATAB=/var/opt/oracle/oratab"
contents of compexp.sh
ORATAB=/etc/oratab
DBSID=$1
LINE=`grep -i $DBSID $ORATAB`
echo $LINE
case $LINE in
"") echo 'Invalid Oracle SID specified : ' $DBSID ;;
*) ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
export ORACLE_SID
ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export
PATH
touch /tmp/${ORACLE_SID}comp
rm /tmp/${ORACLE_SID}comp
/sbin/mknod /tmp/${ORACLE_SID}comp p
COMP=`which compress`
USR=dba_user
PASSWD=oradba
export USR PASSWD
$COMP
/bkups/exports/${ORACLE_SID}/${ORACLE_SID}full.`date
+%y%m%d`.exp.Z &
$ORACLE_HOME/bin/exp $USR/$PASSWD
file=/tmp/${ORACLE_SID}comp buffer=1048576 full=y
echo 'export done !'
;;
esac
******************** END ***************************
--- [EMAIL PROTECTED] wrote:
> Folks,
>
> I know someone had the script because I've read
> it here, but at the time it
> was on little interest since an export did not take
> that much space. Well times
> have changed & I now need a way on HP-UX to export
> into a pipe that passes the
> data thru gzip or compress before hitting the disk
> drive. Anyone have that
> script hanging around??
>
> Thanks in advance.
>
> Dick Goulet
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author:
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX:
> (858) 538-5051
> San Diego, California -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from). You may
> also send the HELP command for other information
> (like subscribing).
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Sakthi , Raj
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).