Restore Operations With rman

 

RMAN is a tool also recommended by Oracle for backup and recovery.

There are many recovery scenarios. The main ones are:

  1. Recovering a database file
  2. Recovering a tablespace
  3. Recovering the database

 

1 – Recovering a database file:

This is the process that should be done when you receive an error similar to the following:

 

The following commands can be used to recover the related file:

 

2-  Recovering a Tablespace:

It is painful for users but very simple operation for DBAs.

Solution:

 

3-  Recovering the database:

This is the most difficult situation that can happen to you. If the database does not open and many files have been deleted, you will need to return the database from the backup. If you try to open the database and there is a situation similar to the following:

 

 

Don’t panic, everything’s under control.

Run the following command from a rman session.

Later

 

Some different parameters may be required for the “Conrolfile” return operation. The location of the backup, the place to return, etc. You should see the output similar to the following when you return.

 

Then run the following command from a rman session.

 

Then run the following command.

 

Connect with SQL PLus to access the latest stable SCN information of the database with the following command:

 

Close all rman sessions and then reconnect.

With the following command, let’s bring the database to the final stable SCN.

 

These operations can take a long or short period depending on the read speed of the backup environment. When everything goes well, the database will be open and running.

Make sure you get a full backup immediately after each database recovery. Because the previous backups will be invalid.

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *