Comments
Sort by recent activity
Your issue is caused by incompatible DMV usage. hdrs.is_primary_replica is not available in SQL Server 2012, so the query fails during execution. Fix options:
Best solution: update the tool/query to detect SQL version and skip HADR DMVs on SQL 2012
Quick workaround: remove the HADR part of the query (sys.dm_hadr_database_replica_states + is_primary_replica condition)
Or wrap logic with version check:
IF CAST(SERVERPROPERTY('ProductMajorVersion') AS int) >= 12 Bottom line: You can’t “force add” this server with that query — it must be made SQL 2012 compatible by removing or version-guarding HADR fields. https://learn.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-hadr-database-replica-states-transact-sql/Scary Teacher 3D / comments
Your issue is caused by incompatible DMV usage.hdrs.is_primary_replica is not available in SQL Server 2012, so the query fails during execution.Fix options:
Best solution: update the tool/query to...