Export (0) Print
Expand All

Resume an Availability Database (SQL Server)

 

You can resume a suspended availability database in AlwaysOn Availability Groups by using SQL Server Management Studio, Transact-SQL, or PowerShell in SQL Server 2014. Resuming a suspended database puts the database into the SYNCHRONIZING state. Resuming the primary database also resumes any of its secondary databases that were suspended as the result of suspending the primary database. If any secondary database was suspended locally, from the server instance that hosts the secondary replica, that secondary database must be resumed locally. Once a given secondary database and the corresponding primary database are in the SYNCHRONIZING state, data synchronization resumes on the secondary database.

System_CAPS_noteNote

Suspending and resuming an AlwaysOn secondary database does not directly affect the availability of the primary database. However, suspending a secondary database can impact redundancy and failover capabilities for the primary database, until the suspended secondary database is resumed. This is in contrast to database mirroring, where the mirroring state is suspended on both the mirror database and the principal database until mirroring is resumed. Suspending an AlwaysOn primary database suspends data movement on all the corresponding secondary databases, and redundancy and failover capabilities cease for that database until the primary database is resumed.

A RESUME command returns as soon as it has been accepted by the replica that hosts the target database, but actually resuming the database occurs asynchronously.

  • You must be connected to the server instance that hosts the database to be resumed.

  • The availability group must be online.

  • The primary database must be online and available.

To resume a secondary database

  1. In Object Explorer, connect to the server instance that hosts the availability replica on which you want to resume a database, and expand the server tree.

  2. Expand the AlwaysOn High Availability node and the Availability Groups node.

  3. Expand the availability group.

  4. Expand the Availability Databases node, right-click the database, and click Resume Data Movement.

  5. In the Resume Data Movement dialog box, click OK.

System_CAPS_noteNote

To resume additional databases on this replica location, repeat steps 4 and 5 for each database.

Arrow icon used with Back to Top linkUnable to find bookmark 'Top' in topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"20e9147b-e985-4caa-910e-fc4b38dbf9a1","entity_type":"Article","locale":"en-US"}'. Rebuild topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"20e9147b-e985-4caa-910e-fc4b38dbf9a1","entity_type":"Article","locale":"en-US"}' may solve the problem.

To resume a secondary database

  1. Change directory (cd) to the server instance that hosts the replica whose database you want to resume. For more information, see Prerequisites, earlier in this topic.

  2. Use the Resume-SqlAvailabilityDatabase cmdlet to resume the availability group.

    For example, the following command resumes data synchronization for the availability database MyDb3 in the availability group MyAg.

    Resume-SqlAvailabilityDatabase ` 
    -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\Databases\MyDb3
    
    System_CAPS_noteNote

    To view the syntax of a cmdlet, use the Get-Help cmdlet in the SQL Server PowerShell environment. For more information, see Get Help SQL Server PowerShell.

To set up and use the SQL Server PowerShell provider

Arrow icon used with Back to Top linkUnable to find bookmark 'Top' in topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"20e9147b-e985-4caa-910e-fc4b38dbf9a1","entity_type":"Article","locale":"en-US"}'. Rebuild topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"20e9147b-e985-4caa-910e-fc4b38dbf9a1","entity_type":"Article","locale":"en-US"}' may solve the problem.

Show:
© 2015 Microsoft