Reputation: 29
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
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
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.
Upvotes: 0