Wednesday, November 3, 2010

Get list of mirroring timeouts

Just a quick script to get a list of mirroring timeouts for databases configured for mirroring.  SQL 2008's failover mirroring default is very quick to failover, and I'd like it to wait out things like very high disk latency in the middle of the night when storage does disk intensive things like deleting snapshots rather than failing over.


To check mirroring timeouts in a more human friendly format:

select d.name as databasename, m.mirroring_connection_timeout as timeout
from sys.databases d join sys.database_mirroring m
on d.database_id = m.database_id
where m.mirroring_guid is not null


Note:  when setting the mirroring timeout, setting it on one server sets it on both.

ALTER DATABASE [DBName] SET PARTNER TIMEOUT 20

No comments:

Post a Comment