export/import [message #96994] |
Fri, 12 October 2001 08:29 |
lily
Messages: 44 Registered: September 2000
|
Member |
|
|
1.How to take export/import(with log) of an oracle8.1.7 db in sun solaris system ?
2.Looking for a script. also how to automate the script each day at 6 pm?
3. i want to send the dmp file in tape drive.
thanks,
lily.
----------------------------------------------------------------------
|
|
|
Re: export/import [message #96999 is a reply to message #96994] |
Sat, 13 October 2001 05:02 |
Hrudananda Baral
Messages: 12 Registered: October 2001
|
Junior Member |
|
|
Hi,
Here is the script what exactly works fine as requested.
##go to the backup directory
$cd /export/home
put everything in backup_script.sh
---------------------
cd /export/home
ORACLE_SID=<write your SID>
export ORACLE_SID
ORACLE_HOME=<write your Oracle_home>
export ORACLE_HOME
$ORACLE_HOME/bin/exp USERID=<userid/passwd> buffer=1000000 FILE=`date '+Full_exp_<USERID>%d%m%y_%H%M'`.dmp
log=`date '+Full_exp_<USERID>%d%m%y_%H%M'`.log
------------------
To automate the process of export write a crontab for this from your unix login.
$EDITOR=vi
$export EDITOR
$crontab -e
--write this line and save ..and quit
01 18 * * * /export/home/backup_script.sh
$-- the above cron job will try to run the specified script and do the export for the defined userid
and place the dump in /export/home directory.
--to put the export dumps in this directory to the tape you have to write another cron job.
--If your data export takes around 1hr or so then put some another 1 hour gap and schedule the tape backup job around 8pm.
$compress *.dmp --compress all the dumps before writting them to tape.
$vi back_totape.sh
tar cvf /dev/rmt/0m Full_exp_<userid>.dmp.Z
--save and quit
$crontab -e
01 20 * * * /export/home/backup_totape.sh
--save and quit
Make sure you have a blank tape in your DDS tape drive and watch the operation next day morning.
If it fails you feel free to mail back.
Regarding Import we should notuse scripts and I recommend you better choose which dump to be imported to which user.
Could you please let me know in which site it will be available or in which site I can find things like this posted
by others.
Cheers
Baral
----------------------------------------------------------------------
|
|
|
Re: export/import [message #97643 is a reply to message #96994] |
Sat, 05 October 2002 11:27 |
soniamit
Messages: 2 Registered: October 2002
|
Junior Member |
|
|
mr Hrudananda Baral
I have tried this on my server but it gives the message that exp not found the script file is caleld but it does not run properly instead it gives message that exp not found what should i do?
|
|
|
Re: export/import [message #97645 is a reply to message #96994] |
Mon, 07 October 2002 11:01 |
soni amit
Messages: 1 Registered: October 2002
|
Junior Member |
|
|
dear
i have tried the same script but still it give the message that no message found for RDBMS and
facility =EXP etc....etc...
so for that what should i do?
plz reply me as soon as possible
|
|
|