Applies ToSQL Server 2008 SQL Server 2008 R2

Microsoft distributes Microsoft SQL Server 2008 Microsoft SQL Server 2008 R2 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 SQL Server 2008 R2 fix release.

Symptoms

Consider the following scenario:

  • You have one server that is running replication in a Microsoft SQL Server 2008 or in a Microsoft SQL Server 2008 R2 environment.

  • You have a second server that is running Microsoft SQL Server 2008 or Microsoft SQL Server 2008 R2, and replication is disabled or is not installed.

  • You restore a replicated database of the first server to the second server.

  • During the database restore process, a user or application runs the stored procedure sp_replcounters on the second server.

In this scenario, an access violation may occur on the second server. Additionally, a stack dump file is created in the SQL Server log folder. When this issue occurs, you may have to restart the second server.

Cause

This problem occurs because the stored procedure sp_replcounters runs on a server where replication is disabled or not installed. When sp_replcounters tries to access the article cache, the database restore operation has already called clear_db_repl_cache to remove the database from the article cache before the database is added back into the article cache.

Resolution

Cumulative update information

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 9. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:

2567713 Cumulative Update package 9 for SQL Server 2008 R2 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 R2 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:

981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

SQL Server 2008 R2 Service Pack 1

The fix for this issue was first released in Cumulative Update 2 for SQL Server 2008 R2 Service Pack 1. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

2567714 Cumulative Update package 2 for SQL Server 2008 R2 Service Pack 1Note 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 R2 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:

2567616 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

SQL Server 2008

The fix for this issue was first released in Cumulative Update 4. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:

2527180 Cumulative update package 4 for SQL Server 2008 Service Pack 2Note 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:

956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released

Status

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

More Information

For more information about what files are changed, and for information about any prerequisites to apply the cumulative update package that contains the hotfix that is described in this Microsoft Knowledge Base article, click the following article number to view the article in the Microsoft Knowledge Base:

2527180 Cumulative update package 4 for SQL Server 2008 Service Pack 2

References

For more information about replication statistics, visit the following Microsoft Developer Network (MSDN) website:

sp_replcounters (Transact-SQL)For more information about the list of builds that are available after the release of SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:

956909 The SQL Server 2008 builds that were released after SQL Server 2008 was releasedFor 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 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problemsFor 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 New naming schema for Microsoft SQL Server software update packagesFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.