8 Rman-2

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Recovery Manager II

Catalog (tables & views) Central repository that stores information of backups.
Configure catalog:
In a separate box (machine) install Oracle software the version must be same or higher from the Target databases and configure the
Listener and do the following:
Steps:
a) Create a new database for the catalog : hzcat
b) Create a tablespace: hzts
c) Create a user: hzrman and assign the above tablespace hzts as default
d) Grant connect, resource and recovery_catalog_owner privileges to hzrman user
i) Sql>grant connect,resource,recovery_catalog_owner to hzrman
e) connect to RMAN and create the catalog:
$rman catalog hzcat/passwd
Rman> create catalog;
For each Target database site
Configure tns service for recovery catalog: tohzcat and register the database
$rman target / catalog rmanuser/rmanuser@tocat
Rman>register database;
Note: Continue same for other target databases
Taking backup of Target db with Catalog
From the Target host connect to rman,
$export ORACLE_SID=prod
$rman target / catalog hzcat/passwd@tohzcat
Rman> backup database;
Run block:
To execute multiple commands at a time.
Eg
Rman>run
{
backup current controlfile;
backup datafile 1;
}
Configure FRA (flash recovery area)
Configure parameters
Db_recovery_file_dest_size
Db_recovery_file_dest
Sql>alter system set db_recovery_file_dest_size=4g scope=both;
Sql>alter system set db_recovery_file_dest=/u01/user18/fra scope=both;
Configure commands
Rman> configure controlfile autobackup on; on backup of database/datafile controlfile & spfile will auto backedup
Rman> configure retention policy to redundancy 2;
OR
Rman> configure retention policy to recovery window of 30 days;
Rman>configure backup Optimization on;

Virtual catalog
- prod (catalog db), target db > proda , prodb
At catalog side
- create one more catalog user.
(prodb)
- From any target db (ex. proda)
- $rman target / catalog rman/rman@tocatalog
Rman>grant catalog for database prodb to prodb;
Rman > list db_unique_name all;
From prodb database
$rman target / catalog prodb/prodb@tocatalog;
Rman>create virtual catalog;
Rman > list db_unique_name all;
Now for prodb database backup information will be store in virtual catalog as well as base catalog.
Rman Scripts
1. Creating Rman Script:
Eg:
Rman>create script coldbkp
{
Shutdown immediate;
Startup mount;
Backup database include current controlfile;
Sql alter database open;
}
2. Executing rman script
Rman>run {execute script coldbkp};
3. To see the code of script:
Rman>print script coldbkp;
Rman>delete script coldbkp;
View: we can check following views to see rman scripts
rc_stored_script //display scripts name
rc_stored_script_line // display text of script
Note: we can create rman script in catalog mode only.
Os Script:
At OS prompt:
$vi hotbkp.sh
#! /bin/bash
rman target / catalog rmanuser/rmanuser@tocat<<!
Backup database;
Exit
Wq!
Run the script:
$sh hotbkp.sh
Bkup.cmd
Rman>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy