成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

OGG在RAC上如何安裝配置

這篇文章給大家分享的是有關(guān)OGG在RAC上如何安裝配置的內(nèi)容。小編覺得挺實(shí)用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

成都創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于做網(wǎng)站、網(wǎng)站建設(shè)、天祝藏族自治網(wǎng)絡(luò)推廣、微信小程序定制開發(fā)、天祝藏族自治網(wǎng)絡(luò)營銷、天祝藏族自治企業(yè)策劃、天祝藏族自治品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎;成都創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供天祝藏族自治建站搭建服務(wù),24小時服務(wù)熱線:18980820575,官方網(wǎng)址:jinyejixie.com

此次試驗(yàn)是為了某省電力公司OGG初始化模擬演練。演練過程分為兩篇博客記錄全過程。第一篇是安裝配置,主要介紹OGG在源端和災(zāi)備端都是雙節(jié)點(diǎn)RAC下的配置。第二篇是OGG初始化,使用rman恢復(fù)災(zāi)備端數(shù)據(jù)庫,啟用OGG復(fù)制進(jìn)程追加日志。

環(huán)境介紹:
Source                               Target 

OS:Enterprise Linux Server release 5.7
OGG:    11.2.1.0.1
ORACLE: 11.2.0.4 RAC 雙節(jié)點(diǎn)
172.16.228.101   node1
172.16.228.102   node2
OGG路徑 node1 /goldengate
OS:Enterprise Linux Server release 5.7
OGG     11.2.1.0.1
ORACLE: 11.2.0.4 RAC 雙節(jié)點(diǎn)
172.16.228.103   node3
172.16.228.104   node4
OGG路徑 node3 /goldengate


Source系統(tǒng)設(shè)置

1.在node1解壓縮ogg安裝包 

# su - oracle

[oracle@node1 ~]$ cd /goldengate/

[oracle@node1 goldengate]$ unzip /tmp/ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip

[oracle@node1 goldengate]$ tar xvf fbo_ggs_Linux_x64_ora11g_64bit.tar


2.在bash_profile中添加OGG_HOME

su - oraclecdvi .bash_profile
export ORACLE_HOSTNAME=node1
export ORACLE_SID=PROD1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_UNQNAME=PROD
export OGG_HOME=/goldengate
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH:$OGG_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export EDITOR=vi
export LANG=en_US
export NLS_LANG=american_america.AL32UTF8
export NLS_DATE_FORMAT='yyyy/mm/dd hh34:mi:ss'


3.創(chuàng)建OGG應(yīng)用目錄,該操作需要在OGG_HOME路徑下

cd $OGG_HOME

[oracle@node1 goldengate]$ ggsci

GGSCI (node1) 1> CREATE SUBDIRS

4.數(shù)據(jù)庫開啟歸檔模式

查看是否為歸檔模式archive log list;開啟歸檔模式# srvctl stop database -d prodSQL> startup mount;SQL> alter database archivelog;SQL> shutdown immediate;# srvctl start database -d prod


5.開啟數(shù)據(jù)庫級別日志補(bǔ)充

sqlplus / as sysdba
SQL> ALTER DATABASE FORCE LOGGING;

SQL>ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

SQL>ALTER DATABASE ADD SUPPLEMENTAL LOG DATA(PRIMARY KEY, UNIQUE,FOREIGN KEY) COLUMNS;

SQL>ALTER SYSTEM ARCHIVE LOG CURRENT;

SELECT 
SUPPLEMENTAL_LOG_DATA_MIN,
SUPPLEMENTAL_LOG_DATA_PK,
SUPPLEMENTAL_LOG_DATA_UI,
SUPPLEMENTAL_LOG_DATA_FK,
SUPPLEMENTAL_LOG_DATA_ALL
FROM v$database;

SUPPLEME SUP SUP SUP SUP
-------- --- --- --- ---
YES      YES YES YES NO


Oracle11.2.0.4版本所需參數(shù)
SQL> ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE SCOPE=BOTH;

6.創(chuàng)建測試用戶

sqlplus / as sysdba

SQL >CREATE USER snow IDENTIFIED BY snow DEFAULT TABLESPACE USERS;

SQL >GRANT CONNECT, RESOURCE TO snow;

SQL >conn snow/snow

SQL >CREATE TABLE t1 (id INT PRIMARY KEY, name VARCHAR2(10));

7.創(chuàng)建OGG管理用戶oggadmin及其表空間goldengate

sqlplus / as sysdba

SQL >select name from v$datafile;

SQL >CREATE TABLESPACE goldengate DATAFILE '+DATA' SIZE 100M AUTOEXTEND ON;

SQL >CREATE USER oggadmin IDENTIFIED BY oggadmin DEFAULT TABLESPACE goldengate;

SQL >GRANT dba TO oggadmin;



8.添加角色

cd $OGG_HOME
sqlplus / as sysdba
SQL >@/goldengate/role_setup
Enter GoldenGate schema name:oggadmin
GRANT GGS_GGSUSER_ROLE TO oggadmin;

