0% found this document useful (0 votes)
85 views

Backup Recovery Test: Sap Admin

This document provides steps for testing backup recovery by taking an online redo log backup of a source Oracle database, restoring it to a target system, and recovering the database using archived redo logs. It describes editing the control file, changing SIDs, renaming archived logs, opening the database with a resetlogs option, and recovering until cancel is selected. It also covers checking database communication, recreating the OPS$ user if needed, and restarting SAP.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Backup Recovery Test: Sap Admin

This document provides steps for testing backup recovery by taking an online redo log backup of a source Oracle database, restoring it to a target system, and recovering the database using archived redo logs. It describes editing the control file, changing SIDs, renaming archived logs, opening the database with a resetlogs option, and recovering until cancel is selected. It also covers checking database communication, recreating the OPS$ user if needed, and restarting SAP.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

This page was exported from - SAP ADMIN

Export date: Sun Apr 7 19:46:37 2013 / +0000 GMT

Backup recovery test


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 ?/path/for/control.sql?) 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 ?STARTUP MOUNT? line. Delete all commented ?#? or ?---? lines. and also Remove all lines after ?CHARACTER SET WE8DEC;?. 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 ?CREATE CONTROLFILE REUSE DATABASE <SSID> NORESETLOGS ARCHIVELOG;? as ?CREATE CONTROLFILE RESUE SET DATABASE <TSID> RESETLOGS ARCHIVELOG;?. 9. On TARGET system, log on as ora<sid> user. 10. Run the below commands. Run the below commands. #su ? ora<sid> #sqlplus / as sysdba #SQL>@/path/to/CONTROL.SQL; (Above script must be executed without any errors? 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 #su ? ora<sid> #sqlplus / as sysdba #SQL>@/path/to/CONTROL.SQL; (Above script must be executed without any errors? 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;

Output as PDF file has been powered by [ Universal Post Manager ] plugin from www.ProfProjects.com

| Page 1/2 |

This page was exported from - SAP ADMIN


Export date: Sun Apr 7 19:46:37 2013 / +0000 GMT

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.

#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.

Output as PDF file has been powered by [ Universal Post Manager ] plugin from www.ProfProjects.com

| Page 2/2 |

You might also like