289 lines
17 KiB
HTML
289 lines
17 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="reference" />
|
|
<meta name="DC.Title" content="DataSource properties" />
|
|
<meta name="abstract" content="This table contains valid data source properties, their values, and their descriptions." />
|
|
<meta name="description" content="This table contains valid data source properties, their values, and their descriptions." />
|
|
<meta name="DC.Relation" scheme="URI" content="connects.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="db2drivr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="conprop.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="udbdatsr.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="otherdts.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="dasrprop" />
|
|
<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>DataSource properties</title>
|
|
</head>
|
|
<body id="dasrprop"><a name="dasrprop"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">DataSource properties</h1>
|
|
<div><p>This table contains valid data source properties, their values,
|
|
and their descriptions.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="top" id="d0e19">Set method (data type)</th>
|
|
<th align="left" valign="top" id="d0e21">Values</th>
|
|
<th align="left" valign="top" id="d0e23">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" headers="d0e19 ">setAccess(String)</td>
|
|
<td valign="top" headers="d0e21 ">"all", "read call", "read only"</td>
|
|
<td valign="top" headers="d0e23 ">This property can be used to restrict the type of operations that can
|
|
be done with a specific connection. The default value is "all" and basically
|
|
means that the connection has full access to the Java™ Database Connectivity (JDBC) API.
|
|
<p>The "read call" value allows the connection to only perform queries and
|
|
call stored procedures. An attempt to update the database through an SQL statement
|
|
causes an SQLException.</p>
|
|
<p>The "read only" value restricts the connection
|
|
to only queries. An attempt to process a stored procedure call or update statements
|
|
causes an SQLException.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setBatchStyle(String)</td>
|
|
<td valign="top" headers="d0e21 ">"2.0", "2.1"</td>
|
|
<td valign="top" headers="d0e23 ">The JDBC 2.1 specification defines a second method for how exceptions
|
|
in a batch update can be handled. The driver can comply with either of these.
|
|
The default is to work as defined in the JDBC 2.0 specification.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setUseBlocking(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property is used to determine whether or not the connection uses
|
|
blocking on result set row retrieval. Blocking can significantly improve the
|
|
performance of processing result sets. <p>By default, this property is set
|
|
to true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setBlockSize(int)</td>
|
|
<td valign="top" headers="d0e21 ">"0", "8", "16", "32", "64", "128", "256", "512"</td>
|
|
<td valign="top" headers="d0e23 ">This property indicates the number of rows that are fetched at a time
|
|
for a result set. For typical forward only processing of a result set, a block
|
|
of this size is obtained if the database has that many rows that satisfy the
|
|
query. Only when the end of the block is reached in the JDBC driver's internal
|
|
storage, another request for a block of data is sent to the database. <p>This
|
|
value is only used if the useBlocking property is set to true. Refer to setUseBlocking
|
|
above for more information.</p>
|
|
<p>Setting the block size property to "0"
|
|
has the same effect as calling setUseBlocking(false).</p>
|
|
<p>The default
|
|
is to use blocking with a block size of "32". This is a fairly arbitrary decision
|
|
and the default could change in future releases.</p>
|
|
<p>Blocking
|
|
is not used on scrollable result sets.</p>
|
|
<p>Using blocking affects the
|
|
degree of cursor sensitivity the user application has. A sensitive cursor
|
|
sees changes made by other SQL statements. However, because of data caching,
|
|
changes are only detected when data needs to be fetched from the database.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setCursorHold(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property specifies whether or not result sets remain open when
|
|
a transaction is committed. A value of true means that an application is able
|
|
to access its open result sets after commit is called. A value of false means
|
|
that commit closes any open cursors under the connection. <p>By default, this
|
|
property is set to true.</p>
|
|
<p>This property serves as a default value for
|
|
all result sets made for the connection. With cursor support added in JDBC
|
|
3.0 (see the <a href="rsltchar.htm">ResultSet characteristics</a> section
|
|
for details), this default is simply replaced if an application specifies
|
|
different cursor support later.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDataTruncation(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property specifies the following: <ul><li>Whether truncation of character data should cause warnings and exceptions
|
|
to be generated (true)</li>
|
|
<li>If the data should just be silently truncated (false).</li>
|
|
</ul>
|
|
See <a href="datatruk.htm">DataTruncation</a> for additional
|
|
details.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDatabaseName(String)</td>
|
|
<td valign="top" headers="d0e21 ">Any name</td>
|
|
<td valign="top" headers="d0e23 ">This property specifies the database to which the DataSource attempts
|
|
to connect. The default is *LOCAL. The database name must either exist in
|
|
the relational database directory on the system that runs the application
|
|
or be the special value *LOCAL or localhost to specify the local system.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDataSourceName(String)</td>
|
|
<td valign="top" headers="d0e21 ">Any name</td>
|
|
<td valign="top" headers="d0e23 ">This property allows the passing of a ConnectionPoolDataSource Java Naming
|
|
and Directory Interface (JNDI) name to support connection pooling.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDateFormat(String)</td>
|
|
<td valign="top" headers="d0e21 ">"julian", "mdy", "dmy", "ymd", "usa", "iso", "eur", "jis"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows you to change how dates are formatted.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDateSeparator(String)</td>
|
|
<td valign="top" headers="d0e21 ">"/", "-", ".", ",", "b"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows you to change what the date separator is. This
|
|
is only valid in combination with some of the dateFormat values (according
|
|
to system rules).</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDecimalSeparator(String)</td>
|
|
<td valign="top" headers="d0e21 ">".", ","</td>
|
|
<td valign="top" headers="d0e23 ">This property allows you to change what the decimal separator should
|
|
be.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDescription(String)</td>
|
|
<td valign="top" headers="d0e21 ">Any name</td>
|
|
<td valign="top" headers="d0e23 ">This property allows the setting of this DataSource object's text description.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setDoEscapeProcessing(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property specifies whether SQL statements have escaped processing
|
|
done on them. <p>The default value for this property is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setFullErrors(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows second-level error text of the full system to
|
|
be returned in SQLException object messages. The default is false.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setLibraries(String)</td>
|
|
<td valign="top" headers="d0e21 ">A space-separated list of libraries</td>
|
|
<td valign="top" headers="d0e23 ">This property allows a list of libraries to be placed into the server
|
|
job's library list. This property is only used when setSystemNaming(true)
|
|
is used. </td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setLobThreshold(int)</td>
|
|
<td valign="top" headers="d0e21 ">Any value under 500000</td>
|
|
<td valign="top" headers="d0e23 ">This property tells the driver to place the actual values instead of
|
|
Locator OBject (LOB) locators if the LOB column is smaller than the threshold
|
|
size.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setLoginTimeout(int)</td>
|
|
<td valign="top" headers="d0e21 ">Any value</td>
|
|
<td valign="top" headers="d0e23 ">This property is currently ignored and is planned for future use.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setNetworkProtocol(int)</td>
|
|
<td valign="top" headers="d0e21 ">Any value</td>
|
|
<td valign="top" headers="d0e23 ">This property is currently ignored and is planned for future use.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setPassword(String)</td>
|
|
<td valign="top" headers="d0e21 ">Any string</td>
|
|
<td valign="top" headers="d0e23 ">This property allows for a password to be specified for the connection.
|
|
This property is ignored if a user ID is not set.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setPortNumber(int)</td>
|
|
<td valign="top" headers="d0e21 ">Any value</td>
|
|
<td valign="top" headers="d0e23 ">This property is currently ignored and is planned for future use.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setPrefetch(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property specifies whether the driver fetchs the first data for
|
|
a result set immediately after processing or waits until the data is requested.
|
|
The default is true.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setReuseObjects(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property specifies whether the driver attempts to reuse some types
|
|
of objects after you close them. This is a performance enhancement. The default
|
|
is true.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setServerName(String)</td>
|
|
<td valign="top" headers="d0e21 ">Any name</td>
|
|
<td valign="top" headers="d0e23 ">This property is currently ignored and is planned for future use.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setServerTraceCategories(int)</td>
|
|
<td valign="top" headers="d0e21 ">A string representation of an integer</td>
|
|
<td valign="top" headers="d0e23 ">This property enables tracing of the JDBC server job. If server tracing
|
|
is enabled, tracing starts when the client connects to the server, and ends
|
|
when the connection is disconnected. <p>Trace data is collected in spooled
|
|
files on the server. Multiple levels of server tracing can be turned on in
|
|
combination by adding the constants and passing that sum on the set method.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> This
|
|
property is typically used by support personnel and its values are not discussed
|
|
further.</div>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setSystemNaming(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows specifying whether collections and tables are
|
|
separated by a period (SQL naming) or a slash (system naming). This property
|
|
also determines whether a default library is used (SQL naming) or the library
|
|
list is used (system naming). The default is SQL naming.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setTimeFormat(String)</td>
|
|
<td valign="top" headers="d0e21 ">"hms", "usa", "iso", "eur", "jis"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows you to change how time values are formatted.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setTimeSeparator(String)</td>
|
|
<td valign="top" headers="d0e21 ">":", ".", ",", "b"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows you to change what the time separator is. This
|
|
is only valid in combination with some of the timeFormat values (according
|
|
to system rules).</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setTrace(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property can enable a simple trace. The default value is false.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setTransactionIsolationLevel(String)</td>
|
|
<td valign="top" headers="d0e21 ">"none", "read committed", "read uncommitted", "repeatable read", "serializable"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows the specification of the transaction isolation
|
|
level. The default value for this property is "none", as JDBC defaults to
|
|
auto-commit mode.</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setTranslateBinary(Boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property can be used to force the JDBC driver to treat binary
|
|
and varbinary data values as if they were char and varchar data values. <p>The
|
|
default for this property is false.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setUseBlockInsert(boolean)</td>
|
|
<td valign="top" headers="d0e21 ">"true", "false"</td>
|
|
<td valign="top" headers="d0e23 ">This property allows the native JDBC driver to go into a block insert
|
|
mode for inserting blocks of data into the database. This is an optimized
|
|
version of the batch update. This optimized mode can only be used in applications
|
|
that ensure that they do not break certain system constraints or data insert
|
|
failures and potentially corrupt data. <p>Applications that turn on this
|
|
property only connect to the local system when attempting to perform batched
|
|
updates. They do not use DRDA<sup>®</sup> to establish remote connections because a blocked
|
|
insert cannot be managed over DRDA.</p>
|
|
<p>Applications must also ensure
|
|
that PreparedStatements with an SQL insert statement and a values clause make
|
|
all the insert values parameters. No constants are permitted in the values
|
|
list. This is a requirement of the blocked insert engine of the system.</p>
|
|
<p>The
|
|
default is false.</p>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" headers="d0e19 ">setUser(String)</td>
|
|
<td valign="top" headers="d0e21 ">anything</td>
|
|
<td valign="top" headers="d0e23 ">This property allows the setting of a user ID for obtaining connections.
|
|
This property requires that you also set the password property.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="connects.htm" title="The Connection object represents a connection to a data source in Java Database Connectivity (JDBC). It is through Connection objects that Statement objects are created for processing SQL statements against the database. An application program can have multiple connections at one time. These Connection objects can all connect to the same database or connect to different databases.">Connections</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="db2drivr.htm" title="DriverManager is a static class in the Java 2 Software Development Kit (J2SDK). DriverManager manages the set of Java Database Connectivity (JDBC) drivers that are available for an application to use.">DriverManager</a></div>
|
|
<div><a href="udbdatsr.htm" title="DataSource interfaces were designed to allow additional flexibility in using Java Database Connectivity (JDBC) drivers.">Use DataSources with UDBDataSource</a></div>
|
|
<div><a href="otherdts.htm" title="There are two implementations of the DataSource interface that are included with the native JDBC driver. These DataSource implementations should be considered deprecated. While you can still use them, they are not enhanced with future improvements; for example, robust connection and statement pooling are not added to these implementations. These implementations exist until you adopt the UDBDataSource interface and its related functions.">Other DataSource implementations</a></div>
|
|
</div>
|
|
<div class="relref"><strong>Related reference</strong><br />
|
|
<div><a href="conprop.htm" title="This table contains valid JDBC driver connection properties, their values, and their descriptions.">Connection properties</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |