Get logical file name from mdf file

  • Thanks for the quick response...

    I forgot one short/important piece...  from a "detatched" mdf file

    We are trying to identify what is installed on a user's notebook.

    Thank you

  • use

    DbName

    Select

    * from sys.sysfiles where right(filename, 4) = '.mdf'

     

     

    I'm sure there's another way but this should do the trick.

  • Use

    dbcc checkprimaryfile (N'<physical path to the .mdf file>', 3)

    Hope this will be useful to you.

    Ignas Chilewa

  • Hi, thank you for the dbcc command.  that's exactly what I was looking for.  I appreciate everyones help. Thank you

  • Woops... 7,2000 not 2005 .

Viewing 5 posts - 1 through 4 (of 4 total)

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