手把手教你生产安装goldengate的步骤---最终版_第1页
手把手教你生产安装goldengate的步骤---最终版_第2页
手把手教你生产安装goldengate的步骤---最终版_第3页
手把手教你生产安装goldengate的步骤---最终版_第4页
手把手教你生产安装goldengate的步骤---最终版_第5页
已阅读5页,还剩66页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、目录1. 安装配置 GoldenGate 31.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. 源数据库要开归档 19

2、1.6.2. 打开数据库级别的补充日志( supplemental log) 191.6.3. 在源端和目标端创建 GoldenGate 管理用户,并授权 201.6.4. 官方技术要求 211.6.5. 数据库字符集检查 271.7. 在源端添加表级的 transdata 281.8. 在目标端添加 checkpoint 表 291.9. 源端配置 MGR 管理进程组 301.9.1. 配置参数文件 301.9.2. 官方技术要求 311.9.3. 使用 GGSCI 命令管理 MGR 331.10. 源端配置 Extract 抽取进程组 351.10.1. 创建和编辑 Extract 进程配

3、置文件 351.10.2. Extract 相关命令 361.11. 源端配置 Pump 投递进程组 401.11.1. 创建和编辑 Pump 进程配置文件 401.11.2. 使用 GGSCI 命令管理Pump 411.12. 目标端创建和配置 MGR 管理进程组 421.13. 目标端配置 Replicat 复制进程组 431.14. 验证 DML 复制结果 481.15. 增加表进行监控的方法 492. 安装配置 Director 512.1. 安装配置Director Server 512.1.1. 安装前准备 512.1.2. 启动 weblogic server 552.1.3.

4、登入服务端 552.2. 安装配置Director Client 562.2.1. 安装客户端。 562.2.2. 登陆信息 562.2.3. 配置监控的页面 572.2.4. 启动监控 582.2.5. 登录页面进行监控 592.3. 安装配置Monitor 601. 安装配置 GoldenGate1.1. 设置环境变量设置 ORACLE_HOME 和 ORACLE_SID1.1.1. 官方资料To specify Oracle variables on UNIX-based systems If there is one instance of Oracle on the system,

5、you only need to set ORACLE_HOME and ORACLE_SID at the system level. If you cannot set them that way, use the following SETENV statements in the parameter file of every Extract and Replicat group that will be connecting to the instance.SETENV (ORACLE_HOME = “ ”) SETENV (ORACLE_SID = “ ”)These parame

6、ters override the system settings and allow the Oracle GoldenGate process to set the variables at the session level when it connects to the database. If there are multiple Oracle instances on the system with Extract and Replicat processes connecting to them, you will need to use a SETENV statement i

7、n the parameter file of each process group and point it to the correct instance. For example, the following shows parameter files for two Extract groups, each capturing from a different Oracle instance.Group 1:EXTRACT ora9a SETENV (ORACLE_HOME = “ /home/oracle/ora9/product ”) SETENV (ORACLE_SID = “

8、ora9a” )USERID ggsa, PASSWORD ggsa RMTHOST sysbRMTTRAIL /home/ggs/dirdat/rt TABLE hr.emp;TABLE hr.salary;Group 2:EXTRACT ora9bSETENV (ORACLE_HOME = “ /home/oracle/ora9/product ”)SETENV (ORACLE_SID = “ora9b” )USERID ggsb, PASSWORD ggsbRMTHOST sysbRMTTRAIL /home/ggs/dirdat/stTABLE fin.sales;TABLE fin.

9、cust;To specify Oracle variables on Windows systems If there is one instance of Oracle on the system, the Registry settings for ORACLE_HOME and ORACLE_SID should be sufficient for Oracle GoldenGate. If those settings are incorrect in the Registry and cannot be changed, you can set an override as fol

10、lows.? On the desktop or Start menu (depending on the Windows version), right-click My Computer, and then select Properties.? In Properties, click the Advanced tab.? Click Environment Variables.? Under System Variables, click New.? For Variable Name, type ORACLE_HOME.? For Variable Value, type the p

11、ath 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 multiple Oracle instances on the system with Extract and Replicat processes connecting to them, do the following.? Use the preceding proc

