April 14, 2010 at 6:45 pm
hi i am trying to get all the DB file paths sys.master_files , i tried using
Select *
from sys.databases sd
join sys.master_files mf
on sd.database_ID = mf.database_ID
join sys.filegroups fg
on fg.data_space_id= mf.data_space_id
Order by mf.database_id, sd.name
but is not giving me all the filegroups, is there a way to use sp_msforeachdb to get all the correct information?
April 14, 2010 at 11:16 pm
sp_helpdb master
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
April 15, 2010 at 12:32 am
This will give you the filegroup information.
Get Server Database File Information
April 15, 2010 at 1:05 am
sp_helpfile
will also give you the filegroup info. Also you can refer FILEGROUP_NAME check following link for detail
http://msdn.microsoft.com/en-us/library/ms176088.aspx
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
April 15, 2010 at 1:08 am
you can also refer "sysfilegroups"
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
April 15, 2010 at 3:05 pm
exactly what i needed, thank you!
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply