If the value of this property is false, either the subscription properties in step 2 were defined incorrectly or the subscription does not exist.Call the Remove method.To delete a push subscription

This is perfect solution for general use but sometime it happens that distributor database/server went crashed or distributor become unavailable or suspected and there is no chance to have that server/database

The problem is that i cannot delete Publisher and Distributor from my production server. Join them; it only takes a minute: Sign up SQL Server Replication : Removing broken subscriptions at the publisher up vote 3 down vote favorite We have multiple subscriptions (merge pull) Deleting a subscription does not remove objects or data from the subscription; they must be removed manually.To delete a push subscription at the PublisherConnect to the Publisher in SQL Server Management Sp_dropsubscription Example subscription = new TransPullSubscription(); subscription.ConnectionContext = subscriberConn; subscription.PublisherName = publisherName; subscription.PublicationName = publicationName; subscription.PublicationDBName = publicationDbName; subscription.DatabaseName = subscriptionDbName; // Define the publication.

This documentation is archived and is not being maintained. sp_dropsubscription (Transact-SQL) Other Versions SQL Server 2012 SQL Server 2008 R2 Applies To: SQL ServerDrops subscriptions to a particular article, publication, or set of subscriptions on the Publisher. Now the problem is not that the replication does not work, I'm pretty confident that I the answer for that. https://technet.microsoft.com/en-us/library/ms146944(v=sql.105).aspx For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1&EvtSrc=Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Replication.ReplicationMenuItem&EvtID=CantDeleteSubscriptionAt&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ 'XXXXXXX\SQLExpress' is not defined as a Subscriber for 'XXXXXXXX'.

Future compatibility is not guaranteed.Return Code Values0 (success) or 1 (failure)Remarkssp_dropsubscription is used in snapshot and transactional replication.If you drop the subscription on an article in an immediate-sync publication, you cannot click site The RMO classes that you use to delete a pull subscription depend on the type of publication to which the pull subscription is subscribed.To delete a pull subscription to a snapshot If a ring R with 1 has characteristic 0. Dim publication As MergePublication Dim subscription As MergePullSubscription Try ' Connect to the Subscriber. Sp_subscription_cleanup

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

If you clear the Connect to Publisher check box, you should connect to the Publisher later to delete the information.Using Transact-SQLPush subscriptions can be deleted programmatically using replication stored procedures. Yes No Additional feedback? 1500 characters remaining Submit Skip this Thank you! You guys are great. Cannot Drop The Publication Because At Least One Subscription Exists For This Publication We appreciate your feedback.

They are in the form -- $(MyVariable). For information about how to use scripting variables -- on the command line and in SQL Server Management Studio, see the -- "Executing Replication Scripts" section in the topic -- "Programming Specify @publisher, @publisher_db, and @publication. http://enymedia.com/sql-server/cannot-delete-publication.php Not the answer you're looking for?

Joy! Replication when it gets into this state confounds me and other good DBAs nothing to do with being a developer at all :-) share|improve this answer edited Apr 19 at 11:49 current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Development Designing and Implementing: How-to Topics Creating, Modifying, and Deleting Subscriptions (Replication) Creating, Modifying, and Deleting Subscriptions (Replication) How to: Delete a Push Subscription (Replication Transact-SQL Programming) How to: Delete a