You can translate the question and the replies:

Pyodbc Denodo

Hello, I am working with a business partner to connect to Denodo using pyodbc. I was able to get my script to work, but when she tried she is getting the following error: OperationalError: ('08001', '[08001] ERROR: SSL connection required\n (101) (SQLDriverConnect)') Here is script: ``` import pyodbc server = "server" database = "database" username = "userid" password = "password" driver = "{DenodoODBC Unicode(x64)}" connection_string = f"DRIVER={driver};SERVER={server};DATABASE={database};UID={username};PWD={password};Security=SSL;trust_server_certificate='Yes';ProxyHost={proxy_host};ProxyPort={proxy_port};ProxyUser={proxy_username};ProxyPass" cnxn = pyodbc.connect(connection_string) cursor = cnxn.cursor() query = "select * from database.view limit 1" cursor.execute(query) results = cursor.fetchall() for row in results: print(row) cursor.close() cnxn.close() ``` I have a feeling the issue is related to proxy. How can I include proxy in this script? Thank you.
user
29-06-2023 17:48:36 -0400
code

3 Answers

Hello, This feels like something not working with SSL, I would suggest checking the SSL configuration on the Virtual Data Port server as explained here: [Enabling SSL/TLS in Denodo Platform Servers](https://community.denodo.com/docs/html/browse/7.0/platform/installation/postinstallation_tasks/enable_ssl_connections_in_the_denodo_platform_servers/enabling_ssl_in_denodo_platform_servers). If you haven't done it yet make sure the keystore has been created and the certificate has been imported both in VDP server and in your client trustore [Obtaining and Installing an SSL/TLS Certificate](https://community.denodo.com/docs/html/browse/7.0/platform/installation/postinstallation_tasks/enable_ssl_connections_in_the_denodo_platform_servers/obtaining_and_installing_an_ssl_certificate). After that I would make some test with the connection string, using only the ODBC params listed [here](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/access_through_odbc/creating_a_dsn_less_connection/creating_a_dsn_less_connection) or [here](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/access_through_odbc/configuration_of_the_odbc_driver_in_linux_and_other_unix/configuration_of_the_odbc_driver_in_linux_and_other_unix#register-a-data-source-dsn-on-unixodbc). Eventually, also consider using [JDBC](https://community.denodo.com/docs/html/browse/latest/en/vdp/developer/access_through_odbc/access_through_odbc) for that has better performance than ODBC with Denodo, JDBC parameters are listed [here](https://community.denodo.com/docs/html/browse/latest/en/vdp/developer/access_through_jdbc/parameters_of_the_jdbc_connection_url/parameters_of_the_jdbc_connection_url). Hope this helps
Denodo Team
30-06-2023 10:05:31 -0400
code
We're both hitting the same VDP server and it works for me, but not working for the analyst (business partner). Would this still be related to the VDP server? It seems odd that it'd be the server if I can get the script to work. Please advise
user
30-06-2023 11:02:53 -0400
Please, check that the [driver version](https://community.denodo.com/drivers/odbc/8.0) is aligned with the server update version in both cases. If you have an active support account, you could open a support ticket and support team will assist you. Hope this helps.
Denodo Team
04-07-2023 04:52:42 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here