New-DbaAvailabilityGroup View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Creates SQL Server availability groups with automated replica setup, database seeding, and listener configuration.
Description Creates availability groups with full automation, eliminating the manual multi-step process typically required through T-SQL or SSMS. This command handles the entire workflow from initial validation through final configuration, so you don’t have to manually coordinate across multiple servers and troubleshoot common setup issues.
Remove-DbaAgDatabase View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Removes databases from availability groups on SQL Server instances.
Description Removes databases from availability groups, effectively stopping replication and high availability protection for those databases. This is commonly needed when decommissioning databases, reconfiguring availability group membership during maintenance windows, or troubleshooting replication issues. The function safely removes the database from all replicas in the availability group while preserving the actual database files on each replica.
Remove-DbaAgListener View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Removes availability group listeners from SQL Server instances.
Description Removes availability group listeners from SQL Server instances, permanently deleting the virtual network name and IP address configuration that clients use to connect to availability group databases. This operation is typically performed during decommissioning, reconfiguration, or when consolidating listeners. Once removed, applications will need to connect directly to individual replicas or use a different listener.
Remove-DbaAgReplica View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Removes secondary replicas from SQL Server Availability Groups
Description Removes secondary replicas from Availability Groups by calling the Drop() method on the replica object. This is commonly used when decommissioning servers, scaling down your availability group topology, or removing failed replicas that cannot be recovered. The function accepts either direct SQL instance parameters or piped input from Get-DbaAgReplica for batch operations.
Remove-DbaAvailabilityGroup View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Removes availability groups from SQL Server instances using DROP AVAILABILITY GROUP.
Description Removes availability groups from SQL Server instances by executing the DROP AVAILABILITY GROUP T-SQL command. This is typically used when decommissioning high availability setups, migrating to different solutions, or cleaning up test environments.
The function handles the complex considerations around properly removing availability groups to avoid leaving databases in problematic states.
Remove-DbaDbMirror View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Breaks database mirroring partnerships and stops mirroring sessions
Description Terminates database mirroring sessions by breaking the partnership between principal and mirror databases. This command stops the mirroring relationship completely, which is useful when decommissioning mirrors, performing maintenance that requires breaking the partnership, or during disaster recovery scenarios where you need to bring a database online independently.
Important: This function only breaks the mirroring partnership - it does not automatically recover databases that are left in a “Restoring” state.
Remove-DbaDbMirrorMonitor View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Stops and deletes the mirroring monitor job for all the databases on the server instance.
Description Stops and deletes the mirroring monitor job for all the databases on the server instance.
Basically executes sp_dbmmonitordropmonitoring.
Syntax Remove-DbaDbMirrorMonitor [-SqlInstance] <DbaInstanceParameter[]> [[-SqlCredential] <PSCredential>] [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> Remove-DbaDbMirrorMonitor -SqlInstance sql2008, sql2012 Stops and deletes the mirroring monitor job for all the databases on sql2008 and sql2012.
Repair-DbaDbMirror View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Repairs suspended database mirroring sessions by restarting endpoints and resuming mirroring
Description Restores database mirroring functionality when mirroring sessions become suspended due to network connectivity issues, log space problems, or other transient failures. This function performs the standard troubleshooting steps that DBAs typically execute manually: stops and restarts the database mirroring endpoints on the SQL Server instance, then resumes the mirroring session between the principal and mirror databases.
Resume-DbaAgDbDataMovement View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Resumes suspended data synchronization for availability group databases.
Description 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.
Revoke-DbaAgPermission View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Revokes permissions from SQL Server logins on database mirroring endpoints or availability groups.
Description Removes specific permissions from SQL Server logins on either database mirroring endpoints or availability groups. This is commonly needed when service accounts change roles, security policies require permission reductions, or during availability group maintenance and troubleshooting. For endpoints, you can revoke most standard permissions like Connect, Alter, and Control.