12、edure (single Oracle instance on system) to set the ORACLE_HOME and ORACLE_SID system variables to the first Oracle instance.? Start all of the Oracle GoldenGate processes that will connect to that instance.? Repeat the procedure for the next Oracle instance, but this time Edit the existing ORACLE_H

13、OME 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 the rest of the Oracle instances.Setting library paths for dynamic builds on UNIX systemsOracle GoldenGate uses shared li

14、braries. When you install Oracle GoldenGate on a UNIX system, the following must be true before you run GGSCI or any other Oracle GoldenGate process.1.When Oracle GoldenGate connects to the database locally, all of the following must have the same bit type, either all 32-bit, all 64-bit, or all IA64

15、:2.When Oracle GoldenGate connects through SQL*Net, the Oracle client library and the Oracle GoldenGate build must match. This means that the Oracle version, the bit type (32-bit, 64-bit, IA64) and the operating system version all must match. If you are using the TRANLOGOPTIONS parameter with the LO

16、GSOURCE option and Oracle GoldenGate connects to transaction logs from a different operating system, the Oracle versions must also be the same.3. Make certain that the database libraries are added to the shared-library environment variables of the system. This procedure is usually performed at datab

17、ase installation time. Consult your Database Administrator if you have any questions.4.If you will be running an Oracle GoldenGate program from outside the Oracle GoldenGate installation directory on a UNIX system:? (Optional) Add the Oracle GoldenGate installation directory to the PA TH environment

18、 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 second command in the following table requires these variables to be set:To set the variables in Korn

19、 shellPATH=:$PATHexport PATH=:$ export To set the variables in Bourne shellexport PATH=:$PA THexport =:$To set the variables in C shellsetenv PATH :$PATHsetenv :$61.1.2. 源端 10.34.1.1 机器创建 GG 用户,密码 gg mkdir /home/gguseradd -d /home/gg -g oinstall -G dba gg passwd gg修改配置文件增加如下配置:export ORACLE_SID=jies

20、uan1export ORACLE_BASE=/opt/oracle/app/oracleexport ORACLE_HOME=/opt/oracle/app/oracle/11.2.0export ORACLE_UNQNAME=jiesuanexport LD_LIBRARY_PA TH=$ORACLE_HOME/lib:$LD_LIBRARY_PA THexport PATH=$ORACLE_HOME/bin:$PA THexport LD_LIBRARY_PA TH=/opt/oracle/app/oracle/11.2.0/lib:/bak/gg:$LD_LIBRARY_PATH um

21、ask 0221.1.3. 源端 10.34.1.1 上增加 tns 解析tnsnames.ora文件。使用 oracle 用户,修改 /opt/oracle/app/oracle/11.2.0/network/admin 目录中的 增加以下内容:asm =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.34.1.1)(PORT = 1521)(CONNECT_DA TA =(SERVICE_NAME = +asm)(UR = A)使用 sqlplus sys/asmjsdbasm as sysdba 命令,看是否能连接到数据库。1.1.

22、4. 修改 10.34.1.1 上 ASM 数据库的参数1) 使用 grid 用户登录是 id 命令可以看当前用户2)修改参数 remote_login_passwordfile alter system set remote_login_passwordfile = shared scope=spfile;3) 重启数据库 用 root 用户操作。crsctlstopcrs -fcrsctlstartcrsshutdown-r(不能用 reboot)Crsctl stop91.1.5. 目标端 10.34.1.72 机器设置环境变量ORACLE_HOME =e:appAdministrato

23、rproduct11.2.0dbhome_1ORACLE_SID=fenxiDB2重启服务器C:UsersAdministrator echo %ORACLE HOME%C:appAdministratorproduct11.2.0dbhome 1C:UsersAdministrator echo %ORACLE SID%JSDB142101.2. 安装 GG (只在小机 1和分析 2 上建)1)解压 GG 软件到 f:gg 目录(分析服务器 2), bakgg 目录(小机 1)2)用 cmd 命令,进入 f:gg 目录中,敲“ GGSCI ”命令3) 敲“ CREATE SUBDIRS ”命

