OGG-upgrade Classic to Integrated take long time

今天要將oracle goldengate 的extract 從classic to integrated mode.
真是簡單的任務阿~ 趕緊做完下班囉~

Classic to Integrated

error

在upgrade 之前我們看info upgrade一下,出現了上面這個錯誤,簡單來說就是需要recovery SCN 3777070365 追上SCN 3787881916。

後面的這個SCN 就是我們在register database時的scn(可以查DBA_capture) ,兩個重疊後我們轉換才不會有資料遺失。

查了一下MOS
Upgrading from Classic To Integrated Reports ‘Extract is not ready to be upgraded because recovery SCN Has Not Reached’ (Doc ID 2582705.1)

裡面有如何轉換的步驟,排錯的方式就是將Extract 重新打開讓他跑一下,追上就好了,但! 如果這樣就好我還寫個屁?

研究一下這個recover SCN 到底是三小,為啥都不動? 原來這叫做recover checkpoint: The recovery checkpoint is the position when the oldest open transaction starts.

那看起來就是有open transaction 導致,查一下!

ggsci showtrans

還真的有,SCN也對上了,已經做了12小時還在做,應該是有鬼…
How-To Identify a transaction by XID which is provided in the SEND EXTRACT <NAME> SHOWTRANS (Doc ID 1504667.1)

Select * from v$transaction where xidusn=8 and XIDSLOT =11 and XIDSQN =186649;

然後可以v$transaction 的 ses_addr 串 v$session 的 saddr

也可以再去串v$session 的SQL_ADDRESS 與 v$sql 的SQL_ADDRESS

就這樣找到哪個transaction 卡在那邊囉~

請下這個transaction的人出來面對!!

下面還是提供一下步驟~

How To Upgrade From Goldengate Classic Extract To Integrated Extract (Doc ID 1484313.1)

1.Check to see if upgrade possible

GGSCI> DBLOGIN USERID <ID> PASSWORD <PW>

GGSCI> INFO <extract_name> UPGRADE

2.Upgrade may fail, in case of existing “open transactions “

GGSCI>stop extract <extract_name>

GGSCI>dblogin userid <ggadmin>,password <password>

3.Register the extract in the database if not done already

GGSCI>register extract <extract_name> database

GGSCI> info extract <Extract_name> upgrade

4.Upgrade integrated

GGSCI>alter extract <extract_name>,upgrade integrated tranlog

GGSCI>start extract <extract_name>

下班!

upgrade Classic to Integrated take long time
Kxodia 肯佐迪亞

Leave a Comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *