Thursday, February 25, 2010

How do we know which files and file groups are ONLINE?

How do we know which files and file groups are ONLINE?
The following SQL shows files status.
select fg.name as FilegroupName, fg.type_desc as FileGroupType,
df.name as FileName, df.physical_name, df.state_desc
from sys.database_files df left outer join sys.filegroups fg on df.data_space_id

= fg.data_space_id

It shows all the files status which are in Online/ Offline.

No comments:

Post a Comment