ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatv_5.4.0.1/rzatvodbcman.htm

110 lines
5.9 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="task" />
<meta name="DC.Title" content="Manually configure an ODBC data source" />
<meta name="abstract" content="Learn how to manually configure data source options that can not be set on the GUI." />
<meta name="description" content="Learn how to manually configure data source options that can not be set on the GUI." />
<meta name="DC.Relation" scheme="URI" content="rzatvconfigodbc.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzaik/connectkeywords.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="odbcman" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Manually configure an ODBC data source</title>
</head>
<body id="odbcman"><a name="odbcman"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Manually configure an ODBC data source</h1>
<div><p>Learn how to manually configure data source options that can not
be set on the GUI.</p>
<div class="section"> <p>The <samp class="codeph">ODBC data source graphical user interface(GUI)</samp> contains
a subset of the most commonly used connection options. Additional connection
options are specified by the connecting application or by editing the <samp class="codeph">.odbc.ini</samp> file.</p>
<p> It
is strongly recommended that you reference the Connection string keywords
topic before manually configuring connection options.</p>
<p>Use the following
steps to add connection options to the <samp class="codeph">.odbc.ini</samp> file:</p>
</div>
<ol><li><span>Open the <samp class="codeph">.odbc.ini</samp> file on your workstation using
a text editor. </span><ul><li>For user data sources, this file is in the root directory of the user
who created the data source. For example, the file for user "<var class="varname">exampleUser</var>"
is <samp class="codeph">/home/<var class="varname">exampleUser</var>/.odbc.ini</samp>. </li>
<li>For system data sources, .odbc.ini is located in /etc/odbc.ini or
/usr/local/etc/odbc.ini depending on how you installed the unixODBC driver
manager.</li>
</ul>
</li>
<li><span>If there are multiple ODBC data sources in the <samp class="codeph">.odbc.ini
file</samp>, locate the section in the file that contains the data source,
that is the target for the additional connection options you are configuring. </span></li>
<li><span>Add a new row after the last entry in the data source and enter
the new connection option and its value. </span><ul><li>The syntax is <samp class="codeph">keyword = value</samp>. </li>
<li>For example, if you want to change the date format from its default
of 5 (yyyy-mm-dd or *ISO), to 1 (mm/dd/yy or *MDY), you would add <samp class="codeph">DFT
= 1</samp> in the new row. </li>
</ul>
</li>
<li><span>Repeat step 3 to add additional connection options to the data
source.</span></li>
<li><span>Save the <samp class="codeph">.odbc.ini</samp> file.</span></li>
</ol>
<div class="section"> <div class="fignone"><span class="figcap">Figure 1. An example of a .odbc.ini file DSN entry</span><pre>[iSeriesDSN]
Description = iSeries Access ODBC Driver DSN for iSeries
Driver = iSeries Access ODBC Driver
System = iSeriesSystemName
UserID =
Password =
Naming = 0
DefaultLibraries = QGPL
Database =
ConnectionType = 0
CommitMode = 2
ExtendedDynamic = 0
DefaultPkgLibrary = QGPL
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression = 1
LibraryView = 0
AllowUnsupportedChar = 0
ForceTranslation = 0
Trace = 0</pre>
</div>
<div class="note"><span class="notetitle">Note:</span> <ol><li>Do not add multiple entries for the same connection option to the same
section for a specific data source. This can lead to unpredictable behavior. </li>
<li>After manually editing the registry you can use <samp class="codeph">ODBCConfig</samp> to
configure your data source.<div class="note"><span class="notetitle">Note:</span> Older versions of the <samp class="codeph">unixODBC</samp> driver
manager removed manually added options from the <samp class="codeph">odbc.ini</samp> file
when <samp class="codeph">ODBCConfig</samp> was used to configure the data source. If
you experience this problem, a newer version of the <samp class="codeph">unixODBC</samp> driver
manager is needed.</div>
</li>
<li>Options specified by the application in the connection string override
any options specified in the <samp class="codeph">.odbc.ini</samp> file.</li>
</ol>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzatvconfigodbc.htm" title="Use this information to configure an ODBC data source.">Configure an ODBC data source</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../rzaik/connectkeywords.htm">Connection string keywords</a></div>
</div>
</div>
</body>
</html>