Resume-SqlAvailabilityDatabase

Resumes data movement on an availability database.
Resume-SqlAvailabilityDatabase [[-Path] <string>] [-Script] [-Confirm] [-WhatIf] [<CommonParameters>]
Resume-SqlAvailabilityDatabase [-InputObject*] <AvailabilityDatabase> [-Script] [-Confirm] [-WhatIf][<CommonParameters>]

The Resume-SqlAvailabilityDatabase cmdlet resumes data movement on an availability database. Resuming a primary database resumes data movement on the corresponding secondary databases. When a particular secondary database is resumed, data movement is resumed on that database only.

Parameters
-InputObject <AvailabilityDatabase>

  • This value is required
  • Accepts pipeline input ByValue

The AvailabilityDatabase object of the primary or secondary database on which data movement is to be resumed.

-Path <string>

The path to the availability database. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.

-Script [<SwitchParameter>]

Outputs a Transact-SQL script that performs the task executed by this cmdlet.

-Confirm [<SwitchParameter>]

Prompts you for confirmation before executing the command.

-WhatIf [<SwitchParameter>]

Describes what would happen if you executed the command without actually executing the command.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Inputs

Microsoft.SqlServer.Management.Smo.AvailabilityDatabase

Outputs

SQL Server Books Online: Resuming a Database in an Availability Group (SQL Server)

Examples
  1. This command resumes data synchronization for the availability database ‘MyDatabase’ in the availability group ‘MyAg’:
    C:PS> Resume-SqlAvailabilityDatabase -Path SQLSERVER:SqlComputerInstanceAvailabilityGroupsMyAgAvailabilityDatabasesMyDatabase
    
  2. This command resumes data synchronization for all availability databases in the availability group ‘MyAg’ on the server instance named ‘ComputerInstance’:
    C:PS> dir SQLSERVER:SqlComputerInstanceAvailabilityGroupsAgNameAvailabilityDatabases | Resume-SqlAvailabilityDatabase
    
  3. This command outputs the Transact-SQL script that resumes data synchronization for the availability database ‘MyDatabase’ in the availability group ‘MyAg’ on the server instance named ‘ComputerInstance’:
    C:PS> Resume-SqlAvailabilityDatabase -Path SQLSERVER:SqlComputerInstanceAvailabilityGroupsMyAgAvailabilityDatabasesMyDatabase -Script
    
Additional Notes
 
Related Links