February 6, 2017 at 1:01 pm
OK, so I screwed up a script and created a push subscription with a mis-typed server name. SQL created the subscription and linked server, but the server name was wrong so it obviously failed. I removed the subscription, set it up with the correct name and all is good.
I'm trying to drop the linked server with the wrong name, but SQL just won't let me. I get this message when I run sp_dropserver:
Msg 20584, Level 16, State 1, Procedure sp_MSrepl_check_server, Line 67
Cannot drop server 'badservername' because it is used as a Subscriber to remote Publisher 'publishername' in replication.
Tried disabling subscriber on the linked server using sp_serveroption 'badservername', 'sub', 'off'
I can't find any trace of the bad server in replication monitor, it's definitely not setup as a subscriber anymore, just can't figure out why my publisher seems to think it is. Any ideas?
February 6, 2017 at 2:21 pm
Mortimer452 - Monday, February 6, 2017 1:01 PMOK, so I screwed up a script and created a push subscription with a mis-typed server name. SQL created the subscription and linked server, but the server name was wrong so it obviously failed. I removed the subscription, set it up with the correct name and all is good.
I'm trying to drop the linked server with the wrong name, but SQL just won't let me. I get this message when I run sp_dropserver:
Msg 20584, Level 16, State 1, Procedure sp_MSrepl_check_server, Line 67
Cannot drop server 'badservername' because it is used as a Subscriber to remote Publisher 'publishername' in replication.Tried disabling subscriber on the linked server using sp_serveroption 'badservername', 'sub', 'off'
I can't find any trace of the bad server in replication monitor, it's definitely not setup as a subscriber anymore, just can't figure out why my publisher seems to think it is. Any ideas?
Try querying sys.servers to see what replication settings the linked server has - SELECT name, is_distributor, is_publisher, is_subscriber
FROM sys.servers
Sue
February 6, 2017 at 2:40 pm
Sue_H - Monday, February 6, 2017 2:21 PMTry querying sys.servers to see what replication settings the linked server has -
SELECT name, is_distributor, is_publisher, is_subscriber
FROM sys.serversSue
is_distributor, is_publisher, is_subscriber are all set to 0 in sys.servers
February 6, 2017 at 4:28 pm
Mortimer452 - Monday, February 6, 2017 2:40 PMis_distributor, is_publisher, is_subscriber are all set to 0 in sys.servers
The only other place I can think of to look around and check is some of the tables in the distribution database. Those might have something to give you a clue of what bits from the first replication are still around. Maybe check these tables:
MSsubscriptions
MSsubscriber_info
MSpublications
MSdistribution_history
MSdistribution_agents
I usually execute sp_removedbreplication everywhere to clean up bits left over but there is never any replication left any more when I do that. Not of any use to you since you have the correct one up and running.
Sue
February 6, 2017 at 4:37 pm
Sue
February 7, 2017 at 10:42 pm
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply