Solved

Inconsistent metadata for a column

Posted on 2009-06-29
9
993 Views
Last Modified: 2012-06-27
I am selecting a lview from an Oracle server over a LInked server via SQL and I get this error and cannot seem to get around it.  Can't find any info on google.

Msg 7356, Level 16, State 1, Line 8
The OLE DB provider "MSDAORA" for linked server "SIDPERS" supplied inconsistent metadata for a column. The column "AUTH" (compile-time ordinal 6) of object ""SIDPERS"."MNLOCAL_ACN_AUTH"" was reported to have a "DBTYPE" of 130 at compile time and 5 at run time.


Select	RSC6,
	UPC,
	PARA,
	LINE,
	DMOS,
	AUTH,
	OS
FROM	SIDPERS..SIDPERS.MNLOCAL_ACN_AUTH

Open in new window

0
Comment
Question by:kdeutsch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24739884
I usually avoid the 4-name syntax for oracle -linked server, and only use the openquery syntax.
alternatively, I create a view on the oracle side, making sure datetime/timestamp is converted to varchar2, for example.
0
 
LVL 15

Accepted Solution

by:
mohan_sekar earned 500 total points
ID: 24739899
0
 

Author Comment

by:kdeutsch
ID: 24748047
The query is already being provided by a view on Oracle, Mohan Seekar reference to articles made us change some variables in Oracle to meet SQL needs.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24749438
>Mohan Seekar reference to articles made us change some variables in Oracle
would you might to clarify what exactly you changed?
as I have the same problem, using the workaround with openquery, I would love to know what you did...
0
 

Author Comment

by:kdeutsch
ID: 24757112
Yes, as soon as i get ahold of my Oracle person, what he told me was that he changed the field values in the Oracle table to match those of SQL.  But I will get specifics and let you know.
0
 

Author Comment

by:kdeutsch
ID: 24762925
angelIII,
In talking with my Oracle person he siad there are variable numeric type in oracle that when queried by MS SQL, SQL cannot find the length of the variable so it throws the error.  The wayt o get around this is to change the variable numeric types to varchars and then reconvert to do math in sql.  Hope that helps
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24763002
>The wayt o get around this is to change the variable numeric types to varchars and then reconvert to do math in sql.  

so, no improvement what I already have and what I suggested in my first comment:
>alternatively, I create a view on the oracle side, making sure datetime/timestamp is converted to varchar2, for example.
0
 

Author Comment

by:kdeutsch
ID: 24763237
ah yes, my mistake, and does need to be corrected to award you points.  if you want to oject that is fine with me and then I can award points.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24763444
na, it's ok for me. just wanted it to be clarified, as I really hoped you had something I did not know!
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question