USE

USE Master

GO

FROM

FROM sys. database_mirroring M

ON

ON M. database_id = D. database_id