手把手教你生产安装goldengate的步骤.docx

上传人:小飞机 文档编号:1944572 上传时间:2022-12-27 格式:DOCX 页数:65 大小:2.13MB
返回 下载 相关 举报
手把手教你生产安装goldengate的步骤.docx_第1页
第1页 / 共65页
手把手教你生产安装goldengate的步骤.docx_第2页
第2页 / 共65页
手把手教你生产安装goldengate的步骤.docx_第3页
第3页 / 共65页
手把手教你生产安装goldengate的步骤.docx_第4页
第4页 / 共65页
手把手教你生产安装goldengate的步骤.docx_第5页
第5页 / 共65页
点击查看更多>>
资源描述

《手把手教你生产安装goldengate的步骤.docx》由会员分享,可在线阅读,更多相关《手把手教你生产安装goldengate的步骤.docx(65页珍藏版)》请在三一办公上搜索。

1、目录1. 安装配置GoldenGate31.1. 设置环境变量31.1.1. 官方资料31.1.2. 源端10.34.1.1机器71.1.3. 源端10.34.1.1上增加tns解析81.1.4. 修改10.34.1.1上ASM数据库的参数91.1.5. 目标端10.34.1.72机器101.2. 安装GG(只在小机1和分析2上建)111.3. 官方系统要求131.4. 目标机器manager进程添加到Windows服务161.5. GoldenGate相关命令171.6. 数据库准备191.6.1. 源数据库要开归档191.6.2. 打开数据库级别的补充日志(supplemental log

2、)191.6.3. 在源端和目标端创建GoldenGate管理用户,并授权201.6.4. 官方技术要求211.6.5. 数据库字符集检查271.7. 在源端添加表级的transdata281.8. 在目标端添加checkpoint表291.9. 源端配置MGR管理进程组301.9.1. 配置参数文件301.9.2. 官方技术要求311.9.3. 使用GGSCI命令管理MGR331.10. 源端配置Extract抽取进程组351.10.1. 创建和编辑Extract进程配置文件351.10.2. Extract相关命令361.11. 源端配置Pump投递进程组371.11.1. 创建和编辑Pu

3、mp进程配置文件371.11.2. 使用GGSCI命令管理Pump381.12. 目标端创建和配置MGR管理进程组391.13. 目标端配置Replicat复制进程组401.14. 验证DML复制结果411.15. 增加表进行监控的方法422. 安装配置Director432.1. 安装配置Director Server432.1.1. 安装前准备432.1.2. 启动weblogic server472.1.3. 登入服务端472.2. 安装配置Director Client482.2.1. 安装客户端。482.2.2. 登陆信息482.2.3. 配置监控的页面492.2.4. 启动监控50

4、2.2.5. 登录页面进行监控512.3. 安装配置Monitor52651. 安装配置GoldenGate1.1. 设置环境变量设置ORACLE_HOME和ORACLE_SID1.1.1. 官方资料To specify Oracle variables on UNIX-based systemsIf there is one instance of Oracle on the system, you only need to set ORACLE_HOME andORACLE_SID at the system level. If you cannot set them that way,

5、use the following SETENVstatements in the parameter every Extract and Replicat group that will beconnecting to the instance.SETENV (ORACLE_HOME = “”)SETENV (ORACLE_SID = “”)These parameters override the system settings and allow the Oracle GoldenGateprocess to set the variables at the session level

6、when it connects to the database.If there are multiple Oracle instances on the system with Extract and Replicatprocesses connecting to them, you will need to use a SETENV statement in the parameter each process group and point it to the correct instance. For example, thefollowing shows parameter fil

7、es for two Extract groups, each capturing from a differentOracle instance.Group 1:EXTRACT ora9aSETENV (ORACLE_HOME = “/home/oracle/ora9/product”)SETENV (ORACLE_SID = “ora9a”)USERID ggsa, PASSWORD ggsaRMTHOST sysbRMTTRAIL /home/ggs/dirdat/rtTABLE hr.emp;TABLE hr.salary;Group 2:EXTRACT ora9bSETENV (OR

8、ACLE_HOME = “/home/oracle/ora9/product”)SETENV (ORACLE_SID = “ora9b”)USERID ggsb, PASSWORD ggsbRMTHOST sysbRMTTRAIL /home/ggs/dirdat/stTABLE fin.sales;TABLE fin.cust;To specify Oracle variables on Windows systemsIf there is one instance of Oracle on the system, the Registry settings for ORACLE_HOMEa

