MDF and LDF

  • Hi,

    How can i find the mdf and ldf using query?

    TAI

  • Ratheesh.K.Nair (2/21/2008)


    Hi,

    How can i find the mdf and ldf using query?

    TAI

    On SQL Server 2005:

    select physical_name from sys.database_files

    for 2000 use dbo.sysfiles

    In both cases use the database you need the files for. (use mydatabase)

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • Or run sp_helpdb 'dbname'.

    Or in the context of the database you want the info on, sp_helpfile.

    Or for all of them sp_msforeachdb 'exec sp_helpdb [?]' or sp_msforeachdb 'use [?] exec sp_helpfile'

    Lots of ways to get info out of SQL Server. 🙂



    Scott Duncan

    MARCUS. Why dost thou laugh? It fits not with this hour.
    TITUS. Why, I have not another tear to shed;
    --Titus Andronicus, William Shakespeare


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

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