Friday, January 15, 2016

PARTNER TIMEOUT

SQL Server uses PARTNER TIMEOUT to determine the maximum period of time an instance waits to get a "ping" message from another instance of SQL Server before determining whether a failover should occur.

To see the current setting, run this query:

   SELECT db_name(database_id) "database_name"
        , mirroring_connection_timeout
     FROM sys.database_mirroring
GO



To change the current setting, run this query:

ALTER DATABASE [databasename] SET PARTNER TIMEOUT 10
GO


lowest value: 5
default value: 10

To generate change sql:

   SELECT db_name(database_id)
        , mirroring_connection_timeout
        , 'alter database [' + db_name(database_id) 
        + '] set partner timeout 30'
     FROM sys.database_mirroring
    WHERE mirroring_role_desc = 'PRINCIPAL'

No comments:

Post a Comment