cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle to EDB migration using XDB

SOLVED
EDB Team Member

Re: Oracle to EDB migration using XDB

Hi @manisha,

 

From the error message shared by you, it looks like the publication service in not up and running.

 

1) Please make sure the services for publication and subscription are up and running on RHEL 7 and CentOS 7, services can be start using below commands :

systemctl start edb-xdbpubserver

systemctl start edb-xdbsubserver

2) Connections to both Oracle and EPAS database from the server where these services are running should be working.

 

Please do the above checks and then proceed with adding the publications and subscription.

 

Regards,

Sudhir

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi Slonkar,

 

As suggested,I checked the connectivity as well the status of xdbpubserver and xdbsubserver.But unable to figure out the issue.This analysis has created some confusions.Would be good if I get the clarity on my below queries.

 

  • xdb publication service is not running on the source i.e oracle server.Still it is looking for that service when adding the publicaton database.Is it mandatory to have it running on source server??

[root@ip-172-31-2-48 ~]# cd /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# java -jar /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin/edb-repcli.jar -printpublist -repsvrfile pubsvr.prop
Printing publications ...
Error: Unable to connect to publication service.
Reason:Connection refused to host: 172.31.10.187; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
Error: Publication service is not available.

 

  • The error log says the driver not available at source host.Even after adding the driver in /etc/alternatives/jre/lib/ext/ of source host,it shows the same log.Any suggestions on this?

Error occured during server initialization:
The connection with the Controller database could not be established.
Reason:No suitable driver found for jdbc:oracle:thin:@172.31.10.187:1521:ORCL

Initializing publication server at port 9051 ...
Publication server started.
[root@ip-172-31-2-48 xdbpubserver]# pwd
/var/log/edb/xdbpubserver

 

  • To start the subscription service ,is it mandatory to have publication service running?

Error occured during server initialization:
The connection with the Controller database could not be established.
Reason:No suitable driver found for jdbc:oracle:thin:@172.31.10.187:1521:ORCL

[root@ip-172-31-2-48 xdbsubserver]# pwd
/var/log/edb/xdbsubserver

 

Appreciate the support till now.

Kindly help me in understanding the behavior of xdb as well as the steps on configuring it.

 

Thanks and Regards,

Manisha

 

EDB Team Member

Re: Oracle to EDB migration using XDB

Hi @manisha 

 
Control database has all the information related to publications, subscriptions etc which is created while installing XDB. 
Thus, installation of XDB should be completed without any errors, as this would avoid further issues.
Also, you need to take care that the control database is not tampered,else then starting and using XDB may become problematic.
 
Considering your scenario :
Your XDB installation is done on server 172-31-2-48, thus the services will also be on this server.
pubsvr.prop and subsvr.prop have details for connecting your publication and subscription servers.  Whereas the entries in your prop files is with IP 172.31.10.187 which means it is searching the services on 172.31.10.187 server, thus failing.
Add the IP of the server 172-31-2-48 in your prop files, and that would solve your problem. 
 
Hope this helps.
Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Thanks Chailtars.

 

So the driver has to be in the source server??If so,I have already placed ojdbc7.jar in source and the host of xdb.

 

[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# java -jar /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin/edb-repcli.jar -paramfile addpubsvr
Adding publication database...
Error:No suitable driver found for jdbc:oracle:thin:@172.31.10.187:1521:ORCL
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# java -jar /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/bin/edb-repcli.jar -printpublist -repsvrfile pubsvr.prop
Printing publications ...
Error: No publications found.
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]#

 

Kindly suggest.

 

Thanks and Regards,

Manisha

EDB Team Member

Re: Oracle to EDB migration using XDB

According to the error it is still searching on host "172.31.10.187".

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi,  

The IP 172.31.10.187" is the source oracle server IP.This ip was added while adding the publication database in the addpubsvr  file as it is the db host.So does this Ip has to point to server which has publication service running??

 

