Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

MS-SQL error: cannot communicate to server using named pipes. Sytem cannot connect to secondary replica

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
OritA
Support
Support

MS-SQL error: cannot communicate to server using named pipes. Sytem cannot connect to secondary replica

Last Update:

Nov 15, 2021 9:41:17 AM

Updated By:

OritA

Created date:

Nov 15, 2021 8:44:42 AM

When working with working with Microsoft SQL Server AlwaysOn Availability Groups endpoint, by default, Replicate establishes a connection with all the replicas, i.e. when Replicate needs to access the backup transaction logs, it "asks" each Replica in turn if it has the required logs, until the backup transaction logs are located. If one of the Replicas that Replicate is trying to reach is offline, Replicate tries to wait until that Replica comes back online and then query it for the backup transaction. If it fails, the following error messages may appear in the log and task will fail to start:

Failed to initialize function for capturing data from an AlwaysOn Availability Group.
Unable to establish connection to replicas
Failed to connect to replica 'xxxx-YYY-ZZZ'
RetCode: SQL_ERROR SqlState: 42000 NativeError: 976 Message: [Microsoft][SQL Server Native Client 11.0][SQL Server]The target database, 'dbname', is participating in an availability group and is currently not accessible for queries.

This can be solved by adding to the MS-SQL enpoint the internal parameter "AlwaysOnSharedSynchedBackupIsEnabled" and set it to TRUE.

The "AlwaysOnSharedSynchedBackupIsEnabled" internal parameter makes Qlik Replicate see the SQL Server cluster as a standalone server, and therefore it doesn't check if there are several SQL Server replicas. i.e. it does not test the connection to all replicas in the AlwaysOn group.

In other words: when "AlwaysOnSharedSynchedBackupIsEnabled" is set to TRUE, Qlik Replicate reads the primary SQL Server replica and skips the secondary one.

Contributors
Version history
Last update:
‎2021-11-15 09:41 AM
Updated by: