Operating System - HP-UX
1838496 Members
2528 Online
110126 Solutions
New Discussion

SAP 4.6C/Oracle DB Online Recovery

 
Sanjoy Rath
New Member

SAP 4.6C/Oracle DB Online Recovery

We are doing the Online Database recovery Test for SAP 4.6C Oracle Database. We have taken a offline and online backup(with the archive log) of the source system. We have installed SAP 4.6C in a target system. Both the target and the source systems have the same SID name. We trying to restore the database of the source to the target. The offline database recovery test is successful however we have failed with the online database recovery test.

What are the following things that needs to be done (in sequence) to complete the online database recovery test.

2 REPLIES 2
John Dixon_1
Advisor

Re: SAP 4.6C/Oracle DB Online Recovery

It depends what you are trying to recover really, but as a guide if you wanted to recover a corrupt datafile (eg: /file01.dbf)the procedure would be:
If I assume /file01.dbf is in tablespace ts_my_data
alter tablespace ts_my_data offline;

then restore an old know good copy of the datafile (/file01.dbf). If you are restoring to a different location (file path) then you will need to tell oracle to rename the file.
ALTER DATABASE RENAME FILE 'old' TO 'new';

when the file has been restore you need to tell oracle to do the recovery:
RECOVER TABLESPACE ts_my_data;

You may have to type AUTO at the next prompt to tell oracle to automatically apply the archive logs.

That should recover the tablespace.
When you get the media recovery complete message you need to bring the tablespace back on line:

ALTER TABLESPACE ts_my_data online;

Thats it!
Good Luck
John
Bruno DESQUESNE
Advisor

Re: SAP 4.6C/Oracle DB Online Recovery

Hi,

If I understand correctly, you are performing a full database recovery. Obviously, What you can recover depends on what you have backed up. Before explaining the restore, I explain how we backup (sure I know there are more sophisticated tools like Oracle RMAN and so on).

Online Backup
We are using a home made set of scripts which run (within Omniback 2.55 and 3.5) and do the following :
- mark the begining of backup in archive of redo-log directory
- pass tablespace by tablespace to issue a begin backup/ execute the backup on tape/ issue an end-backup. At this step, we force a redo log switch and then a new archive file.
- generate a backup of controlfile
- force again a switch of redolog to get a last archive file (paranoid mode, push me to double the switch)
- backup all archive of redolog generated since the mark we generated at first step.

Restore and recover
- restore what has been backed up
- log-in as your dba account with the correct environment
- use svrmgrl and connect internal
- issue : STARTUP MOUNT (to avoid opening because with online backup, you let your database in an open state)
- issue : RECOVER AUTOMATIC DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;
- you should have at least one or two archive files applied automatically in sequence up to a point where you get :

ORA-00308: cannot open archived log
ORA-07360 sfifi...
Specify log : ( | filename | AUTO | CANCEL

then, just type CANCEL
and you 'll get :
Media recovery cancelled

Finally, issue ALTER DATABASE OPEN RESETLOGS


At this point your database should be ok. Perhaps there are better ways but it works well since Oracle7 up to 8i.

I Hope this will help

Regards

(I attached a bonus : nice document on this topic)