Solved

Inconsistent metadata for a column

Posted on 2009-06-29
9
926 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
  • 4
  • 4
9 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
0
 

Author Comment

by:kdeutsch
Comment Utility
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
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
>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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:kdeutsch
Comment Utility
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
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
>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
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now