-
Notifications
You must be signed in to change notification settings - Fork 225
Setting up a SQL Server AlwaysOn Availability Groups
This will reference examples that show how to setup high availability using AlwaysOn Availability Group. It assumes that a working domain exists with at least one Domain Controller, and both servers that should contain the SQL Server nodes are domain joined.
Please see Prepare Active Directory. The same applies to the failover cluster needed for SQL Server AlwaysOn Availability Groups.
Please see Create Failover Cluster. The same applies to the failover cluster needed for SQL Server AlwaysOn Availability Groups.
Note
Make sure any user accounts you use in the configuration exist in Active Directory and that they have the correct permission.
The example shows how to install a SQL Server named instance on a single server which will be used as the primary replica node in the SQL Server AlwaysOn Availability Group.
The example shows how to install a SQL Server named instance on a single server which will be used as the secondary replica node in the SQL Server AlwaysOn Availability Group.
AlwaysOn must be enabled on both the primary and secondary replica, and the example Enable AlwaysOn shows how to enable it (which requires that a working Failover Cluster is present on the node).
Once AlwaysOn is enabled we can create the Availability Group. The example Create Availability Group shows how to create the Availability Group on the primary replica and join the Availability Group on the secondary replica.
Important
Make sure any user accounts you use in the configuration exist in Active Directory and that they have the correct permission.
- Add-SqlDscNode
- Add-SqlDscTraceFlag
- Complete-SqlDscFailoverCluster
- Complete-SqlDscImage
- Connect-SqlDscDatabaseEngine
- ConvertFrom-SqlDscDatabasePermission
- ConvertFrom-SqlDscServerPermission
- ConvertTo-SqlDscDatabasePermission
- ConvertTo-SqlDscServerPermission
- Disable-SqlDscAudit
- Disconnect-SqlDscDatabaseEngine
- Enable-SqlDscAudit
- Get-SqlDscAudit
- Get-SqlDscConfigurationOption
- Get-SqlDscDatabasePermission
- Get-SqlDscManagedComputer
- Get-SqlDscManagedComputerService
- Get-SqlDscPreferredModule
- Get-SqlDscServerPermission
- Get-SqlDscStartupParameter
- Get-SqlDscTraceFlag
- Import-SqlDscPreferredModule
- Initialize-SqlDscRebuildDatabase
- Install-SqlDscServer
- Invoke-SqlDscQuery
- New-SqlDscAudit
- Remove-SqlDscAudit
- Remove-SqlDscNode
- Remove-SqlDscTraceFlag
- Repair-SqlDscServer
- Save-SqlDscSqlServerMediaFile
- Set-SqlDscAudit
- Set-SqlDscDatabasePermission
- Set-SqlDscServerPermission
- Set-SqlDscStartupParameter
- Set-SqlDscTraceFlag
- Test-SqlDscIsDatabasePrincipal
- Test-SqlDscIsLogin
- Test-SqlDscIsSupportedFeature
- Uninstall-SqlDscServer
- SqlAG
- SqlAGDatabase
- SqlAgentAlert
- SqlAgentFailsafe
- SqlAgentOperator
- SqlAGListener
- SqlAGReplica
- SqlAlias
- SqlAlwaysOnService
- SqlAudit
- SqlConfiguration
- SqlDatabase
- SqlDatabaseDefaultLocation
- SqlDatabaseMail
- SqlDatabaseObjectPermission
- SqlDatabasePermission
- SqlDatabaseRole
- SqlDatabaseUser
- SqlEndpoint
- SqlEndpointPermission
- SqlLogin
- SqlMaxDop
- SqlMemory
- SqlPermission
- SqlProtocol
- SqlProtocolTcpIp
- SqlReplication
- SqlRole
- SqlRS
- SqlRSSetup
- SqlScript
- SqlScriptQuery
- SqlSecureConnection
- SqlServiceAccount
- SqlSetup
- SqlTraceFlag
- SqlWaitForAG
- SqlWindowsFirewall