Results 1 to 4 of 4

Thread: Restore database from mdf file?

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Posts
    2

    Thumbs down Restore database from mdf file?

    If a SQL 2000 server instance is destroyed, but the database file (*.mdf) is saved on the disk, can a database within a newly created server instance be built on the saved file?

    If I attempt to create a new database and choose the saved mdf file as the data file, then the server refuses to accept this file. Is there a way to create the new database and make it read the standalone mdf file?

    Please help if at all possible. Thanks.

  2. #2
    Join Date
    Mar 2003
    Location
    Jacksonville, Florida
    Posts
    52

    can you simply...

    Create the instance of the server with the same parameters as the old one.
    Replace its mdf with the one you have?

    I haven't worked with administration of SQL Server too much so I don't know.

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Look BOL for sp_attach_db and
    sp_attach_single_file_db

  4. #4
    Join Date
    Mar 2003
    Posts
    2

    Wink Thanks

    I do appreciate it, MAK. Attaching the database has worked out nicely through EM. Even though we had never explicitly detached the database, the server apparently did so quietly prior to being unintentionally erased from the face of this planet... Thanks for saving us!

Posting Permissions

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