{"id":1431,"date":"2014-02-14T03:12:45","date_gmt":"2014-02-13T21:12:45","guid":{"rendered":"http:\/\/techsatwork.com\/blog\/?p=1431"},"modified":"2016-01-07T11:31:03","modified_gmt":"2016-01-07T05:31:03","slug":"list-file-groups-objects","status":"publish","type":"post","link":"https:\/\/techsatwork.com\/?p=1431","title":{"rendered":"List file groups and indexes for each tables"},"content":{"rendered":"<p>This is one of those quick tips and trick posts I do once in a while. \u00c2\u00a0If you ever want to list the indexes and file groups for each table in your sql server database, you can use the following sql for that:<\/p>\n<p>SELECT o.name as TableName, i.name as IndexName, \u00c2\u00a0f.name as FileGroupName<br \/>\nFROM sys.indexes i<br \/>\nINNER JOIN sys.filegroups f<br \/>\nON i.data_space_id = f.data_space_id<br \/>\nINNER JOIN sys.all_objects o<br \/>\nON i.[object_id] = o.[object_id]<br \/>\nWHERE i.data_space_id = f.data_space_id<br \/>\nAND o.type = \u00e2\u20ac\u02dcU\u00e2\u20ac\u2122 ;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is one of those quick tips and trick posts I do once in a while. \u00c2\u00a0If you ever want to list the indexes and file groups for each table in your sql server database, you can use the following sql for that: SELECT o.name as TableName, i.name as IndexName, \u00c2\u00a0f.name as FileGroupName FROM sys.indexes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[358,1,658],"tags":[893,894,306],"class_list":["post-1431","post","type-post","status-publish","format-standard","hentry","category-how-to","category-misc","category-sql-server-2","tag-file-groups","tag-list-file-groups-for-tables","tag-sql-server"],"_links":{"self":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1431"}],"version-history":[{"count":2,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1431\/revisions"}],"predecessor-version":[{"id":1439,"href":"https:\/\/techsatwork.com\/index.php?rest_route=\/wp\/v2\/posts\/1431\/revisions\/1439"}],"wp:attachment":[{"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techsatwork.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}