Dropping Linked Server 'repl_distributor'

  • 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,

  • Any Ideas Guys??

  • 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?

  • 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

  • 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.

  • Thanks srawant!

  • doesnt work.....

  • Worked for me

    then just sp_DropServer (name) droplogin

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply