oracle10g data guard(dg)__flashback_physical database

wisdomone1發表於2010-01-30
1,在主庫配置備庫log_archive_dest_state_2=defer;再還原enable時,備庫出現不應用日誌;
  測試主庫添刪資料檔案及表空間提示報錯,在alert中



2,處理以上方法

在主庫生成備份控制檔案,根據alert進行修改,把在備庫上少的幾個主庫資料檔案,全部scp到備庫

 備庫如下
Thu Jan 28 05:58:33 2010
Errors in file /oracle/admin/centos/bdump/rhel_mrp0_2544.trc:
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
Thu Jan 28 05:58:33 2010
Errors in file /oracle/admin/centos/bdump/rhel_mrp0_2544.trc:
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01111: name for data file 5 is unknown - rename to correct file
ORA-01110: data file 5: '/oracle/product/10.2.0/db_1/dbs/UNNAMED00005'
Thu Jan 28 05:58:33 2010
MRP0: Background Media Recovery process shutdown (rhel)
Thu Jan 28 05:58:34 2010
Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION


mount開啟備庫,備庫物理恢復就可以了


---以上問題解決了,但備庫不能open,一open就提示恢復,這如何處理喲

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE cancel immediate;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-16004: backup database requires recovery
ORA-01194: file 6 needs more recovery to be consistent
ORA-01110: data file 6: '/oracle/oradata/centos/centos/hard01.dbf'


SQL> host oerr ora 16004
16004, 00000, "backup database requires recovery"
// *Cause:  The control file is for a backup database which requires recovery,
//          and cannot be opened for read-only access by this instance.
// *Action: Perform. the necessary recovery and re-open for read-only access.
//          

SQL>



3,想在備庫上利用flashback功能,必須先在建立備庫前開啟主庫的flashback on功能
主庫 --請注意,新增db_recovery_file_dest相關
  startup mount
  alter database flashback on;
建立備庫
  開啟備庫flashback功能,同主庫操作

具體flashback操作如下
  在備庫上記錄一個當前的scn
   select current_scn from v$database
  在主庫進行相關變更,同時同步到備庫
  在備庫關閉重作應用
   
  在備庫利用flashback
    flashback database to scn 上面查到的scn號
  可以在備庫alert看到相關操作變化了

  此之後,你可以開啟備庫重作應用,主備庫又可以進行同步了
  

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-626438/,如需轉載,請註明出處,否則將追究法律責任。

相關文章