建立CATALOG資料庫。
catalog 資料庫建立的步驟:db01為CATALOG資料庫,orcl為目標資料庫
首先在catalog資料庫上建立必要的條件:
表空間:
1.create tablespace rmantbs datafile '/u1/oracle/oradata/db01/rmantbs.dbf' size 200m;
使用者:
2.drop user rman cascade; 刪除之前建的使用者,可略。
create user rman identified by rman default tablespace rmantbs;
grant connect,resource,recovery_catalog_owner to rman;
輔助命令:
select username,default_tablespace from dba_users;
tnsping orcl; tnsping db01
select name from v$database;
///3.rman catalog
///rman>create catalog;
///rman>exit
3.連線目標資料庫,orcl為目標資料庫,db01為CATALOG資料庫
rman target catalog
rman>create catalog tablespace rmantbs
rman>register database;
註冊是後,RMAN多了一項功能就是建立指令碼的功能
注意:
1、每次必須使用catalog登入
2、第一次登入都必須和目標資料庫同步資訊 rman>resync catalog; 或者報告SCHEMA rman>report schema;
3、也可以使用按照nocatalog(控制檔案恢復目錄)的方式來使用,catalog模式是備份日誌模式,nocatalog是非備份日誌模式
4、注意登入方式:orcl為目標資料庫,db01為CATALOG資料庫 target catalog
5、兩種方式都常用,關鍵是看你的應用需要什麼樣的方式。在catalog模式下,rman庫能管理多個應用資料庫,
但是需要額外的裝置支出(在同一套裝置上使用也行,但是和不用也沒啥區別)。nocatalog模式的話你需要的只是磁碟空間足夠就行,
在你的應用資料庫較少,不需要集中管理的情況下可以使用這種方式。
6、採用catalog時有專門的資料庫對你的備份進行管理。nocatalog時只能將備份資訊存放於controlfile中。
RMAN> create script. b0 {
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> backup
5> (datafile 5 channel c1)
6> (datafile 4 channel c2);}
已建立指令碼 b0
其他命令
run {execute script. b0;}
replace script. b0 {};
alter database open resetlogs;
rman>reset database;
alter tablespace add datafile '';
rman>resync catalog; 同步資料庫
rman>report need backup days 7; 報告7天內那些檔案未備份
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27038344/viewspace-733886/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料庫-Duckdb-catalog和schema資料庫
- 建立資料庫資料庫
- 建立資料庫表資料庫
- Mysql建立資料庫MySql資料庫
- 【資料庫資料恢復】mdb_catalog.wt檔案丟失的MongoDB資料恢復案例資料庫資料恢復MongoDB
- XamarinSQLite教程建立資料庫aSQLite資料庫
- 建立資料mysql庫流程MySql
- 小黑框建立資料庫資料庫
- 資料庫 建立 3表資料庫
- mongodb 如何建立資料庫MongoDB資料庫
- 資料庫之建立索引資料庫索引
- oracle資料庫建立資料庫例項-九五小龐Oracle資料庫
- 2 建立和配置資料庫資料庫
- 2.8.1.4 建立資料庫服務資料庫
- 2.2.1 資料庫建立計劃資料庫
- 2.1 關於建立資料庫資料庫
- SQL建立資料庫和表SQL資料庫
- mongodb資料庫如何建立索引?MongoDB資料庫索引
- (十二)SparkSQL Catalog訪問Hive後設資料資訊SparkSQLHive
- DB2建立資料庫,建立表空間DB2資料庫
- php sqlite 建立本地資料庫PHPSQLite資料庫
- 2.5.8 指定OMF方式建立資料庫資料庫
- 2.5 指定資料庫建立語句資料庫
- 2.4.10 Step 9:手工建立資料庫資料庫
- 2.3 通過DBCA建立資料庫資料庫
- CQL #1:SQLChain 資料庫建立流程SQLAI資料庫
- ArcGIs建立企業級資料庫資料庫
- 建立一個SQL測試資料庫 - 消費者資料庫SQL資料庫
- Oracle Rman Catalog的建立方法和備份原理Oracle
- 2.5.1 關於建立資料庫的子句資料庫
- 2.3.1 有關使用DBCA建立資料庫資料庫
- 2.4.1 使用 CREATE DATABASE 子句建立資料庫Database資料庫
- 4.2.11 使用 SRVCTL 建立資料庫服務資料庫
- sql.bsq與資料庫的建立SQL資料庫
- 【AWR】Oracle資料庫建立awr基線Oracle資料庫
- MySQL建立資料庫的兩種方法MySql資料庫
- mongodb怎麼手動建立資料庫MongoDB資料庫
- PostgreSQL:資料庫的建立與刪除SQL資料庫
- Oracle各種版本下“示例資料庫的建立”的建立Oracle資料庫