JDBC3ConnectionURLFormat Connection URLs for Enterprise Edition (Multi-Tier) Generic Client Type 3 JDBC Driver Connection URLs for Enterprise Edition (Multi-Tier) Generic Client Type 3 JDBC Driver A Type 3 JDBC Driver connects a pure JDBC client environment to non- or partially-Java environments, such as our Enterprise Edition (Multi-Tier) server components (Request Broker and target-specific Database or Bridge Agents).Note: You should generally have only one of the following in your CLASSPATH environment variable. If you have multiple jars which use the same Classname, only the first found by the JVM (typically the first in your CLASSPATH) will be active. Choose the one best matched to your active JVM and to whether you will only need Type 3, or a combination of Type 1 and Type 3, connections.Our pure Type 3 JDBC Drivers have the following attributes -- <tgroup><thead /><tbody> <row><entry> <emphasis>Java Version(s)</emphasis> </entry><entry> <emphasis>Compatible JVM/JRE/JDK</emphasis> </entry><entry> <emphasis>JDBC Version</emphasis> </entry><entry> <emphasis>Filename</emphasis> </entry><entry> <emphasis>Classname</emphasis> </entry></row> <row><entry> Java 8 </entry><entry> 1.8.x </entry><entry> JDBC 4.2 </entry><entry> megathin4_2.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 7 </entry><entry> 1.7.x </entry><entry> JDBC 4.1 </entry><entry> megathin4_1.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 6 </entry><entry> 1.6.x </entry><entry> JDBC 4 </entry><entry> megathin4.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 4 and 5 </entry><entry> 1.4.x and 1.5.x </entry><entry> JDBC 3 </entry><entry> megathin3.jar </entry><entry> openlink.jdbc3.Driver </entry></row> <row><entry> Java 2 and 3 </entry><entry> 1.2.x and 1.3.x </entry><entry> JDBC 2 </entry><entry> megathin2.jar </entry><entry> openlink.jdbc2.Driver </entry></row> <row><entry> Java 1 </entry><entry> 1.1.x </entry><entry> JDBC 1 </entry><entry> megathin.jar </entry><entry> openlink.jdbc.Driver </entry></row> </tbody></tgroup></table> <para>Our hybrid Type 3 and <ulink url="JDBC1ConnectionURLFormat">Type 1 JDBC</ulink> Drivers have the following attributes -- </para><table><title /><tgroup><thead /><tbody> <row><entry> <emphasis>Java Version</emphasis> </entry><entry> <emphasis>Compatible JVM/JRE/JDK</emphasis> </entry><entry> <emphasis>JDBC Version</emphasis> </entry><entry> <emphasis>Filename</emphasis> </entry><entry> <emphasis>Classname</emphasis> </entry></row> <row><entry> Java 8 </entry><entry> 1.8.x </entry><entry> JDBC 4.2 </entry><entry> opljdbc4_2.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 7 </entry><entry> 1.7.x </entry><entry> JDBC 4.1 </entry><entry> opljdbc4_1.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 6 </entry><entry> 1.6.x </entry><entry> JDBC 4 </entry><entry> opljdbc4.jar </entry><entry> openlink.jdbc4.Driver </entry></row> <row><entry> Java 4 and 5 </entry><entry> 1.4.x and 1.5.x </entry><entry> JDBC 3 </entry><entry> opljdbc3.jar </entry><entry> openlink.jdbc3.Driver </entry></row> <row><entry> Java 2 and 3 </entry><entry> 1.2.x and 1.3.x </entry><entry> JDBC 2 </entry><entry> opljdbc2.jar </entry><entry> openlink.jdbc2.Driver </entry></row> <row><entry> Java 1 </entry><entry> 1.1.x </entry><entry> JDBC 1 </entry><entry> opljdbc.jar </entry><entry> openlink.jdbc.Driver </entry></row> </tbody></tgroup></table> <bridgehead class="http://www.w3.org/1999/xhtml:h2"> Type 3 JDBC URL Syntax </bridgehead> <para>Our Type 3 JDBC URL sytax is as shown below. Spaces between arguments are here only for clarity; they should be omitted for actual use, as in the <ulink url="#Example">example</ulink>.</para><programlisting>jdbc:openlink://<Hostname>[:portnumber] [/DSN=<dsn>] [/UID=<uid>] [/PWD=<pwd>] [/READONLY=<y>] [/FBS=<x>] [/JDBCAGENT=<AgentType>] [/SVT=<ServerType>] [/DATABASE=<Schema>] [/OPTIONS=<AgentOptions>] [/DRIVER=<RemoteOdbcDriver>] [/SSL=<y>] [/TIMEOUT=<seconds>] </programlisting><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Handling JDBC URL Reserved Characters </bridgehead> <para>JDBC URL escape characters '<computeroutput>{</computeroutput>' and '<computeroutput />}' should be used when parameters in the JDBC URL contain any JDBC URL reserved characters, such as '<computeroutput>/</computeroutput>'.</para><para>Common examples include</para><itemizedlist mark="bullet" spacing="compact"><listitem> Database or other file paths: <emphasis><computeroutput>{/path/to/database/demo</computeroutput>}</emphasis> </listitem> <listitem> Oracle Instant Client connection strings: <emphasis><computeroutput>{//oracle_hostname:port/TNSNAME</computeroutput>}</emphasis></listitem> </itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Type 3 JDBC URL Attributes </bridgehead> <itemizedlist mark="bullet" spacing="compact"><listitem> <emphasis><computeroutput>Hostname</computeroutput></emphasis> -- Network Alias or IP address of server machine running an OpenLink Request Broker instance </listitem> <listitem> <emphasis><computeroutput>Port Number</computeroutput></emphasis> -- Port number that identifies location of OpenLink JDBC Agent Service; the default value is 5000 </listitem> <listitem> <emphasis><computeroutput>/DSN</computeroutput></emphasis> -- ODBC Data Source Name from which the JDBC driver should automatically derive JDBC URL values; does not imply connection via ODBC </listitem> <listitem> <emphasis><computeroutput>/UID</computeroutput></emphasis> -- Username </listitem> <listitem> <emphasis><computeroutput>/PWD</computeroutput></emphasis> -- Password </listitem> <listitem> <emphasis><computeroutput>/READONLY</computeroutput></emphasis> -- Determines session mode — read-write (<computeroutput>=N</computeroutput>) or read-only (<computeroutput>=Y</computeroutput>). </listitem> <listitem> <emphasis><computeroutput>/SVT</computeroutput></emphasis> -- Determines OpenLink Database Agent type (Oracle, Informix, Sybase, Progress, Ingres, Microsoft SQL Server, MySQL, PostgreSQL, etc.) </listitem> <listitem> <emphasis><computeroutput>/OPTIONS</computeroutput></emphasis> -- Values used to connect to OpenLink Database Agents to remote database servers using database vendors networking. <ulink url="MTServerConfigConnectOptions">See additional information</ulink>. </listitem> <listitem> <emphasis><computeroutput>/DATABASE</computeroutput></emphasis> -- Actual database/schema name within a particular database environment; not relevant to all connections. </listitem> <listitem> <emphasis><computeroutput>/DRIVER</computeroutput></emphasis> -- Only used when making a DSN-Less connection to a remote ODBC Driver. </listitem> <listitem> <emphasis><computeroutput>/FBS</computeroutput></emphasis> -- Sets number of JDBC resultset rows that get packed together for transmission from the Database Agent to the Client Driver </listitem> <listitem> <emphasis><computeroutput>/SSL</computeroutput></emphasis> -- Specifies use of SSL to secure the connection. <ulink url="SecureJDBCType3wSSL">See additional information</ulink>. </listitem> <listitem> <emphasis><computeroutput>/JDBCAGENT</computeroutput></emphasis> -- <emphasis>Only applicable to Release 3.x and older; not used with Release 4.x or later.</emphasis> Specifies a particular handler for the client request rather than letting the Broker decide (separate handlers exist for ODBC and UDBC Generic Clients). </listitem> <listitem> <emphasis><computeroutput>/TIMEOUT</computeroutput></emphasis> -- Generally best set to 10-30 seconds longer than the longest query you execute takes to return data. Analogous to the client-side Enterprise Edition (Multi-Tier) ODBC Generic Client <ulink url="ConfiguringMTCommunicationsAttributes">ReceiveTimeout</ulink>.</listitem> </itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Example </bridgehead> <programlisting>jdbc:openlink://test.example.com:5000/UID=sa/PWD=admin/READONLY=N/FBS=10/SVT=SQLSERVER/DATABASE=pubs/OPTIONS=-H sqlhost.example.com -V 8.0 -P 1433/ </programlisting><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2"> See Also </bridgehead> <itemizedlist mark="bullet" spacing="compact"><listitem> <ulink url="JDBC1ConnectionURLFormat">Connection URLs for Type 1 JDBC Driver</ulink> </listitem> </itemizedlist></section></docbook>