- Oracle GoldenGate 11g Implementer's guide
- John P Jeffries
- 498字
- 2021-04-13 16:39:48
Preparation is the key to just about any task. Get the preparation right and you will be rewarded with the best results. This is also true for GoldenGate, where a number of fundamental areas need to be prepared before the installation can take place.
To successfully create, configure and start our Extract, Data Pump, and Replicat processes, it's important to configure the source database. As described in Chapter 1, Getting Started, GoldenGate relies on the database's changed data to accomplish data replication.
In order to extract the committed transactions from the source Oracle database's online redo logs, as a minimum the database must be configured for supplemental logging on Primary Key columns. This can be enabled at database level using the following DDL executed as SYSDBA:
[oracle@dbserver1 ggs]$ sqlplus '/as sysdba' SQL> alter database add supplemental log data (primary key) columns; Database altered
Initiate a log file switch to start supplemental logging:
SQL> alter system switch logfile; System altered.
The following SQL shows the result of enabling the supplemental logging:
SQL> select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI from v$database; SUPPLEME SUP SUP -------- --- --- IMPLICIT YES NO
We now need to configure GoldenGate to add supplemental log data to the source tables using GGSCI's ADD TRANDATA command. This is shown in the following example for the SCOTT.DEPT
and SCOTT.EMP
tables:
[oracle@dbserver1 ggs]$ ggsci GGSCI (dbserver1) 1> DBLOGIN USERID ggs_admin, PASSWORD ggs_admin Successfully logged into database. GGSCI (dbserver1) 2> ADD TRANDATA scott.DEPT Logging of supplemental redo data enabled for table SCOTT.DEPT. GGSCI (dbserver1) 3> ADD TRANDATA scott.EMP Logging of supplemental redo data enabled for table SCOTT.EMP.
The source database is now ready for data replication!
If you have a lot of tables in your source schema that you wish to replicate, then you could use SQL to generate the ADD TRANDATA statements. Log on to the source database schema using SQL*Plus and execute the following commands:
SQL> set pages 0 SQL> select 'ADD TRANDATA SRC.'||tname from tab;
GoldenGate relies heavily on TCP/IP networking and therefore must be configured correctly. In the earlier sections of this chapter, we configured a Data Pump process that sends data across a TCP/IP network from the source to the target system. In the Data Pump parameter file we specified a remote hostname, which must be resolved to an IP address.
On Linux, the hosts file provides the mapping between host and IP address. For example:
[oracle@dbserver1 ~]$ cat /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.1.65 dbserver1 192.168.1.66 dbserver2
In the case of a clustered environment, such as Oracle RAC, the hosts file must contain the Virtual IP (VIP) address of the remote nodes.
- 突破平面Photoshop UI界面設計與制作剖析
- UG NX10.0從新手到高手
- Oracle SOA Suite Developer's Guide
- Premiere Pro 2022短視頻剪輯、調色與特效制作實戰(全彩微課版)
- Core Data iOS Essentials
- Drools規則引擎技術指南
- 計算機圖形圖像處理Photoshop CS6項目教程
- Jetpack Compose:Android全新UI編程
- Building Websites with ExpressionEngine 1.6
- 好學、好用、好玩的Photoshop 寫給初學者的入門書(第4版)
- Excel 2010 Financials Cookbook
- 3ds Max 印象 影視粒子特效全解析
- Learning Ext JS
- AI賦能Rhino產品造型創意設計(視頻教學版)
- 前端函數式演進