Cannot create the subscription

  • When attempting to recreate the snapshot, the agent failed saying: No subscription exists requiring synchronization.  So I attempted to mark the subscription for reinitialization, it failed.  Then I attempted to recreate the subsciption (after deleting it).   However, when recreating the subscription it failed saying: 

    "sql server enterprise manger cannot create the subscription because a subscription to publication <name> already exists for this subscriber and database.

    to create a second subscription to this publication at this subscriber, choose another database.  If the original subscription no longer exists at the subscriber or is not wanted, delete it at the Publisher before creating a new subscription."

    BUT THERE ISN'T A SUBSCRIPTION  -- SO I went in and deleted the publication which should theoretically clean out all subscription and publication information, but it didn't.  So, I dropped replication completely and set it up again, recreated the publication and attempted the subscription again ... SAME ISSUE.

    any ideas?

    Thanks!

    😎

  • Have you tried "sp_dropsubscription" - check out the parameters in bol.

  • run this on the publisher and subscriber:   sp_removedbreplication [ @dbname = ] 'dbname'

    Double check to see if it worked by running this (NO rows should be returned)

    Select 'drop table ' + name from sysobjects where name like '%conflict%' and type='u'

    Select 'drop trigger ' + name from sysobjects where type = 'tr' and status < 0 and category = 2

    Select 'drop proc ' + name from sysobjects where name like 'sp_%' and type ='p' and category = 2

    Select 'drop view ' + name from sysobjects where name like 'tsvw%' and type ='v' and category = 2

    Select 'drop view ' + name from sysobjects where name like 'ctsv%' and type ='v' and category = 2

    Select 'drop table ' + name from sysobjects where name like 'MSMerge%' and type='u'

    If rows are returned then run the output of this script.

    Replication should now totally be cleaned and you can re-configure.

  • great information ... thanks! 

    this is how i ended up fixing the problem:  i have 2 subscriptions on my subscriber.  once i deleted both of them, i was able to recreate a new one.  oddness???  but hey, it's working now.  thanks again.

    😎

  • you're welcome

  • Do I need to run at Master DB or the same Subscription and Publisher DB ?

  • My issue then was that there were orphaned subscriptions on my subscriber server after I had completely ripped replication out on the publisher. I had to go over to the subscriber server and delete the subscription in the user database (not master) before I could recreate it.

    Hope this helps.

    😎

Viewing 7 posts - 1 through 6 (of 6 total)

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