Reset RMAN Configuration
At times, you might want to reset RMAN configuration back to default. You can use CLEAR keyword to remove it. Let's see a case of RETENTION POLICY.
RMAN> SHOW RETENTION POLICY;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
RMAN> CONFIGURE RETENTION POLICY CLEAR;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
RMAN configuration parameters are successfully reset to default value
RMAN> SHOW RETENTION POLICY;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
You can see that the end of this configuration is marked as # default. Yes, we reset the configuration successfully.
Be aware of that, some configurations have no default values, let's see the case CHANNEL.
RMAN> SHOW CHANNEL;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 2 G FORMAT 'private_%d_%U' PARMS 'SBT_LIBRARY=libpro.so, ENV=(PRO_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/proorcl.ora)';
Now, we CLEAR the configuration.
RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' CLEAR;
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' MAXPIECESIZE 2 G FORMAT 'private_%d_%U' PARMS 'SBT_LIBRARY=libpro.so, ENV=(PRO_PFILE=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/proorcl.ora)';
old RMAN configuration parameters are successfully deleted
You can see that there's no default value for this configuration.
RMAN> SHOW CHANNEL;
RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters
Which means you have no default channel to use at this moment. You have to either specifically set a channel in your run script of backup or configure a channel to use.
Also, you may reset disk device like this:
RMAN> CONFIGURE DEVICE TYPE DISK CLEAR;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;
RMAN configuration parameters are successfully reset to default value
Default RMAN Configuration
There's a way to see the default setting of RMAN before you reset the configuration.
Shutdown the database.
RMAN> shutdown immediate;
...
Startup to NOMOUNT.
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
...
List all default settings of RMAN.
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCLCDB 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
Further reading 1: How to Backup RMAN Configuration Daily
Further reading 2: 3 Ways to Set RMAN Log Location