SlideShare a Scribd company logo
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 12.2
セットアップガイド ver.1.0
2016年2月
日本オラクル株式会社
クラウド&テクノロジー事業統括
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
はじめに
• 本資料では、Oracle GoldenGate R12.2.0.1.0 の環境構築から
動作確認までの一連の手順について説明します。
• 本資料は製品マニュアルを補足する資料です。
手順の一例としてご活用ください。
– Fusion Middleware Installing and Configuring Oracle GoldenGate for Oracle
Database(12.2.0.1.0)
• https://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/toc.htm
3
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
本ドキュメントの流れ
• 本ドキュメントは下記の流れで、
Oracle GoldenGate のセットアップ
方法を説明します。
– 1章:前提知識
– 2章:環境準備
– 3章:GoldenGateのインストール
– 4章:Oracle Databaseの構成
– 5章:GoldenGateの配置
– 6章:GoldenGateの動作確認
– 7章:GoldenGateのアンインストール
– 8章:参考情報
4
Oracle
Database
12gR1
( AL32UTF8)
SID: orcl
Oracle
GoldenGate
12gR2
Oracle
GoldenGate
12gR2
Oracle
Database
12gR1
(AL32UTF8)
SID: orcl
Host: host-a
OS:Oracle Linux Server 6.7
Host: host-b
OS:Oracle Linux Server 6.7
ソース ターゲット
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
5
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 概要
• Oracle GoldenGate概要
– データ・レプリケーション製品
– 2009年旧GoldenGate社を買収
• Oracle GoldenGateの特徴
– データベースに行われた変更を他データベースへ反映
– 既存のデータベースやネットワークへの負荷は最小限
– 稼働中のデータベース同士で双方向に連携が可能
– 異なるデータベースやOSの種類・バージョンで構成され
たシステム間での連携が可能
– データベース全体だけではなく、表・列など必要な部分
に絞った柔軟な連携が可能
ソース・
データベース
ターゲット・
データベース
双方向同期
アプリ
GoldenGate
GoldenGate
アプリ
Active
Active
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 基本アーキテクチャ - 全体像 -
Oracle GoldenGate
Trail
ファイル
差分ログ
Server A Server B
OS
Oracle GoldenGate
Trail
ファイル
OS
ターゲット
データベース
ソース
データベース
チェックポイント
ファイル
チェックポイント
ファイル
チェックポイント
ファイル
抽出プロセス
Extract
(Capture)
転送プロセス
Extract
(Data Pump)
管理プロセス
Manager
受信プロセス
Collector
適用プロセス
Replicat
管理プロセス
Manager
チェック
ポイント表
• データベースの差分ログをTrailファイルという汎用的なフォーマットに変換して転送
• 各プロセスの進行状況はチェックポイントファイル(バイナリファイルまたはDB上の表)に保存
• 上記の構成の他に、DBサーバと別のサーバにGoldenGateを切り出す構成などが可能
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 基本アーキテクチャ - プロセス -
8
Oracle GoldenGate
Trailファイル
Server A Server B
Oracle GoldenGate
抽出プロセス
Extract
(Capture)
転送プロセス
Extract
(Data Pump)
管理プロセス
Manager
受信プロセス
Collector
適用プロセス
Replicat
管理プロセス
Manager
Trailファイル
• Captureプロセス:ソースDBから変更ログを抽出し
てTrailファイルに書き出すプロセス
• Data Pumpプロセス:Captureプロセスが書き出し
たTrailファイルからリモートのCollectorプロセスに
データを転送するプロセス
• Collectorプロセス:ソース側のDataPumpプロセスから
データを受信して、Trailファイルに書き込むプロセス
(Managerが起動するためユーザによる操作は不要)
• Replicatプロセス:Trailファイルからデータを読み出し、
ターゲットDBに反映するためのプロセス
• Managerプロセス:OGGインスタンス全体を管理するプロセス
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 基本アーキテクチャ - パラメータファイル -
9
Oracle GoldenGate
Trail
ファイル
Server A Server B
Oracle GoldenGate
Manager
Collector Replicat
Manager
Trail
ファイル
• GoldenGateのパラメータファイルは下記の2種類があります。プレーンテキスト形式です。
– GLOBALSパラメータファイル(ファイル名:GLOBALS):GoldenGateインスタンス全体を設定するためのパラ
メータファイル。ファイル名は大文字のGLOBALSで拡張子は不要。
– パラメータファイル(ファイル名:xxxx.prm):Capture等のプロセス実行時の設定をするためのファイル。
Collector以外の全てのプロセスで設定が必要。
GLOBALS
パラメータファイル
GLOBALS
パラメータファイル
パラメータファイル パラメータファイル
Capture DataPump
パラメータファイル
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 基本アーキテクチャ - 主なファイル -
10
Oracle GoldenGate
Trail
ファイル
Server A Server B
Oracle GoldenGate
Collector
Trail
ファイル
• Trailファイル: OGG内で変更ログを格納するためのファイル。
• チェックポイントファイル:各プロセスがどこまで処理したかを記録するためのファイル。
• 破棄ファイル(Discardファイル):処理できなかったレコードを格納するためのファイル。
• ログファイル(ggserr.log):エラー等のメッセージが書き込まれるファイル。
チェックポイント
ファイル
チェックポイント
ファイル
チェックポイント
ファイル
破棄
ファイル
Capture
破棄
ファイル
破棄
ファイル
ReplicatDataPump
Manager Manager
ログファイル
ggserr.log
ログファイル
ggserr.log
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGate 基本アーキテクチャ - 主なディレクトリ -
• GoldenGateホーム以下に作成される主なディレクトリと用途を説明します。
– dirprm:各プロセスのパラメータファイル用のディレクトリ。
– dirrpt:各プロセスから出力される破棄ファイル等のディレクトリ。編集不可。
– dirchk:チェックポイントファイル用のディレクトリ。編集不可。
– dirpcs:各プロセスのステータス情報を格納するディレクトリ。編集不可。
– dirsql:GoldenGateのSQLスクリプトを格納するディレクトリ。
– dirdat:Trailファイルを格納するディレクトリ。編集不可。
– dirtmp/dirdmp:一時ファイル、ダンプファイル用ディレクトリ。編集不可。
– dircrd/dirwlt:セキュリティ関連の情報を格納するディレクトリ。
*注:OGGバージョンによってディレクトリ構成が異なることがあります。
11
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
GoldenGateにおけるレプリケーション方式
ソース
データベース
GoldenGate
抽出(Extract)
Classic
Capture
ターゲット
データベース
変更履歴
(REDOログ等)
Non-integrated
Replicat
Coordinated
Replicat
(OGG12c~)
Integrated
Replicat
(OGG12c~)
Integrated
Capture
(OGG11gR2~)
Oracle Databaseのみ構成可能
Database
Logmining
Server
(Outbound)
ソース
オブジェクト
ターゲット
オブジェクト
Database
Logmining
Server
(Inbound)
GoldenGate
適用(Apply)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
GoldenGateにおけるレプリケーション方式 - Capture -
ソース
データベース
GoldenGate
抽出(Extract)
Classic
Capture
変更履歴
(REDOログ等)
Integrated
Capture
(OGG11gR2~)
Oracle Databaseのみ
Database
Logmining
Server
(Outbound)
ソース
オブジェクト
• Classic Capture
– 従来からの抽出方法
– 全てのデータベースで利用可能
– 変更ログ(REDOログ等)から抽出
• 統合Capture(Integrated Capture)
– OGG11gR2からの新しい抽出方法
– Oracle Databaseでのみ利用可能
– DBの機能(Database Logmining Server)を
使用して変更情報を抽出
– Oracle Databaseへの高い親和性
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
GoldenGateにおけるレプリケーション方式 - Replicat -
• Non-integrated Replicat
– 従来からの適用方法
– 全てのデータベースで利用可能
– SQLを使用してターゲットに適用
• Coordinated Replicat
– Non-integrated をマルチスレッド化
• 統合Replicat(Integrated Replicat)
– Oracle Databaseでのみ利用可能
– DBの機能(Database Logmining Server)
を使用して変更情報を適用
– Oracle Databaseへの高い親和性
ターゲット
データベース
Non-integrated
Replicat
Coordinated
Replicat
(OGG12c~)
Integrated
Replicat
(OGG12c~)
Oracle Databaseのみ
ターゲット
オブジェクト
Database
Logmining
Server
(Inbound)
GoldenGate
適用(Apply)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの管理
• コマンドラインによるGoldenGateの管理
– GGSCI(GoldenGate Software Command Interface)
• GUIによるGoldenGateの管理
15
GoldenGate Monitor
•GoldenGateの監視・管理をするスタ
ンドアロン製品
•高度な監視機能やアラート機能を提
供
GoldenGate Plug-in
For EMCC12c
• Enterprise Manager Cloud Control
12cのプラグイン形式
• Oracle Databaseと同一のインタフェー
スやメトリックを使用して統合的な監
視が可能
GoldenGate Director
•GoldenGateのレガシーバージョン
を管理・監視するC/Sツール
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの管理~GGSCIコマンドインターフェイス
• 全てのコマンドのヘルプ概要を表示します。
– GGSCI> HELP
– GGSCI> HELP ALL
• 特定のコマンドのヘルプ概要を表示します。
– GGSCI> HELP <コマンド名>
• 実行したコマンドの履歴を表示します。
– GGSCI> HISTORY
• 全てのプロセスの情報を表示します。
– GGSCI> INFO ALL
16
• GGSCI (Oracle GoldenGate
Software Command Interface)は、
GoldenGateのコマンドラインインタ
フェースです。GGSCIを使用して、
GoldenGateを設定・制御・監視する
ことができます。
• この資料では、GGSCIを使用して操
作します。
利用例
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
17
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
本資料の環境情報
• 本資料で構成する環境は以下を使用しています。
–OS
• Oracle Linux Server Release 6.7 (64bit)
–ソフトウェア
• Oracle GoldenGate R12.2.0.1.0
–本資料では、抽出にIntegrated Capture、適用にIntegrated Replicatを使用します。
• Oracle Database 12.1.0.2.0
–既にソース用データベース、ターゲット用データベースとしてOracle Database が用意さ
れているものとします。
18
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
本資料で構築するGoldenGateの構成イメージ
19
DB
GoldenGate GoldenGate
DB
ソース ターゲット
Manager Manager
同期 Collector
Integrated
Replicat
Integrated
Extract
(Capture)
Extract
(DataPump)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
2. 文章を読み、輸出規制に受諾する場合
は「受諾」ボタンを押します。
メディアのダウンロード(1/3)
1. Oracle Software Delivery Cloudにサイ
ンインします。
20
http://edelivery.oracle.com
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
4. 使用可能なリリースで「Oracle GoldenGate
12.2.0.1.0 for Linux x86-64」を選択し「続
行」を押します。
メディアのダウンロード(2/3)
3. 「製品」で、「Oracle GoldenGate」を選
択し、プラットフォームも選択して、「続
行」を押します。
21
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
メディアのダウンロード(3/3)
5. 「オラクル標準の条件及び規制」のライ
センス契約を十分読み、受諾する場合
はチェックして「続行」ボタンを押します。
22
6.ファイル名をクリックして、ファイルをダウ
ンロードします。
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
23
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateのインストール
• 各システムにGoldenGateをインストールします。
• インストール時にManagerプロセスが設定され起動します。
24
DB
GoldenGate GoldenGate
DB
ソース ターゲット
Manager Manager
同期 Collector
Integrated
Replicat
Integrated
Extract
(Capture)
Extract
(DataPump)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateのインストール(1/4)
1. 事前にインストール用ディレクトリを作成
おきます。また、メディア・パックを解凍し、
インストーラを起動します。
– ソース:
[oracle@host-a ~]$ mkdir -p /u01/app/ogg1
[oracle@host-a ~]$ unzip V97860-01.zip
[oracle@host-a ~]$ cd fbo_ggs_Linux_x64_shiphome/Disk1/
[oracle@host-a Disk1]$ sh runInstaller
– ターゲット:
[oracle@host-b ~]$ mkdir -p /u01/app/ogg2
[oracle@host-b ~]$ unzip V97860-01.zip
[oracle@host-b~]$ cd fbo_ggs_Linux_x64_shiphome/Disk1/
[oracle@host-b Disk1]$ sh runInstaller
• システム要件の確認
– システム要件や利用するデータ型
がGoldenGateに対応しているかを確
認します。システム要件については、
「 Fusion Middleware Installing and
Configuring Oracle GoldenGate for
Oracle Database 」をご参照下さい。
– http://www.oracle.com/technetwork
/middleware/goldengate/documenta
tion/index.html
25
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateのインストール(2/4)
26
2. インストール・オプション画面で「Oracle GoldenGate
for Oracle Database 12c」を選択して「次へ」をクリック
します。
3. Specify Installation Details画面で、ステップ1で作成
したインストール先ディレクトリを指定します。。また、
Managerプロセスが使用するポート番号を指定して、
「次へ」をクリックします。
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateのインストール(3/4)
27
4. サマリー画面で内容を確認の上、「インストー
ル」ボタンをクリックします。
5. 終了画面で、「Oracle GoldenGateのインストールが成
功しました」というメッセージが出ましたら、「閉じる」
ボタンをクリックします。
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
6. 下記の環境変数を設定します。
• ORACLE_HOME
– Oracle Databaseがインストールされているディレクトリ
• ORACLE_SID
– Oracle Databaseを特定する名前(SID)
• OGG_HOME
– Oracle GoldenGateをインストールしたディレクトリ
(ステップ1で作成、ステップ3で指定)
* GG_HOMEの設定は必須ではありません。
7. 同じようにターゲットのOracle
GoldenGateをインストールします。
– ※ここでは省略します。
28
Oracle GoldenGateのインストール(4/4)
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=orcl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export OGG_HOME=/u01/app/ogg1
export LD_LIBRARY_PATH=$OGG_HOME:$LD_LIBRARY_PATH
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
29
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle Databaseの構成
• ソースとターゲットのOracle Databaseは既に構成されているものとします。
• この章ではGoldenGateを使用するための事前設定を行います。
30
DB
GoldenGate GoldenGate
DB
ソース ターゲット
Manager Manager
同期 Collector
Integrated
Replicat
Integrated
Extract
(Capture)
Extract
(DataPump)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle Databaseの構成(1/5)
1. 各データベースのTNS名を設定し
ます。
– ソース側とターゲット側の
$ORACLE_HOME/network/admin/tn
snames.oraに右の内容を追加します。
– 既に構成されている場合は設定す
る必要はありません。
ソース側:
ターゲット側:
SRC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
host-a.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
TGT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =
host-b.oracle.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
3. Oracle GoldenGateを有効化(ソース側と
ターゲット側)
• ソース側とターゲット側両方で下記のコマンド
を実行して、GoldenGateが使用するOracle
Databaseを利用できるようになります。
Oracle Databaseの構成(2/5)
32
2. ロギング・プロパティの構成(ソース側)
• ソース・データベース側で、下記のコマンドを実
行してサプリメンタル・ロギングの設定をします。
• サプリメンタル・ロギングは、通常REDOログに
記録される情報だけでなく、GoldenGate等がレ
プリケーションを行うために必要な情報をREDO
ログに追加する機能です。
$ sqlplus / as sysdba
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
SQL> ALTER DATABASE FORCE LOGGING;
SQL> alter system set enable_goldengate_replication = true;
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle Databaseの構成(3/5)
4. Oracle Databaseサーバリソースの調整(ソース・ターゲット)
– ソース側のOracle Databaseのlogminning server (Integrate Extractが利用)とターゲット側のOracle Databaseの
inbound server(Integrate Replicatが利用)を起動するために、 STREAMS_POOL_SIZE を設定します。
• 推奨値はマニュアルをご参照ください。
– http://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/setup.htm#GIORA234
– 右のコマンドで、STREAMS_POOL_SIZEを設定します。ソースとターゲット両方で設定します。
• 本例では、ExtractとReplicatが一つずつの構成を想定した数値で設定しています。
33
SQL> alter system set streams_pool_size=1250M scope=spfile;
SQL> shutdown immediate
SQL> startup
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
5. ソース側OGG用ユーザの作成
– 下記のコマンドでソース側のユーザ作成
– 下記のコマンドでソース側のユーザの権限設定
• この資料ではDBA権限を付与していますが、より詳細な権
限設定をしたい場合はマニュアルを参照して必要な権限の
みを設定してください。
– https://docs.oracle.com/goldengate/1212/gg-
winux/GIORA/user_assignment.htm#GIORA552
6. ターゲット側OGG用ユーザの作成
– 下記のコマンドでターゲット側のユーザ作成
– 下記のコマンドでターゲット側のユーザ権限設定
• この資料ではDBA権限を付与していますが、より詳細な権
限設定をしたい場合はマニュアルを参照して必要な権限の
みを設定してください。
– ソース側と同じURLをご参照下さい。
34
Oracle Databaseの構成(4/5)
SQL> create user ggs identified by Welcome1;
SQL> grant DBA to ggs;
SQL> exec
dbms_goldengate_auth.grant_admin_privile
ge('ggs');
SQL> create user ggs identified by Welcome1;
SQL> grant DBA to ggs;
SQL> exec
dbms_goldengate_auth.grant_admin_privile
ge('ggs');
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
5. 下記のコマンドでソース側のユーザ作成
– ソース側テスト用ユーザの作成
– ソース側テスト用ユーザの権限設定
• この資料ではDBA権限を付与していますが、より詳細な権限設
定をしたい場合は必要な権限のみを設定してください。
6. 下記のコマンドでターゲット側のユー
ザ作成
– ターゲット側テスト用ユーザの作成
– ターゲット側テスト用ユーザの権限設定
• この資料ではDBA権限を付与していますが、より詳細な権
限設定をしたい場合は必要な権限のみを設定してください。
35
Oracle Databaseの構成(5/5)
SQL> connect sys/Welcome1@src as sysdba
SQL> create user test identified by Welcome1;
SQL> grant dba to test;
SQL> connect sys/Welcome1@tgt as sysdba
SQL> create user test identified by Welcome1;
SQL> grant dba to test;
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
36
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの構成
• 3章でインストールしたGoldenGateを設定します。
37
DB
GoldenGate GoldenGate
DB
ソース ターゲット
Manager Manager
同期 Collector
Integrated
Replicat
Integrated
Extract
(Capture)
Extract
(DataPump)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
• ソース側とターゲット側の両方の設定が
必要です。下記のマークに注意しながら
作業して下さい。
– ソース側のマシンで作業
– ターゲット側のマシンで作業
38
Oracle GoldenGateの構成(1/4)
1. プロセス監視等を行うManagerプロセス
はデフォルトでインストールする際に設
定され、起動している状態です。
•下記のコマンドで起動しているか確認できます。
•下記のコマンドで起動します。
2. スキーマ・レベルのサプリメンタル・ログ
を有効化します。
GGSCI > INFO ALL
GGSCI > START MANAGER
Source
Target
Target
Source
GGSCI > ADD SCHEMATRANDATA test
Source
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの構成(2/4)
39
3. Captureプロセスの構成をします。
• ソース側で起動するCaptureプロセスのパ
ラメータを指定します。
• テキストエディタで、パラメータファイルを
編集します。
GGSCI > EDIT PARAMS E1
EXTRACT E1
SETENV (ORACLE_HOME=/u01/app/oracle/
product/12.1.0/dbhome_1)
USERID ggs@orcl, PASSWORD Welcome1
DDL INCLUDE MAPPED
EXTTRAIL ./dirdat/aa
TABLE test.*;
Source
4. CaptureグループをDBに登録します。
5. Captureグループを追加します。
6. ローカルTrailを追加します。
GGSCI > dblogin userid ggs@orcl password Welcome1
GGSCI > REGISTER EXTRACT e1 DATABASE
GGSCI > ADD EXTRACT E1, INTEGRATED TRANLOG, BEGIN NOW
GGSCI > ADD EXTTRAIL ./dirdat/aa, EXTRACT e1
Source
Source
Source
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの構成(3/4)
40
7. ソース側でPumpプロセスの構成
• ソース側で起動するPumpプロセスのパラ
メータを指定します。
• テキストエディタで、パラメータファイルを編
集します。
GGSCI > EDIT PARAMS P1
EXTRACT P1
PASSTHRU
RMTHOST host-b.oracle.com, MGRPORT 7809
RMTTRAIL /u01/app/ogg2/dirdat/bb
TABLE test.*;
Source
8. DataPumpグループを追加します。
9. リモートTrailを追加します。
GGSCI > ADD EXTRACT P1, EXTTRAILSOURCE ./dirdat/aa
GGSCI > ADD RMTTRAIL /u01/app/ogg2/dirdat/bb, EXTRACT p1
Source
Source
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの構成(4/4)
41
10. ターゲット側でReplicatプロセスの構成
• ターゲット側で起動するReplicatプロセスのパラ
メータを指定します。
• テキストエディタで、パラメータファイルを編集し
ます。
GGSCI > EDIT PARAMS R1
REPLICAT R1
SETENV (ORACLE_HOME=/u01/app/oracle/
product/12.1.0/dbhome_1)
USERID ggs@tgt, PASSWORD Welcome1
MAP test.*, TARGET test.*;
Target
11. ターゲット側でReplicatグループを追加。
GGSCI > ADD REPLICAT R1,INTEGRATED, EXTTRAIL ./dirdat/bb
Target
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの起動
42
11. ソース側でExtractを起動。
12. ソース側でDataPumpを起動。
• DataPumpを起動するタイミングでターゲット側のCollectorプ
ロセスも起動します。
13. ソース側でプロセス状態を確認。
• すべてのプロセスの状態が「RUNNING」であれば、OK。
15. ターゲット側でReplicatを起動
16. ターゲット側でプロセス状態を確認。
•すべてのプロセス状態が「RUNNING」であれば、OK
GGSCI > START EXTRACT E1
GGSCI > START EXTRACT P1
GGSCI > INFO ALL
Target
GGSCI > START REPLICAT R1
Source
Source
Source
Target
GGSCI > INFO ALL
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
43
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの動作確認(1/4)
44
1. DDLの動作確認
• ソース側で、テーブルを作成 • ターゲット側で、テーブルを確認
SQL> connect sys/Welcome1@src as sysdba
SQL> CREATE TABLE test.test_tab
( id NUMBER NOT NULL PRIMARY KEY,
name CHAR(10) NOT NULL ,
upd_date date DEFAULT SYSDATE);
SQL> connect sys/Welcome1@tgt as sysdba
SQL> desc test.test_tab
名前 NULL? 型
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME NOT NULL CHAR(10)
UPD_DATE DATE
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの動作確認(2/4)
45
2. DMLの動作確認 (Insert)
• ソース側で、データをインサート • ターゲット側で、データを確認
SQL> connect sys/Welcome1@src as sysdba
SQL> insert into test.test_tab values(1,'山本', sysdate);
1行が作成されました。
SQL> commit;
コミットが完了しました。
SQL> connect sys/Welcome1@tgt as sysdba
SQL> select * from test.test_tab;
ID NAME UPD_DATE
---------- ------------------------------ --------
1 山本 16-01-11
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの動作確認(3/4)
46
3. DMLの動作確認 (Update)
• ソース側で、データを更新 • ターゲット側で、更新した内容を確認
SQL> conn sys/Welcome1@src as sysdba
SQL> update test.test_tab set name ='湯浅' where id=1;
1行が更新されました。
SQL> commit;
コミットが完了しました。
SQL> connect sys/Welcome1@tgt as sysdba
SQL> select * from test.test_tab;
ID NAME UPD_DATE
---------- ------------------------------ --------
1 湯浅 16-01-11
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateの動作確認(4/4)
47
4. DMLの動作確認 (Delete)
• ソース側で、データを削除 • ターゲット側で、削除した内容を確認
SQL> conn sys/Welcome1@src as sysdba
SQL> delete test.test_tab where id=1;
1行が削除されました。
SQL> commit;
コミットが完了しました。
SQL> conn sys/Welcome1@tgt as sysdba
SQL> select * from test.test_tab;
レコードが選択されませんでした。
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
48
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateのアンインストール(1/2)
49
1. ソース側のアンインストール
• プロセスを停止して設定を解除
• 権限を削除
• OUIでOracle GoldenGateをアンイン
ストール
• 「アンインストールに成功しました」が出ましたら、
アンインストールは終了です。
GGSCI> DBLOGIN USERID ggs PASSWORD Welcome1
GGSCI> STOP ER *
GGSCI> STOP mgr
GGSCI> DELETE SCHEMATRANDATA test
GGSCI> DELETE EXTRACT E1
GGSCI> UNREGISTER EXTRACT E1 database
SQL> exec
dbms_goldengate_auth.revoke_admin_privilege('ggs');
$ cd /u01/app/ogg1/deinstall/
$ sh ./deinstall.sh
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Oracle GoldenGateのアンインストール(2/2)
50
2. ターゲット側のアンインストール
• プロセスを停止して設定を解除
• 権限を削除
• OUIでOracle GoldenGateをアンイン
ストール
• 「アンインストールに成功しました」が出ましたら、
アンインストールは終了です。
GGSCI> DBLOGIN USERID ggs@tgt PASSWORD Welcome1
GGSCI> STOP REPLICAT R1
GGSCI> STOP mgr
GGSCI> DELETE REPLICAT R1
SQL> exec
dbms_goldengate_auth.revoke_admin_privilege('ggs');
$ cd /u01/app/ogg2/deinstall/
$ sh ./deinstall.sh
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Agenda
前提知識
事前の環境準備(メディアの用意)
Oracle GoldenGateのインストール
Oracle Databaseの構成
Oracle GoldenGateの配置
Oracle GoldenGateの動作確認
Oracle GoldenGateのアンインストール
参考情報
51
1
2
3
4
5
6
7
8
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
参考情報
• Oracle GoldenGate 12c 全般情報(英語)
– https://docs.oracle.com/goldengate/c1221/gg-winux/index.html
– Oracle GoldenGate 12c リリースノート(英語)
– http://docs.oracle.com/goldengate/c1221/gg-winux/GRLWU/toc.htm#GRLWU101
• Oracle GoldenGate 12c インストールガイド(英語)
– https://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/system_requirements.htm#GIORA110
52
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Document Control
Author
Oracle Asia Research & Development Center
• 黄 明
• 梁 国賢
• 楊 帆
Reviewer
日本オラクル株式会社
• 谷川 信朗
• 後藤 陽介
• 舟橋 直美
53
変更履歴
Date Version
2016/2 1.0 Created.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 55
Oracle GoldenGate R12.2 セットアップガイド

