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.
Set-DbaDbMirror View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Configures database mirroring partner, witness, safety level, and operational state settings.
Description Modifies database mirroring configuration by setting the partner server, witness server, safety level, or changing the mirror state. This function lets you reconfigure existing mirrored databases without manually writing ALTER DATABASE statements. Use it to add or change witness servers for automatic failover, adjust safety levels between synchronous and asynchronous modes, or control mirror states like suspend, resume, and failover operations.
Suspend-DbaAgDbDataMovement View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Suspends data synchronization for availability group databases to halt replication between replicas.
Description Temporarily halts data movement between primary and secondary replicas for specified availability group databases. This stops transaction log records from being sent to secondary replicas, which is useful during maintenance windows, troubleshooting synchronization issues, or when preparing for manual failovers. While suspended, the secondary databases will fall behind the primary and cannot be failed over to until data movement is resumed.
Sync-DbaAvailabilityGroup View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Synchronizes server-level objects from primary to secondary replicas in availability groups
Description Copies server-level objects from the primary replica to all secondary replicas in an availability group. Availability groups only synchronize databases, not the server-level dependencies that applications need to function properly after failover.
This command ensures that logins, SQL Agent jobs, linked servers, and other critical server objects exist on all replicas so your applications work seamlessly regardless of which replica becomes primary.
Test-DbaAgSpn View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Validates Service Principal Name registration for Availability Group listeners in Active Directory
Description Checks whether the required SPNs are properly registered in Active Directory for each Availability Group listener’s service account. This function queries AD to verify that both the MSSQLSvc/listener.domain.com and MSSQLSvc/listener.domain.com:port SPNs exist, which are essential for Kerberos authentication to work correctly with AG listeners.
Use this to troubleshoot client connectivity issues, validate SPN configuration before deployments, or audit security compliance.
Test-DbaAvailabilityGroup View Source Andreas Jordan (@JordanOrdix), ordix.de Windows, Linux, macOS Synopsis Validates Availability Group replica connectivity and database prerequisites for AG operations
Description Verifies that all replicas in an Availability Group are connected and communicating properly by checking ConnectionState across all replicas from the primary’s perspective. This helps you identify connectivity issues that could impact failover capabilities or data synchronization.
When used with the AddDatabase parameter, performs comprehensive prerequisite validation before adding databases to an AG.