ã´ã¼ï¼ã´ã¼ï¼GoldenGate ï½GoldenGate ã®ã¬ããªã±ã¼ã·ã§ã³ã¯æå·åããã¦ããã®ãï¼ï¼åç·¨ï¼
ã¯ããã«
Oracle GoldenGate (ä»¥ä¸ GoldenGate) ã¯ãå½å å¤ã§å¤ãã®å°å ¥å®ç¸¾ãæã¤ããã¼ã¿ã¬ããªã±ã¼ã·ã§ã³ã®ããã®è£½åã§ããæè»ãªæ§æãåãããã¨ãå¼·ã¿ã§ç°æ©ç¨®ã»ç°OSéã§ã®ãã¼ã¿ç§»è¡ãããã¼ã¿é£æºãªã©ã«ç¨ãããã¦ãã¾ãã
- â» GoldenGate ã®è£½åç´¹ä»ãæ¦è¦èª¬æã¯ããã¡ãã®ãã¼ã¸ãã覧ãã ããã
http://www.intellilink.co.jp/business/platform/oracle_goldengate
ç§ã¯ã2010å¹´é ããæ°å¹´éãGoldenGate ã®è£½åæ¤è¨¼ãæ¬çªç°å¢ã¸ã®ã¤ã³ããªã¡ã³ãã¼ã·ã§ã³ãGoldenGate ãå©ç¨ãããã¼ã¿ãã¼ã¹ç§»è¡ã«æºãã£ã¦ãã¾ãããOracle 社ã GoldenGate Software 社ãè²·åããã®ã¯2009å¹´é ã§ãã製åã¨ãã¦ã¯è²·åç´å¾ã§æ å ±ãå°ãªãã£ããã¨ããããã¤ã³ããªã¡ã³ãæã«ã¯ããããã¨è¦å´ãããã¨ãå¤ããæ¤è¨¼ç°å¢ã§ãã©ãã«ã·ã¥ã¼ãã£ã³ã°ãæ©è½æ¤è¨¼ã«æãæ®ãã¦ãã¾ããã
ã§ã調ã¹ã以ä¸ããã®å 容ã誰ãã«ç¥ã£ã¦ã»ããã¨æããèªåã®é¨ç½²åãã«æ¤è¨¼çµæãã¾ã¨ãã¦æ å ±å ±æãã¦ããã®ã§ããããã®ã¨ãã®ã¿ã¤ãã«ãããã´ã¼ï¼ã´ã¼ï¼GoldenGateãã§ããï¼ã³ã©ã ã®ã¿ã¤ãã«ã¯ããããæ¥ã¦ãã¾ãï¼ã
ç¾å¨ãã»ãã¥ãªãã£ã³ã³ãµã«ãã£ã³ã°æ¥åã«å¾äºãã¦ãã¾ãããã¾ãããªãããGoldenGate ã®æ©è½ã確èªããã®ã§ãç´¹ä»ãã¦ã¿ãããã¨ããã®ãæ¬ã³ã©ã ã®è¶£æ¨ã«ãªãã¾ããããã«å½¹ã«ç«ã¤ãã¨ãããã¨ã¯å°ãªãããç¥ãã¾ããããèªãã§ããã ããã°å¹¸ãã§ãã
GoldenGate ã¯ãæ´æ°å·®åã®ãã¼ã¿ãéä¿¡ãããã¨ã§ãã¼ã¿ã®åæãè¡ãã¾ããåå¾ããå¤æ´ã¬ã³ã¼ãããã£ã¹ã¯ä¸ã®è¨¼è·¡ãã¡ã¤ã«ï¼Trail Fileï¼ã¨å¼ã°ããä¸è¦§ã®ãã¡ã¤ã«ã«æ ¼ç´ãã¾ãã証跡ãã¡ã¤ã«ã¯ï¼æå·åããªãããã©ã«ãã®ã¾ã¾ã ã¨ï¼ããã¤ããªãã¼ã¿ãå«ããã®ã®ããã¡ã¤ã«ã·ã¹ãã ä¸ã§ãview, cat ãªã©ã®OSã³ãã³ãã使ã£ã¦ãããã¨ç°¡åã«ãã¼ã¿ã¯ç¢ºèªã§ãã¾ãï¼â»1ï¼ã
OSã³ãã³ãã§è¨¼è·¡ãã¡ã¤ã«ã®ä¸èº«ãèªãããªããããã転éãã¦ããéä¿¡ãã¼ã¿ã ã£ã¦ããããè¦ããã ãããã¨æã£ã¦ããã®ã§ããããã¬ããªã±ã¼ã·ã§ã³è£½åã ãããããããããéä¿¡æã¯èªããªãããã«ãªã£ã¦ããã®ãã…ãã¨ãèããããããã¡ãã£ã¨ã¢ã¤ã¢ã¤…ã
ã¨ããããã§ãå®éã«ãéä¿¡ãã¦ãããã¼ã¿ã®ä¸èº«ãè¦ããã®ãããããã¦ããæ¬å½ã«æå·åããã¦ããã®ããã確ããã¦ã¿ã¾ããã
ä½ãæå·åããã®ã
GoldenGate ã®ä¸è¬çãªæ§æãå³ï¼ã«ç¤ºãã¾ããã½ã¼ã¹å´ãGoldenGate ã®ãã¼ã¿æ´æ°å ãã¿ã¼ã²ããå´ãæ´æ°ãã¼ã¿ã®é©ç¨å ã¨ãªãã¾ãããã¹ã¿ã¼ã¨ã¬ããªã«ãã¨ããè¨ãæ¹ããã¾ããã
å³1. GoldenGate ã®ä¸è¬çãªæ§æ
GoldenGate ã§çºçãããã¼ã¿ã§ã¯ã以ä¸ã®ï¼ã¤ããæå·åã®å¯¾è±¡ã¨ãªãã¾ãã
(1) ãã£ã¹ã¯ã«ä¿åããã証跡ãã¡ã¤ã«ã®ãã¼ã¿
(2) TCP/IPãããã¯ã¼ã¯ãéãã¦éä¿¡ããããã¼ã¿
ä¸è¨ã®æå·åã®å¯¾è±¡ã«ã¤ãã¦ã説æãã¾ãã
(1) ãã£ã¹ã¯ã«ä¿åããã証跡ãã¡ã¤ã«ã®ãã¼ã¿
GoldenGate ã¯ãåå¾ããå¤æ´ã¬ã³ã¼ãããã£ã¹ã¯ä¸ã®è¨¼è·¡ãã¡ã¤ã«ï¼Trail Fileï¼ã¨å¼ã°ãããã¡ã¤ã«ã«æ ¼ç´ãã¾ããä¸è¬çã«ã¯ãã½ã¼ã¹ã»ã·ã¹ãã ãã¿ã¼ã²ããã»ã·ã¹ãã ã«ããããé ç½®ããã¾ããã½ã¼ã¹å´ãLocal Trail, ã¿ã¼ã²ããå´ã«ãã証跡ãã¡ã¤ã«ã Remote Trail ã¨å¼ã¶ãã¨ãæãã¾ãã
(2) TCP/IPãããã¯ã¼ã¯ãéãã¦éä¿¡ããããã¼ã¿
証跡ãã¡ã¤ã«ããã½ã¼ã¹ã»ã·ã¹ãã ãããã¿ã¼ã²ããã»ã·ã¹ãã ã«éãéã®ãã¼ã¿ãæãã¾ãããã¼ã¿ã®å
容ã¯ã(1)ã¨åä¸ã«ãªãã¾ãã
ã½ã¼ã¹ã»ã·ã¹ãã ã§æ´æ°ãçºçãããã³ãLocal Trailï¼ã½ã¼ã¹å´ã®è¨¼è·¡ãã¡ã¤ã«ï¼ã«è¿½è¨ãããData Pumpã¨å¼ã°ããããã»ã¹ï¼â»2ï¼ã«ãããå·®åãã¼ã¿ãã¿ã¼ã²ããã»ã·ã¹ãã ã¸éããã¾ãã
æ¬ã³ã©ã ã§ã¯ãï¼2ï¼ã®éä¿¡ã®æå·åã«é¢ãã¦ç¢ºèªãã¦ããã¾ãã
ãã¡ããã証跡ãã¡ã¤ã«èªä½ãæå·åããæ¹æ³ãããã¾ãã®ã§ããã¡ãã«ã¤ãã¦ã¯ä»¥ä¸ã®è£½åããã¥ã¡ã³ããåç
§ãã¦ãã ããã
- Oracle GoldenGate 12c Release 2 (12.2)ã®ãªã³ã©ã¤ã³ã»ããã¥ã¡ã³ ãã»ã©ã¤ãã©ãª
https://docs.oracle.com/cd/E74358_01/gg-winux/index.html
æå·ååã®ãã¼ã¿ãè¦ã¦ã¿ãã
ã§ã¯ã§ã¯ãå®éã«æå·ååã®ãã¼ã¿ãè¦ã¦ã¿ã¾ããããä»åã¯å³2 ã®ç°å¢ã§æ¤è¨¼ãã¦ã¿ã¾ããGoldenGate ã®ã³ã³ãã¼ãã³ãã®æ§æã¯ãå³ï¼ã¨åæ§ã§ããã½ã¼ã¹å´ã«Captureããã»ã¹, Data Pumpããã»ã¹ ãç¨æããã¿ã¼ã²ããå´ã«Replicatããã»ã¹ ãç¨æãã¾ãããªãããæ軽ãªä»®æ³ç°å¢ã§ä½ã£ã¦ãã¾ãã以éãæ¬ã³ã©ã ã§ç´¹ä»ããæ©è½ãè¨å®ã¯ãå®éã®ç°å¢ã«ããã¦ãåçã«åä½ãããã®ã ã¨èãããã¾ãããåä½ããµãã¼ããããæ§æã§ã®æ¤è¨¼ã§ã¯ããã¾ããã®ã§ããã®ç¹ã¯ã注æä¸ããã
å³2. æ¤è¨¼ç°å¢ã®æ§æ
ã§ã¯ãã½ã¼ã¹å´ã®ãã¼ã¿ãã¼ã¹ãµã¼ãã«ã¢ã¯ã»ã¹ãã試é¨ç¨ãã¼ãã«ï¼TEST_TABLEï¼ã«ãã¼ã¿ãå ¥ãã¦ã¿ã¾ãã
SQL> desc test_table åå NULL? å ----------------------------------------- -------- ---------------------------- C1 NUMBER C2 VARCHAR2(10) SQL> insert into test_table values ( 1, 'Not Secure' ); 1è¡ãä½æããã¾ããã SQL> commit; ã³ããããå®äºãã¾ããã
ãããå·®åãã¼ã¿ã¨ãã¦ãGoldenGate ã§ã¯ãåè¿°ããLocal Trailï¼ã½ã¼ã¹å´ã®è¨¼è·¡ãã¡ã¤ã«ï¼ã«æ ¼ç´ããã¦ãã¾ããããã¦ã証跡ãã¡ã¤ã«ã®å¨ãå¦ãªã®ã§ãããããã©ã«ãã§ã¯ãGoldenGate ã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªé
ä¸ã«ãããdirdatãã¨ãããµããã£ã¬ã¯ããªã«æ ¼ç´ããã¾ãï¼â»3ï¼ã
証跡ãã¡ã¤ã«ã®ãã¡ã¤ã«åã¯ããä»»æã®ï¼æåãï¼ãã·ã¼ã¯ã¨ã³ã¹çªå·ãã§æ§æããã¦ãã¾ããããã§ã¯ã証跡ãã¡ã¤ã«ã®å称ã®ä»»æã®æåããaaãã¨ãã¦ãã¾ãããã®å
容ã cat ã³ãã³ãã§ã¿ã¦ã¿ã¾ãããã
[oracle@gg1 ~] $ export OGG_HOME=/u01/app/oracle/product/12.1.0/gghome_1 #ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ã㪠[oracle@gg1 ~] $ cd $OGG_HOME/dirdat # ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªé ä¸ã®dirdatãã£ã¬ã¯ããªã«ç§»å [oracle@gg1 dirdat]$ lsã# ä»åã®å¯¾è±¡ã®è¨¼è·¡ãã¡ã¤ã«ã¯ããaa000000001ã aa000000000 aa000000001ã [oracle@gg1 dirdat]$ cat aa000000001 | strings # cat ã³ãã³ãã®çµæãstrings ã³ãã³ãã§è¡¨ç¤ºå¯è½ãªæåã ãã«ãã >uri:gg1:intellilink::u01:app:oracle:product:12.1.0:gghome_1:E16 ./dirdat/aa0000000017 1681704 ,............................................ Linux1 gg1.intellilink2 4.1.12-61.1.18.el7uek.x86_643 "#2 SMP Fri Nov 4 15:48:30 PDT 20164 x86_642 GGDB12 ggdb13 Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production PL/SQL Release 12.1.0.2.0 - Production CORE 12.1.0.2.0 Production TNS for Linux: Version 12.1.0.2.0 - Production NLSRTL Version 12.1.0.2.0 - Production 12.1.0.2.09 GMT3 ?Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO4 GGDB1Z TEST.TEST_TABLE AAAWdIAAGAAAADbAAA 16842646 7.6.1293Z Not SecureT AAAWdIAAGAAAADbAAB 16846096 5.4.1577Z
æååããã¦ãããã®ã®ããã¼ã¿é åã«é¢ãã¦ã¯ãé¨åçã«å
容ã確èªãããã¨ãåºæ¥ã¾ãã表示ãããæ
å ±ããã対象ã®ãã¼ãã«åãTEST_TABLEãããæ¿å
¥ãããã¼ã¿ããNot Secureãã確èªãããã¨ãã§ãã¾ãã
次ã«ãããã¯ã¼ã¯ä¸ãéããGoldenGate ã®ãã¼ã¿ãããã±ãããã£ããã£åæãã¼ã«ã使ãã確èªãã¦ã¿ã¾ããããåããããã¯ã¼ã¯ä¸ã«åå¨ãã Windows ä»®æ³ãã·ã³ãããGoldenGate ã®éä¿¡ãã¼ã¿ãè¦ãã¦ã¿ã¾ãã(â»4)ãããã§ã¯ãWireSharkï¼http://wireshark.orgï¼ãå©ç¨ãã¦ãã¾ãã
å³3. ããã©ã«ãã®éä¿¡ãã¼ã¿ããã£ããã£ããçµæ
å ã»ã©ã証跡ãã¡ã¤ã«ã確èªãã¦ããã£ãããã«ãããã©ã«ãã§ã¯ãã¼ã¿é¨åã¯æå·åããã¦ãããããã®ã¾ã¾ãã¼ã¿éä¿¡ãããããå½ç¶ãªãããéä¿¡ãã¼ã¿ãå¹³æã§ãããã¨ã確èªã§ãã¾ããã
ä»åã®ã¾ã¨ã
証跡ãã¡ã¤ã«ãã®ãã®ãæå·åãã¦ããªãããã©ã«ãç¶æ
ã®ã¾ã¾ã§ã¯ãGoldenGate ã®ãã¼ã¿ã¯ä¸¸è¦ãã®ç¶æ
ã§ãããã¨ã確èªã§ãã¾ããããã¶ãªãã§ããã
次åã®ã³ã©ã ã§ã¯ãæå·åãªãã·ã§ã³ã使ã£ã¦ãéä¿¡ã®æå·åãè¡ãããã¨ã確èªãã¾ãã
è£è¶³
- ï¼â»1ï¼ãã¼ã¿ã¯ç¢ºèªã§ãã¾ã
- ãã¡ãããã¢ã¯ã»ã¹æ¨©éãé©åã«è¨å®ãã¦ããã°ã誰ã§ãè¦ãããããã§ã¯ããã¾ãããoracle ã¦ã¼ã¶ã¼ã root çã®ç¹æ¨©ã¦ã¼ã¶ã¼ã奪ãããå ´åãä»åã®ã³ã©ã ã§ç¢ºèªããããã« OSã³ãã³ãã§ããã¼ã¿ã丸è¦ãã«ãªãã¾ãã
- ï¼â»2ï¼Data Pumpã¨å¼ã°ããããã»ã¹
- GoldenGate ã§ç»å ´ãã Data Pump ããã»ã¹ã¨ãOracle Database ã®ã¦ã¼ãã£ãªãã£ã¼ã§ãã Data Pump Export/Import ã¨ã¯å¥ç©ã§ãããããããã§ããã
ã¡ãªã¿ã«ãGoldenGate ã®ä¸»è¦ããã»ã¹ã°ã«ã¼ãã§ãããCaptureããã»ã¹, Data Pumpããã»ã¹, Replicatããã»ã¹ ã®å称ã¯ãããããæ大ï¼æåã¾ã§æå®ãããã¨ãã§ãã¾ãã - ï¼â»3ï¼dirdat
- GoldenGate ã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªã«ã¯ãdirprm, dirwlt ã¨ãã£ãããdirxxxã ã¨ããå½åè¦åã®ãµããã£ã¬ã¯ããªãèªåçã«ä½æããã¾ããããããããã©ã¡ã¼ã¿ã¼ã»ãã¡ã¤ã«ãæå·éµãæ ¼ç´ããçãGoldenGate ã§å©ç¨ãããã¡ã¤ã«ã®æ ¼ç´å
ã¨ãã¦ä½¿ããã¾ãããã®ä¸ã§ããdirdat ã¯ã証跡ãã¡ã¤ã«ãæ ¼ç´ããå ´æã§ãã
ã¡ãªã¿ã«ã証跡ãã¡ã¤ã«ãæ ¼ç´ããå ´æ㯠dirdat 以å¤ã«ãæå®ããå ´åãããã¾ããä¾ãã°ãGoldenGate ã®ã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªã®å®¹éãå°ãªãå ´åãæãããã¾ããGoldenGate ã¯å·®åãã¼ã¿ããæ±ããªãã¨ã¯ãããæ´æ°éãå¤ãã·ã¹ãã ã§ã¯ãã®å¢å 容éãã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªã®å®¹éãæ¯æ¸ãããå¯è½æ§ãããã¾ãããã®ãããªå ´åã¯ã証跡ãã¡ã¤ã«ã®æ ¼ç´å ãå¥éã容éã潤沢ãªãã£ã¬ã¯ããªãæå®ããã»ããè¯ãã§ãããã
ã¾ããã½ã¼ã¹ã»ã·ã¹ãã ã Real Application Clusters ï¼RACï¼æ§æã®å ´åã«ã注æãå¿ è¦ã§ããã½ã¼ã¹ç¨ã®è¨¼è·¡ãã¡ã¤ã«ãåãã¼ãããã¢ã¯ã»ã¹ããå¿ è¦ãããããã§ãããã®ãããªå ´åã証跡ãã¡ã¤ã«ã®æ ¼ç´å ã¨ãã¦ãã¤ã³ã¹ãã¼ã«ãã£ã¬ã¯ããªã§ã¯ãªããå ±æãã£ã¹ã¯ä¸ãæå®ããå¿ è¦ãããã¾ãã - ï¼â»4ï¼éä¿¡ãã¼ã¿ãè¦ãã¦ã¿ã¾ãã
- ä»åãOracle VM Virtualbox ã¨ããä»®æ³åã½ããã¦ã§ã¢ã使ããLinux ãã·ã³ã2å°ãWindows ãã·ã³ã1å°ãæ§ç¯ãã¦ãã¾ããLinux ãã·ã³2å°ã« Oracle Database ããã³GoldenGate ã®ç°å¢ãããããæ§ç¯ãã¾ãããWindows ãã·ã³ã«ã¯ãWireShark ãã¤ã³ã¹ãã¼ã«ãã¦ãã¾ããWindows ãã·ã³ã®ãããã¯ã¼ã¯ã¢ããã¿ã¼ã®ãªãã·ã§ã³ãããããã¹ãã£ã¹ã¢ã¼ãã«ãããã¨ã§ããã¼ã¿ãååãããã¨ãåºæ¥ã¾ãã
Writer Profile
ã»ãã¥ãªãã£äºæ¥é¨
ã»ãã¥ãªãã£ã³ã³ãµã«ãã£ã³ã°æ
å½ ãã¼ãã³ã³ãµã«ã¿ã³ã
ä½è¤ éä¸ï¼CISSPãPh.D.ï¼
以ä¸ãOracleç³»è³æ ¼ãä¿æ
ã»ORACLE MASTER Platinum Oracle Database 12c
ã»Oracle GoldenGate 12c Certified Implementation Specialist
Tweet