記錄OGG生產環境重新初始化

2021-07-04 21:08:44 字數 1432 閱讀 1844

記錄ogg生產環境重新初始化

1、impdp匯入會產生大量的日誌,需要提前檢查磁碟空間大小,特別是歸檔日誌是否儲存在,如果歸檔空間滿會導致ogg複製無法啟用,提示如下錯誤:

error   ogg-00664  oracle goldengate delivery for oracle, repaly.prm:  oci error beginning session (status = 257-ora-00257: archiver error. connect internal only, until freed.).

2、出現以上錯誤的時候如果重啟資料庫會無法open

ora-03113: end-of-file on communication channel

解決辦法:刪除舊的歸檔,如果確定磁碟空間或者recover區有足夠空間還是無法open,嘗試增大cover的空間,最好是修改歸檔路徑。

sql> alter system set db_recovery_file_dest_size=4000g scope=both;

3、ogg重新初始化步驟

3.1 源庫記錄當前scn號和extract檔案號(最好記錄時間) --

查詢當前

scn

sql>select to_char(current_scn) from v$database;

記錄當前時間下的extract產生的

3.2 匯出源庫

--建立expdir目錄

create directory expdir as '/database/oracle/expdir';

--給使用者授權

grant read,write on directory expdir to system,test;

--匯出資料

expdp system/password@orcly schemas=test directory=expdpdir  dumpfile=syb0826.dmp logfile=syb0825.log content=all flashback_scn=16904557626

3.3 目標庫刪除schema

sql>drop user test cascade

3.4目標庫匯入資料

impdp system/password@orcly directory=expdpdir dumpfile=syb0826.dmp logfile=syb0826.log  schemas=test

3.5 重置replicat 並按scn啟動,如果報錯步驟5可重複嘗試幾個檔案序號

--000687為extract的序號

alter repa extseqno  000687 extrba 0

--2719112586為sc

n號,需要注意的是改scn號必須包含在extract檔案中,否者會報錯

start repa atcsn 2719112586

ogg初始化mysql資料 OGG重新初始化

環境說明 os作業系統 aix 資料庫版 本 oracle 11.2.0.4 ogg重新初始化步驟 1 關閉目標端的日誌應用程序 2.確認源端的資料抽取程序已經啟動 ggsci info all 3 匯出資料 vi exp data par userid as sysdba directory ex...

ogg初始化mysql資料 ogg直接資料初始化

環境 源端 192.168.133.136 目標端 192.168.133.137 資料庫版本 11.2.0.4 ogg 版本 18.1 作業系統 centos 7.6 目標 使用 ogg進行資料初始化 過程 1.源目兩邊 資料準備 源端和目標端 sql conn as sysdba sql cre...

ogg單錶初始化步驟

一 先停止replicat程序。ggsci bre2 49 stop rep t1 sending stop request to replicat rep t1 request processed.二 獲取當前源端的scn號 sql select dbms flashback.get system...