problem: cannot select data from Oracle using MS SQL Server (querry analyzer)

I'm using connection between MS SQL Server and ORACLE 9i, when I'm trying to transfer data from Oracle view, the following error is reported:

OLE DB provider 'MSDAORA' supplied inconsistent metadata for a column. Metadata information was changed at execution time.

OLE DB error trace [Non-interface error:  Column 'OB_ID' (compile-time ordinal 4) of object '"OBI"."LEG_V"' was reported to have a DBTYPE of 131 at compile time and 130 at run time].

How can I resolve a problem?
PremanidhiAsked:
Who is Participating?
 
Helena MarkováConnect With a Mentor programmer-analystCommented:
If it is not an Oracle problem then it can be cuased by MS OLE Driver - MSDAORA.DLL.
Oracle 9.2.0.1.0 is rather buggy version, you can upgrade to 9.2.0.4.1.
I am sorry that is all I can do :(
0
 
Helena Markováprogrammer-analystCommented:
Here is something from MetaLink - Note:272658.1
OraOLEDB.Oracle' supplied inconsistent metadata for a column" error occured when querying a table with a Number column in Query Analyzer

The information in this article applies to:
Oracle Provider for OLE DB - Version: 9.2.0.2
This problem can occur on any platform.
SQL Server 2000 SP2
Windows 2000 sp3
MDAC 2.7
Oracle Client 9.0.2.3.0
Oracle Database 9.0.2.3.0 on Windows 2003

Symptoms
Using Linked server from SQLServer2000 SP2, querying a table that contains a number datatype. Which does not have any precision specified. Results in the following error:

Server: Msg 7356, Level 16, State 1, Line 1 OLE DB provider 'OraOLEDB.Oracle' supplied inconsistent metadata for a column. Metadata information was changed at execution time.

Here is an example of a table:
Create Table foo (no number); <- Table that causes the error to occur
Create Table foo2 (no number(2)); <- Table that does not cause the error
Insert into foo values (1);
Insert into foo2 values (2);

The query was issued using Query Analyzer using the following syntax:
select * from TIGER..SCOTT.FOO

If the precision is specified then the error does not occur.

Cause
The Oracle Provider for OLE DB was having problems pulling back the table in Query Analyzer with the number column that does not contain a precision value.

Fix
Upgrade the Oracle Provider for OLE DB to version 9.2.0.4.0. This resolved the error.

References
<BUG:3003992> - 'Oraoledb.Oracle' Supplied Inconsistent Metadata For A Column With A Number
0
 
PremanidhiAuthor Commented:
I have already upgraded Oracle Provider to version 9.2.0.4.0., but problem is the same
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
PremanidhiAuthor Commented:
Here is part description on view:

MO_PO                NUMBER
MO_PR                NUMBER
MO_DR                NUMBER
MO_VI                 NUMBER
OP                      VARCHAR2(2000)
ID_OBJ                 NUMBER(8)
DST_ID                NUMBER(8)
KSRS                   VARCHAR2(1)
ZKV                     VARCHAR2(10)
0
 
Helena Markováprogrammer-analystCommented:
This is strange:
OLE DB error trace [Non-interface error:  Column 'OB_ID' (compile-time ordinal 4) of object '"OBI"."LEG_V"' ...
and in a view there is no such column ...
0
 
PremanidhiAuthor Commented:
Sorry, i didn't paste complete description on view, there is also ob_id and many others columns, which i didn't paste.

MO_PO                NUMBER
MO_PR                NUMBER
MO_DR                NUMBER
MO_VI                 NUMBER
OP                      VARCHAR2(2000)
ID_OBJ                 NUMBER(8)
DST_ID                NUMBER(8)
KSRS                   VARCHAR2(1)
ZKV                     VARCHAR2(10)
OB_ID                  NUMBER (3)
...
0
 
Helena Markováprogrammer-analystCommented:
What is your Oracle database version ? It seems that it ought to be upgraded, too.
0
 
PremanidhiAuthor Commented:
Oracle enterprise 9.2.0.1.0
0
 
Helena Markováprogrammer-analystCommented:
I must correct this - 9.0.1 is buggy ...
0
All Courses

From novice to tech pro — start learning today.