RMAN - Metadata
Control file
- RMAN always stores its metadata in the target database control
file
- Whether you use or not the Recovery Catalog Oracle stores metadata
into the targer database control file
- RMAN info on control file is is agedbased on
CONTROL_FILE_RECORD_KEEP_TIME
- Single point control ( control file)
- Does not required another DB
How to ..
[oracle@oracle ~]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production
on Sun Feb 3 17:46:29 2013
Copyright (c) 1982, 2009, Oracle and/or its
affiliates. All rights reserved.
connected to target database: ORCL
(DBID=1272537938)
|
Recovery Catalog
- keep info for long time
- single point to store many databases
- RESYNC CATALOG, syncronize the control file metadata with the
recover catalog
- Can store "RMAN backup scripts" in the catalog ... is not
possible do it on the control file
- Recovery Catalog control views
- RC_*
- Allow history commands
- BACKUP .. KEEP UNTIL TIME - keep the backup until point that
deferrers the configured retention polic
- BACKUP ... KEEP FOREVER - keep the backup forever, until
manually removed
- REPORT SCHEMA ... AT - show the structure at specific time periode
Create a RC
How to ..
--1 create tablespace
SQL> create tablespace rman_ts datafile
'/u01/app/oracle/oradata/orcl/rman_ts.bdf' size 125m autoextend on;
Tablespace created.
--2 create create user
SQL> create user rc_owner identified by
rc_owner default tablespace rman quota unlimited on rman_ts;
User created.
--3 grant grant recovery_catalog_owner to
user
SQL> grant recovery_catalog_owner to
rc_owner;
Grant succeeded.
# 4 create catalog and (un)register a database
$ rman target / catalog rc_owner/rc_owner
Recovery Manager: Release 11.2.0.1.0 - Production
on Sun Feb 3 18:38:16 2013
Copyright (c) 1982, 2009, Oracle and/or its
affiliates. All rights reserved.
connected to target database: ORCL
(DBID=1272537938)
connected to recovery catalog database
RMAN> create catalog;
recovery catalog created
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> unregister database;
database name is "ORCL" and DBID is
1272537938
Do you really want to unregister the database
(enter YES or NO)? yes
database unregistered from the recovery catalog
|
Resync catalog
- sync the control file metadata with the catalog metadata
- Situations:
- backup failed because the catalog database is down, rman saves the
metadata only into the control file
- backup system tablespace => automatic backup control file
How to ..
RMAN> resync catalog;
starting full resync of recovery catalog
full resync complete
|
START WITH
To load/save the backups out of FRA you can use the start START WITH option.
How to ..
# catalog start with '/path';
# catalog start with '+DATA2';
catalog start with '/u01/app/oracle/rman_backup';
|
Virtual Private Catalog
- delegate admin (traditional)
- each virtual private catalog is a logical partition of the base
catalog
- each virtual private catalog owner relies on a separate Oracle
oracle account and several views and
- synonyms in the recovery catalog
Create a VPC
How to ..
-- create user
SQL> create user v_priv_catalog1
identified by v_priv_catalog1
default tablespace users quota unlimited on
users;
SQL> grant recovery_catalog_owner to
v_priv_catalog1;
# give catalog grants
OS$ rman target / catalog rc_owner/rc_owner
RMAN> grant catalog for database orcl
to v_priv_catalog1;
RMAN> grant register database to
v_priv_catalog1;
#create virtual catalog
OS$ rman target / catalog
v_priv_catalog1/v_priv_catalog1
RMAN> create virtual catalog;
found eligible base catalog owned by RMAN
created virtual catalog against base catalog
owned by RMAN
RMAN> register database;
RMAN> list encarnation; |
Reporting views
- rc_stored_script
- rc_rman_status
- rc_rman_configurations
- rc_database
Backup the catalog
It should include in the regular
backup stategy
Recommendations
- Don’t create the catalog on the target database
- Set the ARCHIVELOG mode
- Set RETENTION POLICY to REDUNDANCY grater then 1
- Backup the catalog to DISK and TAPE
- Use BACKUP DATABASE PLUS ARCHIVELOG
- Set CONFIGURE CONTROLFILE AUTOBACKUP ON
Comments