Chrissy LeMaire (@cl), netnerds.net | Andreas Jordan (@JordanOrdix), ordix.de
Add-DbaAgDatabase View Source Chrissy LeMaire (@cl), netnerds.net , Andreas Jordan (@JordanOrdix), ordix.de Windows, Linux, macOS Synopsis Adds databases to an Availability Group with automated backup, restore, and synchronization handling.
Description Adds databases to an Availability Group and handles the complete process from backup through synchronization. This command eliminates the manual steps typically required when expanding Availability Groups with new databases, automatically managing seeding modes, backup/restore operations, and replica synchronization.
Add-DbaAgListener View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Creates a network listener endpoint for an Availability Group to provide client connectivity
Description Creates a network listener endpoint that provides a virtual network name and IP address for clients to connect to an Availability Group. The listener automatically routes client connections to the current primary replica, eliminating the need for applications to track which server is currently hosting the primary database.
Add-DbaAgReplica View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Adds a replica to an availability group on one or more SQL Server instances.
Description Adds a replica to an availability group on one or more SQL Server instances.
Automatically creates database mirroring endpoints if required.
Syntax Add-DbaAgReplica [-SqlInstance] <DbaInstanceParameter[]> [[-SqlCredential] <PSCredential>] [[-Name] <String>] [[-ClusterType] <String>] [[-AvailabilityMode] <String>] [[-FailoverMode] <String>] [[-BackupPriority] <Int32>] [[-ConnectionModeInPrimaryRole] <String>] [[-ConnectionModeInSecondaryRole] <String>] [[-SeedingMode] <String>] [[-Endpoint] <String>] [[-EndpointUrl] <String[]>] [-Passthru] [[-ReadOnlyRoutingList] <String[]>] [[-ReadonlyRoutingConnectionUrl] <String>] [[-Certificate] <String>] [-ConfigureXESession] [[-SessionTimeout] <Int32>] [-InputObject] <AvailabilityGroup> [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> Get-DbaAvailabilityGroup -SqlInstance sql2017a -AvailabilityGroup SharePoint | Add-DbaAgReplica -SqlInstance sql2017b Adds sql2017b to the SharePoint availability group on sql2017a
Compare-DbaAgReplicaAgentJob View Source dbatools team Windows, Linux, macOS Synopsis Compares SQL Agent Jobs across Availability Group replicas to identify configuration differences.
Description Compares SQL Agent Jobs across all replicas in an Availability Group to identify differences in job configurations. This helps ensure consistency across AG replicas and detect when jobs have been modified on one replica but not others.
This is particularly useful for verifying that junior DBAs have applied changes to all replicas or for troubleshooting issues where job configurations have drifted between replicas.
Compare-DbaAgReplicaCredential View Source dbatools team Windows, Linux, macOS Synopsis Compares SQL Server Credentials across Availability Group replicas to identify configuration differences.
Description Compares SQL Server Credentials across all replicas in an Availability Group to identify differences in credential configurations. This helps ensure consistency across AG replicas and detect when credentials have been created or removed on one replica but not others.
This is particularly useful for verifying that junior DBAs have applied security changes to all replicas or for troubleshooting issues where credential configurations have drifted between replicas.
Compare-DbaAgReplicaLogin View Source dbatools team Windows, Linux, macOS Synopsis Compares SQL Server logins across Availability Group replicas to identify configuration differences.
Description Compares SQL Server logins across all replicas in an Availability Group to identify differences in login configurations. This helps ensure consistency across AG replicas and detect when logins have been created, modified, or removed on one replica but not others.
This is particularly useful for verifying that junior DBAs have applied security changes to all replicas or for troubleshooting access issues where login configurations have drifted between replicas.
Compare-DbaAgReplicaOperator View Source dbatools team Windows, Linux, macOS Synopsis Compares SQL Agent Operators across Availability Group replicas to identify configuration differences.
Description Compares SQL Agent Operators across all replicas in an Availability Group to identify differences in operator configurations. This helps ensure consistency across AG replicas and detect when operators have been created or removed on one replica but not others.
This is particularly useful for verifying that junior DBAs have applied alert notification changes to all replicas or for troubleshooting issues where operator configurations have drifted between replicas.
Compare-DbaAvailabilityGroup View Source dbatools team Windows, Linux, macOS Synopsis Compares configuration across Availability Group replicas to identify differences in Jobs, Logins, Credentials, and Operators.
Description Compares multiple object types across all replicas in an Availability Group to identify configuration differences. This comprehensive command checks SQL Agent Jobs, SQL Server Logins, SQL Server Credentials, and SQL Agent Operators to ensure consistency across AG replicas.
This is the main command for comparing AG replica configurations.
Disable-DbaAgHadr View Source Shawn Melton (@wsmelton), wsmelton.github.io Windows, Linux, macOS Synopsis Disables High Availability Disaster Recovery (HADR) capability on SQL Server instances.
Description Disables the HADR service setting at the SQL Server instance level, effectively removing the instance’s ability to participate in Availability Groups. This is commonly needed when decommissioning servers from AGs, troubleshooting AG setup issues, or converting instances back to standalone operation after removing them from Availability Groups.
Enable-DbaAgHadr View Source Shawn Melton (@wsmelton), wsmelton.github.io Windows, Linux, macOS Synopsis Enables HADR service setting on SQL Server instances to allow Availability Group creation.
Description Configures the High Availability Disaster Recovery (HADR) service setting on SQL Server instances, which is a required prerequisite before you can create Availability Groups. This setting must be enabled at the instance level and requires a service restart to take effect. Use this command when preparing SQL Server instances for Availability Group participation after your Windows Server Failover Cluster is already configured.