[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# more pubsvr.prop
#user=pubuser
#password=uQ5vWL7WGWte6DtjiBjD4w==
user=admin
password=VbjDPk5zwu/naXI2fpEbBQ\=\=
port=9051
host=172.31.2.48
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# more addpubsvr
-addpubdb -repsvrfile pubsvr.prop -dbtype oracle -dbhost 172.31.10.187 -dbport 1521 -dbuser pubuser -dbpassword uQ5vWL7WGWte6DtjiBjD4w== -oraconnectiontype sid -databa
se ORCL

EDB Team Member

Re: Oracle to EDB migration using XDB

An Oracle JDBC driver jar file such as, ojdbc5.jar, must be accessible to the Java virtual machine (JVM) on the host running the publication server and the subscription server.

 

If the publication server and subscription server are running on separate hosts, the Oracle JDBC driver must be accessible to the JVM on each host. Oracle JDBC driver version ojdbc5 or later must be used.

 

Step 1: Download the Oracle JDBC driver, for example, ojdbc5.jar, from the Oracle download site to the host that will be running the publication server.

 

Step 2: Copy file ojdbc5.jar to the directory XDB_HOME/lib/jdbc.

 

Step 3: If the subscription server is running on a different host than the publication server, repeat steps 1 and 2 for the subscription server host.

Level 3 Adventurer

Re: Oracle to EDB migration using XDB

Hi chaitalirs,

The drivers are already placed.The publication and subscription servers are on single host.But source dataase is on different server.

[root@ip-172-31-2-48 ~]# cd /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# ll
total 7920
-rw-r--r--. 1 root root 175 Feb 13 07:05 addpubsvr
drwxrwxr-x. 2 root root 4096 Feb 13 11:06 bin
-rw-r--r--. 1 root root 0 Feb 13 06:39 -database
-rw-r--r--. 1 root root 0 Feb 13 06:39 -dbtype
-rw-r--r--. 1 root root 0 Feb 13 06:39 -dbuser
-rwxr-xr-x. 1 root root 15 Feb 13 03:23 edb_pwd_file
-rw-r--r--. 1 root root 51 Feb 13 03:25 enc_edb_pwd_file
-rw-r--r--. 1 root root 25 Feb 13 06:44 enc_orcl_pwd_file
drwxrwxr-x. 3 root root 103 Feb 14 02:00 etc
drwxrwxr-x. 4 root root 43 Feb 12 03:19 installer
drwxrwxr-x. 5 root root 4096 Feb 13 00:25 lib
-rw-r--r--. 1 root root 0 Feb 13 06:39 -oraconnectiontype
-rwxr-xr-x. 1 root root 11 Feb 13 06:43 orcl_pwd_file
-rwxr-xr-x. 1 root root 123 Feb 14 03:50 pubsvr.prop
drwxrwxr-x. 4 root root 29 Feb 12 03:19 scripts
-rwxr-xr-x. 1 root root 122 Feb 13 03:45 subsvr.prop
-rwx------. 1 root root 7962824 Feb 12 03:20 uninstall-xdbreplicationserver
-rw-------. 1 root root 21202 Feb 12 03:20 uninstall-xdbreplicationserver.dat
drwx------. 2 enterprisedb root 6 Feb 12 03:19 xdata
-r--r--r--. 1 root root 64025 Feb 5 09:13 xdb_3rd_party_licenses.txt
-r--r--r--. 1 root root 15216 Feb 5 09:13 xdb_license.txt
[root@ip-172-31-2-48 EnterpriseDB-xDBReplicationServer]# cd lib/
[root@ip-172-31-2-48 lib]# ll
total 15156
-rw-r--r--. 1 root root 55932 Feb 5 09:11 activation.jar
-rw-r--r--. 1 root root 252828 Feb 5 09:11 antlr-runtime-4.1.jar
-rw-r--r--. 1 root root 1599570 Feb 5 09:11 axis.jar
-rw-r--r--. 1 root root 610028 Feb 5 09:11 cayenne-exp-3.1.jar
-rw-r--r--. 1 root root 335600 Feb 5 09:11 cglib-nodep-3.2.0.jar
-rw-r--r--. 1 root root 25637 Feb 5 09:11 commons-beanutils-bean-collections.jar
-rw-r--r--. 1 root root 168760 Feb 5 09:11 commons-beanutils-core.jar
-rw-r--r--. 1 root root 188671 Feb 5 09:11 commons-beanutils.jar
-rw-r--r--. 1 root root 41123 Feb 5 09:11 commons-cli-1.2.jar
-rw-r--r--. 1 root root 259600 Feb 5 09:11 commons-codec-1.7.jar
-rw-r--r--. 1 root root 559366 Feb 5 09:11 commons-collections-3.1.jar
-rw-r--r--. 1 root root 160519 Feb 5 09:11 commons-dbcp-1.4.jar
-rw-r--r--. 1 root root 315805 Feb 5 09:11 commons-lang3-3.1.jar
-rw-r--r--. 1 root root 26202 Feb 5 09:11 commons-logging-api.jar
-rw-r--r--. 1 root root 38015 Feb 5 09:11 commons-logging.jar
-rw-r--r--. 1 root root 111119 Feb 5 09:11 commons-pool-1.6.jar
-rw-r--r--. 1 root root 415578 Feb 5 09:11 commons-vfs2-2.0.jar
-rw-r--r--. 1 root root 313898 Feb 5 09:11 dom4j-1.6.1.jar
-rw-r--r--. 1 root root 222325 Feb 5 09:11 edb-commons.jar
-rw-r--r--. 1 root root 2308517 Feb 5 09:11 guava-19.0.jar
-rw-r--r--. 1 root root 31191 Feb 5 09:11 jaxrpc.jar
drwxrwxr-x. 2 root root 81 Feb 12 03:19 jdbc
-rw-r--r--. 1 root root 33832 Feb 5 09:11 jgoodies-common-1.7.0.jar
-rw-r--r--. 1 root root 402425 Feb 5 09:11 jgoodies-looks-2.5.3.jar
-rw-r--r--. 1 root root 326923 Feb 5 09:11 lang-6.6.4.jar
-rw-r--r--. 1 root root 352668 Feb 5 09:11 log4j-1.2.8.jar
-rw-r--r--. 1 root root 416533 Feb 5 09:11 mapdb-1.0.8.jar
-rw-r--r--. 1 root root 3698857 Feb 13 00:24 ojdbc7.jar
-rw-r--r--. 1 root root 825943 Feb 13 00:25 postgresql-42.2.5.jar
-rw-r--r--. 1 root root 466598 Feb 5 09:11 quartz-all-1.8.6.jar
drwxrwxr-x. 2 root root 37 Feb 12 03:19 repl-mtk
-rw-r--r--. 1 root root 18979 Feb 5 09:11 saaj.jar
-rw-r--r--. 1 root root 29257 Feb 5 09:11 slf4j-api-1.7.7.jar
-rw-r--r--. 1 root root 7901 Feb 5 09:11 slf4j-jdk14-1.7.7.jar
-rw-r--r--. 1 root root 157810 Feb 5 09:11 swing-layout-1.0.1.jar
drwxrwxr-x. 2 root root 4096 Feb 12 03:19 xdb
-rw-r--r--. 1 root root 120906 Feb 5 09:11 xpp3-1.1.3_8.jar
-rw-r--r--. 1 root root 538830 Feb 5 09:11 xstream-1.4.8.jar
[root@ip-172-31-2-48 lib]# pwd
/opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib
[root@ip-172-31-2-48 lib]#

Highlighted
EDB Team Member

Re: Oracle to EDB migration using XDB

Hi @manisha,

 

As communicated by earlier, the Oracle JDBC driver needs to be placed at : XDB_HOME/lib/jdbc.

 

However, from the output shared by you, its placed at /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib.

 

Could you please place this jar under directory /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc and try again.

 

NOTE: You may also copy the ojdbc7.jar file to the jre/lib/ext subdirectory of the location where you installed your Java runtime environment.

 

Please get back to us in case of any issues/queries.

 

Regards,

Sudhir