Quantcast
Channel: SQL Server Setup & Upgrade Forum
Viewing all articles
Browse latest Browse all 7701

Linked server issue using SQLNCLI versions on SQL 2008 & 2014

$
0
0

Hi all,

Our product creates databases on a sql server 2008 instance and creates linked servers between them to use distributed queries.
This looks like: "EXEC sp_addlinkedserver 'linkDatabaseA', '', 'SQLNCLI10', '.', NULL, NULL, 'DatabaseA'"".
Distributed queries from second database to DatabaseA work fine in this scenario.

As we want to support both SQL 2008 and SQL 2014 in the next product version, I changed this to SQLNCLI11 as the provider
and tested on SQL 2008 after installation of the SQLNCLI11 driver.

This resulted in following error message:

Msg 468, Level 16, State 9, Line 7
Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

This is very suprising as the SQL Server 2008 instance and both DB's have "SQL_Latin1_General_CP1_CI_AS" as their collation sequence.

Then I tried the opposite, installing SQLNCLI10 on SQL 2014. This gave exactly same error! Using SQLNCLI11 went fine ofcourse.

Generation sp_addlinkedserver statements with correct driver based on SQL version, I'd rather not do (some of the calls are
generated in SQL from settings in other db tables which are also used for external connx) and adding COLLATE to the queries also
has consequences like performance degradation. Adding collate on SQL 2014 with SQLNCLI10 as linked server provider results in
following error:

Msg 7399, Level 16, State 1, Line 1617
The OLE DB provider "SQLNCLI10" for linked server "linkDatabaseA" reported an error. Access denied.
Msg 7301, Level 16, State 2, Line 1617
Cannot obtain the required interface ("IID_IDBCreateCommand") from OLE DB provider "SQLNCLI10" for linked server "linkDatabaseA".

Q: Is there any way that SQLNCLI11 can be made to work for linked servers on SQL2008 (preferred solution) or SQLNCLI10 on SQL2014?

Thx for any feedback.

Regards, Jouke


Viewing all articles
Browse latest Browse all 7701

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>