Re: linkserver error

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Sue Hoegemeier (Sue_H_at_nomail.please)
Date: 03/31/04


Date: Wed, 31 Mar 2004 11:35:09 -0700

Because of a difference in the APIs, column bindings when
you are using Openquery. Openquery takes the SQL statement
and sends it directly to Oracle where it's parsed, executed
on the Oracle server and then just the results are sent back
to the client. The client doesn't go through as much "work"
and doesn't have to go through as many of the data access
APIs, bindings to process an openquery statement.

-Sue
 
On Wed, 31 Mar 2004 09:52:11 -0800, "SQL Apprentice"
<mssqlworld@yahoo.com> wrote:

>FYI,
>
>It runs when using OPENQUERY but not straight from a select to the
>linkserver name
>
>Why???
>
>
>"Sue Hoegemeier" <Sue_H@nomail.please> wrote in message
>news:md9k60lq1kklthglkhkb5vvd7h85b66e7m@4ax.com...
>> Check the following article:
>> PRB: Distributed Queries Return Error 7356 with MSDAORA
>> http://support.microsoft.com/?id=251238
>>
>> -Sue
>>
>> On Tue, 30 Mar 2004 14:12:28 -0800, "SQL Apprentice"
>> <mssqlworld@yahoo.com> wrote:
>>
>> >Hello,
>> >
>> >I created a job that uses a linkserver to Oracle db for the past year.
>> >It ran fine until a few days ago when Oracle db schema changed.
>> >
>> >I modified my SQL schema to be the same as theirs but I am still getting
>an
>> >error.
>> >I ran the following on Query Analyzer.
>> >
>> >SELECT *
>> >FROM OracleServer..TableName
>> >
>> >Server: Msg 7356, Level 16, State 1, Line 1
>> >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 'Col1' (compile-time
>> >ordinal 13) of object '"OraDB"."TableName"' was reported to have a DBTYPE
>of
>> >130 at compile time and 5 at run time].
>> >
>> >However, when I user OpenQuery...Then it worked.
>> >SELECT *
>> >FROM OPENQUERY(OracleServer, 'SELECT * FROM OraDB.TableName')
>> >
>> >Can you give me some advice on how to fix this problem...
>> >I have SQL 2000 Ent on W2K Server with latest service packs.
>> >
>> >thank again for your help.
>> >
>> >
>> >
>> >
>> >
>>
>



Relevant Pages

  • Re: copying data oracle2sql
    ... the insert into sql server is not the problem. ... the problem is the loading part from the Oracle driver, and the overhead of the openquery syntax. ... rollback segment number XX with name YYY to small". ...
    (microsoft.public.sqlserver.datawarehouse)
  • Re: Executing Distributed Queries
    ... You have to wrap the SP call in a package that returns a table variable ... then you can call it using OPENQUERY using a pass-through query. ... sample while back about executing DDLs in Oracle via T-SQL. ...
    (microsoft.public.sqlserver.security)
  • Re: SQL 7 to Oracle Openquery
    ... it can only be processed with an Openquery, ... access what data is available in the Oracle database. ... You can join on both the data sources. ...
    (microsoft.public.sqlserver.connect)
  • Re: SQL Srvr/Oracle - help with data type conversion
    ... The table that I brought over from Oracle, as I said had numeric data types, ... but change to nvarchar in SQL Server. ... Seems that Openquery should better ...
    (microsoft.public.sqlserver.programming)
  • Re: Are you guys sure about + in this sp
    ... In the case of OPENQUERY, it is a pass through statement, which means there ... will not be any local parsing & optimization of the SQL statement. ... 4-part naming is that you can use the linked server's query language dialect ... 4-part naming obviously requires the t-SQL dialect. ...
    (microsoft.public.sqlserver.programming)