AlwaysOn Availability Groups PowerShell Commands
Below are the AlwaysOn Availability Groups Powershell commands.
-
Disable-SqlHADRService
Disables the SQL HADR service on a server instance.
-
Enable-SqlHADRService
Enables the SQL HADR service on an instance of Microsoft SQL Server 2012.
-
New-SqlHadrEndPoint
Creates a new database mirroring endpoint on a server instance. This endpoint is required for data movement between primary and secondary databases.
-
Set-SqlHadrEndpoint
Changes the properties of an existing database mirroring endpoint, such as the name, state, or authentication properties.
-
Backup-SqlDatabase
Creates a data or log backup
-
Restore-SqlDatabase
Restores a backup.
-
Disable-SqlAvailabilityGroup
Takes an availability group offline. -
Enable-SqlAvailabilityGroup
Brings an availability group online. -
New-SqlAvailabilityGroup
Creates a new availability group. -
Remove-SqlAvailabilityGroup
Deletes availability group. -
Set-SqlAvailabilityGroup
Sets the properties of an availability group; take an availability group online/offline -
Switch-SqlAvailabilityGroup
Initiates one of the following forms of failover:
A forced failover of an availability group (with possible data loss).
A manual failover of an availability group. -
Add-SqlAvailabilityDatabase
On the primary replica, adds a database to an availability group.
On a secondary replica, joins a secondary database to an availability group. -
Remove-SqlAvailabilityDatabase
On the primary replica, removes the database from the availability group.
On a secondary replica, removes the local secondary database from the local secondary replica. -
Resume-SqlAvailabilityDatabase
Resumes the data movement for a suspended availability database. -
Suspend-SqlAvailabilityDatabase
Suspends the data movement for an availability database.
