cancel
Showing results for 
Search instead for 
Did you mean: 

Online Backup restore

Former Member
0 Kudos

Hi All,

I have an requirement of restoring my present running development server (ECC 6.0 with EHP4 on AIX 6.1) previous online backup on one temp machine.

I did installation of OS and SAP on my tempdev system. I copied the backup in /sapbackup directory on disk.

I am following article given in below link -

[http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a975013a-0d01-0010-7c9d-dcfda2e3b566]

But I am confused as my source system snd target system both are having diffrent host names and SID's (as I can not put the same because present DEV is running)

I am unable to get any idea how to start my oracle database restore and proceed ahead.

Thanks and regards,

Ramesh.

Accepted Solutions (1)

Accepted Solutions (1)

tomas-krojzl
Active Contributor
0 Kudos

Hello,

you need to use system copy procedure:

https://service.sap.com/instguides --> SAP Business Suite Applications --> SAP ERP --> SAP ERP 6.0 --> Installation

Then go to document named "System Copy for SAP Systems Based on NW 7.0 EHP1 ABAP" and download it.

Note: In case you are using ABAPJava - download appropriate guide but you must be aware that for Java you will need to run export on source and import on target machine using SAPinst on top what is explained below. (Please let me know if you have ABAP only or ABAPJava system.)

In the document you downloaded follow chapter "5.1 Oracle-Specific Procedure" on page 50.

Just be very careful with step "5.1.1 Generating the Control File Structure" with using OraBRCopy tool. I've tested this once and it is stopping source SAP system. So do not create yourself outage. In our approach we are not using OraBRCopy tool but instead we run following Oracle command on source machine:

sqlplus /nolog

connect / as sysdba

alter database backup controlfile to trace;

Then in /oracle/<SID>/saptrace/usertrace list last file ora_xxxx.trc and you will have there two create control file statements. What you need is to adapt them accordingly:

a.) extract first create controlfile command (nothing else) into separate file refresh_<TRG>.sql on target system

1.) Substitue <SRC> by <TRG> all over the file.

2.) Adapt all directories of logfiles and datafiles to the target system.

3.) Check actual size of online redolog files and adapt the sizes of logfiles.

4.) Change: Create controlfile reuse database "<SRC>" noresetlogs archivelog

to: Create controlfile set database "<TRG>" resetlogs noarchivelog

(important point is to have "set" keyword there)

5.) make sure you have only create control file command there

b) extract all "ALTER TABLESPACE xxxx ADD TEMPFILE" commands into separate file temp_<TRG>.sql on target system

1.) Substitue <SRC> by <TRG> all over the file.

2.) Adapt all directories of logfiles and datafiles to the target system.

Note: Check if there is no modification of structure of source database after backup (new datafiles, moved datafiles, etc.). If yes, you must modify the sql script.

Cross check the modification with what is written in SAP Guide. If you do now feel confident to do this manually - use the SAP tool - it is more automatic but SAP stop is required.

After you will do restore of all files to correct locations (same as in refresh_<TRG>.sql) then you need to rename the database:

sqlplus /nolog

connect / as sysdba

startup nomount

Then create control file:

@refresh_<TRG>.sql

Then in case of online backup you have to recover (DO NOT recover in case of offline backup is used and you do not wish to apply any redologs - Oracle will get stucked and you will have to delete and recreate control file.)

recover database using backup controlfile until cancel;

Then ensure that all required redologs were applied (use AUTO option to speed up redolog application.)

alter database open resetlogs;

If no error then:

shutdown

startup

And that's it... You can finish installation of SAP system doing post system copy actions as written in SAP guide.

Hope it helps.

Best regards.

Former Member
0 Kudos

Hi Tomas,

Thank your very much for your answer. My system is ABAP only.

My problem is applying old backup (not present backup)

The first step of system copy is generating control file on source system and then creating backup on source system. Here I dont have the control file generated during my 3 months past backup.

So I feel system copy in case of oracle is useful to make replica of present source system. If I am wrong, please correct me.

So I choosen the second alternative is disaster recovery. where I got stuck in my past message.

Please suggests your expert solutions.

Regards,

Ramesh.

tomas-krojzl
Active Contributor
0 Kudos

Hello,

it is ok to use current system to generate control file from current database that will be used for 3 months old backup - the only thing you must take care is to carefully "undo" all structure changes done since the backup (if you added new datafile after backup - you must delete the file reference from sql script, etc.)

You can use structure overview log to track the changes (in case you are using brtools as recommended).

It is also useful to compare list of data files in sql file vs. list of files on tapes (in backup).

It is not hard to do this (we are doing such thing quite often).

Disaster recovery is not a system copy. What you are performing is EXACTLY system copy (it does not matter it is from old backup). It is also important that you perform all post activities.

Also be very careful before you start the system to not have all jobs executed again sending data to external systems. (It is recommended to set # of background WP to 0).

Hope it helps.

Best regards.

Edited by: Tomas Krojzl on Oct 28, 2010 10:20 AM

Former Member
0 Kudos

Hi Tomas,

Thanks for your answer.

I did the following steps -

I stopped current develpement server. I setup new system with same filesystem, SID and hostname.

I restored my online backup, using brrecover. I restored all datafiles, control files

The database restore was successful.

But my databse is not getting connected in SQL prompt. Its saying connected to idle instance.

I did executed following command,

SQL> conn / as sysdba;

Connected to an idle instance.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 2399141888 bytes

Fixed Size 2085912 bytes

Variable Size 1207962600 bytes

Database Buffers 1174405120 bytes

Redo Buffers 14688256 bytes

Database mounted.

SQL> recover database using backup controlfile until cancel;

ORA-00279: change 107866316 generated at 10/16/2010 01:00:48 needed for thread 1

ORA-00289: suggestion : /oracle/DEV/oraarch/DEVarch1_7931_712108107.dbf

ORA-00280: change 107866316 for thread 1 is in sequence #7931

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

CANCEL

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01195: online backup of file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/oracle/DEV/sapdata1/system_1/system.data1'

ORA-01112: media recovery not started

I don't have any archive log of corresponding backup date and time.

Please suggest how to finish this recovery and open my database resetlogs.

Regards,

Ramesh.

tomas-krojzl
Active Contributor
0 Kudos

Hello,

in case you are using ONLINE backup you MUST have offline redologs - these two things are connected. It is not possible to make it funtional without redologs. If you have only online backup and no redologs you do not have all things required to finish the operation.

Check archive logs on tapes if you can restore the logs or check the backup log - in case you used online_cons backup type logs were archived after the backup was done to the same tape.

Best regards.

Answers (1)

Answers (1)

Former Member
0 Kudos

I think only online backup is not sufficient and it must required the offline redo log file.

Thanks.

Former Member
0 Kudos

If you do not have the sufficient log files to recover the database the online backup is useless. I suggest going forward you must configure online_consistent (online_cons) option. This is a alternative to your offline backup.

Follow: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d7/839e9f72dd4049896dab7d153662c5/frameset.htm