FIX: Error message when you add a subscription to a republisher that is in a merge publication in SQL Server 2005 or in SQL Server 2008: “Cannot create the subscription because the subscription already exists in the subscription database”

Article translations Article translations
Article ID: 977151 - View products that this article applies to.
Microsoft distributes Microsoft SQL Server 2005 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 2005 fix release.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario:
  • You create a merge publication in Microsoft SQL Server 2005 or in Microsoft SQL Server 2008.
  • You create republishers for the merge publication.
  • You create global subscribers that subscribe to the republishers.
  • You drop a subscription between a republisher and a subscriber. Then, you synchronize the republishers with the publisher.
  • You try to add the subscription back to the republisher.
In this scenario, you receive the following error message:

Msg 14058, Level 16, State 1, Procedure sp_addmergesubscription, Line 381
Cannot create the subscription because the subscription already exists in the subscription database. Only one subscription to the same publication is allowed in each subscription database. Drop the subscription and add it again if necessary. If the problem persists, replication metadata might be incorrect; see Books Online for troubleshooting information.

RESOLUTION

SQL Server 2005

The fix for this issue was first released in Cumulative Update 7 for SQL Server 2005 Service Pack 3. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
976951 Cumulative update package 7 for SQL Server 2005 Service Pack 3
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 2005 fix release. Microsoft recommends 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:
960598 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was released
Microsoft SQL Server 2005 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 3 hotfix to an installation of SQL Server 2005 Service Pack 3. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.

SQL Server 2008

Release version of SQL Server 2008

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, click the following article number to view the article in the Microsoft Knowledge Base:
977444 Cumulative update package 9 for SQL Server 2008
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:
956909 The SQL Server 2008 builds that were released after SQL Server 2008 was released

SQL Server 2008 SP1

The fix for this issue was first released in Cumulative Update 6 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:
977443 Cumulative update package 6 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. Microsoft recommends 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 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.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must have SQL Server 2005 Service Pack 3 (SP3) installed. For more information about how to obtain SQL Server 2005 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005

Restart information

You do not have to restart the computer after you apply this hotfix.

Registry information

You do not have to change the registry.