24、令10.34.1.1 机器截图111034.1.72 机器截图121.3. 官方系统要求每个 GoldenGate 实例可以支持并发 500 个 Extract 和 Replicat 进程。每个 Extract 和 Replicat 进程需要大约 25-55MB 内存,这取决于 transaction 的大小和并发 transaction 数量。 工作目录每个 GoldenGate实例的工作目录,大约需要 40M 的空间。辅助空间 这部分空间主要存放 Tails,它包含了工作数据。这部分空间的消耗取决于Trail ,依赖于将要处理的数据量。可以保持 7-10 天的 GoldenGate 队列文

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

26、围从7809开始,或者可以定义一个从 7809+256 的端口。Oracle GoldenGate parameters settings for RAC On AIX and Solaris machines, use the Extract parameter THREADOPTIONS with the BINDCPU option. This parameter handles thread-safety issues related to memory that is updated by different processors. Oracle GoldenGate queues

27、data in memory before sending it to the target system. The INQUEUESIZE and OUTQUEUESIZE options of the THREADOPTIONS parameter determine how much data to queue. If needed, you can increase the performance of Extract on Oracle RAC by tuning these parameters. Oracle GoldenGate detects orphaned transac

28、tions, which can occur when a node fails during a transaction and Extract cannot capture the rollback. Although the database performs the rollback on the failover node, the transaction would otherwise remain in the Extract transaction list indefinitely and prevent further checkpointing for the Extra

29、ct thread that was processing the transaction. By default, Oracle GoldenGate purges these transactions from its list after they are confirmed as orphaned. To control this behavior, use the TRANLOGOPTIONS parameter with the PURGEORPHANEDTRANSACTIONS | NOPURGEORPHANEDTRANSACTIONSand TRANSCLEANUPFREQUE

30、NCYoptions. This functionalitycan be controlled on demand with the SEND EXTRACT command in GGSCI.13Special procedures on RAC If the primary database instance against which Oracle GoldenGate is running stops or fails for any reason, Extract will abend. To resume processing, you can restart the instan

31、ce, or you can mount the Oracle GoldenGate binaries to another node where the database is running and then restart the Oracle GoldenGate processes. Stop the Manager process on the original node before starting Oracle GoldenGate processes from another node. Any time the number of redo threads changes

32、, the Extract group must be dropped and re-created. For the recommended procedure, see the Oracle GoldenGate Windows and UNIX Administrator s Guide. To write SQL operations to the trail, Extract must verify that there are no other operations from other RAC nodes that precede those in the current red

33、o log that it is reading. For example, if 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 from 1: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 ser

34、ver where the main Extract is coordinating 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 need to perform some operations and archive log swi

35、tching on the passive node to ensure that operations from the active node are passed to the passive node. This eliminates any issues that could arise from a slow archiver process, failed network links, and other latency issues caused by moving archive logs from the Oracle nodes to the server where t

36、he main Extract is coordinating the redo data. To process the last transaction in a RAC cluster before shutting down Extract, insert a dummy record into a source table that Oracle GoldenGate is replicating, and then switch log files on all nodes. This will update the Extract checkpoint and confirm t

37、o the process that all available archive logs are available to read. It also confirms that all transactions in those archive logs are captured and written to the trail in the correct order.14对于 ASM 环境GoldenGate 的 Extract 进程需要一个用户来访问 ASM 实例, 所以可以使用 sys 用户或其他具有 sysdba/sysasm权限的用户来连 接到 ASM 实例。对于 ASM us

38、er,可以通过 TRANLOGOPTIONS (带有 ASMUSER 和 ASMPASSWORD 选项)参数来配置。操作系统要求 To install on Windows, the user installing Orac le 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.

39、The Oracle GoldenGate processes require an operating system user that has privileges 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 re

40、quires an operating system user that has read access to thetransaction log files, both 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 documentatio

41、n, you must install as Administrator for the correct permissions to be assigned. If 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.

42、Sensitive informationmight be available to anyone who runs an Or acle GoldenGate process, 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 i

43、s the SP1 version of this package, and make certain to get the correct bit version for your server. This package installs runtime components of Visual C+ Libraries. For more information, and to download this package, go to .151.4. 目标机器 manager 进程添加到 Windows 服务1) 在目标机子上配置,进入 ggsci 命令界面2) 输入“ EDIT PAR

