Microsoft Knowledge Base Email Alertz

FIX: Several problems occur when you use a linked server that was created by the SQL Native Client provider in SQL Server 2008

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 979779 - Last Review: October 9, 2011 - Revision: 4.0

FIX: Several problems occur when you use a linked server that was created by the SQL Native Client provider in SQL Server 2008

Microsoft distributes Microsoft SQL Server 2008 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release.

On This Page

SYMPTOMS

On a computer that is running Microsoft SQL Server 2008, you experience one or more of the following issues when you create a linked server by using the SQL Native Client provider (Sqlncli.dll).

Note These issues also occur in Microsoft SQL Server 2005 Service Pack 3 (SP3). However, the hotfix in this article does not apply to SQL Server 2005 SP3.

Issue 1

Consider the following scenario:
  • In SQL Server Management Studio, you open the New Linked Server window and create a linked server by using one of the following setups:
    • SQL Native Client provider with Server type as SQL Server
    • SQL Native Client (not SQL Native Client 10) provider with Server type as Other data source
    • Microsoft OLE DB Provider for SQL Server with Server type as Other data source
  • You expand the Linked Servers catalog in SQL Server Management Studio to see the linked servers.
In this scenario, the SQL Server service shuts down unexpectedly or a mini-dump file is generated repeatedly in the SQL Server Error log folder. This issue continues until the SQL Server service is stopped. In addition, SQL Server Management Studio reports the following error:

TITLE: Microsoft SQL Server Management Studio
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476 (http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476)
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (Microsoft SQL Server, Error: -2)



Note This problem does not occur if you run a linked server query when you use SQL Native Client provider with Server type as SQL Server.

Issue 2

Consider the following scenario:
  • You create a linked server by using the Microsoft OLE DB Provider for ODBC Drivers.
  • The ODBC data source is created by using SQL Native Client provider with Server type as Other data source.
In this scenario, the linked server returns no results.

RESOLUTION

The fix for this issue was first released in Cumulative Update 7 for SQL Server 2008 Service Pack 1. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base: -
979065  (http://kbalertz.com/Feedback.aspx?kbNumber=979065/ ) Cumulative update package 7 for SQL Server 2008 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base: -
970365  (http://kbalertz.com/Feedback.aspx?kbNumber=970365/ ) The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released
Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 1 hotfix to an installation of SQL Server 2008 Service Pack 1. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

MORE INFORMATION

You can confirm the version of the Sqlncli.dll and Sqlservr.exe files by running following query:
select * from sys.dm_os_loaded_modules where name like '%sqlncli.dll' or name like '%sqlservr.exe'
If you are using Microsoft SQL Server 2008 Service Pack 1 (SP1) or later versions of Microsoft SQL Server 2008, the query will return the following version information:
  • The Sqlncli.dll file will have a version later than 9.0:3207.0.
  • The Sqlservr.exe file will have a version later than or equal to 10.0:2531.0, but earlier than 10.0:2766.0.
If you are using Microsoft SQL Server 2008 RTM or later versions of SQL Server 2008 RTM, the query will return the following version information:
  • The Sqlncli.dll file will have a version later than version 9.0:3207.0.
  • The Sqlservr.exe file will have a version later than or equal to 10.0:1600.0, but earlier than 10.0:1835.0.

WORKAROUND

To work around these problems, follow these steps:

Workaround 1:

1.     Delete the failing linked server.

2.     Create a new linked server using the SQL Server Native Client 10.0 (SQLNCLI10) provider. To do this:
a. Right-click on Linked Servers and select New Linked Server.
b. Select Other data source and choose SQL Server Native Client 10.0 for Provider.

Workaround 2:
  1. Create a registry subkey named "SQLNCLI" in the following path:
    HKLM\Software\Microsoft\DataAccess
  2. Create a REG_DWORD-type registry entry named “SQLOSPartitioning” under this subkey.
  3. Set the value of this entry to 0x0.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

SQL Server 2008 R2 BPA Information

The SQL Server 2008 R2 Best Practice Analyzer (SQL Server 2008 R2 BPA) provides a rule to detect situations in which the affected versions of SQLNCLI.DLL and SQLSERVR.EXE are used by an instance of SQL Server. The SQL Server 2008 R2 BPA supports both SQL Server 2008 and SQL Server 2008 R2. 

If you run the BPA tool and encounter the warning, "Database Engine - Detected use of older versions of SQLNCLI," you need to apply the fixes and take corrective actions as described in this article.

References

Collapse this tableExpand this table
Rule SoftwareRule TitleRule Identifier
SQL Server 2008 R2 BPA RuleDetected use of older versions of SQLNCLIRID3821


REFERENCES

For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
935897  (http://kbalertz.com/Feedback.aspx?kbNumber=935897/ ) An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems


For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
822499  (http://kbalertz.com/Feedback.aspx?kbNumber=822499/ ) New naming schema for Microsoft SQL Server software update packages


For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://kbalertz.com/Feedback.aspx?kbNumber=824684/ ) Description of the standard terminology that is used to describe Microsoft software updates

APPLIES TO
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
kbfix kbexpertiseadvanced kbsurveynew kbqfe KB979779
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate