Вы находитесь на странице: 1из 4

RMAN PERSISTENT CONFIGURATIONS

1. Connect to RMAN
Without Catalog DB
-------------------------------
C:\>RMAN TARGET / OR C:/> RMAN TARGET SYS/ORACLE@ORCL
OR
RMAN>CONNECT TARGRT / OR RMAN>CONNECT TARGET SYS/ORACLE@ORCL
With Catalog Database
--------------------------------
C:\>RMAN TARGET / catalog recdb/recdb@orcl2
C:\> RMAN TARGET sys/oracle@orcl catalog recdb/recdb@orcl2
RMAN>CONNECT TARGET / catalog recdb/recdb@orcl2
RMAN>CONNECT TARGET sys/oracle@orcl catalog recdb/recdb@orcl2
2. View the Persistent settings
RMAN<SHOW ALL;
RMAN configuration parameters for database with db_unique_name ORCL are:
i) CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
Backup Retention Policy
A backup retention policy tells RMAN when to consider backups of datafiles and log files obsolete.
Note that when you tell RMAN to consider a backup file obsolete after a certain time period, RMAN
only marks the file obsoleteit doesnt delete it. You must go in and delete the obsolete files through
RMAN .You can set a retention policy by using either of two methods: the default REDUNDANCY option
or the RETENTION WINDOW option. In both cases, you use the CONFIGURE RETENTION POLICY
command to set the retention policy for all of your database files by default.

The REDUNDANCY Option
The REDUNDANCY option lets you specify how many copies of the backups you want to retain. The
default is 1.

The RECOVERY WINDOW Option
Setting the backup retention policy using the RECOVERY WINDOW option enables you to specify how
far back in time you want to recover from when your database is affected by a media failure. RMAN
will keep all backups of datafiles and log files one backup older than the recovery window. For
example, if the recovery window is seven days, RMAN will save all backups starting from the backups
done immediately before the seven-day period.
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
i) CONFIGURE BACKUP OPTIMIZATION OFF; # default

ii) CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
Default Device Type
The default device for backups is a disk; that is, RMAN will automatically make backups to a file system
on your server. If you want to back up to tape, you configure the default device type to sbt (all tape
destinations are referred to as sbt).
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;

iii) CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
Control File Auto-Backup
If you set the CONTROLFILE AUTOBACKUP option to ON, each time you do a backup of your datafiles, the
control file is automatically backed up along with the SPFILE.
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
If CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN automatically backs up the control file and
the current server parameter file each time you do a backup of your datafiles, and when a structural change to
the database affects the contents of the control file which therefore must be backed up.

iv) CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
You can use the control file AUTOBACKUP FORMAT parameter to specify the location and format of the
control file backups. Heres an example:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
'/test01/app/oracle/oradta/backup/cf_%F';


v) CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

Degree of Parallelism
The degree of parallelism (the default degree is 1) denotes the number of channels that RMAN can
open during a backup or recovery. The time taken to complete the backup or recovery will decrease
as you increase the degree of parallelism.
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 4;

vi) CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default



vii) CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default



viii) CONFIGURE MAXSETSIZE TO UNLIMITED; # default
Overview of the MAXSETSIZE Parameter
To specify the maximum size of each backup set, use the MAXSETSIZE parameter in the CONFIGURE or
BACKUP command. By limiting the overall size of the backup set, the parameter indirectly limits the number
of files in the set and can possibly force RMAN to create additional backup sets.
Specifying MAXSETSIZE: Example Assume that you want to back up 50 datafiles, each containing 1000
blocks. To set the maximum size of each backup set to 10 MB, use the following command:
BACKUP DATABASE MAXSETSIZE = 10M;



ix) CONFIGURE ENCRYPTION FOR DATABASE OFF; # default



x) CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default


xi) CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default



xii) CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default




xiii) CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:\APP\ADMIN\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFORCL.ORA'; #
default
SNAPSHOT CONTROLFILE

A snapshot control file is created by RMAN during the backup process that serves as a point-in-time
copy of the database control file. This will ensure that that backups being taken is consistent to a given
point in time. For example, if you add a datafile or tablespace to a database after the backup has
started, (assuming an online backup and before the backup has ended), that datafile and/or tablespace
will not be included in the backup. It is sometimes required that the location and name of the snapshot
control file be changed from its default.
To set the snapshot control file to a different location (and name) use the following:

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orabackup/rman/ORA920/scontrolfile.ctl';


3. File Format Wildcards
Format Aklamas
%a Specifies the activation id number of the database.
%A Specifies the activation id number of the database completed 0
%c Specifies the copy number of the backup piece within a set of duplexed backup
pieces. The maximum value is 256.
%d Specifies the name of the database
%D Specifies the current day of the month in format DD
%e Specifies the archived log sequence number
%f Specifies the absolute file number
%F Combines the DBID, day, month, year, and sequence into a unique and repeatable
generated name
%h Specifies the archived redo log thread number
%I Specifies the DBID
%M Specifies the month in format MM
%n Specifies the name of the database. padded on the right with x characters to a
total length of eight characters.
%N Specifies the tablespace name.
%p Specifies the piece number within the backup set
%r Resetlogs ID
%s Specifies the backup set number
%S Specifies the backup set number completed 0
%t Specifies the backup set time stamp.
%T Specifies the year, month, and day in format YYYYMMDD
%u Specifies an 8-character name constituted by compressed representations of the
backup set or image copy number.
%U Specifies a system-generated unique file name.
%Y Specifies the year in this format: YYYY.

4. Dsd
5. sd

Вам также может понравиться