Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptom

After you upgrade to Microsoft SQL Server 2012, Microsoft SQL Server 2008 R2 Service Pack 1 (SP1), Microsoft SQL Server 2008 Service Pack 2 (SP2) or Microsoft SQL Server 2008 Service Pack 3 (SP3), the transaction log for a database that is using the Full Recovery model continues to grow even though frequent Transaction Log backups occur.

Cause

This issue occurs because the "tran_sp_MScreate_peer_tables" transaction was left open by a replication upgrade script during the upgrade. This open transaction prevents usual log truncation.

Resolution

Cumulative update information

Cumulative Update 2 for SQL Server 2012 SP1

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

2790947 Cumulative update package 2 for SQL Server 2012 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 2012 SP1 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:

2772858 The SQL Server 2012 builds that were released after SQL Server 2012 Service Pack 1 was released

Cumulative Update 5 for SQL Server 2012

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

2777772 Cumulative update package 5 for SQL Server 2012
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 2012 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:

2692828 The SQL Server 2012 builds that were released after SQL Server 2012 was released

Cumulative update package 10 for SQL Server 2008 R2 Service Pack 1

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

2783135 Cumulative update package 10 for SQL Server 2008 R2 SP1
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 SP1 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

Cumulative update 8 for SQL Server 2008 Service Pack 3 (SP3)

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

2771833 Cumulative update package 8 for SQL Server 2008 Service Pack 3Note 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 Service Pack 3 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:

2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released
To resolve this issue that is on the prior version of SQL Server 2008 Services Package 3, follow these steps:

  1. In the cluster administrative tools, bring both SQL Server Agent and the SQL Server service offline.

  2. Bring the SQL Server service back online while SQL Server Agent is still offline.

  3. After the startup process has begun, review the error logs to see whether the following entries appear there:

    • spid7s Upgrading publication settings and system objects in database [DBName].

    • spid7s Cannot perform this operation while SQLServerAgent is starting. Try again later.

    • spid7s Error executing sp_vupgrade_replication.

    • spid7s Saving upgrade script status to 'SOFTWARE\Microsoft\MSSQLServer\Replication\Setup'.

    • spid7s Saved upgrade script status successfully.


  4. If you do not find these entries, the replication upgrade has completed successfully. To verify this, check whether the value of the Upgrade registry key at the following registry entry is updated to 1. (This indicates a successful upgrade.)

    HKLM\SOFTWARE\Microsoft\MSSQLServer\Replication\Setup

  5. Run the following command, and then look for a transaction that is named "tran_sp_MScreate_peer_tables." If you do not see an entry sthat has this name, you have additional verification that the replication upgrade completed on its own.

    use [DBName]
    select * from sys.dm_tran_active_transactions where name = 'tran_sp_MScreate_peer_tables'

  6. Stop the instance of SQL Server, bring both SQL Server Agent and the SQL Server service online on Node1, fail the instance of SQL Server over to the other node, and fail the instance back to the original node.


If the instance of SQL Server is a stand-alone instance, you can resolve the issue by stopping both SQL Server and the SQL Server Agent service, disabling the SQL Server Agent service, and then restarting just the SQL Server service. This lets the upgrade process complete in the database. After this process is complete, you can restart the SQL Server Agent service.

More Information

A restart of SQL Server does not resolve this problem unless you follow the steps that are described in the "Resolution" section. The transaction restarts and remains open even after a restart of SQL Server.

Note If a high volume of data was changed after the upgrade to Service Pack 2, the transaction logs of any database that is affected by this problem will likely be larger than previously observed norms. The time that is required to bring a database offline and then back online can be significant when a large part of the transaction log is active.

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.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×