More Related Content

What's hot (20)

PDF
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
オラクルエンジニア通信
 
PDF
Oracle GoldenGate Veridata概要
オラクルエンジニア通信
 
PDF
しばちょう先生による特別講義! RMANバックアップの運用と高速化チューニング
オラクルエンジニア通信
 
PDF
Oracle GoldenGate FAQ
オラクルエンジニア通信
 
PDF
[Oracle DBA & Developer Day 2016] しばちょう先生の特別講義!!ストレージ管理のベストプラクティス ~ASMからExada...
オラクルエンジニア通信
 
PPTX
Oracle Database Vaultのご紹介
オラクルエンジニア通信
 
PDF
Zero Data Loss Recovery Applianceによるデータベース保護のアーキテクチャ
オラクルエンジニア通信
 
PDF
Oracle GoldenGate Cloud Serviceユーザーズガイド
オラクルエンジニア通信
 
PPTX
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
オラクルエンジニア通信
 
PDF
事例から見る規模別クラウド・データベースの選び方 (Oracle Database) (Oracle Cloudウェビナーシリーズ: 2021年6月30日)
オラクルエンジニア通信
 
PDF
Zero Data Loss Recovery Applianceのご紹介
オラクルエンジニア通信
 
PPTX
Zero Data Loss Recovery Appliance 設定手順例
オラクルエンジニア通信
 
