oracle同步恢复目录,Oracle创建恢复目录(catalog)
Oracle創(chuàng)建恢復(fù)目錄(catalog),在catalog數(shù)據(jù)庫上創(chuàng)建cat用戶的表空間。
Oracle創(chuàng)建恢復(fù)目錄
1.在catalog數(shù)據(jù)庫上創(chuàng)建cat用戶的表空間
SQL> create tablespace cat datafile '/home/oracle/oradata/orcl/cat.dbf' size 512M;
2.創(chuàng)建cat用戶
SQL> Create user cat identified by cat temporary tablespace temp default tablespace cat Quota unlimited on cat;
3.授權(quán)給cat用戶
SQL> grant connect,resource to cat;
SQL> grant recovery_catalog_owner to cat;
4. 連接到catalog數(shù)據(jù)庫
[oracle@orcl admin]$ rman catalog cat/cat@cat
5.創(chuàng)建恢復(fù)目錄
RMAN> create catalog;
6. 在catalog中注冊target數(shù)據(jù)庫
[oracle@orcl admin]$ rman catalog cat/cat@cat target sys/xyc@rac;
RMAN> register database;
------------------------------------------------------------------------------------------------
7.注銷target數(shù)據(jù)庫
[oracle@orcl admin]$ rman catalog cat/cat@cat target sys/xyc@rac;
RMAN> unregister database;
或
為了能注銷數(shù)據(jù)庫,需要獲得數(shù)據(jù)庫的標(biāo)識碼(DB_ID)和數(shù)據(jù)庫鍵值(DB_KEY)。其中連接目標(biāo)數(shù)據(jù)庫時將會獲得DB_ID
連接到目標(biāo)數(shù)據(jù)庫,,查詢db表:
SQL> select * from db;
DB_KEY DB_ID CURR_DBINC_KEY
---------- ---------- --------------
1 3021445076 2
SQL> execute dbms_rcvcat.unregisterdatabase(1,3021445076);
本條技術(shù)文章來源于互聯(lián)網(wǎng),如果無意侵犯您的權(quán)益請點擊此處反饋版權(quán)投訴 本文系統(tǒng)來源:php中文網(wǎng)
總結(jié)
以上是生活随笔為你收集整理的oracle同步恢复目录,Oracle创建恢复目录(catalog)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 上市公司可转债是利好还是利空?
- 下一篇: COLLATE oracle,Sql 中