9、nd ORACLE_SID should be sufficient for Oracle GoldenGate. If those settings areincorrect in the Registry and cannot be changed, you can set an override as follows.On the desktop or Start menu (depending on the Windows version), right-click MyComputer, and then select Properties.In Properties, click

10、the Advanced tab.Click Environment Variables.Under System Variables, click New.For Variable Name, type ORACLE_HOME.For Variable Value, type the path to the Oracle binaries.Click OK.Click New again.For Variable Name, type ORACLE_SID.For Variable Value, type the instance name.Click OK.If there are mul

11、tiple Oracle instances on the system with Extract and Replicatprocesses connecting to them, do the following.Use the preceding procedure (single Oracle instance on system) to set theORACLE_HOME and ORACLE_SID system variables to the first Oracle instance.Start all of the Oracle GoldenGate processes

12、that will connect to that instance.Repeat the procedure for the next Oracle instance, but this time Edit the existingORACLE_HOME and ORACLE_SID variables to specify the new information.Start the Oracle GoldenGate processes that will connect to that instance.Repeat the Edit and startup procedure for

13、the rest of the Oracle instances.Setting library paths for dynamic builds on UNIX systemsOracle GoldenGate uses shared libraries. When you install Oracle GoldenGate on a UNIXsystem, the following must be true before you run GGSCI or any other Oracle GoldenGateprocess.1.When Oracle GoldenGate connect

14、s to the database locally, all of the following musthave the same bit type, either all 32-bit, all 64-bit, or all IA64:2.When Oracle GoldenGate connects through SQL*Net, the Oracle client library and theOracle GoldenGate build must match. This means that the Oracle version, the bit type(32-bit, 64-b

15、it, IA64) and the operating system version all must match. If you are usingthe TRANLOGOPTIONS parameter with the LOGSOURCE option and Oracle GoldenGateconnects to transaction logs from a different operating system, the Oracle versionsmust also be the same.3.Make certain that the database libraries a

16、re added to the shared-library environmentvariables of the system. This procedure is usually performed at database installationtime. Consult your Database Administrator if you have any questions.4.If you will be running an Oracle GoldenGate program from outside the OracleGoldenGate installation dire

17、ctory on a UNIX system:(Optional) Add the Oracle GoldenGate installation directory to the PATHenvironment variable.(Required) Add the Oracle GoldenGate installation directory to the shared-libraries environment variable.For example, given an Oracle GoldenGate installation directory of /ggs/10.0, the

18、 secondcommand in the following table requires these variables to be set:To set the variables in Korn shellPATH=:$PATHexport PATH=:$export To set the variables in Bourne shellexport PATH=:$PATHexport =:$To set the variables in C shellsetenv PATH :$PATHsetenv :$1.1.2. 源端10.34.1.1机器创建GG用户,密码ggmkdir /h

19、ome/gguseradd -d /home/gg -g oinstall -G dba ggpasswd gg修改配置文件增加如下配置:export ORACLE_SID=jiesuan1export ORACLE_BASE=/opt/oracle/app/oracleexport ORACLE_HOME=/opt/oracle/app/oracle/11.2.0export ORACLE_UNQNAME=jiesuanexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHexport PATH=$ORACLE_HOME/bin:$P