PDF
Oracle GoldenGate Cloud Service(GGCS)概要
オラクルエンジニア通信
 
PPTX
OCI GoldenGate Overview 2021年4月版
オラクルエンジニア通信
 
PDF
Oracle Data Guard による高可用性
Yahoo!デベロッパーネットワーク
 
PPTX
Database Cloud Service/Exadata Cloud Service/Exadata Cloud at Customer サービスアッ...
オラクルエンジニア通信
 
PDF
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
PDF
Oracle GoldenGate Veridata 12cR2 セットアップガイド
オラクルエンジニア通信
 
PDF
Rac rac one_node説明資料
Hiroki Morita
 
PDF
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Yuya Ohta
 
GoldenGateテクニカルセミナー3「Oracle GoldenGate Technical Deep Dive」(2016/5/11)
オラクルエンジニア通信
 
Oracle GoldenGate Veridata概要
オラクルエンジニア通信
 
しばちょう先生による特別講義! RMANバックアップの運用と高速化チューニング
オラクルエンジニア通信
 
Oracle GoldenGate FAQ
オラクルエンジニア通信
 
[Oracle DBA & Developer Day 2016] しばちょう先生の特別講義!!ストレージ管理のベストプラクティス ~ASMからExada...
オラクルエンジニア通信
 
