ORACLE11gRMAN Backup Recovery

Source: Internet
Author: User
When rmancatalog is used for data backup and recovery, the recovery directory catalog is used. Unlike nocatalog, nocatalog records backup-related information in the control file, while catalog records the backup information in the recovery directory. In this experiment, the recovery directory is created on oracle12c, and the database to be backed up is on oracle11g. STE

When rman catalog is used for data backup and recovery, the recovery directory catalog is used. Unlike nocatalog, nocatalog records backup-related information in the control file, while catalog records the backup information in the recovery directory. The experiment in this article is to create the recovery directory on oracle 12c, and the database to be backed up is on oracle 11g. STE

When rman catalog is used for data backup and recovery, the recovery directory catalog is used. Unlike nocatalog, nocatalog records backup-related information in the control file, while catalog records the backup information in the recovery directory.

The experiment in this article is to create the recovery directory on oracle 12c, and the database to be backed up is on oracle 11g.


Step 1: create user c # rman dedicated for recovery on the recovery directory catalog Database and grant related permissions (oracle 12c before creating a user c #, you can refer to http://blog.csdn.net/wenchu20/article/details/43196577)

-- Create a tablespace SQL> create Tablespace TBS_RMAN datafile '/u01/app/oradata/rman1.dbf' size 5 M autoextend on next 2 M; tablespace created. -- create user SQL> create User c # rman identified by rman default tablespace tbs_rman temporary tablespace TEMP; user created. -- grant SQL> Grant connect, resource, recovery_catalog_owner to rman for rman, and grant succeeded for rman.

After a user is created, use rman to log on to PL/SQL. Since no object permission is granted to the rman user, no object exists.



Step 2: connect the target and catalog of rman

[Oracle @ REDHAT6 ~] $ Rman target sys/oracle catalog rman/rman -- or use the following method to log on to [oracle @ REDHAT6 ~] $ Rman Recovery Manager: Release 11.2.0.3.0-Production on Wed Jan 28 00:27:14 2015 Copyright (c) 1982,201 1, Oracle and/or its affiliates. all rights reserved. RMAN> connect target sys/oracle; connected to target database: ORCL (DBID = 1396675707) RMAN> connect catalog rman/rman; connected to recovery catalog databaseRMAN>

Step 3: Create a recovery directory. related objects are automatically created under the recovery directory.
RMAN> create catalog tablespace TBS_RMAN;recovery catalog created


After executing the preceding command, we can see that the rman user has many more objects (table, view, and so on)


Step 4: The recovery directory has been created. Associate the target with the catalog, that is, the registration server (the DB table is empty before the registration server and there is data in the DB table after registration)

RMAN> register database;database registered in recovery catalogstarting full resync of recovery catalogfull resync complete

After registration, you can see that there is data in the relevant table, which is the data in the db table.
SQL> select * from db;    DB_KEYDB_ID CURR_DBINC_KEY---------- ---------- -------------- 1 1396675707   2


OK. The catalog recovery directory has been created.


In this experiment, if the database is shut down (or the database is in the nomount or mount state), the backup information cannot be viewed, because the recovery directory catalog is on the same instance as the target database, the database is not opened, so the relevant information cannot be obtained.

If you have two machines, target is one machine, catalog is one machine, and target database is stopped, you can also connect to catalog.

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.