20、ATHexport LD_LIBRARY_PATH=/opt/oracle/app/oracle/11.2.0/lib:/bak/gg:$LD_LIBRARY_PATHumask 0221.1.3. 源端10.34.1.1上增加tns解析使用oracle用户,修改/opt/oracle/app/oracle/11.2.0/network/admin目录中的tnsnames.ora文件。增加以下内容:asm = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.34.1.1)(PORT = 1521) (CONNECT_DATA = (SE

21、RVICE_NAME = +asm) (UR = A) ) )使用sqlplus sys/asmjsdbasm as sysdba 命令,看是否能连接到数据库。1.1.4. 修改10.34.1.1上ASM数据库的参数1) 使用grid用户登录是id命令可以看当前用户2) 修改参数remote_login_passwordfilealter system set remote_login_passwordfile = shared scope=spfile;3) 重启数据库用root用户操作。 crsctl stop crs -f crsctl start crsshutdown -r (不能用

22、reboot)Crsctl stop1.1.5. 目标端10.34.1.72机器设置环境变量ORACLE_HOME=e:appAdministratorproduct11.2.0dbhome_1ORACLE_SID=fenxiDB2重启服务器C:UsersAdministratorecho %ORACLE_HOME%C:appAdministratorproduct11.2.0dbhome_1C:UsersAdministratorecho %ORACLE_SID%JSDB1421.2. 安装GG(只在小机1和分析2上建)1) 解压GG软件到f:gg目录(分析服务器2),bakgg目录(小机1

23、)2) 用cmd命令,进入f:gg目录中,敲“GGSCI”命令3) 敲“CREATE SUBDIRS”命令10.34.1.1机器截图1034.1.72机器截图1.3. 官方系统要求每个GoldenGate实例可以支持并发500个Extract和Replicat进程。每个Extract和Replicat进程需要大约25-55MB内存,这取决于transaction的大小和并发transaction数量。工作目录每个GoldenGate实例的工作目录,大约需要40M的空间。辅助空间这部分空间主要存放Tails,它包含了工作数据。这部分空间的消耗取决于Trail,依赖于将要处理的数据量。可以保持7-

24、10天的GoldenGate队列文件即可。对于RAC环境GoldenGate的相关软件和工作目录都需要配置在共享盘中,从而保证对所有node都是可用的,从任何一个node都可以启动GoldenGate的进程,当其中一个node出现异常是,可以在剩余的node启动而无须修改任何配置参数。否则,如果运行在单个node上的话,需要将剩余node中的归档日志通过一定的技术共享出来并加载到GoldenGate运行节点。必须两台机子保持时钟同步。GoldenGate一个Port用于Manager Process之间通信(Source和Target),本地进程间通信使用的端口范围:缺省范围从7809开始,或

25、者可以定义一个从7809+256的端口。Oracle GoldenGate parameters settings for RACOn AIX and Solaris machines, use the Extract parameter THREADOPTIONS with theBINDCPU option. This parameter handles thread-safety issues related to memorythat is updated by different processors.Oracle GoldenGate queues data in memory b

26、efore sending it to the target system. TheINQUEUESIZE and OUTQUEUESIZE options of the THREADOPTIONS parameter determine howmuch data to queue. If needed, you can increase the performance of Extract on OracleRAC by tuning these parameters.Oracle GoldenGate detects orphaned transactions, which can occ

27、ur when a node failsduring a transaction and Extract cannot capture the rollback. Although the databaseperforms the rollback on the failover node, the transaction would otherwise remain inthe Extract transaction list indefinitely and prevent further checkpointing for theExtract thread that was proce

28、ssing the transaction. By default, Oracle GoldenGatepurges these transactions from its list after they are confirmed as orphaned. To controlthis behavior, use the TRANLOGOPTIONS parameter with the PURGEORPHANEDTRANSACTIONS| NOPURGEORPHANEDTRANSACTIONS and TRANSCLEANUPFREQUENCY options. This function

29、alitycan be controlled on demand with the SEND EXTRACT command in GGSCI.Special procedures on RACIf the primary database instance against which Oracle GoldenGate is running stops orfails for any reason, Extract will abend. To resume processing, you can restart theinstance, or you can mount the Oracl

30、e GoldenGate binaries to another node where thedatabase is running and then restart the Oracle GoldenGate processes. Stop theManager process on the original node before starting Oracle GoldenGate processesfrom another node.Any time the number of redo threads changes, the Extract group must be droppe

31、d andre-created. For the recommended procedure, see the Oracle GoldenGate Windows andUNIX Administrators Guide.To write SQL operations to the trail, Extract must verify that there are no otheroperations from other RAC nodes that precede those in the current redo log that it isreading. For example, i

