[AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AVAILABILITY GROUP ON子句
AVAILABILITY GROUP ON
指定構成分散式可用性組的兩個可用性組。Specifies two availability groups that constitute a distributed availability group. 每個可用性組都是其自己的Windows Server故障轉移群集(WSFC)的一部分。Each availability group is part of its own Windows Server Failover Cluster (WSFC). 建立分散式可用性組時,當前SQL Server例項上的可用性組將成為主可用性組。When you create a distributed availability group, the availability group on the current SQL Server Instance becomes the primary availability group. 第二個可用性組成為第二個可用性組。The second availability group becomes the secondary availability group.
您需要將輔助可用性組加入到分散式可用性組中。You need to join the secondary availability group to the distributed availability group. 有關詳細資訊,請參閱alter availability group(Transact-SQL)。For more information, see .
<ag_name> 指定構成分散式可用性組一半的可用性組的名稱。<ag_name> Specifies the name of the availability group that makes up one half of the distributed availability group.
LISTENER ='TCP://system-address:port'
指定與可用性組關聯的偵聽器的URL路徑。Specifies the URL path for the listener associated with the availability group.
LISTENER 子句是必需的。The LISTENER clause is required.
'TCP://system-address:port'
指定與可用性組關聯的偵聽器的URL。Specifies a URL for the listener associated with the availability group. URL引數如下:The URL parameters are as follows:
system-address
是一個字串,例如系統名、完全限定的域名或IP地址,它明確標識偵聽器。Is a string, such as a system name, a fully qualified domain name, or an IP address, that unambiguously identifies the listener.
port
是與可用性組的映象端點關聯的埠號。Is a port number that is associated with the mirroring endpoint of the availability group. 注意,這不是偵聽器的埠。Note that this is not the port of the listener.
AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT | CONFIGURATION_ONLY }
指定在主副本可以提交給定主資料庫上的事務之前,主副本是否必須等待輔助可用性組確認將日誌記錄硬化(寫入)到磁碟。Specifies whether the primary replica has to wait for the secondary availability group to acknowledge the hardening (writing) of the log records to disk before the primary replica can commit the transaction on a given primary database.
同步提交 SYNCHRONOUS_COMMIT
指定主副本等待提交事務,直到在輔助可用性組上對它們進行了固化。Specifies that the primary replica waits to commit transactions until they have been hardened on the secondary availability group.您可以為最多兩個可用性組(包括主可用性組)指定同步提交。You can specify SYNCHRONOUS_COMMIT for up to two availability groups, including the primary availability group.
非同步提交 ASYNCHRONOUS_COMMIT
指定主副本提交事務,而不必等待此輔助可用性組固化日誌。Specifies that the primary replica commits transactions without waiting for this secondary availability group to harden the log. 您可以為最多兩個可用性組(包括主可用性組)指定非同步提交。You can specify ASYNCHRONOUS_COMMIT for up to two availability groups, including the primary availability group.
AVAILABILITY_MODE 子句是必需的。The AVAILABILITY_MODE clause is required.
FAILOVER_MODE = { MANUAL }
指定分散式可用性組的故障轉移模式。Specifies the failover mode of the distributed availability group.
手動 MANUAL
啟用資料庫管理員計劃的手動故障轉移或強制的手動故障轉移(通常稱為強制故障轉移)。Enables planned manual failover or forced manual failover (typically called forced failover) by the database administrator.
FAILOVER_MODE 子句是必需的,唯一的選項是手動。The FAILOVER_MODE clause is required, and the only option is MANUAL. 不支援自動故障轉移到輔助可用性組。Automatic failover to the secondary availability group is not supported.
SEEDING_MODE = { AUTOMATIC | MANUAL }
指定輔助可用性組最初的種子設定方式。Specifies how the secondary availability group is initially seeded.
自動 AUTOMATIC
啟用直接播種。Enables direct seeding. 此方法透過網路為輔助可用性組種子。This method seeds the secondary availability group over the network. 此方法不需要備份和還原輔助可用性組副本上的主資料庫副本。This method does not require you to backup and restore a copy of the primary database on the replicas of the secondary availability group.
手動 MANUAL
設定手動播種(預設的)。Specifies manual seeding (default). 此方法要求您在原始複製品上建立一個資料庫備份,並手動恢復原始複製品上的備份。This method requires you to create a backup of the database on the primary replica and manually restore that backup on the replica(s) of the secondary availability group.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-2654360/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:LISTENER子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DATABASE子句SQLServerDatabase
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:REPLICA ON子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:ENDPOINT_URL子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:PRIMARY_ROLE子句SQLServer
- [AlwaysOn] 建立SQL Server AlwaysOn高可用性組T-SQL語法SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:SECONDARY_ROLE子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AVAILABILITY_MODE引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:group_name引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:例項SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:BASIC引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:安全性SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DISTRIBUTED引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:BACKUP_PRIORITY引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:CLUSTER_TYPE引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DTC_SUPPORT引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:先決條件和限制SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:SESSION_TIMEOUT引數SQLServerSession
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:SEEDING_MODE引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:FAILOVER_MODE引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DB_FAILOVER引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AUTOMATED_BACKUP_PREFERENCE引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:HEALTH_CHECK_TIMEOUT引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:FAILURE_CONDITION_LEVEL引數SQLServerAI
- SQL Server Availability Group Failover 測試SQLServerAI
- Linux 上配置 SQL Server Always On Availability GroupLinuxSQLServerAI
- [AlwaysOn] T-SQL語法:REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT引數SQLUIsynchronizedMIT
- SQL Server 2022 AlwaysOn新特性之包含可用性組介紹SQLServer
- [AlwaysOn2017] AlwaysOn的DMV和DMF - Sys.availability_group_listenersAI
- [AlwaysOn] AlwaysOn可用性組的可用性模式之間的差異模式
- Sql Server Linux(Redhat) Distributed Availability Group Setup — step by stepSQLServerLinuxRedhatAI
- T-SQL——基礎語法SQL
- SQL Server AlwaysOn可用性副本會話期間的可能故障SQLServer會話
- SQL Server Alwayson建立代理作業注意事項SQLServer
- SQL Server AlwaysOn搭建SQLServer
- [AlwaysOn2017] AlwaysOn的DMV和DMF - Sys.dm_hadr_availability_group_statesAI
- [AlwaysOn2017] AlwaysOn的DMV和DMF -Sys.availability_group_listener_ip_addressesAI
- SQL Server中的高可用性概覽SQLServer