Tuesday, November 22, 2011

Configuring the RMAN environment

Enabling and Disabling Automatic Control File Backups:

To automatically backs up the control file and the server parameter file whenever RMAN repository data in the control file changes, use the following command

RMAN> configure controlfile autobackup on;

To disable the automatic Control File back, below is the commad

RMAN> configure controlfile autobackup off; 

OR

RMAN> configure controlfile autobackup clear; 

Specifying the Autobackup Control File Directory:


RMAN> configure controlfile autobackup format  for device type disk to 'e:\autobackup\controlfile_%F';

to changes the control file location specified back to default, use the following command

RMAN> configure controlfile autobackup format for device type disk clear; 

Specifying the Snapshot Control Filename and Location:


RMAN> configure snapshot controlfile name to 'c:\ctrl_snap\snct.ctl'; 

To reset the snapshot control filename and location to the default values, use the command as follows:

RMAN> configure snapshot controlfile name clear; 


and use the show command to display the current location of snapshot control file


RMAN> show snapshot controlfile name;

Specifying the Retention Period for RMAN History:

To set the minimum amount of time in order to keep the history of RMAN let say for 15 days, use the command below

SQL> alter system set control_file_record_keep_time=15;
System altered.

Configuring the Default Device Type:

If you want to change the default backup device from disk to tape or from tape to disk then use the following commands:

RMAN> configure default device type to sbt;


You can use the clear option to return the default device type to disk again:

RMAN> configure default device type clear;

You can also explicitly reset the default device type to disk, as shown here:


RMAN> configure default device type to disk;
Once you configure the default device type to disk, all backups will be made to disk.

Configuring Automatic Channels:


If multiple channels are to be configured on a persistant basis the issue the following command. The default is   1.
RMAN>Configure device type disk parallelism 3;


to confirm if the channels configured successfully, use


RMAN> show device type;

Configuring the Default Backup Type:

To change the default backup type to image copies from the default backup set backup type

RMAN> configure device type disk backup type to copy;

Revert to the original setting of backup set backup type by using either of the following two commands:

RMAN> configure device type disk clear;
RMAN> configure device type disk backup type to backupset;

Making Compressed Backup Sets the Default :

By default, all RMAN backups are made in a noncompressed format. Compressed backup sets can be configured both for disk-based as well as for tape-based backups. First example is for disk and the later one is for TAPE

RMAN> configure device type disk backup type to compressed backupset; 
     
RMAN> configure device type sbt backup type to compressed backupset; 
     
Specifying the Maximum Backup Piece Size:

RMAN> configure channel device type disk maxpiecesize 1g;


Creating a Backup Retention Policy:


This command specifies that RMAN must retain all backups for the duration of seven days before marking them obsolete.

RMAN> configure retention policy to recovery window of 7 days;


Backup Retention Policy Based on Redundancy


By default, RMAN keeps a single copy of each backed-up datafile and control file. However, you can  specify that RMAN retain more than a single copy of a backed-up datafile or control file

RMAN> configure retention policy to redundancy 2;

Configuring an Archived Redo Log Deletion Policy

RMAN> configure archivelog deletion policy to backed up 2 times to disk;

The above command specifies that once an archived redo log has been backed up twice to tape, it's eligible for deletion from all archived redo log locations

Limiting the Size of Individual Backup Pieces

RMAN> configure channel device type disk maxpiecesize = 1g;

Configuring the Maximum Size of Backup Sets
RMAN> configure maxsetsize to 1g;



No comments:

Post a Comment