Saturday , December 16 2017
Home / Oracle DBA / Recovery Manager

Recovery Manager

Create Recovery Catalog

  1. Create tablespace
  2. Create catalog owner
  3. Grant privileges(Recovery_catalog_owner)
  4. Create catalog
  5. Connect to target database
  6. Register target database

EXAMPLES

  1. This example connects to the target database ORCL without a recovery catalog:

$rman target sys/sys_pwd@ORCL NOCATALOG

  1. Example to make a connection to the target database and recovery catalog database:

$rman target sys/sys_pwd@ORCL catalog urman/urman

  1. Registering the target database in the recovery catalog from RMAN prompt.

RMAN> REGISTER DATABASE;

  1. Catalog maintenance commands are executed outside of a run command as follows: $rman target sys/sys_pwd@ORCL catalog rman/rman

RMAN> RESYNC CATALOG;
RMAN> LIST INCARNATION OF DATABASE;
RMAN> SHOW ALL; (shows all the configuration parameters)

  1. RMAN configuration parameters are: RMAN> show all;

Using target database control file instead of recovery catalog
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; CONFIGURE CONTROLFILE AUTOBACKUP OFF;
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 CHANNEL 1 DEVICE TYPE DISK FORMAT’/w001/backup/ORCL/rman%d_DB_%u_%s_%p’; CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT
‘/w001/backup/ORCL/rman%d_DB_%u_%s_%p’; CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO
‘/w001/backup/ORCL/rman /snap.F’; # default

  1. To set parameter for automatic backup format for the data files

RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE
DISK FORMAT ‘/w001/backup/ORCL/rman/%U.rmbk’;

  1. This example connects to the target database ORCL without specifying catalog options. Because CONNECT CATALOG is not run at the RMAN prompt, RMAN connects in default NOCATALOG mode when the first command requiring a repository connection is run:  $rman

RMAN> CONNECT TARGET SYS/sys_pwd@ORCL RMAN> BACKUP DATABASE;

  1. This example connects to the target database ORCL and the recovery catalog database rcat, and then runs the command file b_whole_10.rcv:

$rman TARGET sys/sys_pwd@ORCL
CATALOG rman/rman@rcat [@ ‘/w001/oradata/ORCL/rman/b_whole_10.rcv’
(or)
cmdfile = /w001/oradata/ORCL/rman/b_whole_10.rcv]

  1. This example connects to the target database ORCL and the recovery catalog and then specifies that RMAN should append messages to the message log:

$rman TARGET sys/sys_pwd@ORCL NOCATALOG LOG=/w001/oradata/ORCL/rman/log/msglog.log APPEND

  1. Using RMAN perform a copy for a datafile: $rman target sys/sys_pwd@ORCL catalog rman/rman

RMAN> COPY datafile 2 to ‘/w001/oradata/ORCL/rman//userdata01.dbf’;
Note: Here ‘2’, is the file_id from the dba_data_files
[Commands such as backup, restore, and allocate can be executed within a run command]

  1. This command deletes all archived redo logs older than two weeks:

RMAN> DELETE ARCHIVELOG ALL UNTIL TIME ‘SYSDATA-14’;

Read more –>

RMAN Commands

Exports & Imports
SQL Server Error Logs Detailed Information
DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.

Comments

comments

Check Also

Oracle 10g to 11g Enhancements (Difference between Oracle 10g and 11g)

Difference between Oracle 10g and 11g 1- Enhanced Automatic Memory Management System Oracle 9i automated …

Leave a Reply

Your email address will not be published. Required fields are marked *

DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.
close-link
GET OUR LATEST CONTENT IN YOUR INBOX

SUBSCRIBE 
Your information will never be shared
close-link
Sign-up for exclusive content. Be the first to hear about DBA Centre Blogs.
Subscribe