Quantcast
Channel: SCN : All Content - SAP on Oracle
Viewing all articles
Browse latest Browse all 2104

System refresh using RMAN backup

$
0
0

Below steps are useful if RMAN is configure for Oracle Database backup and you want to do Backup restore using RMAN configuration for system refresh activity.

 

Consideration

Database      : Oracle 10g

OS                : Linux

 

1.Ensure db is shutdown in target database

 

 

Sqlplus “/ as sysdba”

Shutdown immediate

exit

 

2.Create a symbolic link on target server

 

 

cd /oracle

ln –s /oracle/<Target SID> <Source SID>

 

3. Ftp following directory on Source server to target server

/oracle//sapbackup

 

Note you will always need the .fnr (Level 0) backup

 

Also copy required .inr file, this should be the closest to the point in time you are trying to recover to, but not later than.

 

 

Final file copy is back.log

 

Once copied to target server, ensure permissions are correct

 

 

4.Ftp the following directory on Source server to target server

/oracle//102_64/dbs

 

 

Copy the following files to from source database

/oracle//102_64/dbs

 

 

init<Source SID>.dba

init<Source SID>.ora

init<Source SID>.sap

init<Source SID>.sap

init<Source SID>.sap_rman_incr

spfile<Source SID>.ora

init<Source SID>.bki

 

Again check permissions once copied

 

5. Set environment variables on target server

Note – Ensure you are logged in as ora

SETENV DB_SID

SETENV SAPDATA_HOME /ORACLE/

SETENV ORACLE_HOME /oracle//102_64

 

 

If your session times out, or you log off these environment variables will need to be set again

 

 

6.Restore the DB control files saved with the Level 1 backup (This is the .inr file)

 

 

brrestore -b <.inr file>  -m 0 -d rman_util

 

 

Once complete you should then have the Source SID control files in the following locations

 

 

/oracle//sapdata1/cntrl

/oracle//origlogA/cntrl

/oracle//origlogB/cntrl

 

 

7.Mount the Database

 

 

Sqlplus “/ as sysdba”

Startup mount

Exit

 

 

8.Start the restore of the data files

 

 

brrestore -b <.fnr filename> -m all -d rman_util

 

 

Check log file for successful completion

 

 

9.Apply incremental backup once step 8 complete

 

 

brrestore -b <.inr filename> -m incr -d rman_util

 

 

Check log file for successful completion

 

 

10.Shutdown DB

 

 

Sqlplus “/ as sysdba”

Shutdown immediate

exit

 

 

11. Log off as ora to reset environment variables to original values

 

 

12.On target server remove the logical link created earlier

 

 

Cd /oracle


Rm <Source SID>

 

 

13 .

 

Change the SID of the database by running the control.sql file:

Run the control.sql script at the sqlplus command prompt:

 

- get control file trace  on source system using command "alter database backup control file to trace"

- rename trace file to control.sql and change sorce id to traget database id in control file.

- transfer updated control file to target system

- logon to target system and type:-

 

      su – ora

      sqlplus “/as sysdba”

      sqlplus> @control.sql

      sqlplus> exit;

 

 

14.After this just follow standard  System backup recovery steps to complete point in time recovery using log files.

 

 

15.You can check the database has returned to its original SID and using the correct control files by issuing the following commands

 

 

Sqlplus “/ as sysdba”

"Show parameter control_file;"

 

 

The output should reference the target SID

 

 

"select NAME from v$database;"

 

 

This should show the target SID

 

 

16.Continue as per System Refresh activity. and follow remaining  Post processing steps


Viewing all articles
Browse latest Browse all 2104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>