I have been asked to write a SQL script that can be run, which will stop replication and remove the subscriber/subscription.
Is this at all possible? Or do you have to use the GUI?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Which version of SQL Server you are using.
Try
Related Read – How to cleanup Replication Bits – http://blogs.msdn.com/b/repltalk/archive/2010/11/17/how-to-cleanup-replication-bits.aspx
Google as well provides MSDN article in results
How to: Disable Publishing and Distribution (Replication Transact-SQL Programming) – http://msdn.microsoft.com/en-us/library/ms147921.aspx