Sql-server – Error in trying to delete a local publication for DB replication

database-replicationsql serversql-server-2008-r2

I logged in in db ad sa (super admin).

I want to remove a publication made using management studio wizard

(right click on Replication/Local Publications/ New publication)

After trying to delete I have error 15517.

I feel that th subscription i made (it was just a test to explore the replication feature) is slowing down my production db (why did i test on production db i don't know – i wanted to have a local subscription to it from my machine)

Anyway is there a way to delete this publication or at least "freeze" it even if i have thie 15517 error?

Thanks

Best Answer

go to replication and right click and select GENERATE SQL SCRIPTS;

  1. Then select SELECT ALL in Replication Components Of Scripts;
  2. Then select TO DROP OR DISABLE THE COMPONENTS in Script The Commands;
  3. Then select GENERATE SCRIPT button at end;
  4. Then Select OPEN IN NEW QUERY;
  5. Then the script will be displayed;
  6. Then EXECUTE.....