KEMBAR78
Restore Oracle DB On Diff Server With Same DBNAME | PDF | Backup | Computer Science
0% found this document useful (0 votes)
131 views20 pages

Restore Oracle DB On Diff Server With Same DBNAME

This document provides a detailed guide on restoring an Oracle RMAN backup to a new host while maintaining the same database name. It outlines the necessary steps for both the source and target environments, including creating backups, transferring files, and restoring the database using RMAN commands. The process is demonstrated using Oracle 19c on Oracle Linux Server 7.9 for both the source and target systems.

Uploaded by

aditya.rajak2024
Copyright
© © All Rights Reserved
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)
131 views20 pages

Restore Oracle DB On Diff Server With Same DBNAME

This document provides a detailed guide on restoring an Oracle RMAN backup to a new host while maintaining the same database name. It outlines the necessary steps for both the source and target environments, including creating backups, transferring files, and restoring the database using RMAN commands. The process is demonstrated using Oracle 19c on Oracle Linux Server 7.9 for both the source and target systems.

Uploaded by

aditya.rajak2024
Copyright
© © All Rights Reserved
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/ 20

UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

RESTORE ORACLE DB TO NEW HOST WITH SAME DB NAME USING RMAN

In This article I will demonstrate how to Restore the oracle RMAN backup on different Server
keeping the Same Database Name. In TARGET environemnt we have the same directory
structure as our SOURCE environment. Here we are running Oracle 19c Database.

ENVIRONMENT

Let us understand our environment.


SOURCE TARGET
OS / VERSION Oracle Linux Server 7.9 Oracle Linux Server 7.9
OS KERNEL Linux 3.10.0-1160.el7.x86_64 Linux 3.10.0-1160.el7.x86_64
HOSTNAME Node1.localdomain Node2.localdomain
IP ADDRESS 192.168.56.106 192.168.56.110
CDB NAME uzmadb uzmadb
PDB NAME uzmapdb uzmapdb
DB VERSION 19.3.0 19.3.0
ORACLE HOME /u01/app/oracle/product/19c/db_home /u01/app/oracle/product/19c/db_home
FILE SYSTEM Non - ASM Non - ASM
DATAFILE LOCATION /u01/app/oracle/oradata/UZMADB /u01/app/oracle/oradata/UZMADB

Page 1 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

SOURCE DATABASE

We have a CDB (UZMADB) with PDB (UZMAPDB) runing on host (Node1).

SOURCE DATABASE DATAFILE LOCATION

The CDB (UZMADB) with PDB (UZMAPDB) datafiles are located at /u01/app/oracle/oradata/UZMADB

Page 2 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

SOURCE DATABASE TEMPFILE LOCATION

The CDB and PDB tempfiles are located at /u01/app/oracle/oradata/UZMADB .

SOURCE DATABASE REDOLOG LOCATION

The CDB (UZMADB) redologs are located at /u01/app/oracle/oradata/UZMADB .

ON SOURCE

Create backup directory to keep the rman backup and other important files.

Page 3 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

Create directory to keep the rman backup and other important files.

ON SOURCE DATABASE

Create pfile at respective backup location from spfile.

Page 4 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON SOURCE DATABASE

Connect with rman and take spfile backup at specified backup directory location.

Note: here autobackup of the spfile and controlfile is also created in FRA location.

Page 5 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON SOURCE DATABASE

Connect with rman and take database backup at specified backup directory location.

Note: here autobackup of the spfile and controlfile is also created in FRA location.

Page 6 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON SOURCE DATABASE

Connect with rman and take database archivelogs backup at specified backup directory location.

Note: here autobackup of the spfile and controlfile is also created in FRA location.

Page 7 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON SOURCE DATABASE

Connect with rman and list archive log backups and note the last archivelog sequence no.

In our case the last archivelog sequence# is 26

In between Archivelogs Ouptut is not shown

Page 8 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON SOURCE DATABASE

Connect with rman and take database controlfile backup at specified backup directory location.

Note: here autobackup of the spfile and controlfile is also created in FRA location.

ON SOURCE

Go to the Backup location directory and list all files.

ON SOURCE

Go to the Backup location directory and move all the files to other server (i.e., node2).

Page 9 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

Go to the Backup location directory and list all the files.

ON TARGET

Cat the contents of the PFILE. To list the directory locations

Page 10 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

Create the required directories.

ON TARGET

Make the entry in ORATAB file.

ON TARGET

Start the database instance in NOMOUNT using pfile.

Page 11 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

There is no SPFILE in the $ORACLE_HOME/dbs location.

ON TARGET

Connect with RMAN and restore the SPFILE from the backup location.

Page 12 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

We can see that DB is up without SPFILE, so shutdown the database.

ON TARGET

We start the DB in nomount mode and this time it uses the SPFILE from $ORACLE_HOME/dbs.

Page 13 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

Connect with RMAN, the DB is in nomount mode and restore the controlfile from backup location.

ON TARGET

Connected with RMAN only, start the DB in mount mode.

Page 14 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET

Connected with RMAN, and catalog the files present in backup location.

ON TARGET

Page 15 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

Connected with RMAN, and try to restore the database.

ON TARGET

Page 16 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

Connected with RMAN, and try to recover the database.

Note: The Last archive sequence# applied is the same that we noted above on target side.

ON TARGET

Connected with DB, and check the datafiles header FUZZY state.

ON TARGET

Page 17 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

Connected with RMAN, and open the DB with RESETLOGS.

ON TARGET

We can see that CDB (UZMADB) with PDB (UZMAPDB) is runing on host (Node2)

Page 18 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

ON TARGET DATABASE DATAFILE & TEMPFILE LOCATION

The CDB (UZMADB) with PDB (UZMAPDB) datafiles are located at /u01/app/oracle/oradata/UZMADB

ON TARGET DATABASE REDOLOGS LOCATION

The CDB (UZMADB) redologs are located at /u01/app/oracle/oradata/UZMADB

Page 19 of 20 o-dba-g.blogspot.com
UZMA PARVEEN DB RESTORE ON DIFF SRV; SAME DBNAME

THANKYOU !!!!

Page 20 of 20 o-dba-g.blogspot.com

You might also like