Mdf files

  • Is there some sort of command that can tell me which mdf and ldf files are associated to which databases?

    Thanks,

    Ninel

  • Hello Ninel,

    You can query the system table "sysdatabases".

    Thanks

     


    Lucky

  • hi..,

    U can get the .mdf and .ldf file names associated with the particular database by executing the following query on each database,

    select * from [DatabaseName].dbo.sysfiles

    or

    select filename from [DatabaseName].dbo.sysfiles

    regards

    deena

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply