cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect to ASE on SCP with ODBC ASE driver?

nicola_taiana
Advisor
Advisor
0 Kudos

Is it possible, and how, to connect to an ASE instance on SCP using ODBC and standard ASE client (ex: isql, ddlgen ).

We are proposing to a customer to move his ASE instance into the cloud (neo).

Customer has an application running on premise and using ODBC ASE driver to connect to ASE instance. He also has JAVA application using jConnect.

We succeeded to connect with jConnect using the neo tunnel, but not with ODBC ASE drive.

Also the question by Athar Iqbal: Is there a ASE cockpit available for Cloud Platform version?

Best regards,

Nicola

Accepted Solutions (0)

Answers (5)

Answers (5)

dawn_kim
Contributor
0 Kudos

Hi Nicola,

If isql isn't working with or without ssl, then we need to look at the boxname and the port in the interfaces file.

I do believe your ssl certificate could be corrupted.

Thanks,
Dawn Kim

dawn_kim
Contributor
0 Kudos

Hi,

Let's see if isql works first. From the command line just do this: isql -Uusername -Sservernameininterfaces -Ppassword. If this doesn't work then we need to look at the certificate. Your setup for odbc looks good, it's pretty basic to setup.

What version of ASE you connecting to? What version of the odbc driver are you using?

Thanks,
Dawn Kim

nicola_taiana
Advisor
Advisor
0 Kudos

Hi Dawn

I am connecting to ASE 16.0 SP03 PL04 and using SDK 16.0 SP03 PL05 on a windows client:

odbcversion.jpg

Here are two isql connections, the first one with SSL in sql.ini, the second one without SSL:

isqlconnections.jpg

Thank you for your help and best regards,

Nicola

dawn_kim
Contributor
0 Kudos

Hi,

All applications should be able to connect to your database in the cloud with any driver whether you are using odbc, java, isql, ado.net, php, etc.

If your having issues then we need the error. It could be something like you have the wrong connection string, if using ASE 16.x you need to make sure you are using password encryption this is a default setting for ASE 16.x. Like said above if using ssl you need various things in the connection string if using this so it depends on the driver.

If you need more help we need the error.

Thanks,
Dawn Kim

nicola_taiana
Advisor
Advisor
0 Kudos

Hi Dawn,

thank you very much for your answer. I agree with you, I should be able to connect with any driver, if I have the tunnel to SCP open.

I made some tests. Likely, the reason why I cannot use ODBC (and Open Client) is the SSL connection.

ASE on SCP requires an SSL trusted connection. I can have a SSL connection with JDBC driver because

I can set the following property: SSL_TRUST_ALL_CERTS=true. This makes the driver to accept any certificate it receives from the ASE server.

Unfortunately, I did not find this property for the ASE ODBC driver and Open Client, therefore I think I should need to install the correct certificate on the client machine.

These are some ASE configuration parameters related to security

This is the ODBC error:

With isql:

sql.ini entry

[HA0053X]

master=TCP,localhost,30015,ssl

query=TCP,localhost,30015,ssl

set SYBOCS_DEBUG_FLAGS=CS_DBG_SSL

set SYBOCS_DEBUG_LOGFILE=.\libsybfssl.log

np_err_string(): Operating system/Network driver error number(0):

TLS/SSL handshake failed. Check certificate for possible corruption.

If this is the issue, who is supposed to give me the correct certificate that matches the one installed on ASE server?

Best regards,

Nicola

nicola_taiana
Advisor
Advisor
0 Kudos

Dear Tilman,

thank you for your answer. Yes, isql and other ASE clients use Open Client libraries. Connections to ASE on SCP should use SSL, therefore the problem could be a missing certificate and wrong ODBC driver configuration. Actually I do not know how to generate such certificate and the correct parameters to use.

Best regards, Nicola

0 Kudos

Dear Nicola

isql does not use ODBC but some c libraries to connect to ASE.
Generally - if you can connect using any library (e.g. jConnect) you should also be able to use a different one. As long as connection to the port of the ASE server on the dbhost is possible.

Rgeards

Tilman