Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Connecting NiFi with Sybase database erroring

avatar
Contributor

Hi,

 

Could you please help me with the correct URL format to connect to Sybase using the DBCP connection pool of NiFi?

 

The URL format that I have tried is - jdbc:sybase:Tds://host:port

 

I keep getting this error - failed to create Poolable Connection Factory. Incorrect URL format.

 

Thank you in advance.

5 REPLIES 5

avatar

@Olivia_4692  Have you tried something like this:

 

jdbc:sybase:User=myuser;Password=mypassword;Server=localhost;Database=mydatabase;Charset=iso_1;

reference:  https://www.cdata.com/kb/tech/sybase-jdbc-apache-nifi.rst

 

I also found this page:

 

https://docs.oracle.com/cd/E13222_01/wls/docs103/jdbc_drivers/sybase.html#wp1068332

jdbc:bea:sybase://server2:5000;User=test;Password=secre

 

avatar
Contributor

@steven-matison  - thank you for your reply.

 

I've tried the first link and it doesn't seem to work. we don't use the cdata jdbc driver. We use jdbc:sybase:Tds://host:port

Not sure why it still says URL incorrect. If I just give the URL without the slashes it says login failed. something like - jdbc:sybase:Tds:host:port

avatar

I suggest them to show some examples of documented urls.  You may want to tweak your string to include user and pass,etc ?

 

What driver are you using?   It may help to show screen shot of entire DBCP Connection Pool configuration.

avatar
Contributor

@steven-matison - the driver that we're using is com.sybase.jdbc4.jdbc.SybDriver

I'm using the user option. We use kerberos so no password. I've been able to configure DBCP for Postgres and MongoDB but I'm unable to do the same for sybase.

I'm unable to post a screenshot bcz it's on my company portal.

avatar

@Olivia_4692 users usually screen shot, then blur anything you need to hide.   Just capture the property/value settings modal, not entire screen of your computer.    Not being able to see what you see, i will continue to make some suggestions.   


Since you are using Kerberos, the doc page i referenced has this property:

 

Property DescriptionAuthenticationMethod

{kerberos or userIdPassword}. Determines which authentication method the driver uses when establishing a connection.

If set to kerberos, the driver uses Kerberos authentication. The driver ignores any user ID or password specified. If you set this value, you also must set the ServicePrincipalName property.

If set to userIdPassword (the default), the driver uses user ID/password authentication. If a user ID and password is not specified, the driver throws an exception.

The User property provides the user ID. The Password property provides the password.

See Authentication for more information about using authentication with the Sybase driver.

The default is userIdPassword.

 

based on this i believe you should have AuthenticationMethod=kerberos in your jdbc url.  

 

There are further details for How to Configure Kerberos, please be sure to follow them all:

 

https://docs.oracle.com/cd/E12839_01/web.1111/e13753/sybase.htm#JDBCD390