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.
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.
Set-DbaAgListener View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Modifies the port number for Availability Group listeners on SQL Server instances.
Description Modifies the port number for Availability Group listeners, allowing you to change the network port that clients use to connect to the availability group. This is commonly needed when standardizing ports across environments, resolving port conflicts with other services, or implementing security policies that require non-default ports.
Set-DbaAgReplica View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Modifies configuration properties of existing availability group replicas.
Description Modifies configuration properties of existing availability group replicas such as availability mode, failover behavior, backup priority, and read-only routing settings. This function is used for ongoing management and tuning of availability groups after initial setup, allowing you to adjust replica behavior without recreating the availability group.
Common use cases include changing synchronous replicas to asynchronous for performance, adjusting backup priorities to control where backups run, configuring automatic failover settings, and setting up read-only routing for load balancing read workloads across secondary replicas.
Set-DbaAvailabilityGroup View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Modifies availability group configuration settings including DTC support, backup preferences, and failover conditions
Description Modifies configuration properties of existing availability groups without requiring you to script out and recreate the entire AG setup. Commonly used to enable DTC support for distributed transactions, adjust automated backup preferences across replicas, configure failure condition levels for automatic failover, and set health check timeouts for monitoring.