RMAN创建catalog:
实验环境,同一虚拟机,目标数据库实例orcl, catalog实例dict
1.在DICT上创建rman相关表空间,用户等。
SQL> create tablespace rman datafile '/oracle/app/oradata/dict/rman.dbf' size 10m autoextend on next 5m maxsize 100m;
表空间已创建。
SQL> create user rman identified by rman default tablespace rman quota unlimited on rman;
用户已创建。
SQL> grant connect, resource, recovery_catalog_owner to rman;
授权成功。
2.创建catalog和注册catalog
[oracle@ora10g admin]$ rman target sys/syspwd catalog rman/rman@dict
Recovery Manager: Release 10.2.0.4.0 - Production on Tue Aug 16 19:38:28 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1225112371)
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
3.在catalog 库中查询相关信息
SQL> select dbid, name from rc_database;
DBID NAME
---------- ----------------------------------------
1225112371 ORCL
SQL> select db_name, ts#, name, creation_change# from rc_tablespace;
DB_NAME TS# NAME CREATION_CHANGE#
-------- ---------- ---------------------------------------- ----------------
ORCL 0 SYSTEM 9
ORCL 1 UNDOTBS1 1193738
ORCL 2 SYSAUX 6609
ORCL 3 TEMP 963167
ORCL 4 USERS 10566
ORCL 6 EXAMPLE 467467
ORCL 9 TBS01 1289379
已选择7行。
SQL> select db_id, bs_key, recid, set_count from rc_backup_set;
DB_ID BS_KEY RECID SET_COUNT
---------- ---------- ---------- ----------
1225112371 856 206 281
1225112371 857 207 282
1225112371 858 208 283
当然也可以查询其它相关信息。
4.注销catalog
RMAN> unregister database;
database name is "ORCL" and DBID is 1225112371
Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog
在Dict下面查询
SQL> select dbid, name from rc_database;
未选定行
SQL> select db_id, bs_key, recid, set_count from rc_backup_set;
未选定行
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25937377/viewspace-705383/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25937377/viewspace-705383/