rman 使用catalog备份的演示
介绍了如何使用catalog方式做RMAN备份,以及如何取消以catalog方式做备份。
第一步:创建RMAN CATALOG表空间及用户。
[oracle@oel-01 ~]$ sqlplus / as sysdba
SQL> create tablespace catalog1 datafile '/u01/app/oracle/oradata/bys001/catalog1.dbf' size 50m ;
Tablespace created.
SQL> create user rmanuser identified by rmanuser default tablespace catalog1;
User created.
SQL> grant connect,resource,recovery_catalog_owner to rmanuser;
Grant succeeded.
SQL> select * from role_sys_privs where role='RECOVERY_CATALOG_OWNER';
ROLE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
RECOVERY_CATALOG_OWNER CREATE SYNONYM NO
RECOVERY_CATALOG_OWNER CREATE CLUSTER NO
RECOVERY_CATALOG_OWNER ALTER SESSION NO
RECOVERY_CATALOG_OWNER CREATE DATABASE LINK NO
RECOVERY_CATALOG_OWNER CREATE SESSION NO
RECOVERY_CATALOG_OWNER CREATE TABLE NO
RECOVERY_CATALOG_OWNER CREATE SEQUENCE NO
RECOVERY_CATALOG_OWNER CREATE PROCEDURE NO
RECOVERY_CATALOG_OWNER CREATE VIEW NO
RECOVERY_CATALOG_OWNER CREATE TYPE NO
RECOVERY_CATALOG_OWNER CREATE TRIGGER NO
11 rows selected.
第二步:注册数据库到RMAN CATALOG
[oracle@oel-01 ~]$ rman target
sys/sys@192.168.1.212:1521/bys001 catalog rmanuser/rmanuser
Recovery Manager: Release 11.2.0.1.0 - Production on Wed Jun 19 14:28:59 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: BYS001 (DBID=2041679290)
connected to recovery catalog database
RMAN>
register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
第三步:查看是否注册
SQL> conn rmanuser/rmanuser
Connected.
SQL> select * from rc_database;
DB_KEY