Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    Phoenix, AZ
    Posts
    3

    Unanswered: Sp_attach problem

    We had database on a SQl server 2000 trial Version. Now as the trail Time is been expired we cannot open the database. So we moved the .MDF and .LDF files to different 2000 server, when used sp_attach_db command to attach these mdf and ldf file I get this error...

    Server: Msg 5172, Level 16, State 15, Line 1
    The header for file 's:\Progra~1\Micros~1\MSSQL$~1\data\PTG_data.mdf' is not a valid database file header. The FILE SIZE property is incorrect.

    Can anybody help please !!!.

    These are the steps I did
    1. Copy .mdf & .ldf file to the data directory(From the Trial SQL Server)
    2. Created a Database called PTG.
    3. Detach this database
    4. tried to attach the copied mdf and ldf files..which errored out as explained above..

    Thanks a Lot
    Arun

  2. #2
    Join Date
    Sep 2002
    Posts
    7
    1. Copy .mdf & .ldf file to the data directory(From the Trial SQL Server)
    2. Created a Database called PTG.
    ^^^^^^^^^^^^^^^^^^^^
    3. Detach this database
    4. tried to attach the copied mdf and ldf files..which errored out as explained above..

    There's no need to create a database with the same name.
    Since you created the new Database with the same name, the copied database were covered.

    The only thing you can do is to copy the original database to destination folder again, then attach it.

Posting Permissions

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