Re: GoldenGate woes with Postgres
Date: Thu, 11 Jan 2024 02:34:27 +0100
Message-ID: <CAFP4yMwGct_-K5o7aBU5Kc5WxFO2Hbsf7nNJWQZFG0oJtyfhtw_at_mail.gmail.com>
Are you using gg for postgresql ? (
https://download.oracle.com/otn/goldengate/21300/213000_ggs_Linux_x64_PostgreSQL_64bit.zip
)
If so, you don't have to download data direct drivers, gg is already
packaged with this driver.
There is as well a documentation how to configure database on linux:
https://docs.oracle.com/en/middleware/goldengate/core/21.3/gghdb/preparing-database-oracle-goldengate-postgresql.html#GUID-D995917F-3773-4B50-8897-9E33329DF352
rpm -qa|grep postgres
postgresql-private-libs-13.13-1.0.1.el9_3.x86_64 postgresql-13.13-1.0.1.el9_3.x86_64 postgresql-server-13.13-1.0.1.el9_3.x86_64 postgresql-odbc-12.02.0000-6.el9.x86_64 postgresql-contrib-13.13-1.0.1.el9_3.x86_64
cat /etc/oracle-release
Oracle Linux Server release 9.3
cat /etc/odbc.ini
[ODBC]
InstallDir=/u01/app/oracle/product/ogg_pgsql
IANAAppCodePage=4
[pgsql13]
Description = Test to Postgres Driver = /u01/app/oracle/product/ogg_pgsql/lib/GGpsql25.so DriverUnicodeType = 1 Trace = Yes TraceFile = sql.log Database = testdb Servername = localhost UserName = ogg LogonID = ogg Password = oracle Port = 5432 ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings =
GGSCI (muclx12.*******.***) 1> dblogin sourcedb pgsql13 userid ogg password oracle
2024-01-11 02:20:09 INFO OGG-03036 Database character set identified as UTF-8. Locale: en_US.UTF-8.
2024-01-11 02:20:09 INFO OGG-03037 Session character set identified as
UTF-8.
Successfully logged into database.
Regards
Maxim
On Wed, Jan 10, 2024 at 7:11 PM Mladen Gogala <gogala.mladen_at_gmail.com> wrote:
> I wanted to try GoldenGate replication with PostgreSQL. The extract and
> data pump processes should be on the Oracle side and the "replicat" (apply)
> process should be on the Postgres side. However, DBLOGIN SOURCEDB <dsn>
> USERID <usr> PASSWORD <pwd> fails with the following error:
>
>
> GGSCI (pgsql16.home.com) 1> dblogin sourcedb pgsql13 userid ggadmin
> password qwerty
>
> 2024-01-10 12:44:40 WARNING OGG-00552 Database operation failed:
> Couldn't connect to pgsql13. ODBC error: SQLSTATE 587 native database error
> 0. 523 586.
> Error: Database operation failed: Couldn't connect to pgsql13. ODBC error:
> SQLSTATE 587 native database error 0. 523 586Failed to open data source
> pgsql13 for user ggadmin
>
> PostgreSQL version is version 13 which should be supported for GG 21c.
>
> postgres=# select version();
>
> version
>
>
> --------------------------------------------------------------------------------
> ---------------------------
> PostgreSQL 13.13 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.4.1
> 20230605
> (Red Hat 11.4.1-2), 64-bit
> (1 row)
>
> At least the release notes say so. ODBC driver, used for the database
> connection, works like a charm:
>
> [postgres_at_pgsql16 data]$ isql pgsql13 scott tiger
> +---------------------------------------+
> | Connected! |
> | |
> | sql-statement |
> | help [tablename] |
> | quit |
> | |
> +---------------------------------------+
>
> My ODBCINI is in the PATH, LD_LIBRARY_PATH is set according to
> instructions. I am currently looking for work and cannot open a SR. My main
> suspect is the ODBC driver:
>
> [postgres_at_pgsql16 data]$ rpm -qa|grep postgres
> pcp-pmda-postgresql-6.0.5-4.0.1.el9.x86_64
> tuned-profiles-postgresql-2.21.0-1.0.1.el9_3.noarch
> postgresql13-libs-13.13-1PGDG.rhel9.x86_64
> postgresql13-13.13-1PGDG.rhel9.x86_64
> postgresql13-server-13.13-1PGDG.rhel9.x86_64
> postgresql13-contrib-13.13-1PGDG.rhel9.x86_64
> *postgresql13-odbc-16.00.0000-1PGDG.rhel9.x86_64*
> postgresql13-llvmjit-13.13-1PGDG.rhel9.x86_64
>
> All examples I've seen were with Data Direct ODBC drivers. I installed the
> original ODBC driver, which comes with the Postgres software. The whole rig
> is running on top of OL 9.3. I've attached my odbc.ini
>
> Does anyone have experience with this kind of replication? I could use
> some help. I will download Data Direct ODBC driver but would like to know
> whether I'm looking in the right direction.
>
> Regards
>
> --
> Mladen Gogala
> Database Consultant
> Tel: (347) 321-1217https://dbwhisperer.wordpress.com
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 11 2024 - 02:34:27 CET