Binding information is invalid
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.
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.
Comment from: Tim [Visitor]
We 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.
02/11/15 @ 17:18
Leave a comment
DBA BlogUseful things about managing SQL Server. Scripts, errors, tips and other thinks that worth sharing.