I'm using a Linked server from SQL Server 2012 to connect to MongoDB via BI Connector ( MongoDB Atlas ).
I can retrieve some info that is int for example, but when running the query below, I receive an error:
select * from openquery([MONGO],'select * from address')
OLE DB provider "MSDASQL" for linked server "MONGO" returned message "Requested conversion is not supported.".
Msg 7341, Level 16, State 2, Line 1 Cannot get the current row value of column "[MSDASQL]._id" from OLE DB provider "MSDASQL" for linked server "MONGO".
I tried everything and I read every post about this issue on the internet with no success. I tried to cast, I tried "allow in process" inside the linked server but it seems I cant retrieve data from mongoDB.
as I read on google, this is because is the MongoDB ODBC driver is correctly describing some MongoDB data to SQL Server as an NVARCHAR(n), but n is greater than the maximum length that SQL Server supports for this data type, so I should use the Schema Editor to change the length for this column to 4000.
theres something calloed mongosqld for MySQL, and there I can set :
SET GLOBAL mongodb_max_varchar_length = X
but where can I find this on SQL Server?