HOW TO PERFORM BACKUP RESTORE RECOVERY Oracle 12c RMAN Backup Restore Recovery

YouTube video

In this article, we will explore the process of performing backup, restore, and recovery activities in Oracle 12c, specifically using the RMAN (Recovery Manager) tool. We will be working with two databases, namely “prod” and “test_underscore.” Our action plan involves taking a backup of the prod database, dropping the database, and then restoring it from the backup.

Before Getting Started

Before we begin the backup process, it’s important to ensure that we have a successful backup. To do this, we need to create a backup directory and grant it appropriate write permissions. The details for creating the backup directory and setting permissions will be provided in the description box of the video.

Additionally, it’s crucial to check the environment settings before proceeding with the backup and restore activities. The prod database should be in read-write mode, with the archive destination enabled and the catalog mode enabled.

Performing the Backup

  1. Connect to RMAN: To initiate the backup process, we need to connect to the RMAN tool.

  2. Prepare the Backup Script: The backup script should be prepared in advance. In this case, a compressed backup in a specific format is being taken. To ensure we can recover up to a specific point, we are also including archive logs in the backup. Additionally, a control file backup is taken, which is essential for the restore process.

  3. Execute the Backup Script: Run the backup script prepared in the previous step. It may take some time to complete, depending on the size of the database.

  4. Verify Backup Completion: Check the database to ensure that the backup has been completed successfully. Look for any warnings or errors.

Once the backup is completed successfully, we can proceed with the next steps.

Preparing for the Restore

Before dropping the database, it’s important to make a backup of the spfile (server parameter file). This is necessary because the spfile will be deleted when the database is dropped. After dropping the database, we can rename the backup file to the spfile and proceed with restoring the instance in no mount mode.

Dropping the Database

Before dropping any database, it’s crucial to verify that we are working with the correct database. To do this, it’s recommended to shut down the database, start it in restricted mode, and then drop the database.

Restoring the Database

Now that the database has been dropped, we can proceed with the restore process.

  1. Restore the Control File: Start the instance in no mount mode and restore the latest control file backup.

  2. Mount the Database: Once the control file is restored, we can mount the database.

  3. Catalog the Backup Directory: Catalog the backup directory where the backups are stored.

  4. Restore the Database: Finally, restore the entire database, including both data files and system files. Allocate only two channels for the restore process.

  5. Recover the Database: Recover the database using the archive logs backups.

Conclusion

In this video, we learned how to perform backup, restore, and recovery activities using the RMAN tool in Oracle 12c. We followed a step-by-step process that involved taking a backup, dropping the database, and then restoring it from the backup. It’s essential to ensure that the parameter file and control file are properly backed up to successfully restore the database. If you encounter any errors during the process, consider them as learning opportunities. In the next video, we will explore restoring a database on a different server and discuss the importance of the password files in that scenario. Hope you found this video informative and useful. Stay tuned for more content in the upcoming videos. Thank you for watching!

Key Points:

  • Backup, restore, and recovery activities in Oracle 12c
  • Use the RMAN (Recovery Manager) tool for these activities
  • Create a backup directory with appropriate permissions
  • Check environment settings before proceeding
  • Connect to RMAN and execute the backup script
  • Verify the completion of the backup
  • Take a backup of the spfile before dropping the database
  • Drop the database by following the correct sequence
  • Restore the control file, mount the database, and catalog the backup directory
  • Restore the entire database and recover it using archive logs backups
  • Learn from errors or mistakes that occur during the process