Ócáid
Mar 31, 11 PM - Apr 2, 11 PM
An ócáid foghlama SQL, Fabric and Power BI is mó. Márta 31 – 2 Aibreán. Bain úsáid as cód FABINSIDER chun $ 400 a shábháil.
Cláraigh inniuNí thacaítear leis an mbrabhsálaí seo a thuilleadh.
Uasghrádú go Microsoft Edge chun leas a bhaint as na gnéithe is déanaí, nuashonruithe slándála, agus tacaíocht theicniúil.
Applies to:
SQL Server
This topic describes how to configure the session-timeout period of an Always On availability replica by using SQL Server Management Studio, Transact-SQL, or PowerShell in SQL Server. The session-timeout period is a replica property that controls how many seconds (in seconds) that an availability replica waits for a ping response from a connected replica before considering the connection to have failed. By default, a replica waits 10 seconds for a ping response. This replica property applies only the connection between a given secondary replica and the primary replica of the availability group. For more information about the session-timeout period, see Overview of Always On Availability Groups (SQL Server).
We recommend that you keep the time-out period at 10 seconds or greater. Setting the value to less than 10 seconds creates the possibility of a heavily loaded system missing PINGs and declaring a false failure.
Requires ALTER AVAILABILITY GROUP permission on the availability group, CONTROL AVAILABILITY GROUP permission, ALTER ANY AVAILABILITY GROUP permission, or CONTROL SERVER permission.
To change the session-timeout period for an availability replica
In Object Explorer, connect to the server instance that hosts the primary replica, and expand the server tree.
Expand the Always On High Availability node and the Availability Groups node.
Click the availability group whose availability replica you want to configure.
Right-click the replica to be configured, and click Properties.
In the Availability Replica Properties dialog box, use the Session timeout (seconds) field to change the number of seconds for the session-timeout period on this replica.
To change the session-timeout period for an availability replica
Connect to the server instance that hosts the primary replica.
Use the ALTER AVAILABILITY GROUP statement, as follows:
ALTER AVAILABILITY GROUP group_name
MODIFY REPLICA ON 'instance_name' WITH ( SESSION_TIMEOUT =seconds )
where group_name is the name of the availability group, instance_name is the name of the server instance that hosts the availability replica to be modified, and seconds specifies how many seconds the availability replica waits for a ping response from a connected replica before considering the connection to have failed. By default, a replica waits 10 seconds for a ping response.
The following example, entered on the primary replica of the AccountsAG
availability group, changes the session-timeout value to 15
seconds for the replica located on the INSTANCE09
server instance.
ALTER AVAILABILITY GROUP AccountsAG
MODIFY REPLICA ON 'INSTANCE09' WITH (SESSION_TIMEOUT = 15);
To change the session-timeout period for an availability replica
Change directory (cd) to the server instance that hosts the primary replica.
Use the Set-SqlAvailabilityReplica cmdlet with the SessionTimeout parameter to change the number of seconds for the session-timeout period on a specified availability replica.
For example, the following command sets the session-timeout period to 15 seconds.
Set-SqlAvailabilityReplica -SessionTimeout 15 `
-Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica
Nóta
To view the syntax of a cmdlet, use the Get-Help cmdlet in the SQL Server PowerShell environment. For more information, see Get Help SQL Server PowerShell.
To set up and use the SQL Server PowerShell provider
Ócáid
Mar 31, 11 PM - Apr 2, 11 PM
An ócáid foghlama SQL, Fabric and Power BI is mó. Márta 31 – 2 Aibreán. Bain úsáid as cód FABINSIDER chun $ 400 a shábháil.
Cláraigh inniuOiliúint
Modúl
Manage persistent connections to remote computers by using Windows PowerShell sessions - Training
This module explains how to establish and manage persistent connections to remote computers, known as Windows PowerShell sessions or PSSessions.