Attching .mdf file, copied from an existing .mdf file and whose name has been changed.

  • In the process of testing few changes in our application i have been trying to attach an ".mdf" file which has been copied from an existing ".mdf" file in the same database and whose name has been changed.

    for e.g:

    Existing Production database name(abc)...filename: "abc.mdf"

    I copied it and created a new file: "abc_test.mdf" and tried attaching this file in the same server group. I used "testdb" as the name of the new database. It gave me an error stating:

    ******************************************************

    "Device Activation Error: The Physical FileName may be incorrect".

    ******************************************************

    When i am using a copy with a changed name and attching it, how is it picking up the original file name for attaching?

    Please help me with the same and suggest a way to attach the copied file.

  • Do you have the log file as well (ldf). If not, you'll have to use the attach_single_file proc and hope that the DB was shut down cleanly.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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