I execute a request from which I want to get all the server name installed on the system. So I did it with this query
select srvname from sysservers
It gives me server names, but this is the wrong server name that gives me srvname
WIN-1BKHGVK7J3A\SQLSERVER2008R2
but this is not my server name and I tried to do it differently with this request
Select @@Servername
it also gives the wrong server name WIN-1BKHGVK7J3A\SQLSERVER2008R2
But when I did this with this request
SELECT SERVERPROPERTY ('ServerName')
It gives the correct server name, which is AIS-OCTACORE\SQLserver2008r2
but the limitation with this is only the name of the current server, and I want the whole server name to be installed on the system
Could you tell me why I get the wrong server name?
Also how can I get all server names
sql sql-server-2008-r2
Co. Aden
source share