Friday, April 11, 2008

Server: Msg 7347, Level 16, State 1, Line 1 OLE DB provider 'SQLOLEDB' returned an unexpected data length for the fixed-length column

I got the error described here http://support.microsoft.com/kb/920930
when running a test select * from a view on a linked server





Server: Msg 7347, Level 16, State 1, Line 1 OLE DB provider 'SQLOLEDB' returned an unexpected data length for the fixed-length column '[LinkedServerName].[DBName].[OwnerName].[TableOrViewName].ColumnName'. The expected data length is n, while the returned data length is m.





when searching on google web/groups the compains were for sql server 2000 and below so not much help until i decided run the same query on the linked server itself and it went through without a problem.
turned out the column in question (the one that reportedly returned larger data than expected) is empty.
so i just rewrote the query to return only a subset of data i needed and all worked nicely

so...fun...

No comments :