[AlwaysOn] 建立SQL Server AlwaysOn高可用性組T-SQL語法
建立SQL Server高可用性組T-SQL語法
CREATE AVAILABILITY GROUP group_name
WITH (<with_option_spec> [ ,...n ] )
FOR [ DATABASE database_name [ ,...n ] ]
REPLICA ON <add_replica_spec> [ ,...n ]
AVAILABILITY GROUP ON <add_availability_group_spec> [ ,...2 ]
[ LISTENER 'dns_name' ( <listener_option> ) ]
[ ; ]
<with_option_spec>::=
AUTOMATED_BACKUP_PREFERENCE = { PRIMARY | SECONDARY_ONLY| SECONDARY | NONE }
| FAILURE_CONDITION_LEVEL = { 1 | 2 | 3 | 4 | 5 }
| HEALTH_CHECK_TIMEOUT = milliseconds
| DB_FAILOVER = { ON | OFF }
| DTC_SUPPORT = { PER_DB | NONE }
| BASIC
| DISTRIBUTED
| REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT = { integer }
| CLUSTER_TYPE = { WSFC | EXTERNAL | NONE }
<add_replica_spec>::=
<server_instance> WITH
(
ENDPOINT_URL = 'TCP://system-address:port',
AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT | CONFIGURATION_ONLY },
FAILOVER_MODE = { AUTOMATIC | MANUAL | EXTERNAL }
[ , <add_replica_option> [ ,...n ] ]
)
<add_replica_option>::=
SEEDING_MODE = { AUTOMATIC | MANUAL }
| BACKUP_PRIORITY = n
| SECONDARY_ROLE ( {
[ ALLOW_CONNECTIONS = { NO | READ_ONLY | ALL } ]
[,] [ READ_ONLY_ROUTING_URL = 'TCP://system-address:port' ]
} )
| PRIMARY_ROLE ( {
[ ALLOW_CONNECTIONS = { READ_WRITE | ALL } ]
[,] [ READ_ONLY_ROUTING_LIST = { ( '<server_instance>' [ ,...n ] ) | NONE } ]
[,] [ READ_WRITE_ROUTING_URL = { ( '<server_instance>' ) ]
} )
| SESSION_TIMEOUT = integer
<add_availability_group_spec>::=
<ag_name> WITH
(
LISTENER_URL = 'TCP://system-address:port',
AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT },
FAILOVER_MODE = MANUAL,
SEEDING_MODE = { AUTOMATIC | MANUAL }
)
<listener_option> ::=
{
WITH DHCP [ ON ( <network_subnet_option> ) ]
| WITH IP ( { ( <ip_address_option> ) } [ , ...n ] ) [ , PORT = listener_port ]
}
<network_subnet_option> ::=
'ip4_address', 'four_part_ipv4_mask'
<ip_address_option> ::=
{
'ip4_address', 'pv4_mask'
| 'ipv6_address'
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-2653307/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:例項SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:REPLICA ON子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:LISTENER子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DATABASE子句SQLServerDatabase
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:安全性SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AVAILABILITY GROUP ON子句SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:BASIC引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DISTRIBUTED引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:ENDPOINT_URL子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:SECONDARY_ROLE子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:PRIMARY_ROLE子句SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:SESSION_TIMEOUT引數SQLServerSession
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:BACKUP_PRIORITY引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:SEEDING_MODE引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:FAILOVER_MODE引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AVAILABILITY_MODE引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:CLUSTER_TYPE引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DB_FAILOVER引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:DTC_SUPPORT引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:group_name引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:先決條件和限制SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:HEALTH_CHECK_TIMEOUT引數SQLServer
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:FAILURE_CONDITION_LEVEL引數SQLServerAI
- [AlwaysOn] 建立SQL Server高可用性組T-SQL語法:AUTOMATED_BACKUP_PREFERENCE引數SQLServer
- [AlwaysOn] T-SQL語法:REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT引數SQLUIsynchronizedMIT
- SQL Server 2022 AlwaysOn新特性之包含可用性組介紹SQLServer
- [AlwaysOn] AlwaysOn可用性組的可用性模式之間的差異模式
- SQL Server 2016 + AlwaysOn 無域叢集SQLServer
- SQL Server AlwaysOn的Oracle等價技術SQLServerOracle
- [AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 3模式
- [AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 6模式
- [AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 5模式
- [AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 4模式
- [AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 2模式
- [AlwaysOn] AlwaysOn可用性組的故障轉移和故障轉移模式[中英文對照] 1模式
- 【T-SQL】〇、 T-SQL語法說明SQL
- 獨家揭祕:SQL Server AlwaysOn在阿里雲的突破SQLServer阿里
- T-SQL——基礎語法SQL