Thor Logo dbatools

AG

Add-DbaAgDatabase

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.

Read more

Add-DbaAgListener

Chrissy LeMaire (@cl), netnerds.net

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.

Read more

Add-DbaAgReplica

Chrissy LeMaire (@cl), netnerds.net

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

Read more

Disable-DbaAgHadr

Shawn Melton (@wsmelton), wsmelton.github.io

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.

Read more

Enable-DbaAgHadr

Shawn Melton (@wsmelton), wsmelton.github.io

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.

Read more

Get-DbaAgBackupHistory

Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram), Andreas Jordan

Get-DbaAgBackupHistory View Source Chrissy LeMaire (@cl) , Stuart Moore (@napalmgram), Andreas Jordan Windows, Linux, macOS Synopsis Retrieves backup history from msdb across all replicas in a SQL Server Availability Group Description Queries the msdb backup history tables across all replicas in an Availability Group and aggregates the results into a unified view. This function automatically discovers all replicas (either through a listener or by querying individual replicas) and combines their backup history data, which is essential since backups can be taken from any replica but are only recorded in the local msdb.

Read more

Get-DbaAgDatabase

Shawn Melton (@wsmelton), wsmelton.github.io

Get-DbaAgDatabase View Source Shawn Melton (@wsmelton), wsmelton.github.io Windows, Linux, macOS Synopsis Retrieves availability group database information and synchronization status from SQL Server instances. Description Retrieves detailed information about databases participating in SQL Server availability groups, including their synchronization state, failover readiness, and replica-specific status. This function queries the availability group configuration from each SQL Server instance to return database-level health and status information that varies depending on whether the replica is primary or secondary.

Read more

Get-DbaAgHadr

Shawn Melton (@wsmelton), wsmelton.github.io

Get-DbaAgHadr View Source Shawn Melton (@wsmelton), wsmelton.github.io Windows, Linux, macOS Synopsis Retrieves the High Availability Disaster Recovery (HADR) service status for SQL Server instances. Description Checks whether Availability Groups are enabled at the service level on SQL Server instances. This is a prerequisite for creating and managing Availability Groups, as HADR must be enabled before you can configure any AG functionality. Returns the computer name, instance name, and the current HADR enabled status (true/false) for each specified instance, making it useful for environment audits and troubleshooting AG setup issues.

Read more

Get-DbaAgListener

Viorel Ciucu (@viorelciucu)

Get-DbaAgListener View Source Viorel Ciucu (@viorelciucu) Windows, Linux, macOS Synopsis Retrieves availability group listener configurations including IP addresses and port numbers. Description Retrieves availability group listener configurations from SQL Server instances, providing essential network details needed for client connections and troubleshooting. This function returns listener names, port numbers, IP configurations, and associated availability groups, which is crucial for validating listener setup and diagnosing connection issues. Use this when you need to document your AG infrastructure, verify listener configurations after setup, or troubleshoot client connectivity problems.

Read more

Get-DbaAgReplica

Shawn Melton (@wsmelton) | Chrissy LeMaire (@cl)

Get-DbaAgReplica View Source Shawn Melton (@wsmelton) , Chrissy LeMaire (@cl) Windows, Linux, macOS Synopsis Retrieves availability group replica configuration and status information from SQL Server instances. Description Retrieves detailed information about availability group replicas including their current role, connection state, synchronization status, and failover configuration. This function helps DBAs monitor replica health, verify failover readiness, and troubleshoot availability group issues without manually querying system views. Returns comprehensive replica properties like backup priority, endpoint URLs, session timeouts, and read-only routing lists for availability group management and compliance reporting.

Read more
← Previous
1 2 3
Next →
Page 1 of 3