JezK
Edit File: OdbcConnAttr.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Connection attributes</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="prepodbc.html" title="Chapter 4. Preparing ODBC" /><link rel="prev" href="prepodbc.html" title="Chapter 4. Preparing ODBC" /><link rel="next" href="dsnless.html" title="DSN-less configuration" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Connection attributes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="prepodbc.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Preparing ODBC</th><td width="20%" align="right"> <a accesskey="n" href="dsnless.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="OdbcConnAttr"></a>Connection attributes</h2></div></div></div><p>The following tables define all possible ODBC connection attributes for the <span class="productname">FreeTDS</span> ODBC driver. Which ones you'll need depends on how you set yourself up. They may appear in your connection string, or in <code class="filename">odbc.ini</code>.</p><div class="table"><a id="tab.Connection.attributes.stringonly"></a><p class="title"><strong>Table 4.1. Connection attributes used only in connection strings</strong></p><div class="table-contents"><table class="table" summary="Connection attributes used only in connection strings" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Possible Values</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code class="literal">DSN</code></td><td>A valid DSN entry</td><td>none</td><td>The <code class="literal">DSN</code> to which <span class="productname">FreeTDS</span> should connect. <span class="productname">FreeTDS</span> will search <code class="filename">odbc.ini</code> for entry. It lets you specify a connection as for <code class="function">SQLConnect</code>, but using <code class="function">SQLDriverConnect</code>. Do not use <code class="literal">Servername</code> and <code class="literal">DSN</code> together. </td></tr><tr><td><code class="literal">UID</code></td><td>Any valid username</td><td>none</td><td>The username to be used when connecting. To use domain authentication, specify the domain using the format <em class="replaceable"><code>domain\username</code></em>.</td></tr><tr><td><code class="literal">PWD</code></td><td>Any</td><td>empty</td><td>The password to be used when connecting. </td></tr><tr><td><code class="literal">WSID</code></td><td>Any</td><td>Computer name</td><td>The name of the local computer, sent to server. Can be specified only for a DSN-less connection.</td></tr></tbody></table></div></div><p><br class="table-break" /> </p><div class="table"><a id="tab.Connection.attributes.freetds.conf"></a><p class="title"><strong>Table 4.2. Connection attributes that may appear in <code class="filename">odbc.ini</code></strong></p><div class="table-contents"><table class="table" summary="Connection attributes that may appear in odbc.ini" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Possible Values</th><th>Default</th><th>Meaning</th></tr></thead><tbody><tr><td><code class="literal">Servername</code></td><td>A valid <code class="filename">freetds.conf</code> server section</td><td>none</td><td>A <code class="filename">freetds.conf</code> servername, not a hostname as known to DNS. If you want to use ODBC-only configuration, use <code class="literal">Server</code> instead.</td></tr><tr><td><code class="literal">Server</code></td><td>A server name or (ip) address</td><td>none</td><td>Hostname of a server. Used in an ODBC-only configuration. To specify a Microsoft SQL Server instance, use the form <code class="literal">server\instance</code>. </td></tr><tr><td><code class="literal">Port</code></td><td>Any TCP port</td><td>Depends on the TDS version specified with <span class="command"><strong>configure</strong></span></td><td>The TCP port where the servername is listening. </td></tr><tr><td><code class="literal">TDS_Version</code></td><td>Any valid protocol version</td><td>Depends on the TDS version specified with <span class="command"><strong>configure</strong></span></td><td>TDS protocol version to use (e.g., 5.0, 7.0).</td></tr><tr><td><code class="literal">ClientCharset</code> or <code class="literal">Client_Charset</code></td><td>A name recognized by the iconv library linked to <span class="productname">FreeTDS</span>. Corresponds to <code class="literal">client charset</code> in <code class="filename">freetds.conf</code>. <code class="literal">Client_Charset</code> is for compatibility with <span class="productname">NCBI C++ ToolKit</span>.</td><td>ISO 8859-1</td><td>Character set (encoding) used by the client.</td></tr><tr><td><code class="literal">APP</code></td><td>Free form text, up to 30 characters. </td><td>none</td><td>Application name. Identifies the connecting application to the server. </td></tr><tr><td><code class="literal">Language</code></td><td>Any</td><td>us_english</td><td>(Human) language the server should use for error messages.</td></tr><tr><td><code class="literal">Address</code></td><td>Any</td><td>none</td><td>IP address of the servername. Useful if you want to specify a server by address, rather than by name. The format is <em class="replaceable"><code>ip,port</code></em> or simply <em class="replaceable"><code>ip</code></em> in standard dotted-decimal notation. </td></tr><tr><td><code class="literal">Database</code></td><td>Any</td><td>none</td><td>Specify which database you want to access. If the database does not exist or the user lacks permission to access it, the connection will fail.</td></tr><tr><td><code class="literal">TextSize</code></td><td>Any</td><td>Server-dependent</td><td>Maximum size returned from server for blobs.</td></tr><tr><td><code class="literal">PacketSize</code></td><td>Any</td><td>Server-dependent</td><td>Size of packets to server. Some users saw some performance gain by increasing this value. Normally you shouldn't set it. </td></tr><tr><td><code class="literal">Trusted_Connection</code></td><td>Yes/No</td><td>No</td><td>Use your current account instead of <code class="literal">UID</code>/<code class="literal">PWD</code> attributes. This option require SSPI or Kerberos and supersedes any <code class="literal">UID</code>/<code class="literal">PWD</code> attributes passed from the application.</td></tr><tr><td><code class="literal">Encryption</code></td><td>off/request/require</td><td>off</td><td>Specify encryption. See encryption on freetds.conf</td></tr><tr><td><code class="literal">MARS_Connection</code></td><td>Yes/No</td><td>No</td><td>Enable MARS for this connection.</td></tr><tr><td><code class="literal">UseNTLMv2</code></td><td>Yes/No</td><td>No</td><td>Use NTLMv2 instead of normal NTLM. Use this option if your Windows domain have this setting.</td></tr><tr><td><code class="literal">REALM</code></td><td>Machine domain</td><td>none</td><td>Kerberos REALM.</td></tr><tr><td><code class="literal">ServerSPN</code></td><td>Any valid SPN</td><td>MSSQLSvc/server FQDN:port</td><td>Full server Kerberos SPN.</td></tr><tr><td><code class="literal">AttachDbFilename</code></td><td>server filename (mdf/sdf)</td><td>none</td><td>MSSQL allow to attach a database while connecting to a server. This setting allow to do it. You should specify <code class="literal">Database</code> attribute to set the name of the database that will be used.</td></tr><tr><td><code class="literal">DumpFile</code></td><td>Any</td><td> </td><td>File name where to dump logs.</td></tr><tr><td><code class="literal">DumpFileAppend</code></td><td>Yes/No</td><td>No</td><td> </td></tr><tr><td><code class="literal">DumpFlags</code></td><td>Any</td><td> </td><td>Debug flags. See freetds.conf entries.</td></tr><tr><td><code class="literal">ApplicationIntent</code></td><td>ReadWrite/ReadOnly</td><td>ReadWrite</td><td>Tell application intent. See <code class="literal">read-only intent</code> on freetds.conf.</td></tr><tr><td><code class="literal">Timeout</code></td><td>Integer number</td><td> </td><td>Query timeout in seconds.</td></tr></tbody></table></div></div><p><br class="table-break" /></p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="prepodbc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="prepodbc.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dsnless.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Preparing ODBC </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> DSN-less configuration</td></tr></table></div></body></html>