32、f a log contains operations that were performed from 1:00 a.m.to 2:00 a.m., and the log from Node 2 contains operations that were performed from1:30 a.m. to 2:30 a.m., then only those operations up to, and including, the 2:00 a.m.one can be moved to the server where the main Extract is coordinating

33、the redo data.Extract must ensure that there are no more operations between 2:00 a.m. and 2:30 a.m.that need to be captured.In active-passive environments, the preceding requirement means that you might needto perform some operations and archive log switching on the passive node to ensurethat operat

34、ions from the active node are passed to the passive node. This eliminatesany issues that could arise from a slow archiver process, failed network links, and otherlatency issues caused by moving archive logs from the Oracle nodes to the server wherethe main Extract is coordinating the redo data.To pr

35、ocess the last transaction in a RAC cluster before shutting down Extract, insert adummy record into a source table that Oracle GoldenGate is replicating, and thenswitch log files on all nodes. This will update the Extract checkpoint and confirm to theprocess that all available archive logs are avail

36、able to read. It also confirms that alltransactions in those archive logs are captured and written to the trail in the correctorder.对于ASM环境GoldenGate的Extract进程需要一个用户来访问ASM实例,所以可以使用sys用户或其他具有sysdba/sysasm权限的用户来连接到ASM实例。对于ASM user,可以通过TRANLOGOPTIONS(带有ASMUSER和ASMPASSWORD选项)参数来配置。操作系统要求To install on Wi

37、ndows, the user installing Oracle GoldenGate must log in as Administrator.To install on UNIX, the user installing Oracle GoldenGate must have read and write privileges on the Oracle GoldenGate installation directory.The Oracle GoldenGate processes require an operating system user that has privileges

38、 to read, write, and delete files and subdirectories in the Oracle GoldenGate directory. In addition, the user for the Manager process requires privileges to control OracleGoldenGate processes.The Extract process requires an operating system user that has read access to thetransaction log files, bot

39、h online and archived. On UNIX systems, that user must be a member of the group that owns the Oracle instance. If you install the Manager process as a Windows service during the installation steps in this documentation, you must install as Administrator for the correct permissions to be assigned. If

40、 you cannot install Manager as a service, assign read access to Extract manually, and then run Manager and Extract as Administrator whenever you start them.Dedicate these operating system users to Oracle GoldenGate. Sensitive informationmight be available to anyone who runs an Oracle GoldenGate proc

41、ess, depending onhow database authentication is configured.Before installing Oracle GoldenGate on a Windows system, install and configure the Microsoft Visual C + 2005 SP1 Redistributable Package. Make certain it is the SP1 version of this package, and make certain to get the correct bit version for

42、 your server. This package installs runtime components of Visual C+ Libraries. For more information, and to download this package, go to .1.4. 目标机器manager进程添加到Windows服务1) 在目标机子上配置,进入ggsci命令界面2) 输入“EDIT PARAMS ./GLOBALS”命令,注意:./GLOBALS最好使用大写3) 输入“MGRSERVNAME GGSMGR” ,系统默认的名字是“GGSMGR”4) 输入“exit”命令5) 输

43、入“install addservice”命令1.5. GoldenGate相关命令1.6. 数据库准备1.6.1. 源数据库要开归档已经开启1.6.2. 打开数据库级别的补充日志(supplemental log) SQL select supplemental_log_data_min from v$database; SUPPLEMENTAL_LOG_DATA_MIN-NO SQL alter database add supplemental log data; Database altered SQL select supplemental_log_data_min from v$d

44、atabase; SUPPLEMENTAL_LOG_DATA_MIN-YES SQL 1.6.3. 在源端和目标端创建GoldenGate管理用户,并授权源端create user ggs identified by ggs default tablespace GGS temporary tablespace TEMPB;grant dba to ggs;目标端:create user ggs identified by ggs default tablespace ggs temporary tablespace TEMPa;grant dba to ggs;1.6.4. 官方技术要求Di

45、sabling triggers and cascade delete constraintsYou have the following options to handle triggers and integrity constraints on the target:For Oracle 10.2.0.5 and later patches, and for Oracle 11.2.0.2 and later, you can use theReplicat parameter DBOPTIONS with the SUPPRESSTRIGGERS option to cause Replicat todisable the triggers during its session.主要参加官方安装

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号