Oracle Database Vaultのご紹介
オラクルエンジニア通信
 
Zero Data Loss Recovery Applianceによるデータベース保護のアーキテクチャ
オラクルエンジニア通信
 
Oracle GoldenGate Cloud Serviceユーザーズガイド
オラクルエンジニア通信
 
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
オラクルエンジニア通信
 
事例から見る規模別クラウド・データベースの選び方 (Oracle Database) (Oracle Cloudウェビナーシリーズ: 2021年6月30日)
オラクルエンジニア通信
 
Zero Data Loss Recovery Applianceのご紹介
オラクルエンジニア通信
 
Zero Data Loss Recovery Appliance 設定手順例
オラクルエンジニア通信
 
Oracle GoldenGate Cloud Service(GGCS)概要
オラクルエンジニア通信
 
OCI GoldenGate Overview 2021年4月版
オラクルエンジニア通信
 
Oracle Data Guard による高可用性
Yahoo!デベロッパーネットワーク
 
Database Cloud Service/Exadata Cloud Service/Exadata Cloud at Customer サービスアッ...
オラクルエンジニア通信
 
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
Oracle GoldenGate Veridata 12cR2 セットアップガイド
オラクルエンジニア通信
 
Rac rac one_node説明資料
Hiroki Morita
 
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Yuya Ohta
 

Viewers also liked (15)

PDF
Oracle GoldenGate Monitor 12cR2 セットアップガイド
オラクルエンジニア通信
 
PDF
Oracle GoldenGate Studioセットアップガイド
オラクルエンジニア通信
 
PDF
Oracle GoldenGate Studio概要
オラクルエンジニア通信
 
PDF
[プレゼン]Db moto
株式会社クライム
 
PDF
GoldenGateテクニカルセミナー1「市場のトレンドと最新事例のご紹介」(2016/5/11)
オラクルエンジニア通信
 
PDF
楽天プロジェクトX:基幹DB移設 編
Rakuten Group, Inc.
 
PDF
Oracle Database Appliance 12.1.2.2.0 アップデート及びパッチ管理について
オラクルエンジニア通信
 
PDF
Cloudera World Tokyo 2015 Oracleセッション資料 「ビッグデータ/IoTの最新事例とHadoop活用の勘所」
オラクルエンジニア通信
 
PDF
Hadoop Conference Japan_2016 セッション「顧客事例から学んだ、 エンタープライズでの "マジな"Hadoop導入の勘所」
オラクルエンジニア通信
 
PDF
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
CO-Sol for Community
 
PDF
Oracle Database Enterprise Edition で解決する データベースシステムの課題 (12c対応版)
オラクルエンジニア通信
 
PDF
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
Ryota Watabe
 
PDF
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
Ryota Watabe
 
PDF
Oracle Databaseを用いて学ぶ RDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
Ryota Watabe
 
PDF
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
Ryota Watabe
 
Oracle GoldenGate Monitor 12cR2 セットアップガイド
オラクルエンジニア通信
 
Oracle GoldenGate Studioセットアップガイド
オラクルエンジニア通信
 
Oracle GoldenGate Studio概要
オラクルエンジニア通信
 
[プレゼン]Db moto
株式会社クライム
 
GoldenGateテクニカルセミナー1「市場のトレンドと最新事例のご紹介」(2016/5/11)
オラクルエンジニア通信
 
楽天プロジェクトX:基幹DB移設 編
Rakuten Group, Inc.
 
Oracle Database Appliance 12.1.2.2.0 アップデート及びパッチ管理について
オラクルエンジニア通信
 
Cloudera World Tokyo 2015 Oracleセッション資料 「ビッグデータ/IoTの最新事例とHadoop活用の勘所」
オラクルエンジニア通信
 
Hadoop Conference Japan_2016 セッション「顧客事例から学んだ、 エンタープライズでの "マジな"Hadoop導入の勘所」
オラクルエンジニア通信
 
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
CO-Sol for Community
 
Oracle Database Enterprise Edition で解決する データベースシステムの課題 (12c対応版)
オラクルエンジニア通信
 
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
Ryota Watabe
 
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
Ryota Watabe
 
Oracle Databaseを用いて学ぶ RDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
Ryota Watabe
 
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
Ryota Watabe
 
Ad

