Section courante

A propos

Section administrative du site

ALTER AVAILABILITY GROUP

Modifie le groupe de disponibilité
SQL Server 2012+ Microsoft SQL Server

Syntaxe

ALTER AVAILABILITY GROUP group_name
{
SET ( set_option_spec )
| ADD DATABASE database_name
| REMOVE DATABASE database_name
| ADD REPLICA ON add_replica_spec
| MODIFY REPLICA ON modify_replica_spec
| REMOVE REPLICA ON server_instance
| JOIN
| JOIN AVAILABILITY GROUP ON add_availability_group_spec [ ,...2 ]
| MODIFY AVAILABILITY GROUP ON modify_availability_group_spec [ ,...2 ]
| GRANT CREATE ANY DATABASE
| DENY CREATE ANY DATABASE
| FAILOVER
| FORCE_FAILOVER_ALLOW_DATA_LOSS | ADD LISTENER 'dns_name' ( add_listener_option )
| MODIFY LISTENER 'dns_name' ( modify_listener_option )
| RESTART LISTENER 'dns_name'
| REMOVE LISTENER 'dns_name'
| OFFLINE
}
[ ; ]

set_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 }
| REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT = { integer }

server_instance ::=
{ 'system_name[\instance_name]' | 'FCI_network_name[\instance_name]' }

add_replica_spec::=
server_instance WITH
(
ENDPOINT_URL = 'TCP://system-address:port',
AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT | CONFIGURATION_ONLY },
FAILOVER_MODE = { AUTOMATIC | MANUAL }
[ , 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 }
} )
| SESSION_TIMEOUT = seconds

modify_replica_spec::=
server_instance WITH
(
ENDPOINT_URL = 'TCP://system-address:port'
| AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT }
| FAILOVER_MODE = { AUTOMATIC | MANUAL }
| 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 }
} )
| SESSION_TIMEOUT = seconds
)

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 }
)

modify_availability_group_spec::=
ag_name WITH
(
LISTENER = 'TCP://system-address:port'
| AVAILABILITY_MODE = { SYNCHRONOUS_COMMIT | ASYNCHRONOUS_COMMIT }
| SEEDING_MODE = { AUTOMATIC | MANUAL }
)

add_listener_option ::=
{
WITH DHCP [ ON ( network_subnet_option ) ]
| WITH IP ( { ( ip_address_option ) } [ , ...n ] ) [ , PORT = listener_port ]
}

network_subnet_option ::=
'four_part_ipv4_address', 'four_part_ipv4_mask'

ip_address_option ::=
{
'four_part_ipv4_address', 'four_part_ipv4_mask'
| 'ipv6_address'
}

modify_listener_option::=
{
ADD IP ( ip_address_option )
| PORT = listener_port
}

Description

Cette instruction permet de modifier un groupe «Always On existant» dans SQL Server.



Dernière mise à jour : Samedi, le 4 novembre 2017