Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Determining the last failover time for Amazon RDS for SQL Server

Focus mode
Determining the last failover time for Amazon RDS for SQL Server - Amazon Relational Database Service

To determine the last failover time, use the following stored procedure:

execute msdb.dbo.rds_failover_time;

This procedure returns the following information.

Output parameter Description

errorlog_available_from

Shows the time from when error logs are available in the log directory.

recent_failover_time

Shows the last failover time if it's available from the error logs. Otherwise it shows null.

Note

The stored procedure searches all of the available SQL Server error logs in the log directory to retrieve the most recent failover time. If the failover messages have been overwritten by SQL Server, then the procedure doesn't retrieve the failover time.

Example of no recent failover

This example shows the output when there is no recent failover in the error logs. No failover has happened since 2020-04-29 23:59:00.01.

errorlog_available_from recent_failover_time

2020-04-29 23:59:00.0100000

null

Example of recent failover

This example shows the output when there is a failover in the error logs. The most recent failover was at 2020-05-05 18:57:51.89.

errorlog_available_from recent_failover_time

2020-04-29 23:59:00.0100000

2020-05-05 18:57:51.8900000

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.