cancel
Showing results for 
Search instead for 
Did you mean: 

Backup recovery test

Former Member
0 Kudos

Hi ALL,

My client is having requirement of ensuring the backup from SAP as recoverable in case of disater. As I am new in Oracle database, I need as specific ponts / tasks to fullfil this requirement.

I have new system installed with diffrent SID i.e. TST, this system is having same directory stucture of my source system.

Now I have taken brbackup online and archieve log backup of source system PRD and copied this entire content of SAPBACKUP directory into my target system TST SAPBACKUP directory.

Please tell me the important steps and if possible some commands and clues. I am planning to prepare the road map based on your suggestions and move ahead so I can restore the DB in minimum time.

Please dont paste the other forum links and any general document link, because after too many search, I already got pitched of in deciding the first step, as all of them contains multiple options of restore in multiple ways.

My requrement is simple and only the important steps with commands based on your own experience which will be helpful in your opion to do this activity successful.

Thanks and Regards,

Ramesh.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member524429
Active Contributor
0 Kudos

Hi,

Have you referred this document [Homogeneous System Copy using Online & Offline Backup|http://www.basisconsultant.com/component/remository/Sytem-Copy-Guides/Homogeneous-System-Copy-using-OnlineandOffline-Backup/]. Test your Disaster setup requirement by doing System copy procedure (which is faster..) which is mentioned in this document and the same things are already written by Rajesh.

Regards,

Bhavik G. Shroff

Former Member
0 Kudos

Hi Ramesh,

Just read the System Copy guides for your test.

Here are the steps for the same.

1. Take the Online+ Redolog backup of Source system. (Offline is recommeded).

2. Delete all data from Target systems sapdata<n>, saparch, sapbackup, oraarch, mirrlog<n>,origlog<n> directory.

3. Restore backup of source system to target system.

4. Generate Controlfile from Source system

(alter database backup controlfile to trace as u2018/path/for/control.sqlu2019) and copy it to TARGET system. also copy init<SID>.ora file form source to target system.

5. Edit "control.sql" file in Target system.

6. Remove all lines before u201CSTARTUP MOUNTu201D line. Delete all commented u201C#u201D or u201C---u201C lines. and also Remove all lines after u201CCHARACTER SET WE8DEC;u201D. Remove all Commented lines.

7. Change all source SID to target SID via following VI command. ":%s/<SSID>/<TSID>/g" or use notepad if the system is windows (in both Control.sql and init<SID>.ora on target system.

8. Change the line u201CCREATE CONTROLFILE REUSE DATABASE <SSID> NORESETLOGS ARCHIVELOG;u201D as u201CCREATE CONTROLFILE RESUE SET DATABASE <TSID> RESETLOGS ARCHIVELOG;u201D.

9. On TARGET system, log on as ora<sid> user.

10. Run the below commands.

#su u2013 ora<sid>
#sqlplus / as sysdba
#SQL>@/path/to/CONTROL.SQL;
(Above script must be executed without any errorsu2026 In case of any error, correct it and re-run the script.)
Once the script execution is successful, try to open the database as below.
#SQL>alter database open resetlogs;

it will show database opened message.

In case of online backup, you may need to perform media recovery. To do this,

#SQL>recover database using backup controlfile until cancel;

provide the files it will ask you. It it ask you for Archive logs then, make sure that you have renamed archive logs in Target system with Target SID. Use the below script on Unix.

cd /oracle/<TSID>/saparch
for i in `ls|grep <SSID>`;
do
file_name=`echo $i |cut -dD -f2`;
mv $i <TSID>${file_name};
done

Once the recovery is complete, try to stop and start the database again.

11. Check database communication using "R3trans -d" from <sid>adm user.

12. if it returns error code 0012, then follow the below process.

Edited by: Rajesh Narkhede on Mar 26, 2010 9:22 AM

Former Member
0 Kudos

--- Continue to previous post... (to make the proper formatting...)

#su - ora<sid>
#sqlplus / as sysdba;
SQL> CREATE USER OPS$<SID>ADM IDENTIFIED BY <NEW_PASSWORD> ;
SQL> GRANT CONNECT, RESOURCE TO OPS$<SID>ADM;
SQL> DROP TABLE OPS$<SID>ADM.SAPUSER;
SQL> CREATE TABLE OPS$<SID>ADM.SAPUSER
(USERID VARCHAR2(256), PASSWD VARCHAR2(256));
SQL> INSERT INTO OPS$<SID>ADM.SAPUSER VALUES ('SAPR3', 'NEW_PASSWORD'); 
SQL> ALTER USER SAPR3 IDENTIFIED BY <NEW_PASSWORD>;
SQL> ALTER DATABASE RENAME GLOBAL_NAME TO <TSID>;

Then again check the result of "R3trans -d". Once the you get return code (0000). Just try to start the sap and perform post installation activity.

1. Run "SM06" and select "Database copy or Database Migration". Reconfigure TMS.

I would recommend you just go through the System Copy guide and the following notes.

50088 - Creating OPS$ users on Windows NT-Oracle

361641 - Creating OPS$ users on UNIX

400241 - Problems with ops$ or sapr3 connect to Oracle

Regards.

Rajesh Narkhede

Former Member
0 Kudos

Hi Rajesh,

Thank you very much for perfect answer.

I will follow the same.

Former Member
0 Kudos

Thanks Rajesh

I've also benefited greatly from your input on system copy. I plan to do my 1st homogenous system copy very soon

regards