9.安裝sequence支持

cd $OGG_HOMEsqlplus / as sysdbaSQL> @sequence.sqlSQL> GRANT EXECUTE ON oggadmin.updateSequence TO oggadmin;SQL> ALTER TABLE sys.seq$ ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;


10.設(shè)置全局參數(shù)

cd $OGG_HOME

ggsci

GGSCI> EDIT PARAMS ./GLOBALS

GGSCHEMA oggadmin


Target系統(tǒng)設(shè)置
11.在node3解壓縮ogg安裝包

# su - oracle

[oracle@node3 ~]$ cd /goldengate/

[oracle@node3 goldengate]$ unzip /tmp/ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip

[oracle@node3 goldengate]$ tar xvf fbo_ggs_Linux_x64_ora11g_64bit.tar


12.在bash_profile中添加OGG_HOME

su - oracle
cd
vi .bash_profile
export ORACLE_HOSTNAME=node3
export ORACLE_SID=PROD1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_UNQNAME=PROD
export OGG_HOME=/goldengate
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH:$OGG_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export EDITOR=vi
export LANG=en_US
export NLS_LANG=american_america.AL32UTF8
export NLS_DATE_FORMAT='yyyy/mm/dd hh34:mi:ss'

13.創(chuàng)建OGG應(yīng)用目錄,該操作需要在OGG_HOME路徑下

cd $OGG_HOME

[oracle@node1 goldengate]$ ggsci

GGSCI (node1) 1> CREATE SUBDIRS


14.數(shù)據(jù)庫開啟歸檔模式

查看是否為歸檔模式
archive log list;

開啟歸檔模式
# srvctl stop database -d prod

SQL> startup mount;

SQL> alter database archivelog;

SQL> shutdown immediate;

# srvctl start database -d prod

15.創(chuàng)建測試用戶

sqlplus / as sysdba

SQL >CREATE USER snow IDENTIFIED BY snow DEFAULT TABLESPACE USERS;

SQL >GRANT CONNECT, RESOURCE TO snow;

SQL >conn snow/snow

SQL >CREATE TABLE t1 (id INT PRIMARY KEY, name VARCHAR2(10));


16.創(chuàng)建OGG管理用戶oggadmin及其表空間goldengate

sqlplus / as sysdba

SQL >select name from v$datafile;

SQL >CREATE TABLESPACE goldengate DATAFILE '+DATA' SIZE 100M AUTOEXTEND ON;

SQL >CREATE USER oggadmin IDENTIFIED BY oggadmin DEFAULT TABLESPACE goldengate;

SQL >GRANT dba TO oggadmin;


17.設(shè)置全局參數(shù)

cd $OGG_HOME

GGSCI

GGSCI> EDIT PARAMS ./GLOBALS

GGSCHEMA oggadmin


Source系統(tǒng)設(shè)置
18.配置管理進(jìn)程

GGSCI> EDIT PARAM MGR
PORT 7839
DYNAMICPORTLIST  7840-7914
--AUTORESTART EXTRACT *, RETRIES 5, WAITMINUTES 7
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 10
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45


19.開啟表級別日志補(bǔ)充,追加對象為用戶snow下所有表

GGSCI> DBLOGIN USERID oggadmin,PASSWORD oggadmin

GGSCI> ADD TRANDATA snow.t1

20.創(chuàng)建初級提取組ex1,源端是雙節(jié)點(diǎn)RAC,此處設(shè)置參數(shù)THREADS 2

ADD EXTRACT ex1,TRANLOG,BEGIN NOW,THREADS 2

21.為初級提取組ex1指定本地trail文件

ADD EXTTRAIL /goldengate/dirdat/ex, EXTRACT ex1 MEGABYTES 5

22.生成OGG管理用戶oggadmin的密碼

GGSCI > encrypt password oggadmin encryptkey default
Using default key...

Encrypted password:  AACAAAAAAAAAAAIARFBCXDACYBXIVCND
Algorithm used:  BLOWFISH


23.配置初級提取組參數(shù)文件,源端是雙節(jié)點(diǎn)RAC,此處設(shè)置參數(shù)TRANLOGOPTIONS DBLOGREADER

EXTRACT ex1

TRANLOGOPTIONS DBLOGREADER
EXTTRAIL /goldengate/dirdat/ex
SETENV (NLS_LANG="AMERICAN_AMERICA.UTF8")
USERID oggadmin, PASSWORD AACAAAAAAAAAAAIARFBCXDACYBXIVCND, ENCRYPTKEY default
GETTRUNCATES
REPORTCOUNT EVERY 30 MINUTES, RATE
DISCARDFILE /goldengate/dirrpt/ex1.dsc, APPEND, MEGABYTES 1024
DISCARDROLLOVER AT 3:00
WARNLONGTRANS 2h, CHECKINTERVAL 3m
DYNAMICRESOLUTION
DBOPTIONS  ALLOWUNUSEDCOLUMN
FETCHOPTIONS NOUSESNAPSHOT
FETCHOPTIONS FETCHPKUPDATECOLS
--TRANLOGOPTIONS  CONVERTUCS2CLOBS
--THREADOPTIONS   MAXCOMMITPROPAGATIONDELAY 60000 IOLATENCY 60000
TABLE snow.*;

