locked
unable to drop subscriber from replication RRS feed

  • Question

  • Hi,

    I have configured transactional replication between two server db's.

    I droped publisher by rite click create script----> drop publisher.

    But it is faling when it comes to drop distributor.

    Please give me suggesions.

     

    Thanks,

    Goutham


    gouthamraj
    Tuesday, July 19, 2011 4:23 PM

Answers

  • Example from my test machine :

    DECLARE @publication AS sysname;
    DECLARE @subscriber AS sysname;
    SET @publication = N'DB2_Pub';
    SET @subscriber = 'IBM-FD30C0F2859';

    USE DB2Migration
    EXEC sp_dropsubscription
      @publication = @publication,
      @article = N'all',
      @subscriber = @subscriber;
    GO

    --Try without ignore_distributor first
    sp_dropsubscriber @subscriber= 'IBM-FD30C0F2859' , @ignore_distributor = 1
     
    GO


    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/
    • Marked as answer by Stephanie Lv Tuesday, July 26, 2011 9:23 AM
    Tuesday, July 19, 2011 6:18 PM

All replies

  • What all you want to drop out of Publisher , distributor and subscriber ..what is the error you are getting..

    Regards


    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/

    Tuesday, July 19, 2011 5:20 PM
  • Abhay,

    Thank you for replay. The destination server has only subscriber which I want to drop.

    I am unable to generate drop script through management studio.

     

    Thanks,

    Goutham.


    gouthamraj
    Tuesday, July 19, 2011 6:00 PM
  • Example from my test machine :

    DECLARE @publication AS sysname;
    DECLARE @subscriber AS sysname;
    SET @publication = N'DB2_Pub';
    SET @subscriber = 'IBM-FD30C0F2859';

    USE DB2Migration
    EXEC sp_dropsubscription
      @publication = @publication,
      @article = N'all',
      @subscriber = @subscriber;
    GO

    --Try without ignore_distributor first
    sp_dropsubscriber @subscriber= 'IBM-FD30C0F2859' , @ignore_distributor = 1
     
    GO


    Abhay Chaudhary OCP 9i, MCTS/MCITP (SQL Server 2005, 2008, 2005 BI) ms-abhay.blogspot.com/
    • Marked as answer by Stephanie Lv Tuesday, July 26, 2011 9:23 AM
    Tuesday, July 19, 2011 6:18 PM