Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Resume-DbaAgDbDataMovement on GitHub.
Want to see the Bill Of Health for this command? Check out Resume-DbaAgDbDataMovement.
Resumes suspended data synchronization for availability group databases.
Resumes data movement for availability group databases that have been suspended due to errors, maintenance, or storage issues. When data movement is suspended, secondary replicas stop receiving transaction log records from the primary, causing synchronization lag. This function reconnects the synchronization process so secondary replicas can catch up to the primary replica.
Resume-DbaAgDbDataMovement
[[-SqlInstance] <DbaInstanceParameter[]>]
[[-SqlCredential] <PSCredential>]
[[-AvailabilityGroup] <String>]
[[-Database] <String[]>]
[[-InputObject] <AvailabilityDatabase[]>]
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> Resume-DbaAgDbDataMovement -SqlInstance sql2017a -AvailabilityGroup ag1 -Database db1, db2
Resumes data movement on db1 and db2 to ag1 on sql2017a. Prompts for confirmation.
PS C:\> Get-DbaAgDatabase -SqlInstance sql2017a, sql2019 | Out-GridView -Passthru | Resume-DbaAgDbDataMovement -Confirm:$false
Resumes data movement on the selected availability group databases. Does not prompt for confirmation.
The target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies the name of the availability group containing the databases with suspended data movement.
Required when using the SqlInstance parameter to identify which AG context to work within.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Specifies which availability group databases to resume data movement for. Accepts multiple database names.
Use this to target specific databases when you don't want to resume movement for all databases in the availability group.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Accepts availability group database objects from Get-DbaAgDatabase for pipeline operations.
Use this when you want to filter or select specific AG databases before resuming data movement.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
Shows what would happen if the command were to run. No actions are actually performed.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
Prompts you for confirmation before executing any changing operations within the command.
Alias | cf |
Required | False |
Pipeline | false |
Default Value |