Search code examples
sql-serversql-server-2008database-replicationmerge-replication

Rename Subscription database in merge replication


I want to rename a subscription database in merge replication. All the subscriptions are synchronized properly.

IS it possible to rename one of the subscription database?


Solution

  • Yes you can

    1. Take backup of your database.
    2. Stop merge agent on the publisher.
    3. Rename the database.
    4. update db_name field in sysmergesubscriptions table bot on Subscriber as well as publisher
    5. Start the merge agent.

    sample query :

     update sysmergesubscriptions set db_name='YourDBName'
     where subscriber_server='YourSubscriber'