Forum Discussion
acappelletti
Mar 30, 2025Copper Contributor
SERVERPROPERTY('IsClustered') does not return the correct value in a cluster configuration
Hi all!
I'm testing some t-sql SQL properties for a data collection project and I got a strange case with the query below:
SELECT
SERVERPROPERTY(''MachineName') AS [MachineName],
SERVERPROPERTY('ServerName') AS [ServerName],
SERVERPROPERTY('InstanceName') AS [Instance],
SERVERPROPERTY('IsClustered') AS [IsClustered],
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS [ComputerNamePhysicalNetBIOS],
SERVERPROPERTY('Edition') AS [Edition]
I have two test instances of SQL Server 2019. They both belong to a cluster without shared storage, as the availability groups allow it: SQLAGCLU
I don't understand why the query is returning "incorrect" properties. I expected them to have the value 1 for the "IsClustered" column. From the query that I use, I have no idea witch SQL instance are in a cluster...
Some one can give a feedback about it?
Thanks ALEN
2 Replies
Sort By
- SivertSolemIron Contributor
For Availability groups, the equivalent server property is "IsHadrEnabled".
See SERVERPROPERTY (Transact-SQL) - SQL Server | Microsoft Learn for all serverproperties and their descriptions.
- RonThePolymathCopper Contributor
That property refers to a failover cluster instance, where the instance itself can only run on one node at a time because the storage fails over with the resource group. That property is also exposed in SMO and the registry to help identify why a SQL service is stopped, which would be the case if that node did not own the resource.