<html>
<head>
    <base href="https://docs.jboss.org/author">
            <link rel="stylesheet" href="/author/s/en/2172/19/5/_/styles/combined.css?spaceKey=TEIID&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://docs.jboss.org/author/display/TEIID/Driver+Connection">Driver Connection</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://docs.jboss.org/author/display/~shawkins">Steven Hawkins</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >| {{disableResultSetFetchSize}} | {{boolean}} | In some situations tooling may choose undesirable fetch sizes for processing results.  Set to true to disable honoring ResultSet.setFetchSize.  Default false. \\ | <br>| {{loginTimeout}} | {{integer}} | The login timeout in seconds.  Must be &gt;= 0. 0 indicates no timeout.  If a connection cannot be created in approximately the the timeout value an exception will be thrown.  Default 0, no timeout. \\ | <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">| {{reportAsViews}} | {{boolean}} | If DatabaseMetaData will report Teiid views as a VIEW table type.  If false then Teiid views will be reported as a TABLE.  Default true. \\ | <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>Use <b>org.teiid.jdbc.TeiidDriver</b> as the driver class.</p>

<p>Use the following URL format for JDBC connections:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: java; gutter: false" style="font-size:12px; font-family: ConfluenceInstalledFont,monospace;">
jdbc:teiid:&lt;vdb-name&gt;@mm[s]://&lt;host&gt;:&lt;port&gt;;[prop-name=prop-value;]*
</pre>
</div></div>

<p>URL Components</p>

<ol>
        <li>&lt;vdb-name&gt; - Name of the VDB you are connecting to. Optionally VDB name can also contain version information inside it. For example: "myvdb.2", this is equivalent to supplying the "version=2" connection property defined below. However, use of vdb name in this format and the "version" property at the same time is not allowed.</li>
        <li>mm - defines Teiid JDBC protocol, mms defines a secure channel (see <a href="/author/display/TEIID/SSL+Client+Connections" title="SSL Client Connections">SSL Client Connections</a> for more)</li>
        <li>&lt;host&gt; - defines the server where the Teiid Server is installed. If you are using IPv6 binding address as the host name, place it in square brackets. ex:[::1]</li>
        <li>&lt;port&gt; - defines the port on which the Teiid Server is listening for incoming JDBC connections.</li>
        <li>[prop-name=prop-value] - additionally you can supply any number of name value pairs separated by semi-colon [;]. All supported URL properties are defined in the <a href="#DriverConnection-URLConnectionProperties">connection properties</a> section.  Property values should be URL encoded if they contain reserved characters, e.g. ('?', '=', ';', etc.)</li>
</ol>


<h1><a name="DriverConnection-URLConnectionProperties"></a>URL Connection Properties</h1>

<p>The following table shows all the supported connection properties that can used with Teiid JDBC Driver URL connection string, or on the Teiid JDBC Data Source class.</p>

<p><b>Connection Properties</b>
<br class="atl-forced-newline" /></p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property Name </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>ApplicationName</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> Name of the client application; allows the administrator to identify the connections </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>FetchSize</tt> </td>
<td class='confluenceTd'> <tt>int</tt> </td>
<td class='confluenceTd'> Size of the resultset; The default size if 500. &lt;=0 indicates that the default should be used. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>partialResultsMode</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> Enable/disable support partial results mode.  Default false.  See the <a href="/author/display/TEIID/Partial+Results+Mode" title="Partial Results Mode">Partial Results Mode</a> section. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>autoCommitTxn</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> Only applies only when "autoCommit" is set to "true". This determines how a executed command needs to be transactionally wrapped inside the Teiid engine to maintain the data integrity.
<ul>
        <li>ON  - Always wrap command in distributed transaction</li>
        <li>OFF - Never wrap command in distributed transaction</li>
        <li>DETECT (default)&#45; If the executed command is spanning more than one source it automatically uses distributed transaction. <br class="atl-forced-newline" />
