Oracle GoldenGate for Oracle 11g to PostgreSQL 9.2.4 Configuration(二)
file for the manager which at least contains a PORT number for the manager
GGSCI (ggos) 3> edit param mgr
add the following content to the parameter file
GGSCI (ggos) 2> view param mgr
PORT 7809
Save the parameter file, exit from the editor, start the manager and verify if it is running
GGSCI (ggos) 1> start mgr
Manager started.
GGSCI (ggos) 2> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (ggos) 3> info mgr
Manager is running (IP port ggos.7809).
Installing and setting up Oracle GoldenGate on the PostgreSQL machine
Then add the lib directory to the LD_LIBRARY_PATH and PATH
export LD_LIBRARY_PATH=/data/pgsql/lib:/data/pgsql/ggs/lib
export PATH=/data/pgsql/bin:/data/pgsql/ggs:$PATH
GoldenGate uses an ODBC connection to connect to the Postgres database. The ODBC driver is shipped with the installation and on Unix you have to create the ODBC configuration file which is commonly called odbc.ini on your own
Here the file I used
[postgres@ggpgt ggs]$ pwd
/data/pgsql/ggs
[postgres@ggpgt ggs]$ cat odbc.ini
[ODBC Data Sources]
GG_Postgres=DataDirect 6.1 PostgreSQL Wire Protocol
[ODBC]
IANAAppCodePage=106
InstallDir=/data/pgsql/ggs
[GG_Postgres]
Driver=/data/pgsql/ggs/lib/GGpsql25.so
Description=DataDirect 6.1 PostgreSQL Wire Protocol
Database=repdb
HostName=ggpgt
PortNumber=1521
LogonID=zwc
Password=zwc
Finally we need to export an ODBC environment variable which is called ODBCINI and points to the odbc.ini file we just created
export ODBCINI=/data/pgsql/ggs/odbc.ini
We've prepared the ODBC set up, now let's start with the GoldenGate set up. Similar to the installation on the Oracle database host we first create the GoldenGate subdirectories
[postgres@ggpgt ggs]$ ./ggsci
Oracle GoldenGate Command Interpreter
Version 11.2.1.0.2 OGGCORE_11.2.1.0.2T3_PLATFORMS_120724.2205
Linux, x64, 64bit (optimized), PostgreSQL on Jul 25 2012 00:32:24
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (ggpgt) 1> create subdirs
Creating subdirectories under current directory /data/pgsql/ggs
Parameter files /data/pgsql/ggs/dirprm: already exists
Report files /data/pgsql/ggs/dirrpt: created
Checkpoint files /data/pgsql/ggs/dirchk: created
Process status files /data/pgsql/ggs/dirpcs: created
SQL script files /data/pgsql/ggs/dirsql: created
Database definitions files /data/pgsql/ggs/dirdef: created
Extract data files /data/pgsql/ggs/dirdat: created
Temporary files /data/pgsql/ggs/dirtmp: created
Stdout files /data/pgsql/ggs/dirout: created
create the Manager parameter file and start the manager
GGSCI (ggpgt) 3> view param mgr
PORT 7809
Once we created the parameter file we can start the manager and check its status
GGSCI (ggpgt) 9> start mgr
Manager started.
GGSCI (ggpgt) 10> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
GGSCI (ggpg