Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
This topic contains information about how to start data synchronization after you add a database to an Always On availability group. For each new primary replica, secondary databases must be prepared on the server instances that host the secondary replicas. Then each of these secondary databases must be manually joined to the availability group.
Note
If the file paths are identical on every server instance that hosts an availability replica for an availability group, the New Availability Group Wizard, Add Replica to Availability Group Wizard, or Add Database to Availability Group Wizard might be able to automatically start data synchronization for you.
To start data synchronization manually, you need to connect, in turn, to each server instance that is hosting a secondary replica for the availability group and complete the following steps:
Restore current backups of each primary database and its transaction log (using RESTORE WITH NORECOVERY). You can use either of the following alternative approaches:
Manually restore a recent database backup of the primary database using RESTORE WITH NORECOVERY, and then restore each subsequent log backup using RESTORE WITH NORECOVERY. Perform this restore sequence on every server instance that hosts a secondary replica for the availability group.
For more information:
Manually Prepare a Secondary Database for an Availability Group (SQL Server)
If you are adding one or more log shipping primary databases to an availability group, you might be able to migrate one or more of the corresponding secondary databases from log shipping to Always On Availability Groups. Migrating a log shipping secondary database requires that it use the same database name as the primary database and that it reside on a server instance that is hosting a secondary replica for the availability group. Furthermore, the availability group must be configured so that the primary replica is preferred for backups and is a candidate for performing backups (that is, that has a backup priority that is >0). Once the backup job has run on the primary database, you will need to disable the backup job, and once the restore job has run on a given secondary database, you will need to disable the restore job.
Note
After you have created all the secondary databases for the availability group, if you want to perform backups on secondary replicas, you will need to re-configure the automated backup preference of the availability group.
For more information:
Prerequisites for Migrating from Log Shipping to Always On Availability Groups (SQL Server)
As soon as possible, join each newly prepared secondary database to the availability group.
For more information:
Join a Secondary Database to an Availability Group (SQL Server)
Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Deploy highly available solutions by using Azure SQL - Training
In this module, you'll learn how to deploy highly available solutions by using Azure SQL. You'll also look at architectures and how they affect availability.
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Documentation
Join a secondary database to an availability group - SQL Server Always On
Steps to join a secondary database to an Always On availability group using either Transact-SQL (T-SQL), PowerShell, or SQL Server Management Studio.
Add a database to an availability group with the 'Availability Group Wizard' - SQL Server Always On
Add a database to an Always On availability group using the 'Availability Group Wizard' within SQL Server Management Studio.
Prepare a secondary database for an availability group - SQL Server Always On
A description for how to manually prepare a secondary database to join an Always On availability group.
Add replica to an availability group (SSMS) - SQL Server Always On
Add a replica to an Always On availability group using the wizard found in SQL Server Management Studio.