Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

which database is SSRS database? Expand / Collapse
Author
Message
Posted Monday, January 6, 2014 11:02 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 3:33 PM
Points: 87, Visits: 542
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.

Post #1528194
Posted Wednesday, January 8, 2014 1:34 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 7, 2014 2:30 PM
Points: 579, Visits: 2,086
Could you use the DATABASE_NAME() function and the Database_id column from the sys.database_mirroring table to get the name?
Post #1529085
Posted Wednesday, January 8, 2014 1:35 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 7, 2014 2:30 PM
Points: 579, Visits: 2,086
Sorry DB_NAME(). My brain said one thing my fingers typed another.
Post #1529087
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse