如題
第1章 配置恢複管理器Configuring Recovery Manager
組成:GUI或者指令行、可選的恢複目錄、RMAN指令和腳本,以及錄音帶媒介連接配接
考慮事項:RMAN是一種實體備份方法。其他的備份恢複方法:使用者管理和Oracle EXPORT工具(邏輯備份,一般不做為獨立得備份方法,而是對RMAN或者使用者管理的備份提供附加的備份護,exp,expdp)
可以使用控制檔案或者恢複目錄作為資料檔案庫。Oracle建議,中等規模的企業環境,使用恢複目錄,這樣可以充分發揮RMAN工具的全部功能。如果使用控制檔案作為資料檔案庫,設定參數:
CONTROL_FILE_RECORD_KEEP_TIME.
恢複目錄必須存儲在自己的資料庫伺服器中,而不是目标資料庫所在的伺服器中。為安全恢複資料庫也備份。為了使目錄能夠工作,必須建立具有connect,resource和RECOVERY_CATALOG_OWNER權限的賬戶。新資料庫參數如下:
1)SYSTEM 90M;UNDO 5M;TEMP 5M
2)三個日志檔案組每組兩個成員 1M
3)RECOVERY CATALOG表空間 CATTBS 15M
DBCA建立恢複目錄資料庫以及,然後實踐第3步,建立恢複目錄
書中資料庫環境:目标資料庫ORA101T,恢複目錄資料庫ORA101RC,恢複目錄表空間DATA
(本機測試環境:目标資料庫為prod,恢複目錄資料庫prodrman,恢複目錄為CATTBS.
rman target /@prod catalog rman/[email protected] )
以下command>表示windows環境指令行。
command> SET ORACLE_SID = ora101rc
command>sqlplus /nolog
sql>connect / as sysdba
sql>create user rman_user identified by rman_user default tablespace data temporary tablespace temp;
sql>grant connect,resource,recovery_catalog_owner to rman_user;
command>rman
rman>connect catalog rman/rman
rman>create catalog tablespace data;
注冊資料庫
command> SET ORACLE_SID = ora101t
command>rman target /
rman>connect catalog "rman_user/[email protected]";
rman>register database;
for example:備份整個資料庫
command>set ORACLE_SID = ora101t
command>sqlplus /nolog
sql>connect / as sysdba
sql>startup mount
command>rman
rman>connect target
rman>connect catalog rman_user/[email protected];
rman>run
{
allocate channel c1 type disk;
backup database format 'G:\RMAN_BAKCUP3\db_%u_%d_%s';
backup format 'G:\RMAN_BAKCUP3\log_t%t_s%s_p%p' (archivelog all);
}