You can translate the question and the replies:

Adding CONTEXT to JDBC Database URI

I am trying to add a timeout context to a JDBC connection. JDBC Parameters are referenced in the documentation (https://community.denodo.com/docs/html/browse/6.0/vdp/developer/access_through_jdbc/parameters_of_the_jdbc_connection_url/parameters_of_the_jdbc_connection_url), but there is not an example of the actual syntax required when decorating a Database URI. I'm expecting to be able to do something like this: > Database URI: jdbc:teradata://my.connection.com/ TMODE=TERADATA & CONTEXT("QUERYTIMEOUT" = 0) What is the proper syntax? I've tried several dozen variations on this theme and always get an error something like this: > Unable to establish connection: [Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [Error 1536] [SQLState HY000] Invalid connection parameter name & CONTEXT("QUERYTIMEOUT"
user
08-09-2021 14:41:37 -0400
code

4 Answers

Hi, I would configure the [parameters](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) like Query Timeout in the database URI of the JDBC data sources by using the following syntax: `jdbc:vdb://<host>:<port>/<database>?queryTimeout=<value>` You can refer to the document [Access Through JDBC](https://community.denodo.com/docs/html/browse/latest/en/vdp/developer/access_through_jdbc/access_through_jdbc#access-through-jdbc) of the Virtual DataPort Developer Guide for more information. Make note that the CONTEXT clause is generally used to change the timeout for a single query. If you still need help and you have a valid support user account, please open a new support case at the [Denodo Support site](https://support.denodo.com/) so that the support team can assist you. Hope this helps!
Denodo Team
09-09-2021 08:32:07 -0400
code
I'm afraid that does not help. How do I accommodate TMODE timeout and CONTEXT both?
user
09-09-2021 09:11:22 -0400
Below are some Database URI's that I've tried and the resulting errors: `jdbc:teradata://GRSVTDTST.LMIG.COM/ TMODE=TERADATA?queryTimeout=0` results in > Unable to establish connection: [Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [Error 1535] [SQLState HY000] Invalid argument TERADATA?queryTimeout=0 was specified for the TMODE connection parameter `jdbc:teradata://GRSVTDTST.LMIG.COM/ ?TMODE=TERADATA&queryTimeout=0` results in > Unable to establish connection: [Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [Error 1536] [SQLState HY000] Invalid connection parameter name ?TMODE `jdbc:teradata://GRSVTDTST.LMIG.COM/ ?queryTimeout=0` results in > Unable to establish connection: [Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [Error 1536] [SQLState HY000] Invalid connection parameter name ?queryTimeout `jdbc:teradata://GRSVTDTST.LMIG.COM/ ?queryTimeout=0&TMODE=TERADATA` results in > Unable to establish connection: [Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [Error 1536] [SQLState HY000] Invalid connection parameter name ?queryTimeout None of these options contain the database name which the documentation states is required. Any hints as to the proper syntax?
user
09-09-2021 15:47:02 -0400
Hi, For the Teradata source, I would be able to configure TMODE in the Database URI successfully without queryTimeout. The reason is that the parameter QueryTimeout is not available for Teradata. You can refer to the documentation [Using the Teradata JDBC Driver](https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html). Also, the parameters specified in the manual [Access Through JDBC](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/access_through_jdbc/access_through_jdbc#access-through-jdbc) are specific to **Denodo JDBC drivers**. The QueryTimeout parameter can be used for other databases when this parameter is supported by the respective database. Hope this helps!
Denodo Team
17-09-2021 09:33:52 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here