Hotfix file information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all 32-bit versions of SQL Server 2005
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
chsbrkr.dll12.0.9732.01,682,28817-Jun-200903:05x86
chtbrkr.dll12.0.9732.06,110,04817-Jun-200903:05x86
databasemailengine.dll9.0.4268.075,62430-Oct-200904:07x86
databasemailprotocols.dll9.0.4268.042,84030-Oct-200904:07x86
distrib.exe2005.90.4268.067,43230-Oct-200904:07x86
dtspipeline.dll2005.90.4268.0602,45630-Oct-200904:07x86
dtspipelineperf.dll2005.90.4268.030,05630-Oct-200904:07x86
fteref.dll12.0.9732.0446,46417-Jun-200903:05x86
infosoft.dll12.0.9732.0465,77617-Jun-200903:05x86
korwbrkr.dll12.0.9732.068,44817-Jun-200903:05x86
langwrbk.dll12.0.9732.0134,00017-Jun-200903:05x86
logread.exe2005.90.4268.0399,19230-Oct-200904:11x86
microsoft.sqlserver.maintenanceplantasks.dll9.0.4268.0292,69630-Oct-200904:12x86
microsoft.sqlserver.replication.dll2005.90.4268.01,625,43230-Oct-200904:12x86
microsoft.sqlserver.smo.dll9.0.4268.01,603,41630-Oct-200904:12x86
microsoft.sqlserver.smoenum.dll9.0.4268.0218,96830-Oct-200904:12x86
microsoft.sqlserver.sqlenum.dll9.0.4268.0919,38430-Oct-200904:12x86
microsoft.sqlserver.webservicetask.dll9.0.4268.096,08830-Oct-200904:12x86
msfte.dll12.0.9732.02,431,85617-Jun-200903:05x86
msftefd.exe12.0.9732.064,35217-Jun-200903:05x86
msftepxy.dll12.0.9732.093,04017-Jun-200903:05x86
msftesql.exe12.0.9732.093,04017-Jun-200903:05x86
msgprox.dll2005.90.4268.0196,95230-Oct-200904:12x86
msir5jp.dll5.0.2130.03,157,36017-Jun-200903:05x86
mssqlsystemresource.ldfNot Applicable524,28830-Oct-200901:57Not Applicable
mssqlsystemresource.mdfNot Applicable40,304,64030-Oct-200901:57Not Applicable
nlhtml.dll12.0.9732.0121,69617-Jun-200903:05x86
nls400.dll5.0.7112.012,287,34417-Jun-200903:05x86
query9x.dll12.0.9732.045,92017-Jun-200903:05x86
rdistcom.dll2005.90.4268.0644,44030-Oct-200904:13x86
repldp.dll2005.90.4268.0185,17630-Oct-200904:13x86
replisapi.dll2005.90.4268.0269,65630-Oct-200904:13x86
replmerg.exe2005.90.4268.0317,78430-Oct-200904:13x86
replprov.dll2005.90.4268.0551,76830-Oct-200904:13x86
replrec.dll2005.90.4268.0783,19230-Oct-200904:13x86
replsub.dll2005.90.4268.0405,33630-Oct-200904:13x86
replsync.dll2005.90.4268.098,13630-Oct-200904:13x86
sbmsmdlocal.dll9.0.4268.015,977,81630-Oct-200904:12x86
snapshot.exe9.0.4268.011,09630-Oct-200904:14x86
spresolv.dll2005.90.4268.0173,91230-Oct-200904:14x86
sqlaccess.dll2005.90.4268.0346,96830-Oct-200904:14x86
sqlagent90.exe2005.90.4268.0346,45630-Oct-200904:14x86
sqlatxss90.dll2005.90.4268.023,38430-Oct-200904:07x86
sqlmergx.dll2005.90.4268.0191,32030-Oct-200904:15x86
sqlservr.exe2005.90.4268.029,284,18430-Oct-200904:15x86
sqltaskconnections.dll2005.90.4268.0104,28030-Oct-200904:15x86
sqlwep.dll2005.90.4268.087,38430-Oct-200904:15x86
sysdbupg.sqlNot Applicable534,48229-Oct-200923:30Not Applicable
sysdbupg_uninstall.sqlNot Applicable142,93429-Oct-200923:30Not Applicable
thawbrkr.dll12.0.9732.0203,63217-Jun-200903:05x86
xmlfilt.dll12.0.9732.0195,44017-Jun-200903:05x86
xmlrw.dll2.0.3609.0166,23230-Oct-200904:15x86
xmlrwbin.dll2.0.3609.0120,15230-Oct-200904:15x86
xmlsub.dll2005.90.4268.0192,34430-Oct-200904:15x86
xpstar90.dll2005.90.4268.0297,30430-Oct-200904:16x86
For all x64-based versions of SQL Server 2005
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
chsbrkr.dll12.0.9732.01,691,50417-Jun-200905:00x64
chtbrkr.dll12.0.9732.06,107,50417-Jun-200905:00x64
databasemailengine.dll9.0.4268.075,62430-Oct-200905:33x86
databasemailprotocols.dll9.0.4268.042,84030-Oct-200905:33x86
distrib.exe2005.90.4268.083,28830-Oct-200905:33x64
dtspipeline.dll2005.90.4268.01,066,32830-Oct-200905:33x64
dtspipelineperf.dll2005.90.4268.040,79230-Oct-200905:33x64
fteref.dll12.0.9732.0433,15217-Jun-200905:00x64
infosoft.dll12.0.9732.0618,86417-Jun-200905:00x64
korwbrkr.dll12.0.9732.099,18417-Jun-200905:00x64
langwrbk.dll12.0.9732.0234,35217-Jun-200905:00x64
logread.exe2005.90.4268.0525,16030-Oct-200905:36x64
microsoft.sqlserver.maintenanceplantasks.dll9.0.4268.0292,69630-Oct-200904:12x86
microsoft.sqlserver.replication.dll2005.90.4268.01,816,40830-Oct-200905:36x64
microsoft.sqlserver.smo.dll9.0.4268.01,603,41630-Oct-200905:36x86
microsoft.sqlserver.smoenum.dll9.0.4268.0218,96830-Oct-200905:36x86
microsoft.sqlserver.sqlenum.dll9.0.4268.0919,38430-Oct-200905:36x86
microsoft.sqlserver.webservicetask.dll9.0.4268.096,08830-Oct-200905:36x86
msfte.dll12.0.9732.03,813,74417-Jun-200905:00x64
msftefd.exe12.0.9732.096,62417-Jun-200905:00x64
msftepxy.dll12.0.9732.0124,78417-Jun-200905:00x64
msftesql.exe12.0.9732.0156,01617-Jun-200905:00x64
msgprox.dll2005.90.4268.0258,90430-Oct-200905:36x64
msir5jp.dll5.0.2130.03,418,99217-Jun-200905:00x64
mssqlsystemresource.ldfNot Applicable524,28830-Oct-200901:57Not Applicable
mssqlsystemresource.mdfNot Applicable40,304,64030-Oct-200901:57Not Applicable
nlhtml.dll12.0.9732.0189,29617-Jun-200905:00x64
nls400.dll5.0.7112.014,101,87217-Jun-200905:00x64
query9x.dll12.0.9732.065,90417-Jun-200905:00x64
rdistcom.dll2005.90.4268.0821,08030-Oct-200905:37x64
repldp.dll2005.90.4268.0236,88830-Oct-200905:37x64
repldp.dll2005.90.4268.0185,17630-Oct-200904:13x86
replisapi.dll2005.90.4268.0392,53630-Oct-200905:37x64
replmerg.exe2005.90.4268.0414,55230-Oct-200905:37x64
replprov.dll2005.90.4268.0751,96030-Oct-200905:37x64
replrec.dll2005.90.4268.01,011,03230-Oct-200905:37x64
replsub.dll2005.90.4268.0508,76030-Oct-200905:37x64
replsync.dll2005.90.4268.0127,83230-Oct-200905:37x64
sbmsmdlocal.dll9.0.4268.015,977,81630-Oct-200904:12x86
snapshot.exe9.0.4268.011,09630-Oct-200905:37x86
snapshot.exe9.0.4268.011,09630-Oct-200904:14x86
spresolv.dll2005.90.4268.0222,55230-Oct-200905:37x64
sqlaccess.dll2005.90.4268.0354,13630-Oct-200905:37x86
sqlagent90.exe2005.90.4268.0425,81630-Oct-200905:37x64
sqlatxss90.dll2005.90.4268.029,03230-Oct-200905:33x64
sqlmergx.dll2005.90.4268.0233,83230-Oct-200905:38x64
sqlservr.exe2005.90.4268.039,768,40830-Oct-200905:38x64
sqltaskconnections.dll2005.90.4268.0150,37630-Oct-200905:38x64
sqlwep.dll2005.90.4268.0120,15230-Oct-200905:38x64
sqlwep.dll2005.90.4268.087,38430-Oct-200904:15x86
sysdbupg.sqlNot Applicable534,48229-Oct-200923:30Not Applicable
sysdbupg_uninstall.sqlNot Applicable142,93429-Oct-200923:30Not Applicable
thawbrkr.dll12.0.9732.0207,21617-Jun-200905:00x64
xmlfilt.dll12.0.9732.0266,60817-Jun-200905:00x64
xmlrw.dll2.0.3609.0278,87230-Oct-200905:38x64
xmlrw.dll2.0.3609.0166,23230-Oct-200904:15x86
xmlrwbin.dll2.0.3609.0195,92830-Oct-200905:38x64
xmlrwbin.dll2.0.3609.0120,15230-Oct-200904:15x86
xmlsub.dll2005.90.4268.0336,74430-Oct-200905:38x64
xpstar90.dll2005.90.4268.0548,69630-Oct-200905:38x64
For all IA-64-based versions of SQL Server 2005
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
chsbrkr.dll12.0.9732.01,880,92817-Jun-200903:57IA-64
chtbrkr.dll12.0.9732.06,152,56017-Jun-200903:57IA-64
databasemailengine.dll9.0.4268.075,60830-Oct-200907:40x86
databasemailprotocols.dll9.0.4268.042,85630-Oct-200907:40x86
distrib.exe2005.90.4268.0197,46430-Oct-200907:40IA-64
dtspipeline.dll2005.90.4268.01,931,60830-Oct-200907:40IA-64
dtspipelineperf.dll2005.90.4268.081,75230-Oct-200907:40IA-64
fteref.dll12.0.9732.0433,15217-Jun-200903:58IA-64
infosoft.dll12.0.9732.01,912,68817-Jun-200903:57IA-64
korwbrkr.dll12.0.9732.0180,08017-Jun-200903:57IA-64
langwrbk.dll12.0.9732.0330,59217-Jun-200903:57IA-64
logread.exe2005.90.4268.01,100,13630-Oct-200907:43IA-64
microsoft.sqlserver.maintenanceplantasks.dll9.0.4268.0292,69630-Oct-200904:12x86
microsoft.sqlserver.replication.dll2005.90.4268.02,530,64830-Oct-200907:43IA-64
microsoft.sqlserver.smo.dll9.0.4268.01,603,43230-Oct-200907:43x86
microsoft.sqlserver.smoenum.dll9.0.4268.0218,98430-Oct-200907:43x86
microsoft.sqlserver.sqlenum.dll9.0.4268.0919,38430-Oct-200907:43x86
microsoft.sqlserver.webservicetask.dll9.0.4268.096,10430-Oct-200907:43x86
msfte.dll12.0.9732.07,081,84017-Jun-200903:57IA-64
msftefd.exe12.0.9732.0170,84817-Jun-200903:57IA-64
msftepxy.dll12.0.9732.0132,96017-Jun-200903:57IA-64
msftesql.exe12.0.9732.0292,19217-Jun-200903:57IA-64
msgprox.dll2005.90.4268.0542,04030-Oct-200907:43IA-64
msir5jp.dll5.0.2130.03,821,93617-Jun-200903:57IA-64
mssqlsystemresource.ldfNot Applicable524,28830-Oct-200901:57Not Applicable
mssqlsystemresource.mdfNot Applicable40,304,64030-Oct-200901:57Not Applicable
nlhtml.dll12.0.9732.0293,21617-Jun-200903:58IA-64
nls400.dll5.0.7112.014,747,50417-Jun-200903:57IA-64
query9x.dll12.0.9732.0120,68817-Jun-200903:58IA-64
rdistcom.dll2005.90.4268.01,888,10430-Oct-200907:44IA-64
repldp.dll2005.90.4268.0512,34430-Oct-200907:44IA-64
repldp.dll2005.90.4268.0185,17630-Oct-200904:13x86
replisapi.dll2005.90.4268.0781,16030-Oct-200907:44IA-64
replmerg.exe2005.90.4268.0954,72830-Oct-200907:44IA-64
replprov.dll2005.90.4268.01,629,54430-Oct-200907:44IA-64
replrec.dll2005.90.4268.02,147,68830-Oct-200907:44IA-64
replsub.dll2005.90.4268.01,156,96830-Oct-200907:44IA-64
replsync.dll2005.90.4268.0274,79230-Oct-200907:44IA-64
sbmsmdlocal.dll9.0.4268.050,013,54430-Oct-200907:43IA-64
snapshot.exe9.0.4268.011,11230-Oct-200907:45x86
snapshot.exe9.0.4268.011,09630-Oct-200904:14x86
spresolv.dll2005.90.4268.0495,44830-Oct-200907:45IA-64
sqlaccess.dll2005.90.4268.0348,52030-Oct-200907:45x86
sqlagent90.exe2005.90.4268.01,252,71230-Oct-200907:45IA-64
sqlatxss90.dll2005.90.4268.056,16830-Oct-200907:40IA-64
sqlmergx.dll2005.90.4268.0443,75230-Oct-200907:45IA-64
sqlservr.exe2005.90.4268.073,048,93630-Oct-200907:45IA-64
sqltaskconnections.dll2005.90.4268.0314,21630-Oct-200907:45IA-64
sqlwep.dll2005.90.4268.0217,44830-Oct-200907:45IA-64
sqlwep.dll2005.90.4268.087,38430-Oct-200904:15x86
sysdbupg.sqlNot Applicable534,48229-Oct-200923:30Not Applicable
sysdbupg_uninstall.sqlNot Applicable142,93429-Oct-200923:30Not Applicable
thawbrkr.dll12.0.9732.0250,72017-Jun-200903:57IA-64
xmlfilt.dll12.0.9732.0439,64817-Jun-200903:58IA-64
xmlrw.dll2.0.3609.0560,48830-Oct-200907:46IA-64
xmlrw.dll2.0.3609.0166,23230-Oct-200904:15x86
xmlrwbin.dll2.0.3609.0330,60030-Oct-200907:46IA-64
xmlrwbin.dll2.0.3609.0120,15230-Oct-200904:15x86
xmlsub.dll2005.90.4268.0578,92030-Oct-200907:46IA-64
xpstar90.dll2005.90.4268.0964,96830-Oct-200907:46IA-64

