ogg12c測試oracle 11 2 0 4同步

2021-07-04 19:05:22 字數 3984 閱讀 8070

本次實驗oracle資料庫為11.2.0.4

gg版本為:

oracle goldengate command interpreter for oracle

version 12.1.2.1.0 oggcore_12.1.2.1.0_platforms_140727.2135.1_fbo

linux, x64, 64bit (optimized), oracle 11g on aug  7 2014 09:14:25

1.源端安裝

12c的gg採用oui圖形介面執行runinstaller安裝如下:

在源端資料庫內授權:

create user ggs identified by ggs;

grant connect,resource,unlimited tablespace to ggs; 

grant execute on utl_file to ggs; 

grant select any dictionary,select any table to ggs; 

grant alter any table to ggs; 

grant flashback any table to ggs;

sql> alter database add supplemental log data;

database altered.

sql> alter database force logging;

ggsci (bre1) 11> dblogin userid ggs,password ggs

successfully logged into database.

2.目標端安裝:

目標端和源端一樣使用oui介面安裝

在資料庫建立使用者並授權:

create user ggt identified by ggt;

grant dba to ggt;

建立checkpointtable,在ogg home建立globals檔案:

[oracle@bre2 oracle]$ cat globals

checkpointtable ggt.chkpt

ggsci (bre2) 2> dblogin userid ggt,password ggt

successfully logged into database.

ggsci (bre2 as ggt@bre2) 3>

ggsci (bre2 as ggt@bre2) 3>

ggsci (bre2 as ggt@bre2) 3> add checkpointtable

no checkpoint table specified. using globals specification (ggt.chkpt)...

successfully created checkpoint table ggt.chkpt.

3.配置源端程式

一、配置extract程序:

ggsci (bre1) 54> edit params ext_t1

extract ext_t1

setenv(nls_lang=american_america.zhs16gbk)

userid [email protected]/bre1,password ggs

exttrail dirdat/sp

table test.cj_cw_cwsj;

ggsci (bre1) 18> 

add extract ext_t1,tranlog,begin now

extract added.

ggsci (bre1) 20> 

add exttrail dirdat/sp,extract ext_t1,megabytes 100

exttrail added.

ggsci (bre1) 21> start extract ext_t1

sending start request to manager ...

extract ext_t1 starting

ggsci (bre1) 22> info all

program     status      group       lag at chkpt  time since chkpt

manager     running                                          

extract     stopped     ext_t1      00:00:00      00:02:03   

由於是11.2.0.4版本,需要在資料庫內設定引數:

alter system set enable_goldengate_replication = true scope=both;

ggsci (bre1) 28> start extract ext_t1

sending start request to manager ...

extract ext_t1 starting

ggsci (bre1) 29> info all

program     status      group       lag at chkpt  time since chkpt

manager     running                                          

extract     running     ext_t1      00:07:16      00:00:01   

二、配置datapump程序:

ggsci (bre1) 55> edit params dp_t1

extract dp_t1

passthru

rmthost 192.168.56.46 ,mgrport 7008

rmttrail dirdat/rp

table test.cj_cw_cwsj;

ggsci (bre1) 50> 

add extract dp_t1,exttrailsource dirdat/sp

extract added.

ggsci (bre1) 51> 

add rmttrail dirdat/rp,extract dp_t1,megabytes 100

rmttrail added.

ggsci (bre1) 52> start ext dp_t1

sending start request to manager ...

extract dp_t1 starting

ggsci (bre1) 53> info all

program     status      group       lag at chkpt  time since chkpt

manager     running                                          

extract     running     dp_t1       00:00:00      00:01:39   

extract     running     ext_t1      00:00:00      00:00:04

4.配置目標端程式

配置replicat程序:

ggsci (bre2) 29> edit params rep_t1

replicat rep_t1

setenv(nls_lang=american_america.zhs16gbk)

userid ggt,password ggt

handlecollisions

assumetargetdefs

map test.*,target test.*;

ggsci (bre2) 7> 

add replicat rep_t1,exttrail dirdat/rp

replicat added.

ogg12c測試oracle11 2 0 4同步

本次實驗oracle資料庫為11.2.0.4 gg版本為 oracle goldengate command interpreter for oracle version 12.1.2.1.0 oggcore 12.1.2.1.0 platforms 140727.2135.1 fbo linux,...

Oracle11g 12c設定開機自動啟動

宣告 部分鏈結可能需要fq才能開啟,fq軟體 安裝oracle11g或者12c先安裝oracle pre install rpm包可以為安裝oracle提前配置好環境,省得各種各樣的配置了 centos6.x安裝oracle pre install rpm centos6.x安裝oracle12c ...

oracle11g公升級12c後,日期格式顯示不對?

oracle11g公升級12c後,日期格式顯示不對 11.2.0.1 12.2.0.1 原11g下 新12c下 對比nls引數結果 11g下 發現11g下沒有做任何設定。嘗試修改sys下登入觸發器 create or replace trigger logintrg after logon on d...