Catalog端(10.133.224.144):
#sqlplus /nolog
SQL>connnect /as sysdba
SQL>startup nomount
SQL>@/gisdata/catdb/createdb.sh (創建數據庫)
SQL>@$ORACLE_HOME/rdbms/admin/catalog.sql;
SQL>@$ORACLE_HOME/rdbms/admin/catproc.sql;
創建catalog恢復目錄
創建恢復目錄使用的表空間
SQL>create tablespace catalogtbs datafile '/sda22/rmandata/catalog.dbf' size 500M;
創建RMAN用戶並授權
SQL>create user rman identified by rman default tablespace catalogtbs temporary
tablespace temp quota unlimited on catalogtbs;
SQL>grant recovery_catalog_owner to rman ;
SQL>grant connect,resource to rman;
創建恢復目錄
#rman catalog rman/rman
RMAN>create catalog tablespace catalogtbs;
RMAN>exit;
target端:
註冊目標數據庫
配置目標數據庫的tnsnames.ora
添加:
RMAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.133.224.144)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orastandby)
)
)
註冊目標數據庫
#rman target / catalog rman/rman@rman
RMAN> register database;
RMAN> report schema;
備份目標數據庫
RMAN> run{
allocate channel ch00 type disk;
backup database format '/data/backup/bk_%s_%p_%t';
release channel ch00;
}
顯示備份信息
RMAN>list backup;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25402324/viewspace-715479/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25402324/viewspace-715479/