Skip to Main Content

GoldenGate

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Golden Gate for MySQL to PostgreSQL replication

835233Oct 7 2015

Hi everyone,

I would like to setup real time replication between MySQL and PostgreSQL.

I'm using Centos 6.5

I have a problem in connecting to postgres from Oracle Golden Gate. Here is the error i'm getting.

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 (testmachine.net) 1> DBLogin SourceDB postgres, UserID postgres, Password postgres

2015-10-07 16:26:02  WARNING OGG-00552  Database operation failed: Couldn't connect to postgres. ODBC error: SQLSTATE 81 native database error 0. 523 80.

ERROR: Database operation failed: Couldn't connect to postgres. ODBC error: SQLSTATE 81 native database error 0. 523 80Failed to open data source postgres for user postgres.

I have installed postgres odbc connector(postgresql94-odbc.x86_64, postgresql94-odbc-debuginfo.x86_64) and unixodbc(2.2.14).

I did set up .bash_profile  as below

export LD_LIBRARY_PATH=/usr/pgsql-9.4/lib:/usr/lib64

export ODBCINI=/etc/odbc.ini

Here is my /etc/odbc.ini

[ODBC Data Sources]

postgres = ODBC for PostgreSQL

[postgres]

Driver = PostgreSQL

DriverUnicodeType=1

Description = ODBC for PostgreSQL

DSN=postgres

Servername = localhost

Port = 5432

Protocol = 9.4

UserName = postgres

Password = postgres

Database = postgres

ReadOnly = no

ServerType = Postgres

FetchBufferSize = 99

ServerOptions =

ConnectOptions =

Trace = 1

Debug = 1

[Default]

Driver = PostgreSQL

Here is /etc/odbcinst.ini

# Example driver definitions

# Driver from the postgresql-odbc package

# Setup from the unixODBC package

[PostgreSQL]

Description     = ODBC for PostgreSQL

Driver          = /usr/lib64/psqlodbc.so

Setup           = /usr/lib64/libodbcpsqlS.so

FileUsage       = 1

I can able to login into postgres as below.

[testmachine.net ~]# psql -U postgres -W -d postgres

Password for user postgres:

psql (9.4.4)

Type "help" for help.

postgres=#

.Can anyone suggest why i'm getting error in DBLOGIN command. Thing is isql command is executing successfully.

[testmachine.net ~]# isql postgres -v

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL>

Thanks in advance,

-DBA

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2015
Added on Oct 7 2015
0 comments
936 views