Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle restore

AAA_8
Occasional Advisor

Oracle restore

I want a procedure of restore of Oracle.I have installed Oracle in internal disk and I have hotbackup and archivelog in a tape.How can restore all in case of fault of disk ? All documentation is appreciate.
Thanks in advance.
5 REPLIES
Alexander M. Ermes
Honored Contributor

Re: Oracle restore

Hi there.
What about the control files ?
Do a backup of this every now and then :

alter database backup controlfile to trace

Remember : to restore a database to a certain time you need the logfiles ( online and offline up to this point ) and the controlfile because of the time stamp. I hope, you have mirrored ( if possible ) the logfiles ( online ) and the control files on several disks ( physical disks ) and several controler interfaces.

To restore just do a shutdown of the database.
After restoring start the database in mount
and do a recover
recover database until time .....

you can go through the logfiles automatically or one by one manually.

Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Magdi KAMAL
Respected Contributor

Re: Oracle restore

Hi AAA,

Listen, it's critical task what you are trying to do.

You said that you have a hotbackup, and you plan to restaure it. But hotbackup from which time ( consider T0 )??. And what's about the transactions between time T0 and the time that you are planing to restaure ???.

You really need to be familiar with oracle database architecture in order to have a valid coherant backups allowing you to restaure in case of crash or needs.

I would recommand that you do this task with a dba.

From the the hp-ux side, you can do the following :

1. Make an ignite tape ( make_recovery command ) in order to save volume group vg00 ( hope vg00 includes Oracle software ) in cas of miss deleting files. You need to apply this command each time you modify the vg00.

2. Plan to do mirroring on internal disks, this allow you in case of failure of internal disk to just replace the faulty disk and go ahead without restauring.

3. You have to choose a configuration for your disk including data ( all your oracle databases ) :
- Raid 0
- Raid 1
- Raid 5
- Raid 0+1 ( mirroring + stripping )
- AutoRaid ( of HP ).
I would recommand AutoRaid, because of the hotswap disks feature. With this you can mixe, performance with good AutoRaid and availability with hotswap ( hot replace a disk while the database is up and running, small degradation will occured during disk change and disk synchrinizing but the database is still laccessible and running ).

After this point we can start speak about hot and cold backup :

1. You can do cold backup ( full backup ) from a file system backup point of view, database must be shutdowned.
2. You can do a hot backup at time T0 and you have to take care of the "Archive redo log files". Combining hotbackup ( T0 ) and archive redo logs files can bring your database restaure to any point in time and to maintaine your data integrity.

3. RECOVER DATABASE UNTIL
Volker Borowski
Honored Contributor

Re: Oracle restore

In contradiction to Alexander I would like to say:
You do not need controlfiles, but they do ease up things quite well, if you have them.

You can do a binary backup using
"alter database backup controlfile to '/backup/backup_controlfile.bkup';"

Or as Alexander suggested do a "backup to trace", which will deliver a syntax template for the "CREATE CONTROLFILE"-statement.

If you installed all on one disk, you will have loss of work !
Procedure goes like this, assuming your HOT-Backup was taken with tablespaces in BACKUP-Mode (however acomplished) and your archive-logs where saved after a logswitch of the last "ALTER TABLESPACE xxx END BACKUP" command:

- shutdown running oracle processes if still there
- restore the "rst of disk" disk from backup (oracle executables)
- restore datafiles and controlfiles from backup
- restore archivelogs from backup

- STARTUP NOMOUNT

-> You have controlfiles ?
-> Yes: Skip CREATE, MOUNT the DB instead
-> Else: Create a controlfile (with the mentioned template or manual [which will be difficult, but can be done])

- RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

- ALTER DATABASE OPEN RESETLOGS;

I would definately change my setup! You should install Oracle-DB in a way, that you will have no loss of work in case of a single disk-crash.

Volker
Ravi_8
Honored Contributor

Re: Oracle restore

Hi,
control files having the physical structure of the database,without those you can't restore the database, in case of disk problem you can recreate the same database using the control files,and transactions untill the backup time (from the backup you have)
never give up
Massimo Carozzo
Occasional Advisor

Re: Oracle restore

HI AAA.
I'm not an expert n restorein Oracle (And I hope become as later as possible) but, looking at various answer your received I see alse some discussion about several forms of hot backup of Oracle.
I wish send you my current backup script that was tested even in case of restoring Oracle from beginning (Oracle product + databese data).
I hope it will be useful.
Best regards.