Pre Requisites To Setup HA DR in SQL Server 1727584922
Pre Requisites To Setup HA DR in SQL Server 1727584922
The high availability (HA) and disaster recovery (DR) solutions available in SQL Server are Log Shipping,
Database Mirroring, Replication, Failover Cluster Instances (FCI), and Always On Availability Groups.
b. Recovery Model:
● The database must be in the Full Recovery Model for transaction logs to be backed up and shipped.
https://www.sqldbachamps.com
● SQL Server Agent must be running on both the primary and secondary servers because the log shipping
jobs rely on SQL Server Agent.
d. Backup Location:
● A shared folder (network path) accessible by both the primary and secondary servers is required to store
transaction log backups.
● The SQL Server service accounts on both the primary and secondary servers must have sufficient
permissions (read/write) on this shared folder.
e. Primary Server:
● A database on the primary server from which transaction logs will be shipped.
f. Secondary Server(s):
● One or more secondary servers where the transaction logs will be copied and restored.
g. Disk Space:
● Sufficient disk space on both primary and secondary servers for the transaction log backups and copies.
https://www.sqldbachamps.com Praveen Madupu +91 98661 30093
Sr SQL Server DBA, Dubai
[email protected]
h. SQL Server Version:
● The SQL Server version of the secondary server should be equal to or higher than the version on the
primary server.
i. Network:
● A reliable network connection between the primary and secondary servers is needed for copying
transaction log backups.
https://www.sqldbachamps.com
https://www.sqldbachamps.com Praveen Madupu +91 98661 30093
Sr SQL Server DBA, Dubai
[email protected]
● SQL Server Enterprise Edition supports both High-Safety with Automatic Failover and
High-Performance modes.
● SQL Server Standard Edition only supports High-Safety without Automatic Failover mode (no
asynchronous mirroring).
b. Recovery Model:
https://www.sqldbachamps.com
● The mirror server must have the same or higher version of SQL Server as the principal server.
e. Database State:
● SQL Server Agent is not required for database mirroring, but it can be used for monitoring and alerting.
g. Network Configuration:
● The principal, mirror, and witness (if used) servers must be able to communicate with each other via
TCP/IP.
● Port 5022 is used by default, but it can be customized.
● Reliable network connection with low latency is critical for synchronous mirroring (High-Safety mode).
3. Replication Prerequisites
a. Edition Requirements:
● Publisher: The server that owns the database objects and data to be replicated.
● Distributor: Can be the same as the Publisher or a separate instance. Stores replication metadata and
transactions.
● Subscriber: One or more servers where the replicated data is received.
c. Snapshot Folder:
● A network location for the snapshot folder that is accessible by the Distributor and Subscriber servers.
https://www.sqldbachamps.com
● SQL Server Agent must be running on both Publisher and Distributor servers, as it manages the
replication jobs.
e. Replication Agents:
f. Recovery Model:
● For Transactional Replication, the database must be in Full or Bulk-Logged recovery models.
● For Snapshot Replication, the recovery model can be Simple, Bulk-Logged, or Full.
g. Network Configuration:
● Reliable network communication between the Publisher, Distributor, and Subscriber servers.
h. Database Schema:
https://www.sqldbachamps.com Praveen Madupu +91 98661 30093
Sr SQL Server DBA, Dubai
[email protected]
● The database schema on the Subscriber should be compatible with that on the Publisher.
● SQL Server Failover Clustering requires Windows Server Failover Clustering (WSFC) to be set up and
operational.
c. Shared Storage:
● The servers in the cluster must have access to shared storage (SAN, iSCSI, or SMB file shares) to host
the databases.
d. Network Configuration:
https://www.sqldbachamps.com
●
●
A private network for communication between the nodes and a public network for client connections.
All cluster nodes must be on the same domain, and the network adapters must be correctly configured
with static IPs.
e. Quorum Configuration:
● A quorum configuration (Disk, File Share, or Cloud) is required to manage cluster node membership.
● Install SQL Server on each node of the cluster by choosing the New SQL Server failover cluster
installation option.
g. Domain Accounts:
● Use domain service accounts for SQL Server services (SQL Server Database Engine, SQL Server
Agent) that have necessary permissions across all nodes.
h. Cluster Nodes:
● Each node in the cluster must have the same SQL Server version and edition installed.
https://www.sqldbachamps.com Praveen Madupu +91 98661 30093
Sr SQL Server DBA, Dubai
[email protected]
● Always On Availability Groups are available only in SQL Server Enterprise Edition.
● Always On Availability Groups rely on WSFC for coordination between replicas. You must first set up a
Windows Failover Cluster.
● All databases in the Availability Group must be in the Full Recovery Model.
● SQL Server Agent should be running on all nodes for job management and automation.
https://www.sqldbachamps.com
●
●
The primary replica is the server where the database is active and readable/writable.
One or more secondary replicas (up to 8) serve as copies of the primary database, which can be readable
(read-scale) or serve as failover targets.
● The Windows Failover Cluster must endorse each node before participating in an Availability Group.
● All nodes (primary and secondary) must have the same or higher version of SQL Server.
● You can configure a Listener to allow client applications to connect to the Availability Group with a single
name or virtual IP, rather than connecting to individual servers.
i. Network Configuration:
Setting up any SQL Server high availability or disaster recovery solution requires careful planning and meeting
several technical prerequisites.
Each solution has its own set of specific requirements, including editions, recovery models, network setups, SQL
Server Agents, storage configurations, and more.
Ensure that these prerequisites are met before configuring any HA or DR setup in SQL Server to avoid common
pitfalls.
https://www.sqldbachamps.com