DB file paths help!

  • 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?

  • 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

  • This will give you the filegroup information.

    Get Server Database File Information

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=89058

  • 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."

  • you can also refer "sysfilegroups"

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • 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