Could anyone give me the script for cold Backup.
I have solaris8 and Oracle8.0.5
I am very new to Solaris please guide me.
quite simple, since you just have to save your files.
1) know where are your files (datafiles, control files, init files, redo logs)
2) know which device you'll use to save (DAT, DLT, HD ...)
3) simply build a script to shutdown database, and copy the files using cp, cpio, or any other command
4) startup database
if you need details on how to do this, I think I have exemples for you somewhere, but not at work, I could bring you that tomorrow (about 9 AM GMT)
Yep, please give the examples also.
Although not strictly neccessary its also a good idea to get a copy of the init.ora, password files and to backup your controlfile to trace before shutting down. I think there should be some example scripts in the scripts-section on this site :-), if not then take a look on technet
get a file (filelst for example) with all the files you need to save :
any other file you need
then here is a skeleton of script to save your files (note : you can add log functionnalities, etc ...) :
# configure to match your device if DAT or DLT
cat filelst | while read FILENAME
find $LISTSVG | cpio -oxcvB > $BKUPDEVICE
I would suggest that you use a query to build a your cold backup script to get the paths to all your datafiles, control files, and redologs. This would eliminate the need for to know where you files resides because their locations would be gotten from the database. Also if you hardcode your paths every time you add a data file or redologs or move files around you would have to modify your backup script. The oracle scripts section of the site offers some excellent examples. Here the link to the scripts section: http://www.dbasupport.com/oracle/scripts/.
If you would like a copy of the script that I use on my Solaris system send me an email at Ulysses.Hill@Gunter.af.mil.
of course, nothing is hard coded
Click Here to Expand Forum to Full Width