In this tutorial, I’ll be describing the RMAN (Recovery Manager), which we frequently use to backup and restore Oracle Databases. Backup and Restore are essential tasks for Oracle database administrators. “Introduction to Oracle RMAN”
Introduction to Oracle RMAN
Oracle RMAN Tool is available to help you manage the Backup & Restore operations. It comes with the default Oracle install and has very specific capabilities. RMAN Tool’s most significant feature is its ability to automate many operations and reduce the workload of DBA (Database Administrator).
Let’s now see how the configuration and administration of the RMAN tool’s features begin from the very basics.
A database administrator who is an Oracle DBA must ensure that backups are done according to the plan and verify that they are being taken correctly.
In the event of a disaster or significant data loss, the eyes will look for the last Backup. It is important to ensure that the last Backup is restored correctly and that the database is consistently recovered. RMAN assists DBAs with all these operations.
All DBAs have the responsibility of learning and using RMAN well. RMAN is important because it will show you what RMAN can do. The most important characteristics of RMAN are as follows. “Introduction to Oracle RMAN”
- You can take Full Backup in Online and Offline Mode.
- You can take a backup of the archive logs.
- You can also take Incremental backups like full Backup.
- Backups of SPFILE and Control File.
- You can Restore and Recovery of previous Backups with RMAN.
- For any reason, you can recover Corrupt Tablespace and Datafiles with RMAN in online mode.
- You can also fix the Corrupt Block with RMAN.
The RMAN tool has many benefits. Although many of these tasks can be done manually, RMAN is required to automate them in a safe way.
You can also install a central Backup & Restore Unit with RMAN. This unit can be connected to all databases and can handle any actions. RMAN can also be used to create encrypted and compressed backups. “Introduction to Oracle RMAN”
RMAN has one major drawback: Backup cannot be restored without RMAN.
How to connect with RMAN
Using the below command you can connect with the RMAN prompt.
[oracle@12cPatching ~]$ rman target/ Recovery Manager: Release 126.96.36.199.0 - Production on Sun Jun 19 18:41:12 2022 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. connected to target database: RCAT (DBID=878459366)
Check RMAN configuration
Rman configuration is mandatory before taking database backup.
RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name RCAT are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.2.0/dbhome_1/dbs/snapcf_rcat.f'; # default
- Convert Physical Standby To Snapshot Standby Database
- How to Restore Database until time
- Oracle RMAN
- RMAN Backup with Archivelog