Hi all,
We have a cluster with 2 SQL Server 2016 named instances, SSIS01 and SSIS02.
On each Instance, we have an Integrations Services Catalogue and its corresponding SSISDB.
We created an AG named AG_SSIS01 and added the SSISDB into it. Then we right click of the IS Catalogue and Enable Always On Support and It worked OK.
Now we're going to repeat the same tasks on SSIS02 instance in order to enable Always On Support for its SSISDB but we've got this error message:
"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression"
I've run a SQL Profiler to see what generates this and found this SQL::
SELECT dharc.[replica_server_name]
FROM [sys].[dm_hadr_availability_replica_cluster_states] dharc
INNER JOIN [sys].[dm_hadr_availability_replica_states] dhars ON dharc.[replica_id] = dhars.[replica_id]
WHERE dharc.[group_id] = (SELECT group_id FROM [sys].[availability_databases_cluster] WHERE database_name = 'SSISDB') AND dhars.[role] = 2
I think that is a bug because database name "SSISDB" cannot be changed and subquery ask to [sys].[availability_databases_cluster] table for existence of SSISDB database. Obviously if you have more than one instance in your cluster with SSISDB and want to add it to an AlwaysOn Availability group the subquery will return more than one value (2 in my case) and the main query will fail.
I've been searching for SSIS Catalogue Option "Enable Always On Support..." T-SQL code in order to fix it manually but nothing...
We have a cluster with 2 SQL Server 2016 named instances, SSIS01 and SSIS02.
On each Instance, we have an Integrations Services Catalogue and its corresponding SSISDB.
We created an AG named AG_SSIS01 and added the SSISDB into it. Then we right click of the IS Catalogue and Enable Always On Support and It worked OK.
Now we're going to repeat the same tasks on SSIS02 instance in order to enable Always On Support for its SSISDB but we've got this error message:
"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression"
I've run a SQL Profiler to see what generates this and found this SQL::
SELECT dharc.[replica_server_name]
FROM [sys].[dm_hadr_availability_replica_cluster_states] dharc
INNER JOIN [sys].[dm_hadr_availability_replica_states] dhars ON dharc.[replica_id] = dhars.[replica_id]
WHERE dharc.[group_id] = (SELECT group_id FROM [sys].[availability_databases_cluster] WHERE database_name = 'SSISDB') AND dhars.[role] = 2
I think that is a bug because database name "SSISDB" cannot be changed and subquery ask to [sys].[availability_databases_cluster] table for existence of SSISDB database. Obviously if you have more than one instance in your cluster with SSISDB and want to add it to an AlwaysOn Availability group the subquery will return more than one value (2 in my case) and the main query will fail.
I've been searching for SSIS Catalogue Option "Enable Always On Support..." T-SQL code in order to fix it manually but nothing...