I will tell you about the RMAN (Recovery Manager) tool that we use frequently Backup and Restore operations in Oracle Databases in this first article of my tutorial series . Backup & Restore is one of the most important things in every Oracle database admins’ task.
In order to administer the Backup & Restore operations easily, Oracle provides us RMAN tool, which is equipped with very special capabilities and comes with the default Oracle installation. The most important feature of the RMAN Tool is that it automates many operations and relieves DBA (Database Administrator) workload.
One of the most important tasks of a Oracle DBA in database administration is to make sure that the backups are taken according to the planned scenario of the database and to check whether the backups are taken properly.
Because in the event of a disaster or a significant loss of data, the eyes will search for the last Backup. It is very important that this last Backup is properly restored and the database recovered consistently. Here, RMAN helps DBAs in all of these operations.
the most important duty of all DBAs is to learn and administer RMAN very good. Knowing what can be done with RMAN in general will reveal the importance of RMAN. Most important features of RMAN are like following.
- You can take Full Backup in Online and Offline Mode.
- You can take Backup of the archivelogs.
- You can also take Incremental backup like full Backup.
- Backups of vital files for our database, such as SPFILE and Control File, can be taken by RMAN.
- You can Restore and Recovery of previously 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.
There are many advantages using the RMAN tool. Many of the tasks can be performed manually without using RMAN, but again we have to use RMAN to automate these tasks in a simple way because it performs safely in our place.
The only significant disadvantage of using RMAN is the fact that Backup can only be restored with RMAN tool.
You can connect to rman tool like following.
[oracle@MehmetSalih ~]$ rman Recovery Manager: Release 184.108.40.206.0 - Production on Mon Mar 25 12:14:39 2019 Version 220.127.116.11.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. RMAN> connect target / connected to target database: DEVECI19 (DBID=4027228950) RMAN>
You can connect to rman directly like following instead of above commands.
[oracle@MehmetSalih ~]$ rman target / Recovery Manager: Release 18.104.22.168.0 - Production on Mon Mar 25 12:14:55 2019 Version 22.214.171.124.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. connected to target database: DEVECI19 (DBID=4027228950) RMAN>
RMAN Tool performs Backup & Restore actions according to spesific configurations. We can learn RMAN’s configuration settings with the following command.
RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name DEVECI19C 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 '/oradata/install/dbs/snapcf_DEVECI19C.f'; # default RMAN>
The default configurations of the RMAN tool are as follows. These configurations may vary depending on need. You can learn the changed configurations with the following query. Since I am not making any changes to the new database named DEVECI19C, a changed configuration will not appear as follows.
[oracle@MehmetSalih ~]$ sqlplus / as sysdba SQL*Plus: Release 126.96.36.199.0 - Production on Mon Mar 25 12:24:00 2019 Version 188.8.131.52.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Connected to: Oracle Database 19c Enterprise Edition Release 184.108.40.206.0 - Production Version 220.127.116.11.0 SQL> select * from v$rman_configuration; no rows selected SQL>
I will continue to tell Oracle RMAN in the next post.
Do you want to learn Oracle Database for Beginners, then read the following articles.
206 views today, 3 views in last 3 hour