Access Elasticsearch Data as a Remote Oracle Database

We want to set up a dblink from the Oracle database to eleastic search and pull information, but we get the following error in the dblink.

We could not find a source on this site, so we did it by following the steps in the link below.

Our dblink is not working, what could we be missing?

Is there an rpm package on this site for ODBC?

Hi @onr1onr1,

Welcome! I don't see the specified error you are receiving in your post, so can you please share the exact error message?

Which version of Elasticsearch are you using? Have you also checked that the version of the driver you are using is compatible with the version of Elasticsearch that you're using?

Hi

elasticsearch version = 7.17.6

I downloaded rpm from this link
ElasticsearchODBCDriverforUnix.rpm

installed the other rpm.
unixODBC-2.3.1-14.el7.x86_64.rpm

I downloaded rpm from this link and installed the other rpm.

In general, I followed the steps in the link I shared. If you want, I can send the settings I made as a picture

Hi @onr1onr1,

You haven't provided the link to the driver so it's difficult to determine compatibility.

Searching for the error you have in the screenshot it looks like an issue with your authentication settings as per this Oracle article. I would recommend checking your login settings are correct.

  1. So are the steps correct on the site I referenced?

  2. Which information of elasticsearch do I need to establish a dblink connection? Do I need Elasticsearch's server information?

cat /etc/odbc.ini
Driver = CData ODBC Driver for Elasticsearch
Description = myelasticsearchdb
Server = 1.2.3.4 (elasticsearch server ip-I wrote it differently here for security)
Port = 9200
User = elastic
Password = password123
You have new mail in /var/spool/mail/root

(SID_DESC =
(ORACLE_HOME = /ora1912_home/orahome)
(SID_NAME = myelasticsearchdb)
(PROGRAM = dg4odbc)
(ENV="LD_LIBRARY_PATH=/usr/lib64:/opt/cdata/cdata-odbc-driver-for-elasticsearch/lib:/ora1912_home/orahome/lib")
)

myelasticsearchdb  =

(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=my oracledb server ip )(PORT=1521))
(CONNECT_DATA=(SID=myelasticsearchdb))
(HS=OK)
)

It looks like you are using some third party ODBC driver, which is not supported here. I would recommend you reach out to the vendor in question.

I don't have to use this drive. How can I find a driver that is not a third party?

Elastic offers an ODBC driver, but be aware that this requires a commercial license.

Is there one for linux?

I have never used it, but based on the docs it does not look like there is.

Is it possible to get the data from the oracle database on the linux server to an elasticsearch on the linux server with db link?

The only official offering is the ODBC driver that requires a Commercial License and run on Windows Machine.

Anything else is third-party and you would need to test yourself, and since it is not something that is not widely used, so I'm not sure you will be able to get much help on the forum.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.