Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2007
    Posts
    64

    Thumbs down Unanswered: .mdf and .LDF file names

    Hi All,

    I am using query analyzer to execute my sqls .

    I want to take out .mdf and .LDF files and put it in another machine .
    But there is no .mdf or .LDF file with prefix as my database name . I think the file name might be something else .
    Please help me in finding out the .mdf and .LDF of a particular database .

    Thanks ,
    Sushi

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    SELECT filename FROM dbo.sysfiles
    -PatP

  3. #3
    Join Date
    Aug 2007
    Posts
    64
    I got the files .
    How to restore a database using these files . Is there any way to do that .
    I copied the .mdf and .LDF files from one server ,now i need to have this database(corresponding to .mdf and .LDF files) in a different server .

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You need to make a backup of the database
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Or, more easily, just Attach - details in BoL (I've forgotten how to do it in 2k....)

  6. #6
    Join Date
    Aug 2007
    Posts
    64
    I tried attach option in SQL Server management Studio . but it is throwing some errors like

    The physical name of file c:xyz.mdf is incorrect. Microsoft Sql Server error : 5105

    please help me out

  7. #7
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    What is the physical file name of the mdf? Is it C:\xyz.mdf where C is the C drive of the server you are attempting to attach it to?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •