Database failover/failback history
The following is a script I wrote for displaying the failover and failback history:

SELECT d.name, t3.time, (1 - t3.role) as status
FROM (
    SELECT t1.database_id, t1.time, t1.role 
    FROM 
        (
            SELECT RANK() OVER (ORDER BY database_id, time) AS rec, database_id, role, time 
            FROM msdb.dbo.dbm_monitor_data dbmd 
        ) as t1
        INNER JOIN 
        (
            SELECT RANK() OVER (ORDER BY database_id, time) AS rec, database_id, role, time 
            FROM msdb.dbo.dbm_monitor_data dbmd 
        ) t2 ON T1.database_id = T2.database_id and t1.rec = (t2.rec - 1) AND t1.role &lt;&gt; t2.role
    ) t3
    INNER JOIN sys.databases d ON t3.database_id = d.database_id
ORDER BY d.name, t3.time


I believe Role = 0 is PRIMARY.