Cloning a Standalone database using RMAN Backup pieces

Share via:

Cloning a Standalone database using RMAN Backup pieces

I am making this article to create copy of current PROD database in another server using RMAN backup pieces for testing and development purposes.

i have used a simple method to perform clone database.

Server details :

Source :

Target : 

Implementation :

Step 1:

In Source database, we need check all the details of database like, Archive log mode, DB name, Instance and datafile location.

 

Step 2:

We required to setup the parameters for RMAN like below.

Connect to RMAN

 

Check with show all command.

Note : Before taking the backup ,execute below commands in RMAN prompt for validate previous backups and archive logs.

Step 3 :

Take the backup of database using compress backupset.

Take the backup of archive logs as below.

Target database :

Step 4:

We need to create directory structure same as source database.

Note: If user required in new location we can use db_file_name_convert and log_file_name_convert parameters to change directory structures .

create directory structure in target

SOURCE DATABASE :

Step 5 :

Copy all the backup files to target database using SCP

crosscheck backup files  copied in target or not

Target database :

Step 6:

Export SID and start instance forcefully to retrieve spfile from backup files.

Connect to RMAN  and s tart the database in nomount state forcefully.

Step 7 :

Restore spfile from RMAN backup pieces.

Command to restore spfile from backup controlfile.

SPFILE is restored successfully and we need to shutdown and nomount   the database with spfile to effect changes.

 

Step 8 :

Shutdown the database and nomount .

Check database has started with spfile or not

Step 9 :

Connect to RMAN and restore controlfile

Restore the controlfile using below command

Once controlfile restored ,alter the database to the mount state.

Step 10 :

Use catalog start with option to know the location backup files and names

####Restore database preview;

Step 10 :

Restore database using below command

 

Step 11 :

Recover the database using below command

Step 12 :

Open the database with resetlogs option

Check the database name and open state.

check datafiles.

Finally cloning of NONRAC  database using backup pieces is done. Please implement in lower environments

 

Thank you for giving your valuable time to read the above information.
Follow us on 
Website  www.ktexperts.com
Facebook Page KTExperts Facebook
Linkedin Page : KT EXPERTS Linkedin

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Add Comment