Similar to Oracle GoldenGate R12.2 セットアップガイド (14)

PDF
Oracle GoldenGate Studio R12.2.1.1 セットアップガイド
オラクルエンジニア通信
 
PDF
Oracle GoldenGate for Big Data 12.2 セットアップガイド
オラクルエンジニア通信
 
PDF
Oracle GoldenGate EM Plugin 13c セットアップガイド
オラクルエンジニア通信
 
PDF
Oracle_GoldenGate_23ai_導入Tips_v1.12_公開版[051-100].pdf
ssuser8ccb5a
 
PDF
MySQLインストールのお作法
Meiji Kimura
 
PDF
Oracle_GoldenGate_23ai_導入Tips_v1.12_公開版[101-141].pdf
ssuser8ccb5a
 
PDF
超簡単! PostgreSQLをWindowsにインストール
Shin Tanigawa
 
PPTX
Dbts2012 unconference wttrw_yazekatsu_publish
Yohei Azekatsu
 
PPTX
Oracle Audit Vault and Database Vault のご紹介
オラクルエンジニア通信
 
PDF
MySQL 5.7 & 最新開発状況 @ オープンソースカンファレンス20
Ryusuke Kajiyama
 
PDF
Oracle xeインストール(linux環境)
izuyuri
 
PDF
S13 Oracle Database を Microsoft Azure 上で運用する為に~基本事項とベストプラクティス
Microsoft Azure Japan
 
PPTX
MySQL Technology Cafe #14 MySQL Shellを使ってもっと楽をしようの会
オラクルエンジニア通信
 
PDF
[C31] OSS-DB Exam Silver 技術解説セミナー by Ryota Watabe
Insight Technology, Inc.
 
Oracle GoldenGate Studio R12.2.1.1 セットアップガイド
オラクルエンジニア通信
 
Oracle GoldenGate for Big Data 12.2 セットアップガイド
オラクルエンジニア通信
 
Oracle GoldenGate EM Plugin 13c セットアップガイド
オラクルエンジニア通信
 
Oracle_GoldenGate_23ai_導入Tips_v1.12_公開版[051-100].pdf
ssuser8ccb5a
 
MySQLインストールのお作法
Meiji Kimura
 
Oracle_GoldenGate_23ai_導入Tips_v1.12_公開版[101-141].pdf
ssuser8ccb5a
 
超簡単! PostgreSQLをWindowsにインストール
Shin Tanigawa
 
Dbts2012 unconference wttrw_yazekatsu_publish
Yohei Azekatsu
 
Oracle Audit Vault and Database Vault のご紹介
オラクルエンジニア通信
 
MySQL 5.7 & 最新開発状況 @ オープンソースカンファレンス20
Ryusuke Kajiyama
 
Oracle xeインストール(linux環境)
izuyuri
 
S13 Oracle Database を Microsoft Azure 上で運用する為に~基本事項とベストプラクティス
Microsoft Azure Japan
 
MySQL Technology Cafe #14 MySQL Shellを使ってもっと楽をしようの会
オラクルエンジニア通信
 
[C31] OSS-DB Exam Silver 技術解説セミナー by Ryota Watabe
Insight Technology, Inc.
 
Ad

More from オラクルエンジニア通信 (20)

PDF
Oracle Cloud Infrastructure:2023年5月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2023年4月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2023年3月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2023年2月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2023年1月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年12月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年11月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年10月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年9月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年8月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年7月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年6月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年5月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年4月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure データベース・クラウド:各バージョンのサポート期間 (2022年4月版)
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年3月度サービス・アップデート
オラクルエンジニア通信
 
PPTX
Oracle Cloud Infrastructure:2022年2月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2022年1月度サービス・アップデート
オラクルエンジニア通信
 
PDF
Oracle Databaseはクラウドに移行するべきか否か 全10ケースをご紹介 (Oracle Cloudウェビナーシリーズ: 2021年11月30日)
オラクルエンジニア通信
 
PDF
Oracle Cloud Infrastructure:2021年12月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2023年5月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2023年4月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2023年3月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2023年2月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2023年1月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年12月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年11月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年10月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年9月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年8月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年7月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年6月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年5月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年4月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure データベース・クラウド:各バージョンのサポート期間 (2022年4月版)
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年3月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年2月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2022年1月度サービス・アップデート
オラクルエンジニア通信
 
Oracle Databaseはクラウドに移行するべきか否か 全10ケースをご紹介 (Oracle Cloudウェビナーシリーズ: 2021年11月30日)
オラクルエンジニア通信
 
Oracle Cloud Infrastructure:2021年12月度サービス・アップデート
オラクルエンジニア通信
 

Recently uploaded (8)

PPTX
オープンソース界隈の利用者や技術者から見たオープンソースEDAとは? What is open source EDA from the perspecti...
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
PDF
SIG-AUDIO 2025 Vol.02 オンラインセミナー SIG-Audioプレゼン資料_オーディオプラグイン開発_塩澤達矢.pdf
IGDA Japan SIG-Audio
 
PDF
2023年版Web3技術の理想と現実
Syuhei Hiya
 
PDF
go tool と Minimal Version Selection アルゴリズム
Keisuke Ishigami
 
PDF
生成AIパネルトーク(Interop25Tokyo APPS JAPAN M1-07,M2-07 嶋ポジショントーク)
嶋 是一 (Yoshikazu SHIMA)
 
PDF
AIツールを使った研究の効率化 Improving Research Efficiency with AI Tools
Tohoku University
 
PPTX
新卒・中途採用者向け採用ピッチ資料2025年7月版(20250702).pptx
Official74
 
PDF
20250630_aws_reinforce_2025_aws_sheild_network_security_director
uedayuki
 
オープンソース界隈の利用者や技術者から見たオープンソースEDAとは? What is open source EDA from the perspecti...
Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)
 
SIG-AUDIO 2025 Vol.02 オンラインセミナー SIG-Audioプレゼン資料_オーディオプラグイン開発_塩澤達矢.pdf
IGDA Japan SIG-Audio
 
2023年版Web3技術の理想と現実
Syuhei Hiya
 
go tool と Minimal Version Selection アルゴリズム
Keisuke Ishigami
 
生成AIパネルトーク(Interop25Tokyo APPS JAPAN M1-07,M2-07 嶋ポジショントーク)
嶋 是一 (Yoshikazu SHIMA)
 
AIツールを使った研究の効率化 Improving Research Efficiency with AI Tools
Tohoku University
 
新卒・中途採用者向け採用ピッチ資料2025年7月版(20250702).pptx
Official74
 
20250630_aws_reinforce_2025_aws_sheild_network_security_director
uedayuki
 

