I am writing a generic T-SQL script that needs to have sql server tell it what database(s) are configured as Reporting Services databases.
This database is going to be mirrored, so I need the database name/id so I can use that with sys.database_mirroring to tell me if it is running as the principal or mirror role.
Is there a DMV, system view, etc. that holds that information?
Thanks,
Alan.