-
Multiple DB's using same rman script problem
RMAN Script:
spool log to '/home/oracle/backup/flush.log';
run {...cut for issue clarity...}
exit;
spool log off;
The problem is the spool file. If I run this in parallel, the spool file will get screwed up.
Can I pass in a variable?
Should I have one script for each database (flushDB1.rman, flushDB2.rman, etc.)?
-Ken
-
you could send all stdout to a file instead of using spool in a file
-
rman catalog foo/bar@cat target / cmdfile=your_script.rman msglog=db1.out
Jeff Hunter
-
Originally Posted by davey23uk
you could send all stdout to a file instead of using spool in a file
For example...
cron job???
script_that_runs_rman.sh>/home/oracle/backup/logs/DB1_flush.log
Will this catch it all?
-
Originally Posted by marist89
rman catalog foo/bar@cat target / cmdfile=your_script.rman msglog=db1.out
db1.out could be $1, for example?
-
As Jeff pointed
backup_archive.rcv
connect target / ;
connect catalog user/passwd@catalogdb
run {
allocate channel d1 device type disk format '/rman/logfiles/%d_%u_%p';
BACKUP ARCHIVELOG ALL DELETE INPUT;
release channel d1;
}
exit;
backup_archive.sh
if [[ -z ${1} ]]; then
echo "please provide a dbname and try again";
exit 1;
else
LOGFILE='/backup/${1}_log_`date +\%Y\%m\%d`
fi
rman cmdfile=backup_archive.rcv msglog=${LOGFILE}
exit 0;
I personally would prefer to generate the rcv script dynamically and then delete upon finishing it.
This would tag the file with the DBID and the date
Thanx,
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Thanks Sam. I appreciate the detailed explanation. Thanks for your time.
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
|