February 27, 2014 at 2:13 pm
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
February 27, 2014 at 2:18 pm
Yes, you can extend the your query with sys.objects, sys.tables, sys.procedures and etc...
Just explore a bit.
Igor Micev,My blog: www.igormicev.com
February 27, 2014 at 2:47 pm
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 27, 2014 at 3:15 pm
Igor, Gail,
Thank you both so much.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply