Support Questions

Find answers, ask questions, and share your expertise

How to Connect to the Relational Database in Nifi

Explorer

Hi, 

I am new to NiFi, I wanted to understand the how can we connect to the oracle database through NiFi?Do we need to download the driver for the same and paste it to NiFi server ? or we have to install the database on the same server and after using that driver then only we can connect to the database. Please help me.  

1 ACCEPTED SOLUTION

Hi @Techie123 

Hopefully after reading the link that @SAMSAL shared earlier, you've reached the understanding that no, you don't have to install the database on the same server as the server that NiFi is installed on, but of course the server hosting the database must be accessible to the NiFi server via the JDBC protocol, regardless of where it is located. There are any number of things that could be causing the error message that you are getting.

 

Given what you have shared in this thread, I would recommend that you begin by talking to your DBA or perhaps the person that installed the database on the server. The string that you have entered on the properties tab, as shown in your page shot:

 


jdbc:oracle:thin@hostname:portnumber:sname

 

…needs to be replaced with the values appropriate for the server where your actual database is installed. To be a bit more specific, you have to get the actual literal values for hostname, portnumber and sname necessary to access your database and enter all of them correctly. In my personal experience, you'd also be much better off if you can verify that the database server is accessible via JDBC using some other tool so you have a way to validate the connection string before you get involved with NiFi-specific details.

 

 

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

3 REPLIES 3

Super Collaborator

Please check this old post on how to connect to mysql I assume its similar to oracle:

https://community.cloudera.com/t5/Support-Questions/how-to-configure-and-connect-mysql-with-nifi-and...

 

Explorer

Hi @SAMSAL , i did same configuration but my processor is stuck. am I doing something wrong?

 

Techie123_0-1655743067311.png

the error I am getting is:

 

Cannot create PoolableConnectionFactory (IO Error: The Network Adapter could not establish the connection)
- Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (IO Error: The Network Adapter could not establish the connection)
- Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
- Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection

 

Hi @Techie123 

Hopefully after reading the link that @SAMSAL shared earlier, you've reached the understanding that no, you don't have to install the database on the same server as the server that NiFi is installed on, but of course the server hosting the database must be accessible to the NiFi server via the JDBC protocol, regardless of where it is located. There are any number of things that could be causing the error message that you are getting.

 

Given what you have shared in this thread, I would recommend that you begin by talking to your DBA or perhaps the person that installed the database on the server. The string that you have entered on the properties tab, as shown in your page shot:

 


jdbc:oracle:thin@hostname:portnumber:sname

 

…needs to be replaced with the values appropriate for the server where your actual database is installed. To be a bit more specific, you have to get the actual literal values for hostname, portnumber and sname necessary to access your database and enter all of them correctly. In my personal experience, you'd also be much better off if you can verify that the database server is accessible via JDBC using some other tool so you have a way to validate the connection string before you get involved with NiFi-specific details.

 

 

Bill Brooks, Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.