Created 06-20-2022 08:12 AM
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.
Created 06-21-2022 10:55 AM
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.
Created 06-20-2022 08:23 AM
Please check this old post on how to connect to mysql I assume its similar to oracle:
Created 06-20-2022 09:39 AM
Hi @SAMSAL , i did same configuration but my processor is stuck. am I doing something wrong?
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
Created 06-21-2022 10:55 AM
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.