44、AMS ./GLOBALS ”命令,注意: ./GLOBALS 最好使用大写3) 输入“ MGRSERVNAME GGSMGR ” ,系统默认的名字是“ GGSMGR ”4) 输入“ exit ”命令5) 输入“ install addservice ”命令161.5. GoldenGate 相关命令17181.6. 数据库准备1.6.1. 源数据库要开归档supplemental log )已经开启1.6.2. 打开数据库级别的补充日志(SQL select supplemental_log_data_min from v$database;SUPPLEMENTAL_LOG_DATA_MIN

45、NOSQL alter database add supplemental log data;Database alteredSQL select supplemental_log_data_min from v$database;SUPPLEMENTAL_LOG_DATA_MINYESSQL191.6.3. 在源端和目标端创建 GoldenGate 管理用户,并授权creategrantuser ggs identified by ggs dba to ggs;defaulttablespaceGGS temporarytablespace目标端:createuser ggs identif

46、ied by ggsdefaulttablespaceggstemporarytablespace源端grant dba to ggs;TEMPB;TEMPa;201.6.4. 官方技术要求212223Disabling 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.

47、0.2 and later, you can use the Replicat parameter DBOPTIONS with the SUPPRESSTRIGGERS option to cause Replicat to disable the triggers during its session.主要参加官方安装文档第 43 页左右2425261.6.5. 数据库字符集检查SETENV (NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK)小机分析数据库271.7. 在源端添加表级的 transdata例如:添加“ scott”对像中的表回头在这

48、里试试添加新的表。add trandata qy.aadd trandata qy.b1.8. 查询数据库对哪些表添加了附加日志SELECT owner,table_name,log_group_name FROM dba_log_groupsWHERE owner=DZZWUSER ;281.9. 在目标端添加 checkpoint 表在目标机器上的 GLOBALS 文件中加入,添加一行, “ checkpointtable ggs.checkpoint291.10. 源端配置 MGR 管理进程组在源端和目标端 都必须要有的,他负责启动 GoldenGate 进程,已经相关的动态进程、 tr

49、ail 文件的管理、以及错误信息报告 等。1.10.1. 配置参数文件进入 ggsci , edit params mgr ,在弹出的文件里添加需要的参数内容。port 7809dynamicportlist 7840-7880purgeoldextracts /bak/gg/dirdat/et* , USECHECKPOINTS , MINKEEPDAYS 3autostart extract *autorestart extract *,waitminutes 2, retries 360,resetminutes 60管理端口 7809动态通信端口 7840-7880 动态通信端口分配前

50、延时 3600 秒,重新制定一次 自动清除已经使用过的 tail 文件Mgr 启动后,自动启动 extract 进程组Mgr 启动后,自动重启 extract 进程组7809GoldenGate 一个 Port 用于 Manager Process 之间通信( Source 和 Target),本地进程间通信使用的端口范围:缺省范围从 开始,或者可以定义一个从 7809+256 的端口。Port 表示 MGR 进程通信的端口号,必须存在。dynamicportlist 表示 manager 进程可以为源端和目标端的动态通信动态的指定端口。30autorestart extract 表示自动重启

51、 extract 进程组,每次尝试的时间间隔为 2 分钟,最大尝试 360 次,如果没有成功则放弃 分钟清零。301.10.2. 官方技术要求Configuring ManagerTo configure Manager, create a parameter file by following these steps. If you installed Oracle GoldenGate on a UNIX cluster, configure the Oracle GoldenGate Manager process within the cluster application as di

52、rected by the vendor s documentation, so that Oracle GoldenGate will fail over properly with the other applications.To configure Manager1.From the Oracle GoldenGate directory, run the ggsci program to open the Oracle GoldenGate Software Command Interface, commonly known as GGSCI.2.In GGSCI, issue the following command to edit the Manager parameter file. EDIT PARAMS MGR3.Add the following parameter to specify the Manager port number.PORT PORT defines the port number on which Manager runs on the local system. The default port is 7809. Y

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论