What driver does SQL Server use for a Linked Server (SQL Server to SQL Server)

  • I have several SQL Server instances (2012-2016) that I have set up linked severs to/from SQL Server. I want to make sure that all the drivers are the same version on all servers. However, I'm not quite sure what driver that linked server uses.

    To set up a linked server, I simply chose "SQL Server" as the server type.

    If I query sys.servers it lists the provider as "SQLNCLI"

    When I look in the the ODBC administrator, I see various entries under the Drivers tab. For example:

    ODBC Driver 17 for SQL Server version 2017.175.02.01 MSODBCSQL17.DLL

    SQL Server 6.03.9600.17415 SQLSRV32.DLL

    SQL Server Native Client 2011.110.7493.04 SQLNCLI11.DLL

    Any help is greatly appreciated!

    Marty

     

  • This is an easy one - if you pick SQLNCLI for the provier, it will use the SQLNCLI driver.  SQLNCLI is the SQL Server Native Client driver.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Thank you for the quick response. So SQL Server is using SQL Server Native Client 2011.110.7493.04  SQLNCLI11.DLL.

    When I google SQL Server Native Client driver (to download the latest version) this is the response from Microsoft:

    The SQL Server Native Client (SQLNCLI) remains deprecated and it is not recommended to use it for new development work. Instead, use the new Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) which will be updated with the most recent server features.

    So, if it's depreciated, my question is why does SQL Server use it by default? I just chose the SQL Server connection, not the "other data sources" option where I choose a provider.

  • The official docs from Microsoft state it uses that one.  See:

    https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-addlinkedserver-transact-sql?view=sql-server-ver15

    And the table towards the end states that SQL Server (default) uses "Microsoft SQL Server Native Client OLE DB Provider".  Further on it states "The Microsoft SQL Server Native Client OLE DB provider is the provider that is used with SQL Server if no provider name is specified or if SQL Server is specified as the product name. Even if you specify the older provider name, SQLOLEDB, it will be changed to SQLNCLI when persisted to the catalog.".  As to why Microsoft seems to list contradictory information, I am not sure why they post multiple times in that article "SQL Server Native Client OLE DB provider (SQLNCLI) remains deprecated and it is not recommended to use it for new development work. Instead, use the new Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) which will be updated with the most recent server features."

    Best guess is they are using that by default for compatibility.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Thanks again....

    Marty

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply