truncate table tcustmer;Table truncated. 在目的端,查看表數據 SQL> select coun" />

<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        GoldenGate實現OracleforOracle單向DDL操作同步

        來源:懂視網 責編:小采 時間:2020-11-09 16:08:29
        文檔

        GoldenGate實現OracleforOracle單向DDL操作同步

        GoldenGate實現OracleforOracle單向DDL操作同步:GoldenGate 實現Oracle for Oracle 單向DDL操作同步 在 文章中我們實現了表的DML操作同步。 我們做如下測試 在源端執行表的truncate SQL> truncate table tcustmer;Table truncated. 在目的端,查看表數據 SQL> select coun
        推薦度:
        導讀GoldenGate實現OracleforOracle單向DDL操作同步:GoldenGate 實現Oracle for Oracle 單向DDL操作同步 在 文章中我們實現了表的DML操作同步。 我們做如下測試 在源端執行表的truncate SQL> truncate table tcustmer;Table truncated. 在目的端,查看表數據 SQL> select coun

        GoldenGate 實現Oracle for Oracle 單向DDL操作同步

        在 文章中我們實現了表的DML操作同步。

        我們做如下測試

        在源端執行表的truncate

        SQL> truncate table tcustmer;
        Table truncated.

        在目的端,查看表數據

        SQL> select count(*) from tcustmer;

        COUNT(*)
        ----------
        2

        數據并沒有同步

        我們如何讓Goldengate實現DDL操作的同步呢?

        GoldenGate 實現Oracle for Oracle 單向DDL操作同步

        要想支持DDL同步,需要在源數據庫上做些設置,使得可以跟蹤DDL操作。包括如下內容Trigger、marker和history table,一個用戶角色和其他各式各樣的數據庫對象。

        首先要配置GLOBALS參數,告訴gg使用那個schema來存儲DDL操作。

        GGSCI (localhost.localdomain) 19> edit params ./GLOBALS

        -- GoldenGate GLOBALS parameter file
        --
        GGSCHEMA GGDDL

        2. 使用sqlplus 創建ggddl用戶,,并安裝ddl支持

        SQL> conn / as sysdba
        Connected.
        SQL> create user ggddl identified by ggddl ;

        User created.

        SQL> grant connect,resource to ggddl;

        Grant succeeded.

        關閉數據回收站功能

        SQL> ALTER SYSTEM SET RECYCLEBIN = OFF scope=spfile;

        System altered.
        SQL> startup force
        Oracle instance started.

        Total System Global Area 835104768 bytes
        Fixed Size 2217952 bytes
        Variable Size 574621728 bytes
        Database Buffers 255852544 bytes
        Redo Buffers 2412544 bytes
        Database mounted.
        Database opened.

        運行marker_setup.sql (ogg的安裝目錄,進入sqlplus)

        [oracle@localhost ogg]$ sqlplus / as sysdba

        SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 11 19:58:40 2015

        Copyright (c) 1982, 2009, Oracle. All rights reserved.


        Connected to:
        Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
        With the Partitioning, OLAP, Data Mining and Real Application Testing options

        SQL> @marker_setup.sql

        Marker setup script

        You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
        NOTE: The schema must be created prior to running this script.
        NOTE: Stop all DDL replication before starting this installation.

        Enter Oracle GoldenGate schema name:GGDDL


        Marker setup table script complete, running verification script...
        Please enter the name of a schema for the GoldenGate database objects:
        Setting schema name to GGDDL

        MARKER TABLE
        -------------------------------
        OK

        MARKER SEQUENCE
        -------------------------------
        OK

        Script complete.

        在彈出對話框輸入GGSCHEMA的名稱

        運行ddl_setup.sql

        SQL> @ddl_setup.sql

        運行role_setup.sql

        SQL> @role_setup.sql

        GGS Role setup script

        This script will drop and recreate the role GGS_GGSUSER_ROLE
        To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter to the preferred name. (Do not run the script.)

        You will be prompted for the name of a schema for the GoldenGate database objects.
        NOTE: The schema must be created prior to running this script.
        NOTE: Stop all DDL replication before starting this installation.

        Enter GoldenGate schema name:ggddl
        Wrote file role_setup_set.txt

        PL/SQL procedure successfully completed.


        Role setup script complete

        Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command:

        GRANT GGS_GGSUSER_ROLE TO

        where is the user assigned to the GoldenGate processes.

        創建好角色后,并不是要把這個角色賦予ggddl用戶,而是要將該角色賦予Extract,Replicat等使用的schema 。

        我們之前配置的是system用戶

        SQL> GRANT GGS_GGSUSER_ROLE TO system;

        Grant succeeded.

        啟用ddl,其實就是使trigger enable

        SQL> @ddl_enable.sql

        Trigger altered.

        關閉Manager,Extract,Replicat

        源端

        GGSCI (localhost.localdomain) 1> stop Extract eorakk
        GGSCI (localhost.localdomain) 5> stop mgr !

        目的端

        GGSCI (localhost.localdomain) 1> stop replicat rorakk
        Sending STOP request to REPLICAT RORAKK ...
        Request processed.
        GGSCI (localhost.localdomain) 2> stop manager

        編輯Extract參數

        GGSCI (localhost.localdomain) 5> edit params eorakk

        --
        -- Change Capture parameter file to capture
        -- TCUSTMER and TCUSTORD Changes
        --
        EXTRACT EORAKK
        USERID system, PASSWORD oracle
        RMTHOST 192.168.199.104, MGRPORT 7809
        EXTTRAIL ./dirdat/KK
        DDL INCLUDE ALL
        TABLE SCOTT.TCUSTMER;
        TABLE SCOTT.TCUSTORD;

        在原有基礎上添加一行DDL INCLUDE ALL

        編輯Replicat參數

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        GoldenGate實現OracleforOracle單向DDL操作同步

        GoldenGate實現OracleforOracle單向DDL操作同步:GoldenGate 實現Oracle for Oracle 單向DDL操作同步 在 文章中我們實現了表的DML操作同步。 我們做如下測試 在源端執行表的truncate SQL> truncate table tcustmer;Table truncated. 在目的端,查看表數據 SQL> select coun
        推薦度:
        標簽: 同步 oracle ddl
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 四虎国产精品免费永久在线| 亚洲成人福利网站| 国产精品亚洲小说专区| 歪歪漫画在线观看官网免费阅读| 亚洲va在线va天堂va四虎 | 亚洲AV无码AV吞精久久| 美女视频黄的全免费视频 | 亚洲AV无码一区二区乱子仑 | 免费日本一区二区| 国产亚洲一区二区精品| 国产色无码精品视频免费| 国产亚洲一区二区手机在线观看| 国产一区二区三区免费观看在线| 亚洲av福利无码无一区二区| 免费视频成人片在线观看| 亚洲福利一区二区| 嫩草影院免费观看| 亚洲hairy多毛pics大全| 亚洲精品国产高清不卡在线| 久久精品成人免费国产片小草 | 国产亚洲av片在线观看18女人| CAOPORN国产精品免费视频| 久久精品国产亚洲夜色AV网站| 久别的草原电视剧免费观看| 亚洲日韩国产精品无码av| 一二三四免费观看在线电影 | 亚洲人成小说网站色| 毛片大全免费观看| 风间由美在线亚洲一区| 国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 亚洲JIZZJIZZ妇女| 亚洲色偷偷偷鲁综合| 99热在线精品免费播放6| 亚洲国产日韩综合久久精品| 国产精品jizz在线观看免费| 国产美女视频免费观看的网站| 亚洲视频精品在线| 日本黄色免费观看| a级片免费在线播放| www.亚洲日本| 综合亚洲伊人午夜网 |