Powershell SMO SQL Server Mirror Databases RRS feed

  • Question

  • 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.

    Since I am using SMO objects I looked for their equivalents, but I could not find any.

    Does anyone have any idea where I could find/determine this information using SMO?

    Thank you

    Wednesday, September 17, 2014 10:34 PM


All replies