Cannot drop server ‘repl_distributor’ because it is used as a Distributor in replication

Recently I encountered the following error:

Cannot drop server ‘repl_distributor’ because it is used as a Distributor in replication

during an attempt to remove the linked server that is created as part of a replication. The following is the fix to this error:

EXEC master.dbo.sp_serveroption @server=N'<SERVER_NAME>’, @optname=N’dist’, @optvalue=N’true’
GO

EXEC sp_dropdistributor @no_checks = 1, @ignore_distributor = 1
GO

You need to replace <SERVER_NAME> with the computer name of the distributor.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: