Skip to main content
vkotsas
Silver ⭐️⭐️
June 8, 2022
Solved

Nifi create a connection to MS SQL Server

Hi,
I want to insert data to Ms. Sql's server from nifi flow.
Where can I find a sample or a guide?
Also, where have I must install sqljdbc-4.0.jar?

ckumar
ckumarAnswer
Platinum ⭐️
June 9, 2022

The error says the Connection pool is not able to find configured driver classpath name into provided database client-jar driver. Please check and make sure configured driver classpath name is present on the provided jar file. 

 

 

3 replies

gtorres
Silver ⭐️⭐️⭐️
Silver ⭐️⭐️⭐️
June 8, 2022

You need to create a DBCPConnectionPool service and set the required connection properties. On DataBase driver location you can enter the folder where the jar files are located, this folder must be accesible by nifi service user and must be present in all of the NiFI nodes.

 

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-dbcp-service-nar/1.16.0/org.apache.nifi.dbcp.DBCPConnectionPool/index.html

 

Then you can use a SQL processor, such as PutSQL to insert data into the data base:
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.16.0/org.apache.nifi.processors.standard.PutSQL/

 

Translate
vkotsas
vkotsasAuthor
Silver ⭐️⭐️
June 9, 2022

Thank  you i am taking the below error  have you got an idea what causes this error

vkotsas_0-1654772916466.png

 

Translate
ckumar
Platinum ⭐️
ckumarAnswer
Platinum ⭐️
June 9, 2022

The error says the Connection pool is not able to find configured driver classpath name into provided database client-jar driver. Please check and make sure configured driver classpath name is present on the provided jar file. 

 

 

Translate