cancel
Showing results for 
Search instead for 
Did you mean: 

EDB Replication between Oracle and Postgres

Adventurer

EDB Replication between Oracle and Postgres

Hello...I'm in need of help if someone can help.

 

I am testing out EDB Replication Server to see if it will fulfill our needs.  I have the following setup.

1. Oracle 11g Server (Physical Server)

2. Postgres 10 (Docker) - **not EDB Postgres (I read that the replication tool can replicate to the regular version of Postgres.  If this use is incorrect, please let me know).

3. xDB Replication Publication Server, Subscription Server and Console (Windows)

 

I have been able to successfully install the Publication Server and Subscription Server.  I have created a publication from my Oracle Server and a subscription to my Postgres Server.  When I try and create a snapshot, I get an error regarding the schema that the server is replicating to.

 

Capture.JPG

 

I have tried to drop the schema in the Postgres DB and take a snapshot, but I get this error.

Enabling FK constraints & triggers on cimsmgr.cdbcase...
Error: ERROR: relation "cimsmgr.cdbcase" does not exist at position 186
Update pg_catalog.pg_class set relhastriggers = case when (select pg_catalog.count(*) FROM pg_catalog.pg_trigger where pg_class.oid = tgrelid) > 0 then true else false end where oid = 'cimsmgr.cdbcase':Smiley Tongueg_catalog.regclass
^
Stack Trace:
java.sql.SQLException: ERROR: relation "cimsmgr.{table name}" does not exist at position 186
Update pg_catalog.pg_class set relhastriggers = case when (select pg_catalog.count(*) FROM pg_catalog.pg_trigger where pg_class.oid = tgrelid) > 0 then true else false end where oid = 'cimsmgr.{table name}':Smiley Tongueg_catalog.regclass
^
at com.edb.common.MTKMetaData.executeScript(MTKMetaData.java:1046)
at com.edb.MigrationToolkit.enableTableContraints(MigrationToolkit.java:4974)
at com.edb.MigrationToolkit.restoreAllTablesConstsAndIndexes(MigrationToolkit.java:3783)
at com.edb.MigrationToolkit.copyTables(MigrationToolkit.java:3659)
at com.edb.MigrationToolkit.main(MigrationToolkit.java:1570)

 

 

I have replaced the actual name of the table with {table name}.

 

Can you direct me in what I am doing incorrectly? 

 

-AQD

4 REPLIES
Level 2 Adventurer

Re: EDB Replication between Oracle and Postgres

How was this schema cimsmgr dropped ?  You have the command /output that you can share ?

 

EDB Team Member

Re: EDB Replication between Oracle and Postgres

test.png

 

 

 

 

 

 

 

 

 

 

 

 

Above a successful xdb Replicatoin Server snapshot between Oracle 11g -> PG-10, however PG-10 is on a VM instance.  There should not be any issues between those versions of databases. 

 

If for some reason snapshot or any configuration failuer happens, you should run "DROP SCHEMA <schema_name> CASCADE;"  on target(PG10 in your case) and reconfigure it. 

 

--Raghav

Adventurer

Re: EDB Replication between Oracle and Postgres

I have dropped the schema in both ways - (1) through the pgAdmin 4 interface and (2) through the DROP SCHEMA [tablename] CASCADE.

 

Doing it both ways, I received the error regarding triggers.

 

EDB Team Member

Re: EDB Replication between Oracle and Postgres


aqdaniels wrote:

I have dropped the schema in both ways - (1) through the pgAdmin 4 interface and (2) through the DROP SCHEMA [tablename] CASCADE.

 

Doing it both ways, I received the error regarding triggers.

 


I am gusseing its typo "DROP SCHEMA [tablename] CASCADE;", you meant here you did " DROP SCHEMA cimsmgr CASCADE;". If you not please run "DROP SCHEMA cimsmgr CASCADE;" and try testing again.  As I have mentioned xDB works with the version you have mentioned without any issues. Please share you test result after doing the clean-up work.

 

Regards

Raghav