Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Export backup on Oracle8.1.7 on HP-Unix 11.0

Rajkumar_3
Regular Advisor

Export backup on Oracle8.1.7 on HP-Unix 11.0

Hai All,

I need to take the full & incremental & cummulative export of the database on HP-Unix.

Can anyone can provide me a script which can be run through cronjob??

Thanks for the advance in help..

Rajkumar
Oracle DBA
2 REPLIES
Andreas D. Skjervold
Honored Contributor

Re: Export backup on Oracle8.1.7 on HP-Unix 11.0

Hi

Here is a quick and NOT tested solution:

Crontab entry:
30 3 * * 1-5 /path/inc_exp.sh

inc_exp.sh:
export ORACLE_HOME=/u01/app/oracle/product/8.1.7
export ORACLE_SID=
(you migh also want to include NLS_LANG if your using special character sets)
$ORACLE_HOME/bin/exp parfile=/path/inc_exp.par


inc_exp.par:
USERID=system/manager
FULL=Y
INCTYPE=incremental
DIRECT=Y
FILE=/path/inc_exp.dmp
LOG=/path/inc_exp.log
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Graham Cameron_1
Honored Contributor

Re: Export backup on Oracle8.1.7 on HP-Unix 11.0

Here's another way of skinning the same cat,
but using ops$ login to avoid hard coding the system password into a file and it doesn't use a parfile.
This should run from the unix account of a user who has an ops$ account with dba access,
typically 'oracle', 'ops$oracle'
It's a real example (sorry it's v7 !!)


00 23 * * 1-6 /home/oracle/cron/export_des2000.sh >/home/oracle/cron/export_des2000.log 2>/home/oracle/cron/export_des2000.err.log

/home/oracle/cron/export_des2000.sh :


#!/bin/ksh
#
# set up environment
ORACLE_HOME=/app/oracle/product/734
ORACLE_SID=des2000
PATH=${ORACLE_HOME}/bin:${PATH}
export ORACLE_HOME ORACLE_SID PATH

cd /oracle1/exp
rm des2000.dmp.Z
/usr/bin/compress -v des2000.dmp

exp / file=/oracle1/exp/des2000.dmp compress=n, grants=y, indexes=y, constraints=y, full=y


Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.