Consider the following scenario:

  • You run a server that hosts multiple instances with different major versions, including not only Microsoft SQL server 2008, 2008 R2, 2012 or 2014, but also SQL server 2016 or 2017 (This includes lightweight editions instances such as SQL Express).

In this scenario, the VSS application may not successfully collect SQL Server databases. Additionally, you may receive an error message in Windows Application Event logs that resembles the following:

For a SQL Server 2008 OR 2008 R2 instance

Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: Invalid object name 'master.sys.availability_replicas'.

Note: The error will occur when you execute the following query:
declare @sql nvarchar(MAX)DECLARE @DatabaseName VARCHAR(256)set @DatabaseName =N'master'set @sql = SELECT 1 FROM master.sys.availability_replicas AS ar INNER JOIN master.sys.databases AS d ON DB_ID(''' + @DatabaseName + ''') = d.database_id AND ar.replica_id = d.replica_id INNER JOIN master.sys.dm_hadr_availability_replica_states AS st ON ar.replica_id = st.replica_id AND st.role = 2'EXEC(@sql)

For a SQL Server 2012 or SQL Server 2014 instance hosting AlwaysOn Availability Group Secondary Databases

‎Error state: 1, Severity: 16
‎Source: Microsoft SQL Server Native Client 11.0
‎Error message: Invalid column name 'basic_features'.

And in this case the query hitting the error will be :

'select database_id, ar.replica_id, replica_server_name, is_primary_replica, ar.group_id, basic_features from master.sys.availability_replicas ar, master.sys.dm_hadr_database_replica_states rs, master.sys.availability_groups ag where database_id = DB_ID(''' + @DatabaseName + ''' ) AND replica_server_name = ''' + @INSTANCENAME + ''' AND ar.replica_id = rs.replica_id AND ar.group_id = ag.group_id'


This issue is fixed in the following cumulative updates for SQL Server:

      Cumulative Update 12 for SQL Server 2017

      Cumulative Update 4 for SQL Server 2016 SP2

Each new cumulative update for SQL Server contains all the hotfixes and security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Latest cumulative update for SQL Server 2017

Latest cumulative update for SQL Server 2016


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


Learn about the terminology Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!