Oracle GoldenGate學(xué)習(xí)之--基本概念和配置(2)
成都創(chuàng)新互聯(lián)10多年成都企業(yè)網(wǎng)站建設(shè)服務(wù);為您提供網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)頁設(shè)計及高端網(wǎng)站定制服務(wù),成都企業(yè)網(wǎng)站建設(shè)及推廣,對成都被動防護網(wǎng)等多個領(lǐng)域擁有多年的網(wǎng)站營銷經(jīng)驗的網(wǎng)站建設(shè)公司。
一、Oracle OGG下載:
http://www.oracle.com/technetwork/cn/middleware/goldengate/downloads/index.html
二:OGG安裝(RedHat EL6)
系統(tǒng)架構(gòu):
Test Environment:
Item | Source System | Target System |
Platform | RedHat EL6 | RedHat EL6 |
HostName | ogg | rh7 |
DataBase Version | Oracle 11.2.0.1.0 | Oracle 11.2.0.1.0 |
Character Set | zhs16gbk | zhs16gbk |
ORACLE_SID | prod | prod |
Listener | linstener/1521 | linstener/1521 |
GoldenGate User | ogg | ogg |
1、檢測安裝環(huán)境
[oracle@rh7 ogg]$ uname -a
Linux rh7.cuug.net 2.6.32-71.el6.i686 #1 SMP Wed Sep 1 01:26:34 EDT 2010 i686 i686 i386 GNU/Linux
[oracle@rh7 ogg]$ arch
i686
2、安裝OGG軟件
[oracle@rh7 ogg]$ mkdir -p /u01/ogg
[oracle@rh7 ogg]$ ls -l
total 85912
-rw-r----- 1 oracle oinstall 87966150 Sep 10 11:33 ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip
注意:
下載的OGG 11g版本有32位和64位,如果在操作系統(tǒng)為32位,安裝64位的OGG,將出現(xiàn)以下錯誤
“不可執(zhí)行的二進制文件”
[oracle@rh7 ogg]$ unzip ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip
Archive: ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip inflating: fbo_ggs_Linux_x86_ora11g_32bit.tar inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf inflating: Oracle GoldenGate 11.2.1.0.1 README.txt inflating: Oracle GoldenGate 11.2.1.0.1 README.doc
[oracle@rh7 ogg]$ ls -l
total 290704 -rw-rw-r-- 1 oracle oinstall 209367040 Apr 23 2012 fbo_ggs_Linux_x86_ora11g_32bit.tar -rw-r----- 1 oracle oinstall 87966150 Sep 10 11:33 ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip -rwxrwxrwx 1 oracle oinstall 220546 May 2 2012 OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf -rwxrwxrwx 1 oracle oinstall 93696 May 2 2012 Oracle GoldenGate 11.2.1.0.1 README.doc -rwxrwxrwx 1 oracle oinstall 24390 May 2 2012 Oracle GoldenGate 11.2.1.0.1 README.txt
[oracle@rh7 ogg]$ tar xvf fbo_ggs_Linux_x86_ora11g_32bit.tar
查看安裝目錄:
[oracle@rh7 ogg]$ ls -l
total 474820 -rw-r----- 1 oracle oinstall 426 Oct 15 2010 bcpfmt.tpl -rw-r----- 1 oracle oinstall 1725 Oct 15 2010 bcrypt.txt drwxr-x--- 2 oracle oinstall 4096 Apr 23 2012 cfg -rw-r----- 1 oracle oinstall 1285 Feb 29 2012 chkpt_ora_create.sql -rwxr-x--- 1 oracle oinstall 5307711 Apr 23 2012 cobgen -rwxr-x--- 1 oracle oinstall 5054612 Apr 23 2012 convchk -rw-r----- 1 oracle oinstall 159 Oct 15 2010 db2cntl.tpl -rw-r----- 1 oracle oinstall 1059 Oct 15 2010 ddl_cleartrace.sql -rwxr-x--- 1 oracle oinstall 5584197 Apr 23 2012 ddlcob -rw-r----- 1 oracle oinstall 4189 Oct 15 2010 ddl_ddl2file.sql -rw-r----- 1 oracle oinstall 746 Oct 15 2010 ddl_disable.sql -rw-r----- 1 oracle oinstall 692 Oct 15 2010 ddl_enable.sql -rw-r----- 1 oracle oinstall 3518 Oct 14 2011 ddl_filter.sql -rw-r----- 1 oracle oinstall 388 Oct 15 2010 ddl_nopurgeRecyclebin.sql -rw-r----- 1 oracle oinstall 13689 Dec 15 2011 ddl_ora10.sql -rw-r----- 1 oracle oinstall 3167 Aug 29 2011 ddl_ora10upCommon.sql -rw-r----- 1 oracle oinstall 14358 Dec 15 2011 ddl_ora11.sql -rw-r----- 1 oracle oinstall 14051 Dec 15 2011 ddl_ora9.sql -rw-r----- 1 oracle oinstall 1026 Oct 15 2010 ddl_pin.sql -rw-r----- 1 oracle oinstall 1227 Oct 15 2010 ddl_purgeRecyclebin.sql -rw-r----- 1 oracle oinstall 4138 Aug 9 2011 ddl_remove.sql -rw-r----- 1 oracle oinstall 425 Oct 15 2010 ddl_session1.sql -rw-r----- 1 oracle oinstall 1053 Oct 15 2010 ddl_session.sql -rw-r----- 1 oracle oinstall 296951 Apr 3 2012 ddl_setup.sql -rw-r----- 1 oracle oinstall 10506 Feb 27 2012 ddl_status.sql -rw-r----- 1 oracle oinstall 2506 Oct 15 2010 ddl_staymetadata_off.sql -rw-r----- 1 oracle oinstall 2501 Oct 15 2010 ddl_staymetadata_on.sql -rw-r----- 1 oracle oinstall 2955 Oct 15 2010 ddl_tracelevel.sql -rw-r----- 1 oracle oinstall 2721 Dec 28 2010 ddl_trace_off.sql -rw-r----- 1 oracle oinstall 2862 Oct 15 2010 ddl_trace_on.sql -rwxr-x--- 1 oracle oinstall 8317872 Apr 23 2012 defgen -rw-r----- 1 oracle oinstall 1217 Oct 15 2010 demo_more_ora_create.sql -rw-r----- 1 oracle oinstall 967 Oct 15 2010 demo_more_ora_insert.sql -rw-r----- 1 oracle oinstall 883 Oct 15 2010 demo_ora_create.sql -rw-r----- 1 oracle oinstall 821 Oct 15 2010 demo_ora_insert.sql -rw-r----- 1 oracle oinstall 4015 Oct 15 2010 demo_ora_lob_create.sql -rw-r----- 1 oracle oinstall 2275 Oct 15 2010 demo_ora_misc.sql -rw-r----- 1 oracle oinstall 1269 Oct 15 2010 demo_ora_pk_befores_create.sql -rw-r----- 1 oracle oinstall 1227 Oct 15 2010 demo_ora_pk_befores_insert.sql -rw-r----- 1 oracle oinstall 2520 Oct 15 2010 demo_ora_pk_befores_updates.sql drwxr-x--- 2 oracle oinstall 4096 Apr 23 2012 dirjar drwxr-x--- 2 oracle oinstall 4096 Apr 23 2012 dirprm -rwxr-x--- 1 oracle oinstall 5901919 Apr 23 2012 emsclnt -rwxr-x--- 1 oracle oinstall 34210648 Apr 23 2012 extract -rw-rw-r-- 1 oracle oinstall 209367040 Apr 23 2012 fbo_ggs_Linux_x86_ora11g_32bit.tar -rw-r----- 1 oracle oinstall 1968 Oct 15 2010 freeBSD.txt -rwxr-x--- 1 oracle oinstall 5825921 Apr 23 2012 ggcmd -rw-r----- 1 oracle oinstall 1257280 Apr 23 2012 ggMessage.dat -rwxr-x--- 1 oracle oinstall 12266773 Apr 23 2012 ggsci -rw-r----- 1 oracle oinstall 169753 Feb 1 2012 help.txt -rwxr-x--- 1 oracle oinstall 406 Apr 23 2012 jagent.sh -rwxr-x--- 1 oracle oinstall 316003 Apr 23 2012 keygen -rwxr-x--- 1 oracle oinstall 83229 Apr 19 2012 libantlr3c.so -rwxr-x--- 1 oracle oinstall 1740066 Apr 19 2012 libdb-5.2.so -rwxr-x--- 1 oracle oinstall 6569009 Apr 23 2012 libgglog.so -rwxr-x--- 1 oracle oinstall 1893448 Apr 23 2012 libggrepo.so -rwxr-x--- 1 oracle oinstall 15581116 Apr 19 2012 libicudata.so.38 -rwxr-x--- 1 oracle oinstall 4508019 Apr 19 2012 libicui18n.so.38 -rwxr-x--- 1 oracle oinstall 3349821 Apr 19 2012 libicuuc.so.38 -rwxr-x--- 1 oracle oinstall 4803823 Apr 19 2012 libxerces-c.so.28 -rw-r----- 1 oracle oinstall 1668 Oct 15 2010 libxml2.txt -rwxr-x--- 1 oracle oinstall 6441773 Apr 23 2012 logdump -rw-r----- 1 oracle oinstall 2278 Aug 9 2011 marker_remove.sql -rw-r----- 1 oracle oinstall 3824 Aug 9 2011 marker_setup.sql -rw-r----- 1 oracle oinstall 1715 Oct 15 2010 marker_status.sql -rwxr-x--- 1 oracle oinstall 9250398 Apr 23 2012 mgr -rw-r----- 1 oracle oinstall 213535 Jan 19 2012 notices.txt -rw-r----- 1 oracle oinstall 87966150 Sep 10 11:33 ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip -rwxr-x--- 1 oracle oinstall 4600385 Apr 23 2012 oggerr -rwxrwxrwx 1 oracle oinstall 220546 May 2 2012 OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf -rwxrwxrwx 1 oracle oinstall 93696 May 2 2012 Oracle GoldenGate 11.2.1.0.1 README.doc -rwxrwxrwx 1 oracle oinstall 24390 May 2 2012 Oracle GoldenGate 11.2.1.0.1 README.txt -rw-r----- 1 oracle oinstall 5364 Mar 22 2012 params.sql -rw-r----- 1 oracle oinstall 1272 Dec 28 2010 prvtclkm.plb -rwxr-x--- 1 oracle oinstall 1015 Apr 23 2012 pw_agent_util.sh -rw-r----- 1 oracle oinstall 2393 Apr 8 2011 remove_seq.sql -rwxr-x--- 1 oracle oinstall 27303957 Apr 23 2012 replicat -rwxr-x--- 1 oracle oinstall 4622859 Apr 23 2012 retrace -rwxr-x--- 1 oracle oinstall 654448 Apr 23 2012 reverse -rw-r----- 1 oracle oinstall 4375 Apr 8 2011 role_setup.sql -rw-r----- 1 oracle oinstall 34564 Nov 16 2011 sequence.sql -rwxr-x--- 1 oracle oinstall 11984721 Apr 23 2012 server -rw-r----- 1 oracle oinstall 248 Oct 15 2010 sqlldr.tpl -rw-r----- 1 oracle oinstall 759 Oct 15 2010 tcperrs -rw-r----- 1 oracle oinstall 16763 Mar 3 2012 ucharset.h -rw-r----- 1 oracle oinstall 6747 Aug 25 2011 ulg.sql drwxr-x--- 7 oracle oinstall 4096 Apr 23 2012 UserExitExamples -rw-r----- 1 oracle oinstall 28041 Dec 30 2011 usrdecs.h -rw-r----- 1 oracle oinstall 1476 Oct 15 2010 zlib.txt
3、執(zhí)行g(shù)gsci腳本,建立相關(guān)目錄
[oracle@rh7 ogg]$ ./ggsci Oracle GoldenGate Command Interpreter for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO Linux, x86, 32bit (optimized), Oracle 11g on Apr 23 2012 08:09:25 Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved. GGSCI (ogg) 2> help GGSCI Command Summary: Object: Command: SUBDIRS CREATE ER INFO, KILL, LAG, SEND, STATUS, START, STATS, STOP EXTRACT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, REGISTER, SEND, START, STATS, STATUS, STOP UNREGISTER EXTTRAIL ADD, ALTER, DELETE, INFO GGSEVT VIEW MANAGER INFO, SEND, START, STOP, STATUS MARKER INFO PARAMS EDIT, VIEW REPLICAT ADD, ALTER, CLEANUP, DELETE, INFO, KILL, LAG, SEND, START, STATS, STATUS, STOP REPORT VIEW RMTTRAIL ADD, ALTER, DELETE, INFO TRACETABLE ADD, DELETE, INFO TRANDATA ADD, DELETE, INFO SCHEMATRANDATA ADD, DELETE, INFO CHECKPOINTTABLE ADD, DELETE, CLEANUP, INFO Commands without an object: (Database) DBLOGIN, LIST TABLES, ENCRYPT PASSWORD, FLUSH SEQUENCE MININGDBLOGIN (DDL) DUMPDDL (Miscellaneous) FC, HELP, HISTORY, INFO ALL, OBEY, SET EDITOR, SHELL, SHOW, VERSIONS, ! (note: you must type the word COMMAND after the ! to display the ! help topic.) i.e.: GGSCI (sys1)> help ! command For help on a specific command, type HELP <command> <object>. Example: HELP ADD REPLICAT GGSCI (ogg) 3> create subdirs Creating subdirectories under current directory /u01/ogg Parameter files /u01/ogg/dirprm: already exists Report files /u01/ogg/dirrpt: created Checkpoint files /u01/ogg/dirchk: created Process status files /u01/ogg/dirpcs: created SQL script files /u01/ogg/dirsql: created Database definitions files /u01/ogg/dirdef: created Extract data files /u01/ogg/dirdat: created Temporary files /u01/ogg/dirtmp: created Stdout files /u01/ogg/dirout: created
GGSCI>create subdirs
--不需要指定路徑,默認(rèn)在當(dāng)前目錄下(所以進入ggsci的時候,一定要在gg的當(dāng)前目錄)
新建出來的目錄有:
name Purpose
--dirchk Checkpoint files存放檢查點(Checkpoint)文件 (和Oracle的checkpoint含義不同,如oralce的一個實例失敗,從最近一次的checkpoint開始recorver, oracle的一次checkpoint是讓dbwrt進程把被修改的數(shù)據(jù)從數(shù)據(jù)緩沖區(qū)中寫入數(shù)據(jù)文件。而OGG的checkpoint是OGG捕捉了很多事務(wù)日志,哪些被傳輸了,哪些未被傳輸。每隔一段時間,執(zhí)行一次checkpoint,之前的所有數(shù)據(jù)都要傳送過去。如果soure or target db斷電了,那下次啟動的時候,就要支持?jǐn)帱c續(xù)傳,那那個斷點位置就是最后一次OGG執(zhí)行checkpoint的位置)
--dirdat GoldenGate trails, 存放Trail與Extract文件
--dirdef Data Definition files,過DEFGEN工具生成的源或目標(biāo)的數(shù)據(jù)定義文件
--dirprm Parameter files, 存放參數(shù)文件
--dirpcs Process status files, 存放進程狀態(tài)文件
--dirrpt Report files, 存放進程報告文件
--dirsql SQL script files,存放SQL腳本文件
--dirtmp Temporary files,當(dāng)事務(wù)所需要的內(nèi)存超過已分配內(nèi)存時,缺省存儲于此
@至此,OGG在linux下安裝基本完成,后面將進入OGG的基本配置
分享題目:OracleGoldenGate學(xué)習(xí)之--基本概念和配置(2)
網(wǎng)站鏈接:http://jinyejixie.com/article6/ipigig.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作、Google、移動網(wǎng)站建設(shè)、云服務(wù)器、ChatGPT、App開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)