MSSQL Linked Server error: The OLE DB provider "OraOLEDB.Oracle" for linked server supplied inconsistent metadata for a column
<p>I was trying to pull data from Oracle to <code>MSSqlserver</code> database using Linked server.</p>

<pre><code>select * from [LINK_NAME]..SCHEMA.TABLE;
</code></pre>

<p>But it was failing with the below error:</p>

<blockquote>
  <p>The OLE DB provider "OraOLEDB.Oracle" for linked server "LINK_NAME"
  supplied inconsistent metadata for a column. The column "COLUMN_NAME"
  (compile-time ordinal 6) of object ""SCHEMA"."TABLE"" was reported to
  have a "LENGTH" of 100 at compile time and 200 at run time.</p>
</blockquote>

<p>I also need to pass argument at run time in where condition. I found OPENQUERY as a solution but it does not support arguments at runtime.</p>