【Dataguard】DataGuard運維注意事項
DataGuard 主要目的 或者作用
1、主備唯一名不能相同
db_name,db_unique_name,instance_name,service_name,區別和關係 /u02/app/oracle/diag/rdbms/mydb/mydb/trace +DATA/mydb/datafile/users
注意/ 影響:
正常來說報錯,或者無法同步, 山大二院案例 windows 單機 dg,搭建完成,啟動recover不報錯,但無法實時同步。
2、OMF 對dg的影響
db_create_file_dest db_file_name_convert/log_file_name_convert
影響: 主備切換,增量恢復
使用omf後,備端生成的名字類似如下:
+DATA/mydb/datafile/t2019.259.1018457031
+DATA/mydb/datafile/mytest.270.1025380271
當使用增量恢復時,我們需要恢復控制檔案,怎麼確定資料檔案位置?
--備端舊控制檔案資料檔案位置 set lines 2000 set pages 999 col name for a70 select 'alter database rename file '||f.file#||' to '''||f.name||''';' from v$datafile f order by f.file#; --or select f.file#,f.name from v$datafile f order by f.file#; --備端舊控制檔案臨時資料檔案位置 set lines 2000 set pages 999 col name for a70 select 'alter database rename file '||f.file#||' to '''||f.name||''';' from v$tempfile f order by f.file#; --or select f.file#,f.name from v$tempfile f order by f.file#; --備端新控制檔案資料檔案位置 set lines 2000 set pages 999 col name for a70 select 'alter database rename file '''||f.name||''' to '''||f.file#||''';' from v$datafile f order by f.file#; --備端新控制檔案臨時資料檔案位置 set lines 2000 set pages 999 col name for a70 select 'alter database rename file '''||f.name||''' to '''||f.file#||''';' from v$tempfile f order by f.file#;
注意事項:
1、儘量備份備端原有控制檔案,以備後查
2、將資料檔案、日誌檔案、臨時檔案等做好查詢記錄,更好用於恢復(建議恢復控制檔案後對比)
如果沒備份,恢復時突然發現不對怎麼辦? 例如,system表空間就一個資料檔案,備端卻3個……
3、主備端資料檔案不一致
問題:客戶在主庫新增資料檔案後,造成dg中斷
Warning: Datafile 88 (+DATA/plt136/datafile/bappr02.dbf) is offline during full database recovery
and will not be recovered
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Media Recovery Log +FLA/plt136/archivelog/2019_12_30/thread_2_seq_168948.6376.1028413411
Media Recovery Log +FLA/plt136/archivelog/2019_12_30/thread_1_seq_324738.9642.1028413409
Errors in file /u01/app/oracle/diag/rdbms/plt136/plt1361/trace/plt1361_pr00_11732.trc (incident=08516):
ORA-00600: internal error code, arguments: [3689], [88], [], [], [], [], [], [], [], [], [], Incident details in: /u01/app/oracle/diag/rdbms/plt136/plt1361/incident/incdir_208516/plt1361__11732_i208516.trc
Completed: alter database recover managed standby database using current logfile disconnect ession
主備端都查,發現兩個問題, 主備端88號資料檔案建立時間不同,表空間也不一樣
--檢查檔案資訊
select d.file#,t.name,d.name,d.creation_time from v$datafile d,v$tablespace t where d.ts#=t.ts# and d.file#=88;
問題比較明朗:客戶在主庫增加資料檔案時,資料檔案編號為88號,但備端早已經有了88號資料檔案,造成dg中斷,報錯。
Thu Oct 03 22:39:24 2019
alter tablespace bappr drop datafile 88
Deleted file /u02/app/oracle/product/11.2.0/db_home/dbs/gcltsysdata01_3.ora
Completed: alter tablespace bappr drop datafile 88
怎麼處理……
1)、檢查88號檔案是怎麼來的,主備端都檢查, 主庫因建錯表空間位置,drop 表空間了,備庫沒有drop,是alter database create datafile 88 as ‘’;
2)、必須刪除備端88檔案,與主庫保持一致,現在88檔案已有資料,刪除會丟失,怎麼恢復
處理過程:
1、刪除備端88號檔案 --要知道,刪除的88號檔案,其實就是所屬表空間(例如
B表空間)資料丟失
2、主端備份
B表空間資料,還有控制檔案,恢復至dg備端(88號檔案在備端已經沒有了)
3、主端需要備份88號資料檔案等後續產生的資料檔案,恢復至備端
4、備端開啟recover程式
為什麼還有恢復控制檔案?
因主備資料檔案所屬表空間不一致,控制檔案記錄的資訊不一樣,需要根主端一直
注意事項:
1、不管是刪除還是增加資料檔案,保持一致
2、處理前後檢查、做好記錄
4、standby log日誌
建議主備都建好,為了方便,在做備份恢復前,主庫建好。
注意事項: 主端未建,如有問題切換時,會多一個步驟,影響業務恢復時間
5、備端歸檔目錄滿
歸檔日誌傳輸中斷,如果不能清理歸檔日誌怎麼辦?
- 更換目錄或者資料夾
- 暫時停止歸檔日誌傳輸,也需要預估好主端能存放多久歸檔
- 如備端效能差,追太慢呢? 建議增量恢復
- 需要注意,造成歸檔日誌滿,備端歸檔目錄最後一個或幾個日誌,可能已損壞,注意觀察
6、主備硬體儘量效能相同
主要面對業務突然增加,如果備端效能較差,應用速度受限,造成資料同步延遲
7、如何分析DG備端效能
AWR 能否使用? ash呢? --awr是同步主端資料,ash是當前資料
執行計劃呢,如何跟主庫對比 --因為備端是隻讀環境,可以透過跟蹤,10046等方式查詢
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29487349/viewspace-2765680/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【DATAGUARD】Oracle21c Dataguard建立注意事項及主要引數介紹Oracle
- dataguard 常規運維操作運維
- 運維注意事項及案例講解(個人心得)運維
- Oracle 19C CBD Active DataGuard Standby passwd file 注意事項 ORA-01017Oracle
- DataGuard 日常維護命令整理
- MYSQL 安裝維護注意事項MySql
- Dataguard日常維護及故障解決
- DataGuard broker之一:DataGuard broker簡介
- dataguard環境中的密碼維護密碼
- Dataguard 維護操作-01-- MRP process
- DataGuard SwitchOver
- DataGuard搭建
- oracle dataguardOracle
- 【系統運維】--linux伺服器上傳測試程式碼注意事項運維Linux伺服器
- 伺服器日常維護需注意哪些事項?伺服器
- Oracle11g 搭建單例項DataGuardOracle單例
- 【DATAGUARD】Oracle Dataguard體系架構詳解Oracle架構
- 【DATAGUARD】Dataguard遠端同步配置最佳實踐
- 【DataGuard】Oracle DataGuard 最高可用模式 故障實驗Oracle模式
- PHP7 null 合併運算子注意事項PHPNull
- RandomAccessFile注意事項randomMac
- nginx 注意事項Nginx
- Oracle DataGuard 常用維護命令參考手冊Oracle
- 【DATAGUARD】Oracle19c dataguard新特性及部署Oracle
- 【DATAGUARD】Oracle Dataguard nologging 塊修復Oracle
- 【DataGuard】Oracle DataGuard 資料保護模式切換Oracle模式
- 計算機的實際維護和注意事項計算機
- oracle dataguard setupOracle
- oracle rac + dataguardOracle
- Dataguard mode switch
- Oracle 11g RAC 配置單例項 DataGuardOracle單例
- Oracle 10G windows 平臺 DataGuard 例項Oracle 10gWindows
- Oracle 11.2.0.4 physical dataguard和snapshot dataguard切換Oracle
- 【DATAGUARD 學習】同一臺主機上的dataguard
- 【DataGuard】Oracle DataGuard 日誌傳輸狀態監控Oracle
- 9I DATAGUARD實施和維護總結
- 快取注意事項快取
- 使用parallel注意事項Parallel