Home > Database > Mysql Tutorial > Oracle创建恢复目录(catalog)

Oracle创建恢复目录(catalog)

WBOY
Release: 2016-06-07 17:27:10
Original
1419 people have browsed it

Oracle创建恢复目录(catalog),在catalog数据库上创建cat用户的表空间。

Oracle创建恢复目录

1.在catalog数据库上创建cat用户的表空间
SQL> create tablespace cat datafile '/home/oracle/oradata/orcl/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@cat

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

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

RMAN> register database;

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


7.注销target数据库

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

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);

linux

Related labels:
or
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template