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.

Problem:

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 more words

About duyanhphamkiller

SEOer, developer

Posted on 11/06/2014, in Thông tin - chia sẽ. Bookmark the permalink. Để lại bình luận.

Gửi phản hồ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:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s