Synchronization of RMAN controlfile and catalog

Source: Internet
Author: User
When we use catalog instead of controlfile as rmanrepository, the metadata information about the backup will also be stored in controlfil, so that when we use rman,

When we use catalog instead of controlfile as rman repository, the metadata information about the backup will also be stored in controlfil, so that when we use rman,

When we use catalog instead of controlfile as rman repository, the metadata information about the backup will also be stored in controlfil, so that when we use rman, you can use the information in controlfile even if the catalog is temporarily unavailable.

When we can connect to the catalog next time, we can also use resync catalog to manually move the backup information in the controlfile to the catalog.

RMAN> resync catalog;

Starting full resync of recovery catalog
Full resync complete

In fact, when we use catalog to release commands such as backup, delete, and list, rman will implicitly synchronize the contents of the catalog. In this way, during backup, at the same time, the information in controlfile and catalog is consistent.

First, check the current backup information. There are two backups: 277 and 278.

RMAN> list backup summary;


List of Backups
====================
Key ty lv s Device Type Completion Time # Pieces # Copies Compressed Tag
-----------------------------------------------------------------
277 B F A DISK 22-FEB-14 1 1 NO TAG20140222T050832
278 B F A DISK 22-FEB-14 1 1 NO TAG20140222T050832

The query results in catalog are the same. Currently, rman is connected using catalog.
SQL> select BS_KEy from rman. bp;

BS_KEY
----------
277
278

Now use nocatalog for a backup

[Oracle @ o12c ~] $ ORACLE_HOME/bin/rman target/nocatalog

RMAN> backup datafile 1;
........

RMAN> list backup summary;


List of Backups
====================
Key ty lv s Device Type Completion Time # Pieces # Copies Compressed Tag
-----------------------------------------------------------------
46 B F A DISK 22-FEB-14 1 1 NO TAG20140222T050832
47 B F A DISK 22-FEB-14 1 1 NO TAG20140222T050832
48 B F A DISK 22-FEB-14 1 1 NO TAG20140222T051944
49 B F A DISK 22-FEB-14 1 1 NO TAG20140222T051944

Currently, the files are read from controlfile. The keys are different, but the tags of the backups are the same. This indicates that the contents in controlfile are inconsistent with those in catalog.

Connect again using catalog,
[Oracle @ o12c ~] $ ORACLE_HOME/bin/rman target/catalog = rman/rman @ testasm

RMAN> list backup summary;

List of Backups
====================
Key ty lv s Device Type Completion Time # Pieces # Copies Compressed Tag
-----------------------------------------------------------------
277 B F A DISK 22-FEB-14 1 1 NO TAG20140222T050832
278 B F A DISK 22-FEB-14 1 1 NO TAG20140222T050832
304 B F A DISK 22-FEB-14 1 1 NO TAG20140222T051944
305 B F A DISK 22-FEB-14 1 1 NO TAG20140222T051944

Using list backup summary, we can see that rman will automatically help us to perform a controlfile and catalog synchronization first. Now it is consistent with the backup information in the files under control.

-------------------------------------- Split line --------------------------------------

Recommended reading:

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

-------------------------------------- Split line --------------------------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.