Problem

When trying to select data from a view through a linked server the following error can appear:

SELECT *  FROM [SERVER_NAME].DATABASE_NAME.DBO.VIEW_NAME


OLE DB provider "SQLNCLI" for linked server "SERVER_NAME" returned message "Binding information is invalid.".

Msg 7346, Level 16, State 2, Line 1

Cannot get the data of the row from the OLE DB provider "SQLNCLI" for linked server " SERVER_NAME".

 

Tested with other views / tables, the linked server turns out to work fine so the problem is in particular with that view.

 

Solution

As a workaround you can select data from that view using OPENQUERY, and it works. 

SELECT * FROM OPENQUERY([SERVER_NAME], 'SELECT *  FROM DATABASE_NAME.DBO.VIEW_NAME')

 

The problem seems to be related to this particular view definition (wrong data type used, etc).

After recreating the view the select through linked server worked fine.

 


1 comment

Comment from: Tim [Visitor] Email
TimWe are seeing this exact same issue. Everything was working fine and now we are getting the binding error.
What has caused this to change?
Did Microsoft send out an update that caused our linked servers to now need the queries re-written to work?
I need to report to management why the change is needed.
Thanks,
02/11/15 @ 17:18

Leave a comment


Your email address will not be revealed on this site.
(Line breaks become <br />)
(For my next comment on this site)
(Allow users to contact me through a message form -- Your email will not be revealed!)