6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ZDM(Zero Downtime Migration)を使ってみた - オンライン論理移行・OGG準備編 -

Last updated at Posted at 2025-12-20

この記事は JPOUG Advent Calendar 2025 および OCI Advent Calendar 2025 の Day 17 の記事となります。遅れてスミマセン

ZDM(Zero Downtime Migration) を使ってみますやで。下記記事の続編になります。
彡(^)(^)

事前準備が色々とあるのでつらつらと書いていきます。

1. 参考ドキュメント

以下のマニュアルと公開資料を参考にしました。

Zero Downtime Migration 21.5 - ブック -
https://docs.oracle.com/cd/G22032_01/books.html

Zero Downtime Migrationを使用したOracle Cloudへの移行
5 論理データベース移行の準備
https://docs.oracle.com/cd/G22032_01/zdmug/preparing-logical-database-migration1.html

ZeroDowntimeMigration 論理オンライン移行における環境構築手順
https://speakerdeck.com/oracle4engineer/zerodowntimemigration-lun-li-onrainyi-xing-niokeruhuan-jing-gou-zhu-shou-shun

2. 構成図

以下の構成で ZDM のオンライン論理移行を実行します。Source と Target の BaseDB はあらかじめ作成しておきました。
image.png

3. Oracle GoldenGate - Database Migrations(Marketplace) Compute の作成

下記のマニュアルから Cloud Marketplace を辿って Oracle GoldenGate – Database Migrations を検索します。

image.png

赤で囲ったのがお目当ての Oracle GoldenGate – Database Migrations になります。上記のリンクをクリックします。

image.png

上記画面の Get App をクリックします。下記画面に遷移します。

image.png

通常のOCIユーザーであれば Commercial Market のテナントになるはずです。Commercial Market にチェックを入れた状態で Sign In をクリックして Marketplace のイメージを作成する Oracle Cloud のテナントにログインします。既にログインしている場合はログインは不要です。

image.png

上記画面の Launch Stack をクリックします。下記画面に遷移します。

image.png

image.png

OCI Resource Manager(※Terraform のマネージドサービス) の Stack を作成するコンパートメントと GoldenGate のイメージ/バージョンを選択します。Oracle DB用の最新イメージを選択します。

Resource Manager の Stack作成画面に遷移するので各項目を入力します。

image.png

Name と Description は任意ですが判りやすいものにします。

image.png

その他項目は必要に応じて入力してください。デフォルトのままでも構いません。Next をクリックします。

image.png

Compute の Display Name と hostname(ホスト名) を入力します。任意ですが判りやすいものにしておいてください。

image.png

Compute を作成する VCN のコンパートメント名とVCN、サブネットのコンパートメント名とSubnetを選択します。

image.png

インスタンスの設定は作成する AD(Avaliability Domain)、Compute の Shape、Flex Shape の場合は oCPU数とメモリ量をそれぞれ記載します。Public IP は今回付与しません。

image.png

Custom Volume Size をチェックすると上記のようなオプションをセットできます。今回は選択しません。

image.png

OGGデプロイメント名も任意ですが判りやすいものにしてください。opcユーザーログイン用のSSH公開鍵を直接貼り付けます。Next をクリックします。

image.png

RM Stack の確認画面になります。慎重にやるなら Stack実行前に Plan した方が良いのですが、今回は直接Applyしてしまいます。Createボタンをクリックします。

image.png

RM Stack の実行が成功すると上記のようになります。Compute の Instance画面に遷移します。

image.png

GoldenGate のマケプレイメージによる Compute作成に成功しました。

4. Oracle GoldenGate - Database Migrations への接続

まず Compute に SSH で接続します。上記 3. で張り付けたSSH公開鍵と対になる秘密鍵でopcユーザーでログインします。

[opc@ayu-bastion1 ~]$ ssh 10.0.1.251
Last login: Sat Dec 20 14:30:08 2025 from 10.0.0.xxx
[opc@zdmogg23ai ~]$

下記マニュアルを参照して opcユーザーのホームディレクトリ直下にある ogg-credentials.json を確認します。

[opc@zdmogg23ai ~]$ ls -la
total 0
drwxr-xr-x. 3 opc  opc  75 Dec 20 14:23 .
drwxr-xr-x. 3 root root 17 Dec  2 04:59 ..
lrwxrwxrwx. 1 opc  opc  37 Dec 20 14:23 ogg-credentials.json -> /u02/deployments/ogg-credentials.json
lrwxrwxrwx. 1 opc  opc  39 Dec 20 14:22 ora23ai-231032511.tar -> /opt/dockerimages/ora23ai-231032511.tar
drwx------. 2 opc  opc  29 Dec 20 14:22 .ssh
[opc@zdmogg23ai ~]$ cat ogg-credentials.json
{"username": "oggadmin", "credential": "xxxxxxxxxx"}
[opc@zdmogg23ai ~]$

このユーザー名とパスワードで Marketplace の Compute にインストールされている GoldenGate の管理画面にログインしてみます。GUI が必要でこういう踏み台経由の環境では悩ましいのですが、今回は下記記事の要領で VNCサーバー(ZDM Compute) と VNCクライアント(PC側) をセットアップしました。

VNC経由で Oracle Linux 8 の画面を起動します。左上の Activity → Firefox のアイコンで Firefox を起動します。

image.png

https://<マケプレGoldenGateをインストールしたComputeのIP>:443/

URL に上記を入力します。初めはオレオレ証明書の警告が出ると思いますが許容して進みます。

image.png

ogg-credentials.json で確認したユーザー名とパスワードを入力します。

image.png

GG の管理画面にログインできました。
彡(^)(^)

5. まとめ

ZDMを使ってみたと言いながら今回ZDMを全く触っていない……事前準備が多いツールなので仕方ないですね。続きは次回以降!
彡(^)(^)

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?