Linked server

Hosein Shali 0 Reputation points
2023-11-06T09:45:55.02+00:00

Hi

I am using SQL 2022 to connect to Oracle

(Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.14.0.0.0 ,

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.20.0.0.0 )

, I get the following error.

I also tested the following solutions but did not get an answer

use option recompile

Use same datatype

enable distributed transaction

Please guide me.

The OLE DB provider "OraOLEDB.Oracle" for linked server "" supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,582 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bjoern Peters 8,731 Reputation points
    2023-11-06T16:42:07.5366667+00:00

    Hello Hosein,

    Welcome to Q&A Forum; this is a great place to get support, answers, and tips.

    Thank you for posting your question; I'll be more than glad to help you out.

    As you didn't supply much information on what you are trying, my answer might lead in the wrong direction...

    1.) There is a patch from Oracle for 19C on this error
    https://support.oracle.com/knowledge/Oracle%20Database%20Products/2484393_1.html

    2.) Maybe you are running into an issue that can be fixed with a 4-part query or you might find some help here:
    https://techcommunity.microsoft.com/t5/sql-server-support-blog/how-to-get-up-and-running-with-oracle-and-linked-servers/ba-p/318636

    I hope my answer is helpful to you,

    Your

    Bjoern Peters

    If the reply was helpful, please upvote and/or accept it as an answer, as this helps others in the community with similar questions. Thanks!


  2. CosmogHong-MSFT 17,156 Reputation points Microsoft Vendor
    2023-11-08T02:01:25.6433333+00:00

    Hi @Hosein Shali

    Please check if it is the version issue.

    Here are similar threads you might refer to:

    Linked Server Throws Metadata Error.

    MSSQL Linked Server error: The OLE DB provider "OraOLEDB.Oracle" for linked server supplied inconsistent metadata for a column

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments