Click here to Skip to main content
14,334,974 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have SQL server 2016 with column encryption enabled when querying the database from a linked server I am receiving the error below

Msg 7356, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "itor" supplied inconsistent metadata for a column. The column "card_num" (compile-time ordinal 3) of object ""itor"."dbo"."chels_view"" was reported to have a "DBTYPE" of 130 at compile time and 128 at run time.

The query is working normally on the original server.

What I have tried:

I tried to search Google and checked SQL server forums.
Posted
Updated 5-May-19 4:27am
Comments
#realJSOP 5-May-19 10:22am
   
is card_num the encrypted column?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

My first guess is that you've specified the wrong type for named column (card_num) - you're expecting a string and it's returning an int, or the other way around.
   
Comments
Mohammad Al Hoss 6-May-19 2:03am
   
This column holds the encrypted data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100