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

Objects and Filegroups Expand / Collapse
Author
Message
Posted Thursday, February 27, 2014 2:13 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 11:20 AM
Points: 124, Visits: 199
By joining sys.filegroups and sys.indexes on data_space_id, I can find the specific filegroup in which a given heap or clustered index exists. Is there a way to tell which filegroup contains a given view or stored procedure, or do that always exist in PRIMARY?

Thanks,
Alex
Post #1546129
Posted Thursday, February 27, 2014 2:18 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 6:32 AM
Points: 2,901, Visits: 2,924
Yes, you can extend the your query with sys.objects, sys.tables, sys.procedures and etc...
Just explore a bit.




Igor Micev,
SQL Server developer at Seavus
www.seavus.com
Post #1546132
Posted Thursday, February 27, 2014 2:47 PM This worked for the OP Answer marked as solution


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:48 AM
Points: 42,438, Visits: 35,493
Views and stored procs are stored within the system tables (they're just saved code), system tables are always on primary. While you can join from sys.indexes to sys.objects it will never match procedures and for views will only match indexed views.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1546140
Posted Thursday, February 27, 2014 3:15 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 11:20 AM
Points: 124, Visits: 199
Igor, Gail,

Thank you both so much.
Post #1546148
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse