以下是windows下
將數據庫啟動到歸檔模式下:
C:\Documents and Settings\Administrator>sqlplus / as sysdba
SQL>shutdown immediate
SQL>startup mount
SQL>alter database archivelog;
SQL>alter database open;
SQL>archive log list;
根據需要更改日志的存放路徑(前提是使用了spfile方式啟動)
SQL>alter system set log_archive_dest_
恢復目錄的配置
創建恢復目錄表空間
C:\Documents and Settings\Administrator>sqlplus / as sysdba
SQL>create tablespace rman_ts
創建恢復目錄User
SQL>create user rmanuser
tablespace temp;
SQL>grant connect
SQL>exit;
為恢復目錄創建對象:
C:\Documents and Settings\Administrator>rman catalog rmanuser
RMAN>create catalog tablespace rman_ts
RMAN>exit;
注冊目標數據庫:
C:\Documents and Settings\Administrator>rman catalog rmanuser
system/system@oradb
RMAN> register database;
RMAN>exit;
恢復目錄支持如下的命令
{CREATE|UPGRADE|DROP} CATALOG
{CREATE|DELETE|REPLACE|PRINT} SCRIPT
LIST INCARNATION
REGISTER DATABASE
REPORT SCHEMA AT TIME
RESET DATABASE
RESYNC CATALOG
Resync可以同步數據庫與恢復目錄之間的信息
在如下情況下需要同步
?數據庫物理結構的改變
?數據文件增加或者是改變大小
?表空間刪除
?回滾段的創建與刪除
?每產生
目標數據庫resetlogs 之後
From:http://tw.wingwit.com/Article/program/Oracle/201311/17755.html