Results 1 to 2 of 2

Thread: restoring database from an MDF file

  1. #1
    Indra Guest

    restoring database from an MDF file


    I have a MSSQL7 data file mydata_data.mdf that I would like to load into my MSSQL7.
    When I try to restore to my database, I got an error message saying MSSQl does not recognize the file as a valid backup file.

    Your help is greatly appreciated.


  2. #2
    James May Guest

    restoring database from an MDF file (reply)

    Assumming the path is correct for your database MyData, I think the following will work. SQL will create the log for you. If my syntax is flawed, just check BOL.

    EXEC sp_Attach_DB @dbname = 'MyData' ,
    @filename1 = 'C:MSSQL7Datamydata_data.mdf'


    ------------
    Indra at 3/2/01 5:33:21 PM


    I have a MSSQL7 data file mydata_data.mdf that I would like to load into my MSSQL7.
    When I try to restore to my database, I got an error message saying MSSQl does not recognize the file as a valid backup file.

    Your help is greatly appreciated.


Posting Permissions

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