Error Selecting on AD Linked Server Columns

Looks like not all columns are born equal on Active Directory linked server on SQL Server.

I have a pretty little view which initially was selecting just four columns (mail, samaccountname, company and displayname) from a linked AD on an SQL Server 2000. Trust me, there was a reason to add more columns to the view. However, my attempt to include all the columns I wanted (valid columns!) was throwing error

Server: Msg 7346, Level 16, State 2, Line 1
Could not get the data of the row from the OLE DB provider ‘ADsDSOObject’. Could not convert the data value due to reasons other than sign mismatch or overflow.

After banging my head on the desk a couple of times, I started debugging by adding a column at a time. In the end, I discovered that the following columns won’t play nice: otherTelephone, otherMobile, otherHomePhone and may be a million other columns like that.

Author: Adedeji Olowe

Adedeji / a bunch of bananas ate a monkey /

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.