SQL Server Performance

Unable to remove Distribution database.

Discussion in 'ALL SQL SERVER QUESTIONS' started by krajdba, Sep 5, 2005.

  1. krajdba New Member

    Hi

    I have configured Merge Repliation.There after I revomed the Replication.
    But the Distribution database is Not removed.

    When I am trying to Detach the database, It says "cannot detach while database is
    being replicated."

    Please let me know how to remove the Distribution database.


    Thanks

    raj
  2. dineshasanka Moderator

  3. satya Moderator

    You must remove replication before detaching any database, check under sysdatabases whether this database is still marked as replicated.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
  4. krajdba New Member

    There is No Replication.But Still the distribution database is present.
    And When I tried to dettach the database it give the Error,"cannot detach while database is
    being replicated."


    Please help


    Thanks






    raj
  5. satya Moderator

  6. krajdba New Member

    Hi Satya

    I tried it didn't work.Please suggest.

    Please help.


    Thanks

    raj
  7. Raptaur New Member

    Hi Raj,
    If you have the distributer database still remaining even when the publisher and subscriptions have been removed, try running the followinf SQL to force the DB offline then delete
    Use master

    Alter DATABASE distributionDBname SET OFFLINE

    DROP Database distributionDBname
    Obviously changing distributionDBname to whatever you have called the distributerDB
    Let us know if this works for you
  8. soonam.lal New Member

    Hi Raptaur,
    I have been trying for days to delete this DB. Ur query worked for me [Y]
    Thanks a ton,
    Soonam
  9. Jreddy New Member

    Folks,

    Initially i have tried with 'sp_dropdistributor' for dropping the database, it didn't worked out.
    later on i have tried with below.... it works fine.

    use master
    go
    alter database distribution set offline;
    drop database distribution;

Share This Page