24.創(chuàng)建投遞組dp1,設(shè)置本地trail文件

ADD EXTRACT dp1 EXTTRAILSOURCE /goldengate/dirdat/ex

25.為投遞進(jìn)組dp1設(shè)置target端trail文件地址

ADD RMTTRAIL /u01/app/oracle/gg/dirdat/rt, EXTRACT dp1

26.配置投遞組dp1參數(shù)文件。172.16.228.103為目標(biāo)端OGG所在服務(wù)器IP地址

EXTRACT dp1
USERID oggadmin, PASSWORD oggadmin
RMTHOST 172.16.228.103, MGRPORT 7839, COMPRESS
PASSTHRU
NUMFILES 5000
RMTTRAIL /goldengate/dirdat/rt
DYNAMICRESOLUTION
TABLE snow.*;


Target系統(tǒng)
27.配置管理進(jìn)程

PORT 7839
USERID oggadmin, PASSWORD AACAAAAAAAAAAAIARFBCXDACYBXIVCND, ENCRYPTKEY default
DYNAMICPORTLIST 7840-7914
AUTORESTART EXTRACT *,RETRIES 5,WAITMINUTES 3
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 5
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45

28.創(chuàng)建檢查點(diǎn)表

GGSCI> DBLOGIN USERID oggadmin,PASSWORD oggadmin

GGSCI> ADD CHECKPOINTTABLE oggadmin.checkpointtable


29.在全局環(huán)境中添加檢查點(diǎn)表

GGSCI> EDIT PARAMS ./GLOBALS

GGSCHEMA oggadmin
CHECKPOINTTABLE oggadmin.checkpointtable

30.創(chuàng)建復(fù)制組rt1,設(shè)置讀取trail文件路徑以及檢查點(diǎn)表

ADD REPLICAT rt1, EXTTRAIL /goldengate/dirdat/rt, checkpointtable oggadmin.checkpointtable

31.為復(fù)制組rt1配置參數(shù)文件

REPLICAT rt1
SETENV (NLS_LANG = "American_America.UTF8")
USERID oggadmin, PASSWORD AACAAAAAAAAAAAIARFBCXDACYBXIVCND, ENCRYPTKEY default
DBOPTIONS DEFERREFCONST
GETTRUNCATES
REPORT AT 06:00
REPORTCOUNT EVERY 30 MINUTES, RATE
REPORTROLLOVER AT 02:00
REPERROR DEFAULT, ABEND
--HANDLECOLLISIONS
ALLOWNOOPUPDATES
DISCARDFILE ./dirrpt/repsa.dsc, APPEND, MEGABYTES 1024M
DISCARDROLLOVER AT 02:00
ASSUMETARGETDEFS
MAP snow.*, TARGET snow.*;


測試環(huán)節(jié)
啟動source管理進(jìn)程
GGSCI > START MGR

啟動target管理進(jìn)程
GGSCI > START MGR

啟動source提取進(jìn)程
GGSCI > START ex1

啟動target復(fù)制進(jìn)程
GGSCI > START rt1

啟動source投遞進(jìn)程
GGSCI > START dp1

確認(rèn)source進(jìn)程狀態(tài)
GGSCI > INFO ALL

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     DP1         00:00:00      00:00:08
EXTRACT     RUNNING     EX1         00:00:00      00:00:03

確認(rèn)target進(jìn)程狀態(tài)
GGSCI > INFO ALL

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     RT1         00:00:00      00:00:02

源端節(jié)點(diǎn)node1插入數(shù)據(jù)

begin
for i in 1..1000 loop
insert into t1 values(i,'oOo');
end loop;
commit;
end;
/

復(fù)制端驗(yàn)證
select count(*) from snow.t1;

生產(chǎn)端(source)與災(zāi)備端(target)的OGG配置到這里就結(jié)束了。

感謝各位的閱讀!關(guān)于“OGG在RAC上如何安裝配置”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

網(wǎng)站標(biāo)題:OGG在RAC上如何安裝配置
本文來源:http://jinyejixie.com/article10/ppegdo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、網(wǎng)站營銷、搜索引擎優(yōu)化、App設(shè)計(jì)動態(tài)網(wǎng)站、標(biāo)簽優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化
中方县| 胶州市| 含山县| 永州市| 怀来县| 盐津县| 和龙市| 璧山县| 平和县| 拜城县| 阜新市| 苗栗市| 贵溪市| 台南市| 云阳县| 道真| 当阳市| 德清县| 吉木萨尔县| 平安县| 南皮县| 安溪县| 景德镇市| 汾西县| 康平县| 鄢陵县| 临高县| 甘孜县| 望谟县| 柳江县| 赫章县| 上林县| 会东县| 娄底市| 肥西县| 阜平县| 巴林左旗| 东乌珠穆沁旗| 康定县| 汪清县| 璧山县|