Create a catalog experiment using rman and its description

Source: Internet
Author: User
Create a catalog experiment and description for rman. Install the database software on the two machines, create databases respectively, and start the database;

Create a catalog experiment and description for rman. Install the database software on the two machines, create databases respectively, and start the database;

Prerequisites:
Install the database software on the two machines, create databases respectively, and start the database;

Description

1. Host functions:
[Oracle @ Oracle11gOcp_catalog ~] $ Cat/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1 localhost. localdomain localhost
192.168.0.253 Oracle11gOcp_catalog # As a catalog host

192.168.0.252 Oracle11gOcp # As the host to be backed up

Ii. tnsname example:
[Oracle @ Oracle11gOcp_catalog ~] $ Cat $ ORACLE_HOME/network/admin/tnsnames. ora
# Tnsnames. ora Network Configuration File:/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames. ora
# Generated by Oracle configuration tools.
CATALOG_ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Oracle11gOcp_catalog) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
TARGET_ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = Oracle11gOcp) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

Iii. Experiment
-- 1. In the Oracle11gOcp_catalog host (as the database for catalog), prepare tablespace, user, permissions and quota, and perform the following operations:
[Oracle @ Oracle11gOcp_catalog ~] $ Sqlplus/as sysdba
SQL> create tablespace rmancatalog_tablespace datafile '/u01/app/oracle/oradata/orcl/rmancatlog_tablespace.dbf' size 50 m;
SQL> create user rman identified by rman default tablespace rmancatalog_tablespace;
SQL> grant recovery_catalog_owner to rman;
SQL> alter user rman quota unlimited on rmancatalog_tablespace;


-- 2. Run the command in the operating system to register the target database to the catalog Database;
-- Catalog_ORCL is the tnsname configured to connect to the catlog database;
[Oracle @ Oracle11gOcp_catalog ~] $ Rman catalog rman/rman @ catalog_ORCL target sys/123123 @ target_orcl
RMAN> create catalog;
RMAN> register database;
RMAN> list backup;
RMAN>
Note: rman catrman rman/rman @ catalog_ORCL target sys/123123 @ target_orcl
Catalog rman/rman @ catalog_ORCL indicates that the catalog database to be connected is catalog_ORCL.
Target sys/123123 @ target_orcl indicates that the target database to be connected is target_orcl.

-- 3. You can query registration information in the catalog database;
[Oracle @ Oracle11gOcp_catalog ~] $ Sqlplus rman/rman @ catalog_orcl
SQL> select dbid, name from rc_database;
SQL> select db_id, bs_key, backup_type from rc_backup_set;

-- After completing step 1 and step 2, you can perform rman backup and other operations, such as performing backup and querying backup information;
RMAN> backup datafile 4; -- backup file 4;
RMAN> list backup; -- list backup information;

Backup set list
==============================

BS keyword Type LV Size Device type time completed
--------------------------------------------------------
230 Full 2.54 m disk 00:00:05-12
BP Keyword: 231 status: AVAILABLE compressed: NO mark: TAG20121006T085542
Segment name:/u01/app/oracle/backup_rman/795948944_17_1.bk
Data File List in backup set 230
File LV type Ckp SCN Ckp time name
----------------------------------
4 Full 1743421 month-12/u01/app/oracle/oradata/orcl/users01.dbf

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.