Hello,
I am almost done writing a script to help my team manage mirrored database during planned outages. I would like to do determine the role of the database (principal or mirror). If I query atheDMV sys.database_mirroring, I am able to determine the role of the database by looking at the mirror_role and mirror_role_desc columns.
http://technet.microsoft.com/en-us/library/ms178655(v=sql.110).aspx
Since I am using SMO objects I looked for their equivalents, but I could not find any.
http://msdn.microsoft.com/en-us/library/Microsoft.SqlServer.Management.Smo.Database_properties.aspx
Does anyone have any idea where I could find/determine this information using SMO?
Thank you