Rman Configuration parameter Part-1
* today we discuss Rman parameter configuration before we take the database backup using Rman.
we need to confirm our database whether it is in archive log mode or not
sql>select log_mode from V$database; LOG_MODE ------------ NOARCHIVELOG The Database is in NOARCHIVELOG mode.
If your database is in archive log mode then skip this steps from 2 to 4
sql>shut immediate; Database closed. Database dismounted. ORACLE instance shut down.
start the database in mount stage
sql>startup mount; ORACLE instance started. Total System Global Area 308981760 bytes Fixed Size 2212896 bytes Variable Size 163580896 bytes Database Buffers 138412032 bytes Redo Buffers 4775936 bytes Database mounted.
change the database from noarchive log into archive log mode and open the database
sql>alter database archivelog; Database altered. sql>alter database open; Database altered.
Ensure the archive log destination
sql>archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 2 Next log sequence to archive 4 Current log sequence 4
let us we can connect the rman with target db
[oracle@oracle11g ~]$ rman target / Recovery Manager: Release 18.104.22.168.0 - Production on Fri Jun 3 11:46:22 2016 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1363580714) RMAN>
Here the first parameter is retention policy has two types
Note: if you are going for recovery window explained things to the client we can't do any further point in time recovery.
by default, it is not recommended
RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY 1; RMAN> configure retention policy to recovery window of 5 days;
by default backup optimization is off this parameter will save the disk space
ex: if we enabled this option the rman would take the datafile backup if it contains any changed data otherwise
it won't take any backup as per backup strategy we would delete 30 days backup because we have the copy of the backup in tape
but the copied of backup is not available because we enabled this parameter so it allows taking backup only
if it contains any changes by default it is recommended to off
we can enable in our test database environment
RMAN> CONFIGURE BACKUP OPTIMIZATION OFF; # default change into RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
Where our backup is going to save either disk or tape, by default it was stored in the disk.
if its necessary we can change the backup into Tape
RMAN>CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default change into RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;
configure the control file auto-backup feature that will be auto-backup control file in case of major changes done in the database.
it would take auto backup of the control file and spfile while we perform any kind of backup
Note: it is very necessary parameter always to enable auto backup on
RMAN>configure controlfile autobackup on;
If we enable the controlfile autobackup this parameter would help where the file would be stored and name convention of the file
RMAN>CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default if we using to store the backup in tape CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt TO 'control_%F'; # default