blob: 1cb53db027eb8f1b175d109c53ccfbd3657ec6b3 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>8.&nbsp; IBM DB2</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.3 User's Guide"><link rel="up" href="supported_databases.html" title="Appendix&nbsp;2.&nbsp; Supported Databases"><link rel="prev" href="dbsupport_jdatastore.html" title="7.&nbsp; JDataStore"><link rel="next" href="dbsupport_empress.html" title="9.&nbsp; Empress"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.&nbsp;
IBM DB2
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dbsupport_jdatastore.html">Prev</a>&nbsp;</td><th width="60%" align="center">Appendix&nbsp;2.&nbsp;
Supported Databases
</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="dbsupport_empress.html">Next</a></td></tr></table><hr></div><div class="section" title="8.&nbsp; IBM DB2"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="dbsupport_db2">8.&nbsp;
IBM DB2
</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="dbsupport_db2.html#dbsupport_db2_issues">8.1.
Known issues with DB2
</a></span></dt></dl></div>
<div class="example"><a name="example_props_db2"></a><p class="title"><b>Example&nbsp;2.4.&nbsp;
Example properties for IBM DB2
</b></p><div class="example-contents">
<pre class="programlisting">
openjpa.ConnectionDriverName: com.ibm.db2.jcc.DB2Driver
openjpa.ConnectionURL: jdbc:db2://SERVER_NAME:SERVER_PORT/DB_NAME
</pre>
</div></div><br class="example-break">
<div class="section" title="8.1.&nbsp; Known issues with DB2"><div class="titlepage"><div><div><h3 class="title" id="dbsupport_db2_issues">8.1.&nbsp;
Known issues with DB2
</h3></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<p>
Floats and doubles may lose precision when stored.
</p>
</li><li class="listitem">
<p>
Empty char values are stored as NULL.
</p>
</li><li class="listitem">
<p>
Fields of type BLOB and CLOB are limited to 1M. This number can be increased by
extending <code class="classname">DB2Dictionary</code>.
</p>
</li><li class="listitem">
<p>
Explicit creation of indexes specified by the OpenJPA @Index annotation will
fail on DB2 for iSeries if the default schema used by the JDBC driver does not
exist. If a default schema is not specified on the connection, the iSeries
will default to the user profile name. If a schema of that name does not
exist, DB2 on iSeries will not create the schema, resulting in a failure when
creating the index. The failure message will look similar to: "[SQL0204]
USERNAME in QSYS type *LIB not found." To work around this issue, specify a
default schema on the JDBC URL or data source property and make sure that
schema exists or create a schema which matches the user profile of the
connection.
</p>
</li><li class="listitem">
<p>
Use of DB2 on z/OS with the IBM JCC driver requires the DESCSTAT subsystem
parameter value to be set to 'YES'. If this parameter is set to 'NO', the
mapping tool will fail with a persistence exception containing this text:
"Invalid parameter: Unknown column name TABLE_SCHEM". After changing the value
of DESCSTAT, DB2 metadata tables must be recreated by running the DSNTIJMS job.
See DB2 for z/OS documentation for additional information.
</p>
</li><li class="listitem">
<p>
When using LOBs with persistent attributes of a streaming data type (e.g.
<code class="literal">java.io.InputStream</code>) in the case of very large LOB, DB2 JCC
driver will automatically use progressive streaming to retrieve the LOB data.
With progressiveStreaming, the inputStream retrieved must be fully materialized
before the next iteration of call to rs.next(). By default
this will result in a LobClosedException when OpenJPA processes the InputStream.
</p>
<p>
To work around this condition you may force fullyMaterializedLobData to true in
the connection URL as shown below :
</p><pre class="programlisting">
openjpa.ConnectionURL: jdbc:db2://localhost:50000/demodb:fullyMaterializeLobData=true;progressiveStreaming=NO
</pre><p>
</p>
</li></ul></div>
</div>
</div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dbsupport_jdatastore.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="supported_databases.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="dbsupport_empress.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">7.&nbsp;
JDataStore
&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;9.&nbsp;
Empress
</td></tr></table></div></body></html>