Oracle GoldenGate R12.2 セットアップガイド

  • 1. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 12.2 セットアップガイド ver.1.0 2016年2月 日本オラクル株式会社 クラウド&テクノロジー事業統括
  • 2. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | はじめに • 本資料では、Oracle GoldenGate R12.2.0.1.0 の環境構築から 動作確認までの一連の手順について説明します。 • 本資料は製品マニュアルを補足する資料です。 手順の一例としてご活用ください。 – Fusion Middleware Installing and Configuring Oracle GoldenGate for Oracle Database(12.2.0.1.0) • https://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/toc.htm 3
  • 4. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 本ドキュメントの流れ • 本ドキュメントは下記の流れで、 Oracle GoldenGate のセットアップ 方法を説明します。 – 1章:前提知識 – 2章:環境準備 – 3章:GoldenGateのインストール – 4章:Oracle Databaseの構成 – 5章:GoldenGateの配置 – 6章:GoldenGateの動作確認 – 7章:GoldenGateのアンインストール – 8章:参考情報 4 Oracle Database 12gR1 ( AL32UTF8) SID: orcl Oracle GoldenGate 12gR2 Oracle GoldenGate 12gR2 Oracle Database 12gR1 (AL32UTF8) SID: orcl Host: host-a OS:Oracle Linux Server 6.7 Host: host-b OS:Oracle Linux Server 6.7 ソース ターゲット
  • 5. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 5 1 2 3 4 5 6 7 8
  • 6. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 概要 • Oracle GoldenGate概要 – データ・レプリケーション製品 – 2009年旧GoldenGate社を買収 • Oracle GoldenGateの特徴 – データベースに行われた変更を他データベースへ反映 – 既存のデータベースやネットワークへの負荷は最小限 – 稼働中のデータベース同士で双方向に連携が可能 – 異なるデータベースやOSの種類・バージョンで構成され たシステム間での連携が可能 – データベース全体だけではなく、表・列など必要な部分 に絞った柔軟な連携が可能 ソース・ データベース ターゲット・ データベース 双方向同期 アプリ GoldenGate GoldenGate アプリ Active Active
  • 7. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 基本アーキテクチャ - 全体像 - Oracle GoldenGate Trail ファイル 差分ログ Server A Server B OS Oracle GoldenGate Trail ファイル OS ターゲット データベース ソース データベース チェックポイント ファイル チェックポイント ファイル チェックポイント ファイル 抽出プロセス Extract (Capture) 転送プロセス Extract (Data Pump) 管理プロセス Manager 受信プロセス Collector 適用プロセス Replicat 管理プロセス Manager チェック ポイント表 • データベースの差分ログをTrailファイルという汎用的なフォーマットに変換して転送 • 各プロセスの進行状況はチェックポイントファイル(バイナリファイルまたはDB上の表)に保存 • 上記の構成の他に、DBサーバと別のサーバにGoldenGateを切り出す構成などが可能
  • 8. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 基本アーキテクチャ - プロセス - 8 Oracle GoldenGate Trailファイル Server A Server B Oracle GoldenGate 抽出プロセス Extract (Capture) 転送プロセス Extract (Data Pump) 管理プロセス Manager 受信プロセス Collector 適用プロセス Replicat 管理プロセス Manager Trailファイル • Captureプロセス:ソースDBから変更ログを抽出し てTrailファイルに書き出すプロセス • Data Pumpプロセス:Captureプロセスが書き出し たTrailファイルからリモートのCollectorプロセスに データを転送するプロセス • Collectorプロセス:ソース側のDataPumpプロセスから データを受信して、Trailファイルに書き込むプロセス (Managerが起動するためユーザによる操作は不要) • Replicatプロセス:Trailファイルからデータを読み出し、 ターゲットDBに反映するためのプロセス • Managerプロセス:OGGインスタンス全体を管理するプロセス
  • 9. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 基本アーキテクチャ - パラメータファイル - 9 Oracle GoldenGate Trail ファイル Server A Server B Oracle GoldenGate Manager Collector Replicat Manager Trail ファイル • GoldenGateのパラメータファイルは下記の2種類があります。プレーンテキスト形式です。 – GLOBALSパラメータファイル(ファイル名:GLOBALS):GoldenGateインスタンス全体を設定するためのパラ メータファイル。ファイル名は大文字のGLOBALSで拡張子は不要。 – パラメータファイル(ファイル名:xxxx.prm):Capture等のプロセス実行時の設定をするためのファイル。 Collector以外の全てのプロセスで設定が必要。 GLOBALS パラメータファイル GLOBALS パラメータファイル パラメータファイル パラメータファイル Capture DataPump パラメータファイル
  • 10. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 基本アーキテクチャ - 主なファイル - 10 Oracle GoldenGate Trail ファイル Server A Server B Oracle GoldenGate Collector Trail ファイル • Trailファイル: OGG内で変更ログを格納するためのファイル。 • チェックポイントファイル:各プロセスがどこまで処理したかを記録するためのファイル。 • 破棄ファイル(Discardファイル):処理できなかったレコードを格納するためのファイル。 • ログファイル(ggserr.log):エラー等のメッセージが書き込まれるファイル。 チェックポイント ファイル チェックポイント ファイル チェックポイント ファイル 破棄 ファイル Capture 破棄 ファイル 破棄 ファイル ReplicatDataPump Manager Manager ログファイル ggserr.log ログファイル ggserr.log
  • 11. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGate 基本アーキテクチャ - 主なディレクトリ - • GoldenGateホーム以下に作成される主なディレクトリと用途を説明します。 – dirprm:各プロセスのパラメータファイル用のディレクトリ。 – dirrpt:各プロセスから出力される破棄ファイル等のディレクトリ。編集不可。 – dirchk:チェックポイントファイル用のディレクトリ。編集不可。 – dirpcs:各プロセスのステータス情報を格納するディレクトリ。編集不可。 – dirsql:GoldenGateのSQLスクリプトを格納するディレクトリ。 – dirdat:Trailファイルを格納するディレクトリ。編集不可。 – dirtmp/dirdmp:一時ファイル、ダンプファイル用ディレクトリ。編集不可。 – dircrd/dirwlt:セキュリティ関連の情報を格納するディレクトリ。 *注:OGGバージョンによってディレクトリ構成が異なることがあります。 11
  • 12. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | GoldenGateにおけるレプリケーション方式 ソース データベース GoldenGate 抽出(Extract) Classic Capture ターゲット データベース 変更履歴 (REDOログ等) Non-integrated Replicat Coordinated Replicat (OGG12c~) Integrated Replicat (OGG12c~) Integrated Capture (OGG11gR2~) Oracle Databaseのみ構成可能 Database Logmining Server (Outbound) ソース オブジェクト ターゲット オブジェクト Database Logmining Server (Inbound) GoldenGate 適用(Apply)
  • 13. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | GoldenGateにおけるレプリケーション方式 - Capture - ソース データベース GoldenGate 抽出(Extract) Classic Capture 変更履歴 (REDOログ等) Integrated Capture (OGG11gR2~) Oracle Databaseのみ Database Logmining Server (Outbound) ソース オブジェクト • Classic Capture – 従来からの抽出方法 – 全てのデータベースで利用可能 – 変更ログ(REDOログ等)から抽出 • 統合Capture(Integrated Capture) – OGG11gR2からの新しい抽出方法 – Oracle Databaseでのみ利用可能 – DBの機能(Database Logmining Server)を 使用して変更情報を抽出 – Oracle Databaseへの高い親和性
  • 14. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | GoldenGateにおけるレプリケーション方式 - Replicat - • Non-integrated Replicat – 従来からの適用方法 – 全てのデータベースで利用可能 – SQLを使用してターゲットに適用 • Coordinated Replicat – Non-integrated をマルチスレッド化 • 統合Replicat(Integrated Replicat) – Oracle Databaseでのみ利用可能 – DBの機能(Database Logmining Server) を使用して変更情報を適用 – Oracle Databaseへの高い親和性 ターゲット データベース Non-integrated Replicat Coordinated Replicat (OGG12c~) Integrated Replicat (OGG12c~) Oracle Databaseのみ ターゲット オブジェクト Database Logmining Server (Inbound) GoldenGate 適用(Apply)
  • 15. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの管理 • コマンドラインによるGoldenGateの管理 – GGSCI(GoldenGate Software Command Interface) • GUIによるGoldenGateの管理 15 GoldenGate Monitor •GoldenGateの監視・管理をするスタ ンドアロン製品 •高度な監視機能やアラート機能を提 供 GoldenGate Plug-in For EMCC12c • Enterprise Manager Cloud Control 12cのプラグイン形式 • Oracle Databaseと同一のインタフェー スやメトリックを使用して統合的な監 視が可能 GoldenGate Director •GoldenGateのレガシーバージョン を管理・監視するC/Sツール
  • 16. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの管理~GGSCIコマンドインターフェイス • 全てのコマンドのヘルプ概要を表示します。 – GGSCI> HELP – GGSCI> HELP ALL • 特定のコマンドのヘルプ概要を表示します。 – GGSCI> HELP <コマンド名> • 実行したコマンドの履歴を表示します。 – GGSCI> HISTORY • 全てのプロセスの情報を表示します。 – GGSCI> INFO ALL 16 • GGSCI (Oracle GoldenGate Software Command Interface)は、 GoldenGateのコマンドラインインタ フェースです。GGSCIを使用して、 GoldenGateを設定・制御・監視する ことができます。 • この資料では、GGSCIを使用して操 作します。 利用例
  • 17. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 17 1 2 3 4 5 6 7 8
  • 18. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 本資料の環境情報 • 本資料で構成する環境は以下を使用しています。 –OS • Oracle Linux Server Release 6.7 (64bit) –ソフトウェア • Oracle GoldenGate R12.2.0.1.0 –本資料では、抽出にIntegrated Capture、適用にIntegrated Replicatを使用します。 • Oracle Database 12.1.0.2.0 –既にソース用データベース、ターゲット用データベースとしてOracle Database が用意さ れているものとします。 18
  • 19. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 本資料で構築するGoldenGateの構成イメージ 19 DB GoldenGate GoldenGate DB ソース ターゲット Manager Manager 同期 Collector Integrated Replicat Integrated Extract (Capture) Extract (DataPump)
  • 20. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 2. 文章を読み、輸出規制に受諾する場合 は「受諾」ボタンを押します。 メディアのダウンロード(1/3) 1. Oracle Software Delivery Cloudにサイ ンインします。 20 http://edelivery.oracle.com
  • 21. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 4. 使用可能なリリースで「Oracle GoldenGate 12.2.0.1.0 for Linux x86-64」を選択し「続 行」を押します。 メディアのダウンロード(2/3) 3. 「製品」で、「Oracle GoldenGate」を選 択し、プラットフォームも選択して、「続 行」を押します。 21
  • 22. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | メディアのダウンロード(3/3) 5. 「オラクル標準の条件及び規制」のライ センス契約を十分読み、受諾する場合 はチェックして「続行」ボタンを押します。 22 6.ファイル名をクリックして、ファイルをダウ ンロードします。
  • 23. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 23 1 2 3 4 5 6 7 8
  • 24. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateのインストール • 各システムにGoldenGateをインストールします。 • インストール時にManagerプロセスが設定され起動します。 24 DB GoldenGate GoldenGate DB ソース ターゲット Manager Manager 同期 Collector Integrated Replicat Integrated Extract (Capture) Extract (DataPump)
  • 25. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateのインストール(1/4) 1. 事前にインストール用ディレクトリを作成 おきます。また、メディア・パックを解凍し、 インストーラを起動します。 – ソース: [oracle@host-a ~]$ mkdir -p /u01/app/ogg1 [oracle@host-a ~]$ unzip V97860-01.zip [oracle@host-a ~]$ cd fbo_ggs_Linux_x64_shiphome/Disk1/ [oracle@host-a Disk1]$ sh runInstaller – ターゲット: [oracle@host-b ~]$ mkdir -p /u01/app/ogg2 [oracle@host-b ~]$ unzip V97860-01.zip [oracle@host-b~]$ cd fbo_ggs_Linux_x64_shiphome/Disk1/ [oracle@host-b Disk1]$ sh runInstaller • システム要件の確認 – システム要件や利用するデータ型 がGoldenGateに対応しているかを確 認します。システム要件については、 「 Fusion Middleware Installing and Configuring Oracle GoldenGate for Oracle Database 」をご参照下さい。 – http://www.oracle.com/technetwork /middleware/goldengate/documenta tion/index.html 25
  • 26. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateのインストール(2/4) 26 2. インストール・オプション画面で「Oracle GoldenGate for Oracle Database 12c」を選択して「次へ」をクリック します。 3. Specify Installation Details画面で、ステップ1で作成 したインストール先ディレクトリを指定します。。また、 Managerプロセスが使用するポート番号を指定して、 「次へ」をクリックします。
  • 27. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateのインストール(3/4) 27 4. サマリー画面で内容を確認の上、「インストー ル」ボタンをクリックします。 5. 終了画面で、「Oracle GoldenGateのインストールが成 功しました」というメッセージが出ましたら、「閉じる」 ボタンをクリックします。
  • 28. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 6. 下記の環境変数を設定します。 • ORACLE_HOME – Oracle Databaseがインストールされているディレクトリ • ORACLE_SID – Oracle Databaseを特定する名前(SID) • OGG_HOME – Oracle GoldenGateをインストールしたディレクトリ (ステップ1で作成、ステップ3で指定) * GG_HOMEの設定は必須ではありません。 7. 同じようにターゲットのOracle GoldenGateをインストールします。 – ※ここでは省略します。 28 Oracle GoldenGateのインストール(4/4) export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 export ORACLE_SID=orcl export LD_LIBRARY_PATH=$ORACLE_HOME/lib export OGG_HOME=/u01/app/ogg1 export LD_LIBRARY_PATH=$OGG_HOME:$LD_LIBRARY_PATH
  • 29. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 29 1 2 3 4 5 6 7 8
  • 30. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Databaseの構成 • ソースとターゲットのOracle Databaseは既に構成されているものとします。 • この章ではGoldenGateを使用するための事前設定を行います。 30 DB GoldenGate GoldenGate DB ソース ターゲット Manager Manager 同期 Collector Integrated Replicat Integrated Extract (Capture) Extract (DataPump)
  • 31. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Databaseの構成(1/5) 1. 各データベースのTNS名を設定し ます。 – ソース側とターゲット側の $ORACLE_HOME/network/admin/tn snames.oraに右の内容を追加します。 – 既に構成されている場合は設定す る必要はありません。 ソース側: ターゲット側: SRC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host-a.oracle.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) TGT = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host-b.oracle.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
  • 32. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 3. Oracle GoldenGateを有効化(ソース側と ターゲット側) • ソース側とターゲット側両方で下記のコマンド を実行して、GoldenGateが使用するOracle Databaseを利用できるようになります。 Oracle Databaseの構成(2/5) 32 2. ロギング・プロパティの構成(ソース側) • ソース・データベース側で、下記のコマンドを実 行してサプリメンタル・ロギングの設定をします。 • サプリメンタル・ロギングは、通常REDOログに 記録される情報だけでなく、GoldenGate等がレ プリケーションを行うために必要な情報をREDO ログに追加する機能です。 $ sqlplus / as sysdba SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; SQL> ALTER DATABASE FORCE LOGGING; SQL> alter system set enable_goldengate_replication = true;
  • 33. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Databaseの構成(3/5) 4. Oracle Databaseサーバリソースの調整(ソース・ターゲット) – ソース側のOracle Databaseのlogminning server (Integrate Extractが利用)とターゲット側のOracle Databaseの inbound server(Integrate Replicatが利用)を起動するために、 STREAMS_POOL_SIZE を設定します。 • 推奨値はマニュアルをご参照ください。 – http://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/setup.htm#GIORA234 – 右のコマンドで、STREAMS_POOL_SIZEを設定します。ソースとターゲット両方で設定します。 • 本例では、ExtractとReplicatが一つずつの構成を想定した数値で設定しています。 33 SQL> alter system set streams_pool_size=1250M scope=spfile; SQL> shutdown immediate SQL> startup
  • 34. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5. ソース側OGG用ユーザの作成 – 下記のコマンドでソース側のユーザ作成 – 下記のコマンドでソース側のユーザの権限設定 • この資料ではDBA権限を付与していますが、より詳細な権 限設定をしたい場合はマニュアルを参照して必要な権限の みを設定してください。 – https://docs.oracle.com/goldengate/1212/gg- winux/GIORA/user_assignment.htm#GIORA552 6. ターゲット側OGG用ユーザの作成 – 下記のコマンドでターゲット側のユーザ作成 – 下記のコマンドでターゲット側のユーザ権限設定 • この資料ではDBA権限を付与していますが、より詳細な権 限設定をしたい場合はマニュアルを参照して必要な権限の みを設定してください。 – ソース側と同じURLをご参照下さい。 34 Oracle Databaseの構成(4/5) SQL> create user ggs identified by Welcome1; SQL> grant DBA to ggs; SQL> exec dbms_goldengate_auth.grant_admin_privile ge('ggs'); SQL> create user ggs identified by Welcome1; SQL> grant DBA to ggs; SQL> exec dbms_goldengate_auth.grant_admin_privile ge('ggs');
  • 35. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 5. 下記のコマンドでソース側のユーザ作成 – ソース側テスト用ユーザの作成 – ソース側テスト用ユーザの権限設定 • この資料ではDBA権限を付与していますが、より詳細な権限設 定をしたい場合は必要な権限のみを設定してください。 6. 下記のコマンドでターゲット側のユー ザ作成 – ターゲット側テスト用ユーザの作成 – ターゲット側テスト用ユーザの権限設定 • この資料ではDBA権限を付与していますが、より詳細な権 限設定をしたい場合は必要な権限のみを設定してください。 35 Oracle Databaseの構成(5/5) SQL> connect sys/Welcome1@src as sysdba SQL> create user test identified by Welcome1; SQL> grant dba to test; SQL> connect sys/Welcome1@tgt as sysdba SQL> create user test identified by Welcome1; SQL> grant dba to test;
  • 36. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 36 1 2 3 4 5 6 7 8
  • 37. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの構成 • 3章でインストールしたGoldenGateを設定します。 37 DB GoldenGate GoldenGate DB ソース ターゲット Manager Manager 同期 Collector Integrated Replicat Integrated Extract (Capture) Extract (DataPump)
  • 38. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | • ソース側とターゲット側の両方の設定が 必要です。下記のマークに注意しながら 作業して下さい。 – ソース側のマシンで作業 – ターゲット側のマシンで作業 38 Oracle GoldenGateの構成(1/4) 1. プロセス監視等を行うManagerプロセス はデフォルトでインストールする際に設 定され、起動している状態です。 •下記のコマンドで起動しているか確認できます。 •下記のコマンドで起動します。 2. スキーマ・レベルのサプリメンタル・ログ を有効化します。 GGSCI > INFO ALL GGSCI > START MANAGER Source Target Target Source GGSCI > ADD SCHEMATRANDATA test Source
  • 39. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの構成(2/4) 39 3. Captureプロセスの構成をします。 • ソース側で起動するCaptureプロセスのパ ラメータを指定します。 • テキストエディタで、パラメータファイルを 編集します。 GGSCI > EDIT PARAMS E1 EXTRACT E1 SETENV (ORACLE_HOME=/u01/app/oracle/ product/12.1.0/dbhome_1) USERID ggs@orcl, PASSWORD Welcome1 DDL INCLUDE MAPPED EXTTRAIL ./dirdat/aa TABLE test.*; Source 4. CaptureグループをDBに登録します。 5. Captureグループを追加します。 6. ローカルTrailを追加します。 GGSCI > dblogin userid ggs@orcl password Welcome1 GGSCI > REGISTER EXTRACT e1 DATABASE GGSCI > ADD EXTRACT E1, INTEGRATED TRANLOG, BEGIN NOW GGSCI > ADD EXTTRAIL ./dirdat/aa, EXTRACT e1 Source Source Source
  • 40. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの構成(3/4) 40 7. ソース側でPumpプロセスの構成 • ソース側で起動するPumpプロセスのパラ メータを指定します。 • テキストエディタで、パラメータファイルを編 集します。 GGSCI > EDIT PARAMS P1 EXTRACT P1 PASSTHRU RMTHOST host-b.oracle.com, MGRPORT 7809 RMTTRAIL /u01/app/ogg2/dirdat/bb TABLE test.*; Source 8. DataPumpグループを追加します。 9. リモートTrailを追加します。 GGSCI > ADD EXTRACT P1, EXTTRAILSOURCE ./dirdat/aa GGSCI > ADD RMTTRAIL /u01/app/ogg2/dirdat/bb, EXTRACT p1 Source Source
  • 41. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの構成(4/4) 41 10. ターゲット側でReplicatプロセスの構成 • ターゲット側で起動するReplicatプロセスのパラ メータを指定します。 • テキストエディタで、パラメータファイルを編集し ます。 GGSCI > EDIT PARAMS R1 REPLICAT R1 SETENV (ORACLE_HOME=/u01/app/oracle/ product/12.1.0/dbhome_1) USERID ggs@tgt, PASSWORD Welcome1 MAP test.*, TARGET test.*; Target 11. ターゲット側でReplicatグループを追加。 GGSCI > ADD REPLICAT R1,INTEGRATED, EXTTRAIL ./dirdat/bb Target
  • 42. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの起動 42 11. ソース側でExtractを起動。 12. ソース側でDataPumpを起動。 • DataPumpを起動するタイミングでターゲット側のCollectorプ ロセスも起動します。 13. ソース側でプロセス状態を確認。 • すべてのプロセスの状態が「RUNNING」であれば、OK。 15. ターゲット側でReplicatを起動 16. ターゲット側でプロセス状態を確認。 •すべてのプロセス状態が「RUNNING」であれば、OK GGSCI > START EXTRACT E1 GGSCI > START EXTRACT P1 GGSCI > INFO ALL Target GGSCI > START REPLICAT R1 Source Source Source Target GGSCI > INFO ALL
  • 43. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 43 1 2 3 4 5 6 7 8
  • 44. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの動作確認(1/4) 44 1. DDLの動作確認 • ソース側で、テーブルを作成 • ターゲット側で、テーブルを確認 SQL> connect sys/Welcome1@src as sysdba SQL> CREATE TABLE test.test_tab ( id NUMBER NOT NULL PRIMARY KEY, name CHAR(10) NOT NULL , upd_date date DEFAULT SYSDATE); SQL> connect sys/Welcome1@tgt as sysdba SQL> desc test.test_tab 名前 NULL? 型 ----------------------------------------- -------- ---------------------------- ID NOT NULL NUMBER NAME NOT NULL CHAR(10) UPD_DATE DATE
  • 45. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの動作確認(2/4) 45 2. DMLの動作確認 (Insert) • ソース側で、データをインサート • ターゲット側で、データを確認 SQL> connect sys/Welcome1@src as sysdba SQL> insert into test.test_tab values(1,'山本', sysdate); 1行が作成されました。 SQL> commit; コミットが完了しました。 SQL> connect sys/Welcome1@tgt as sysdba SQL> select * from test.test_tab; ID NAME UPD_DATE ---------- ------------------------------ -------- 1 山本 16-01-11
  • 46. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの動作確認(3/4) 46 3. DMLの動作確認 (Update) • ソース側で、データを更新 • ターゲット側で、更新した内容を確認 SQL> conn sys/Welcome1@src as sysdba SQL> update test.test_tab set name ='湯浅' where id=1; 1行が更新されました。 SQL> commit; コミットが完了しました。 SQL> connect sys/Welcome1@tgt as sysdba SQL> select * from test.test_tab; ID NAME UPD_DATE ---------- ------------------------------ -------- 1 湯浅 16-01-11
  • 47. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateの動作確認(4/4) 47 4. DMLの動作確認 (Delete) • ソース側で、データを削除 • ターゲット側で、削除した内容を確認 SQL> conn sys/Welcome1@src as sysdba SQL> delete test.test_tab where id=1; 1行が削除されました。 SQL> commit; コミットが完了しました。 SQL> conn sys/Welcome1@tgt as sysdba SQL> select * from test.test_tab; レコードが選択されませんでした。
  • 48. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 48 1 2 3 4 5 6 7 8
  • 49. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateのアンインストール(1/2) 49 1. ソース側のアンインストール • プロセスを停止して設定を解除 • 権限を削除 • OUIでOracle GoldenGateをアンイン ストール • 「アンインストールに成功しました」が出ましたら、 アンインストールは終了です。 GGSCI> DBLOGIN USERID ggs PASSWORD Welcome1 GGSCI> STOP ER * GGSCI> STOP mgr GGSCI> DELETE SCHEMATRANDATA test GGSCI> DELETE EXTRACT E1 GGSCI> UNREGISTER EXTRACT E1 database SQL> exec dbms_goldengate_auth.revoke_admin_privilege('ggs'); $ cd /u01/app/ogg1/deinstall/ $ sh ./deinstall.sh
  • 50. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Oracle GoldenGateのアンインストール(2/2) 50 2. ターゲット側のアンインストール • プロセスを停止して設定を解除 • 権限を削除 • OUIでOracle GoldenGateをアンイン ストール • 「アンインストールに成功しました」が出ましたら、 アンインストールは終了です。 GGSCI> DBLOGIN USERID ggs@tgt PASSWORD Welcome1 GGSCI> STOP REPLICAT R1 GGSCI> STOP mgr GGSCI> DELETE REPLICAT R1 SQL> exec dbms_goldengate_auth.revoke_admin_privilege('ggs'); $ cd /u01/app/ogg2/deinstall/ $ sh ./deinstall.sh
  • 51. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Agenda 前提知識 事前の環境準備(メディアの用意) Oracle GoldenGateのインストール Oracle Databaseの構成 Oracle GoldenGateの配置 Oracle GoldenGateの動作確認 Oracle GoldenGateのアンインストール 参考情報 51 1 2 3 4 5 6 7 8
  • 52. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 参考情報 • Oracle GoldenGate 12c 全般情報(英語) – https://docs.oracle.com/goldengate/c1221/gg-winux/index.html – Oracle GoldenGate 12c リリースノート(英語) – http://docs.oracle.com/goldengate/c1221/gg-winux/GRLWU/toc.htm#GRLWU101 • Oracle GoldenGate 12c インストールガイド(英語) – https://docs.oracle.com/goldengate/c1221/gg-winux/GIORA/system_requirements.htm#GIORA110 52
  • 53. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Document Control Author Oracle Asia Research & Development Center • 黄 明 • 梁 国賢 • 楊 帆 Reviewer 日本オラクル株式会社 • 谷川 信朗 • 後藤 陽介 • 舟橋 直美 53 変更履歴 Date Version 2016/2 1.0 Created.
  • 54. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |
  • 55. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | 55