Sql-server – When SysServer and Server Property Don’t Match

sql server

Pinal suggests removing and adding the correct name based on the below difference discrepancy to fix this CDC error. That may be correct for a solution, but would this affect anything else? I tested an ADO connection to both connection instances and they both work, but I'm curious if there will be anything else negatively impacted by his solution.

The code that shows a difference between the two:

SELECT CONVERT(SYSNAME,SERVERPROPERTY('SERVERNAME')) 
SELECT * FROM master.dbo.sysservers

One being fully qualified, the other not. Again, the ADO connection can hit both, but CDC is negatively impact by this.

His solution is like:

sp_dropserver 'domain\instance'
GO
sp_addserver 'full.domain.dom\instance', 'local'
GO

Would that cause connection issues, outside ADO – since I've confirmed ADO still connects to both instance names and types.

Best Answer

master.dbo.sysservers is a deprecated. You should use sys.servers.

If you change your server name after installing sql server then you have to make the entry in master.sys.servers which can be done by sp_dropserver and sp_addserver