<a href="/author/display/TEIID/Transactions" title="Transactions">Transactions</a> for more information. </li>
</ul>
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>disableLocalTxn</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> If "true", the autoCommit setting, commit and rollback will be ignored for local transactions.  Default false. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>user</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> User name </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>Password</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> Credential for user </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>ansiQuotedIdentifiers</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> Sets the parsing behavior for double quoted entries in SQL.  The default, true, parses dobuled quoted entries as identifiers.  If set to false, then double quoted values that are valid string literals will be parsed as string literals. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>version</tt> </td>
<td class='confluenceTd'> <tt>integer</tt> </td>
<td class='confluenceTd'> Version number of the VDB </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>resultSetCacheMode</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> ResultSet caching is turned on/off. Default false. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>autoFailover</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> If true, will automatically select a new server instance after a communication exception.  Default false. This is typically not needed when connections are managed, as the connection can be purged from the pool. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>SHOWPLAN</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> (typically not set as a connection property) Can be ON&#124;OFF&#124;DEBUG;
<ul>
        <li>ON returns the query plan along with the results</li>
        <li>DEBUG additionally prints the query planner debug information in the log and returns it with the results.  Both the plan and the log are available through JDBC API extensions.</li>
        <li>Default OFF.</li>
</ul>
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>NoExec</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> (typically not set as a connection property) Can be ON&#124;OFF; ON prevents query execution, but parsing and planning will still occur.  Default OFF. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>PassthroughAuthentication</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> Only applies to "local" connections. When this option is set to "true", then Teiid looks for already authenticated security context on the calling thread. If one found it uses that users credentials to create session. Teiid also verifies that the same user is using this connection during the life of the connection. if it finds a different security context on the calling thread, it switches the identity on the connection, if the new user is also eligible to log in to Teiid otherwise connection fails to execute. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>useCallingThread</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> Only applies to "local" connections. When this option is set to "true" (the default), then the calling thread will be used to process the query.  If false, then an engine thread will be used. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>QueryTimeout</tt> </td>
<td class='confluenceTd'> <tt>integer</tt> </td>
<td class='confluenceTd'> Default query timeout in seconds. Must be &gt;= 0. 0 indicates no timeout. Can be overriden by <tt>Statement.setQueryTimeout</tt>. Default 0. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>useJDBC4ColumnNameAndLabelSemantics</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> A change was made in JDBC4 to return unaliased column names as the ResultSetMetadata column name. Prior to this, if a column alias were used it was returned as the column name.   Setting this property to false will enable backwards compatibility when JDBC3 and older support is still required.  Defaults to true. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>jaasName</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> JAAS configuration name. Only applies when configuring a GSS authentication. Defaults to Teiid.  See the Security Guide for configuration required for GSS. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>kerberosServicePrincipleName</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> Kerberos authenticated principle name. Only applies when configuring a GSS authentication. See the Security Guide for configuration required for GSS </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>encryptRequest</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> Only applies to non-SSL socket connections.&nbsp; When "true" the request message and any associate payload will be encrypted using the connection cryptor.&nbsp; Default false. <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>disableResultSetFetchSize</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> In some situations tooling may choose undesirable fetch sizes for processing results.  Set to true to disable honoring ResultSet.setFetchSize.  Default false. <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>loginTimeout</tt> </td>
<td class='confluenceTd'> <tt>integer</tt> </td>
<td class='confluenceTd'> The login timeout in seconds.  Must be &gt;= 0. 0 indicates no timeout.  If a connection cannot be created in approximately the the timeout value an exception will be thrown.  Default 0, no timeout. <br class="atl-forced-newline" /> </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>reportAsViews</tt> </td>
<td class='confluenceTd'> <tt>boolean</tt> </td>
<td class='confluenceTd'> If DatabaseMetaData will report Teiid views as a VIEW table type.  If false then Teiid views will be reported as a TABLE.  Default true. <br class="atl-forced-newline" /> </td>
</tr>
</tbody></table>
</div>


    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://docs.jboss.org/author/users/removespacenotification.action?spaceKey=TEIID">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://docs.jboss.org/author/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
        <a href="https://docs.jboss.org/author/display/TEIID/Driver+Connection">View Online</a>
        |
        <a href="https://docs.jboss.org/author/pages/diffpagesbyversion.action?pageId=18646113&revisedVersion=12&originalVersion=11">View Changes</a>
                |
        <a href="https://docs.jboss.org/author/display/TEIID/Driver+Connection?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>