Cannot modify table after having deleted replication

  • Hi to all,

    I have deleted the replication between two SQL servers and tried renaming, modifying or dropping a table. Every time I get the error:

     Unable to modify table. 

    ODBC error: [Microsoft][SQL Native Client][SQL Server]Cannot drop the table 'dbo.T_MyTable' because it is being used for replication.

    Is there any function to perform a clean up after deleting a subscription? Thanks!

    Charlie

     

  • Hi, Charlie

    You need to go into the sysobjects table and change the replinfo columns to zero and that will fix your problem.

     

    Mark

  • Try using sp_removedbreplication 'dbname'.

    Mark

  • Hi,

    The command sp_removedbreplication 'dbname' worked great, thanks very much. The EM doesn't seem to be doing the cleaning up that well so you always have to go through entering the commands manually! Anyways, thanks again for the prompt response.

    Charlie

Viewing 4 posts - 1 through 3 (of 3 total)

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