Using Oracle Large Object (LOB) Datatype Columns In ODI Integration Interfaces [ID 423768.1]
2012-02-17 21:52
4383 查看
Using Oracle Large Object (LOB) Datatype Columns In ODI Integration Interfaces [ID 423768.1] | ||
Modified 21-NOV-2011 Type PROBLEM Status PUBLISHED |
Symptoms
Cause
Solution
References
Applies to:
Oracle Data Integrator - Version: 3.2.03.01 and later [Release: 3.2.03 and later ]Information in this document applies to any platform.
Symptoms
The following message:java.sql.SQLException: ORA-00932: inconsistent datatypes
is signaled when executing an interface based on Oracle technology.
Remark: One of the mapped columns has a CLOB type in both source, staging area and target data sources.
Cause
Oracle provides the following LOB types:BLOB, used to store binary data.
CLOB, used to store character data using the database character set encoding.
NCLOB, used to store Unicode character data using the national character set.
BFILE, used to reference external files under the operating system's filesystem.
Older versions of Oracle provided LONG and LONG RAW types for character and binary data, respectively. With Oracle9i these were deprecated in favor of LOBs.
See
Oracle Database Application Developer's Guide - Large Objects for details, use and restrictions.
For example, the following operations are invalid:
- SELECT lobcol from table1@remote_site; - INSERT INTO lobtable select type1.lobattr from table1@remote_site; - SELECT dbms_lob.getlength(lobcol) from table1@remote_site;
Solution
A number of restrictions apply to the use of LOB types, the most important being their use in SQL statements.You cannot use a LOB type in any of the following queries:
SELECT DISTINCT <lob_type>
ORDER BY <lob_type>
GROUP BY <lob_col>
It is also illegal to use a LOB type column for:
Table joins,
UNION,
INTERSECTION and
MINUS statements.
Further restrictions apply to other aspects of the use of LOBs, such as you cannot use LOB as a primary key column.
Also:
When binding an internal LOB in order to use piece-wise INSERT/UPDATE, the bind variable may be of type SQLT_CHR or SQLT_LBI but is limited to 4k. You cannot bind a SQLT_LNG to a LOB or a SQLT_LBI that is longer than 4k.
LOBs are not allowed in clustered tables and thus cannot be a cluster key.
LOBs are not allowed in VARRAYs.
NCLOBs are not allowed as attributes in object types but NCLOB parameters are allowed in methods.
LONGs are not allowed in WHERE clause, expressions, aggregates, function calls and Indexes. See
Note.423992.1 <Using Oracle LONG Datatype Columns In ODI(Sunopsis)> for details.
Q: What to do if the desired LOB datatype is not defined in ODI Topology?
A: Manually define the missing datatype as shown in
Note 424012.1 <How Can I Define (New) Datatypes In ODI Topology?>.
Note that, due to a missing datatype, the underlying Datastore may have been incorrectly reverse engineered and the LOB Column type left blank (NULL). In this case:
Create the missing datatype in ODI Topology Manager.
Reverse engineer the Model / Datastore again.
I M P O R T A N T:
Under some conditions, the use of LONG and LOB datatypes from ODI Integration Interfaces may not work as expected, even if Oracle-dedicated Knowledge Modules provided with ODI 10.1.3.5 are used.
For example, if the LOB field contains many bytes of data, the execution of the Integration Interface may show the following message:
java.lang.ClassCastException: java.lang.String at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:7846) at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:7546) at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:7919) at com.sunopsis.sql.SnpsQuery.updateExecStatement(SnpsQuery.java)
The behavior is resolved in version 10.1.3.5.6 of ODI. For details, refer to:
Bug 6870772 WHEN USING LKM SQL TO SQL TO LOAD BLOB AND CLOB DATA WITH ORACLE
References
http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_lobs.htmlhttp://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/toc.htm
http://rocksolutions.wordpress.com/2010/06/07/handling-clobs-made-easy-with-oracle-jdbc-10g/
http://www.oracle.com/technetwork/indexes/samplecode/index.html
NOTE:423992.1 - Using Oracle LONG Datatype Columns In ODI
NOTE:424658.1 - "ORA-00942" Message With Oracle Large Object (LOB) Datatype Fields In ODI Integration Interfaces
NOTE:424012.1 - How Can I Define (New) Datatypes In ODI Topology?
NOTE:423909.1 - "java.lang.NumberFormatException" Or "Cannot start execution" Or "om.sunopsis.jdbc.driver.file.d.i" Signaled When Using Oracle LOB Family Column Types In
ODI Datastores And Integration Interfaces
BUG:6870772 - WHEN USING LKM SQL TO SQL TO LOAD BLOB AND CLOB DATA WITH ORACLE
![]() Related Products Middleware > Data Integration > Oracle Data Integrator (ODI) > Oracle Data Integrator Keywords
|
相关文章推荐
- How To Generate An XML File As A Target Datastore Using ODI In An Integration Interface ? [ID 454268
- Oracle_object_id和data_object_id的区别与联系
- Tracing Sessions in Oracle Using the DBMS_SUPPORT Package (文档 ID 62160.1)
- Change Or Set Report Object Property At Run Time In Oracle Forms Using Set_Report_Object_Property Command
- Collecting Diagnostic Data for Performance Issues in Oracle E-Business Suite (文档 ID 1121043.1)
- ORACLE DBA_OBJECTS视图中OBJECT_TYPE为LOB的对象查看
- [repost]Oracle RDBMS:Generic Large Object (LOB) Performance Guidelines
- app.js:1274 [Vue warn]: Error in render: "TypeError: Cannot read property 'object_id' of undefined"问题小记
- Using C# for Inserting CLOB data in Oracle
- Using the TIME data type in SQL Server 2008
- org.springframework.data.mapping.model.MappingException: No id property found for object of type
- To Search Data in Multiple Columns using 'IN' Clause
- Part 29 - Using data transfer object as the model in mvc
- oracle object_id和data_object_id的区别
- Populating Tabular Data Block Manually Using Cursor in Oracle Forms
- Using Class of Secure Transport (COST) to Restrict Instance Registration in Oracle RAC (Doc ID 13408
- Define Custom Data Filter Using Pre-Query Trigger In Oracle Forms
- The Database ID 30, Page (1:1141), slot 71 for LOB data type node does not exist.