WORKAROUND

To work around this problem, follow these steps:
  1. Stop all DML activities on the main publisher.
  2. Stop the merge agents that synchronize the main publisher and the republishers.
  3. Stop the merge agents that synchronize the republishers and the leaf-level subscribers.
  4. Back up the main publisher and all republishers.
  5. Run the following statements on the republishing database:
    Begin tran MyTran
    delete <RepublisherDBname>..SysMergeSubscriptions where 
    subscriber_server = '<enter name>' and
    [db_name] = '<enter subscribing dbname>' and
    pubid = <enter pub id>
    
  6. Create another connection to the republishing database. Then, run the following statement to make sure that only the rows that you intended to delete were deleted:
    Select * from <RepublisherDBname>..sysmergesubscriptions with (nolock)
  7. In the first connection, run the following statement if the correct rows were deleted:
    Commit tran MyTran
    If the correct rows were not deleted, run the following statement:
    Rollback tran MyTran
  8. If any error occurs during the process, restore the databases or reinitialize the replication.

STATUS

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

MORE INFORMATION

After you apply this hotfix, you must delete the subscriber that was not added successfully from the SysMergeSubscriptions system table that is located on the republishing database. To do this, run the following statement:
delete from SysMergeSubscriptions where subid = <Subscriber ID>

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 An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems
For more information about how to obtain SQL Server 2005 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005
For more information about new features and improvements in SQL Server 2005 SP3, visit the following Microsoft Web site:
http://go.microsoft.com/fwlink/?LinkId=131442
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 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 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 977151 - Last Review: January 18, 2010 - Revision: 2.0
APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
kbautohotfix kbsurveynew kbfix kbqfe kbexpertiseadvanced kbhotfixserver KB977151

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com