Tuesday, 10 January 2012

Different way to get sql server instance name

--1.
SELECT SERVERPROPERTY('InstanceName')

--2
sp_helpserver

--3
select @@SERVERNAME

--4
SELECT * FROM SYS.SYSSERVERS

--5
SELECT * FROM SYS.SERVERS

--6
select @@servicename

No comments:

Post a Comment