Vasile Cuzmin
Vasile Cuzmin

Reputation: 29

Secondary Replica SQL Server(Availability Groups )

I have two bases in a group on SQL Server. The first one is primary and the second is the replica. I want to connect to the replica (from a simple C # application) if the primary one falls. How can I do that? Thank you!

Upvotes: 1

Views: 67

Answers (2)

Ben Thul
Ben Thul

Reputation: 32737

If your databases are in an Availability Group (AG), you should point your application to the Listener for the AG. This is a network name that will always point to the primary server for the AG.

Upvotes: 1

A.D.
A.D.

Reputation: 2372

SQL Server 2008 Enterprise and later versions support backup compression. When creating a log shipping configuration, you can control the backup compression behavior of log backups and if you already have a Replica then you can configure it When an availability failover occurs, existing persistent connections to the availability are terminated and the client must establish a new connection in order to continue working with the same primary database or read-only secondary database. For more information.

Configure Log Shipping

Secondary Database Settings

Application Failover

Upvotes: 0

Related Questions