Solved

filegroups: tables in a filegroup

Posted on 2011-02-26
2
624 Views
Last Modified: 2012-05-11
Hei!

i have a DB from a vendour, which has many filegroups and aout 260 tables

Question: how do i find which tables belong to which filegroups?

//shan
0
Comment
Question by:shanj
2 Comments
 
LVL 41

Expert Comment

by:Sharath
ID: 34988496
check this: http://www.mssqltips.com/tip.asp?tip=1112
SELECT o.[name], o.[type], i.[name], i.[index_id], f.[name],i.data_space_id
FROM sys.indexes i
INNER JOIN sys.filegroups f
ON i.data_space_id = f.data_space_id
INNER JOIN sys.all_objects o
ON i.[object_id] = o.[object_id]
--WHERE i.data_space_id = 2 --* New FileGroup*

Open in new window

0
 
LVL 9

Accepted Solution

by:
mayank_joshi earned 250 total points
ID: 34990638
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question