January 23, 2009 at 5:27 pm
Hi Guys,
How Can I drop this linked server? ( There has been no replication setup in the environment for right now). As I was configuring the linked server in the different server(fresh server), I accidently added 'repl_distributor' as linked server. Later on I realised that this is automatically created when adding transactional replication. Now I cannot drop this linked server.. The error thrown was
Msg 20581, Level 16, State 1, Procedure sp_MSrepl_check_server, Line 22
Cannot drop server 'repl_distributor' because it is used as a Distributor in replication.
(There has been no replication setup)
Please Help
Thanks,
January 23, 2009 at 8:26 pm
Any Ideas Guys??
January 30, 2009 at 5:19 am
That is exactly my error as well, however we did have replication running on the server ... then they moved the server into our production environment, re-aliased and re-IPd it to "become" the existing production server, and I have had a multitude of issues ever since trying to get replication running again. I have circled around now to having decided that the repl_distributor linked server is pointing to the old servername and am trying to drop it - so I receive the same error.
Any clue? Anyone?
January 30, 2009 at 9:54 am
Hi Matt,
I had figured my problem last week. What I did was executed one of the server option for this server to be the distributor..
The linked server was configured to be the distributor ...
EXEC master.dbo.sp_serveroption @server=N'XXXX', @optname=N'dist', @optvalue=N'true'
GO
So , I simply changed the value to false and executed the script and it was no more the distributor. Then I could delete the linked server.
I would suggest you to right click and script out your linked server and see the name of the server as well as the server options whether or not configured correctly. If it has different server name try changing the name appropriatly.. You can first drop the linked server( that is pointing to different server name) and then execute the script of the right one (linked server with the correct name)
I wish it works
Thanks
October 9, 2010 at 3:45 am
As you already know the 'repl_distributor' linked server is not an actual server but it is used in Replication. So if you no longer have replication set up on the server ... run
EXEC master.dbo.sp_removedbReplication 'repl_distributor'
to remove all references to it. Then you should be able to delete it.
--As with all sample codes, pls use with caution and if possible on a test server first.
October 12, 2010 at 2:25 pm
Thanks srawant!
February 1, 2012 at 11:17 pm
doesnt work.....
March 9, 2012 at 2:15 pm
Worked for me
then just sp_DropServer (name) droplogin
May 14, 2024 at 6:47 pm
I realize this is ancient - and nobody should be running into these issues anymore. But let's say you inherited someone else's mystery box and are expected by mgmt to get things done, regardless. And the above suggestions do not work, even though they should. What else can you do?
Here's what I ran into. I couldn't drop the linked server, due to it being involved in replication. And there was no replication set up on the server, anyway, so while sp_removedbreplication would run, the server wasn't regarding any of the dbs in replication; still couldn't remove the linked server.
So I right-clicked Local Publications under Replication and selected Generate Scripts... I noticed Distributor properties had a checkmark. I moved the radio button to "To drop or disable the components" and clicked Generate Script (to a New Window)
This gave me the script to uninstall the distributor, matching exactly what we want to do here.
use master
exec sp_dropdistributor @no_checks = 1, @ignore_distributor = 1
GO
This dropped the linked server all on its own. I was then able to rename my instance, which was my original assignment. For others who may have not been successful with the previously provided solutions, I hope this helped.
Be well!
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply