Home  >  Article  >  Database  >  Oracle create catalog 创建恢复目录

Oracle create catalog 创建恢复目录

WBOY
WBOYOriginal
2016-06-07 15:37:151229browse

1.在catalog数据库上创建cat用户的表空间 SQL create tablespace cat datafile 'DATADG/orcl/datafile/cat.dbf' size 512M; 2.创建cat用户 SQL Create user cat identified by cat temporary tablespace temp default tablespace cat Quota unlimited on cat

1.在catalog数据库上创建cat用户的表空间
SQL> create tablespace cat datafile '+DATADG/orcl/datafile/cat.dbf' size 512M;

2.创建cat用户
SQL> Create user cat identified by cat temporary tablespace temp default tablespace cat Quota unlimited on cat;

3.授权给cat用户
SQL> grant connect,resource to cat;

SQL> grant recovery_catalog_owner to cat;

4. 连接到catalog数据库
[oracle@orcl admin]$ rman catalog cat/cat@orcl

5.创建恢复目录
RMAN> create catalog;

6. 在catalog中注册target数据库
[oracle@orcl admin]$ rman catalog cat/cat@orcl target sys/oracle@python;

RMAN> register database;

------------------------------------------------------------------------------------------------


7.注销target数据库

[oracle@orcl admin]$ rman catalog cat/cat@orcl target sys/oracle@python;

RMAN> unregister database;

为了能注销数据库,需要获得数据库的标识码(DB_ID)和数据库键值(DB_KEY)。其中连接目标数据库时将会获得DB_ID
连接到目标数据库,查询db表:
SQL> select * from db;
DB_KEY DB_ID CURR_DBINC_KEY
---------- ---------- --------------
1 3021445076 2
SQL> execute dbms_rcvcat.unregisterdatabase(1,3021445076);



FROM:http://www.linuxidc.com/Linux/2013-02/79856.htm

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn