Removing Replication

how to delete sql server Replication

:: NickBurns

Sticking with the theme of “following my nose“- I set about removing replication from my new ReplicationExample sqlLab.

Method 1

While replication is still active, you can remove replication by right clicking Replication and selecting “Disable Publishing and Distribution“. This will remove the subscriptions, publications and also remove the distribution database. Couldn’t be easier.

Method 2

Alternatively you can disable replication by running:

Run this code against the subscriber and publisher to disable replication.


Someone has restored a database from production into test. Unfortunately, this often creates orphaned replication artefacts that need to be cleaned up.

For this scenario, I have created a ExampleOrphanedReplication_sqlLab, as shown below. Notice the publication, ‘throwAwayPublication’, the existance of the distribution database, and no subscriptions.

If you now try to drop the publication, you get the following errors:

Alternatively, if you attempt to run the “Disable Publishing and Distribution

View original post 120 từ nữa


About duyanhphamkiller

SEOer, developer

Posted on 11/06/2014, in Thông tin - chia sẽ. Bookmark the permalink. Bạn nghĩ gì về bài viết này?.

Trả lời

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập: Logo

Bạn đang bình luận bằng tài khoản Đăng xuất / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Đăng xuất / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Đăng xuất / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Đăng xuất / Thay đổi )

Connecting to %s