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: Saturday, October 25, 2014 11:54 AM
Points: 88, Visits: 563
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
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: 2 days ago @ 7:58 AM
Points: 609, Visits: 2,138
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
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: 2 days ago @ 7:58 AM
Points: 609, Visits: 2,138
Sorry DB_NAME(). My brain said one thing my fingers typed another.
Post #1529087
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse