Solved

filegroups: tables in a filegroup

Posted on 2011-02-26
2
619 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 40

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

831 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