We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Inconsistent metadata for a column

Medium Priority
1,664 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

Comment
Watch Question

Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
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.
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
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.
Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
>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...

Author

Commented:
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.

Author

Commented:
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
Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
>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.

Author

Commented:
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.
Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
na, it's ok for me. just wanted it to be clarified, as I really hoped you had something I did not know!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.