RMAN學習筆記_Catalog 安裝與御載
在10.230.17.29 使用10.230.17.33上的資料庫作為Catalogdb
1 配置TNSname
catalogdb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.230.17.33)(PORT = 1521))
)
(CONNECT_DATA =
(SID = mydb)
)
)
2 建立catalog 使用者,表空間
:~> sqlplus " as sysdba"
SQL*Plus: Release 9.2.0.4.0 - Production on Thu Feb 4 17:56:54 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
SQL> create tablespace catalog datafile '/opt/oracle/oradata/mydb/catalog01.dbf' size 50M;
Tablespace created.
SQL> Create user rman identified by rmanpwd default tablespace catalog temporary tablespace temp;
User created.
SQL> grant connect,resource,recovery_catalog_owner to rman;
Grant succeeded.
3 建立catalog和註冊資料庫
rman target / catalog
RMAN> create catalog tablespace catalog;
recovery catalog created
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
注意Catalog Schema 必須先連線,再建立,即使在10.230.17.33本機上也必須透過
RMAN target / catalog 來連線
Catalog Schema 只需建立一次,而所有想使用此Catalog的資料庫只需連線到Catalog Schema所在Database上,並向其註冊即可.
如10.230.17.34想使用此Catalog
# rman target / catalog
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
4 Unregistering a Target Database from the Recovery Catalog 如何取消註冊.
4.1 刪除所有的備份
rman target / catalog
delete backup device type disk;
-- delete backup device type sbt;
4.2 找到DB_ID對應的DB_KEY;
sqlplus ""
SQL> select db_key, db_id from db where db_id=2621354619;
DB_KEY DB_ID
---------- ----------
97 2621354619
4.3 Unregister catalog (只是單一個)
#EXECUTE dbms_rcvcat.unregisterdatabase(db_key, db_id);
EXECUTE dbms_rcvcat.unregisterdatabase(97, 2621354619)
再次嘗試連線
:~> rman target / catalog
Recovery Manager: Release 9.2.0.4.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: MYDB (DBID=2621354619)
connected to recovery catalog database
RMAN> report schema;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 02/04/2010 19:39:30
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
仍能連線上,但找不到任何資訊.
5 DROP CATALOG;(刪掉所有資訊)
rman target / catalog
DROP CATALOG;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-628774/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- GoldenGate 學習筆記(3)_安裝與御載Go筆記
- RMAN Catalog 學習與測試
- Redis安裝與配置(學習筆記一)Redis筆記
- RabbitMQ學習筆記-安裝MQ筆記
- Centos學習筆記--安裝CentOS筆記
- Docker 學習筆記-基本概念與安裝Docker筆記
- 續rman學習筆記筆記
- ant的下載與安裝——mybatis學習筆記之預備篇(一)MyBatis筆記
- TypeScript學習筆記—安裝與基礎型別TypeScript筆記型別
- Mysql學習筆記(安裝篇)MySql筆記
- Docker安裝(學習筆記一)Docker筆記
- Airflow學習筆記 --- airflow安裝AI筆記
- python學習安裝筆記Python筆記
- Flask學習筆記(安裝篇)Flask筆記
- ASM學習筆記_ASM安裝ASM筆記
- Git 的安裝與初次使用 —— Git 學習筆記 03Git筆記
- Openstack學習筆記(三):keystone的安裝與配置筆記
- Flutter學習筆記 - 安裝,映象,配置Flutter筆記
- golang學習筆記(1):安裝&helloworldGolang筆記
- Redis學習筆記【01】 - 安裝RedisRedis筆記
- matlab學習筆記一:安裝Matlab筆記
- Mysql學習筆記1--安裝MySql筆記
- RMAN學習筆記_ Duplicate建立DataGuard筆記
- RMAN學習筆記_ Duplicate重做DataGuard筆記
- 學習筆記:Eclipse IDE for javaEE 64位下載安裝筆記EclipseIDEJava
- QT學習筆記1(安裝、建立和訊號與槽)QT筆記
- MSP432安裝與環境配置(ccs) 學習筆記筆記
- Golang學習筆記-IDE安裝指南Golang筆記IDE
- CentOS學習筆記 – 6. docker安裝CentOS筆記Docker
- Ansible學習筆記-Ansible安裝筆記
- Linux 學習筆記 - 軟體安裝Linux筆記
- 【Flutter 學習筆記一】Mac OS 安裝 FlutterFlutter筆記Mac
- Linux學習筆記-軟體安裝管理Linux筆記
- 學習筆記:openstack實驗環境安裝筆記
- linux下Nagios安裝學習筆記LinuxiOS筆記
- Oracle學習筆記(一)---oracle安裝和配置Oracle筆記
- ctf學習筆記[轉載]筆記
- elasticsearch學習筆記二:相關軟體安裝Elasticsearch筆記