Few days back I was on a fairly secured environment doing my merry work for the consulting company I work for when I realized the serverproperty(‘servername’) and @@servername were not the same.
To be precise ServerProperty(‘Servername’) had the current server name and @@servername was empty.
When the Sys.servers DMV was queried it had the current server name but the server_id was greater than zero.
After speaking to the infrastructure team it was gathered they had renamed a virtual server and installed SQL on it without considering the repercussions.
Now to sort the problem
- Execute sp_droppserver
- Executed sp_addserver with the new name
- Restarted SQL
I have not taken time to research what other subsystems will have an impact with the way the sever was setup, but for the moment my immediate problem was sorted.
Also to note: if there is a link server with the same name that too has to be dropped before the default sql instance name is added
ReplyDelete