How to restore a Backup onto different Server

  • How does one restore an SQL Server 7 backed up database to a different machine which is running SQL Server 2000.

    I only have the SQL Server 7 backed up file.

     

  • RESTORE DATABASE MyDB

    FROM DISK = 'C:\MSSQL\Backup\MyDB_Backup.BAK' -- location of backup

    WITH MOVE 'MyDB_Data' TO 'C:\MSSQL\Data\MyDB_Data.MDF' -- if location of files is different from where they were on the 7 box you use the WITH MOVE option

    WITH MOVE 'MyDB_log' TO 'C:\MSSQL\Data\MyDB_Log.LDF'<O></O>

     

     

    Hope this helps...

    Ford Fairlane
    Rock and Roll Detective

  • More Infor:

    1) The new server never had this database on it before

    2) The backup file one that you create using add database device.

    3) I am not sure of the names of backed up _log and _data objects is there a way of finding out the contents of this backup file.

  • 1) That's fine, Restore will create a new database for you.

    2) not sure what you exactly meant

    3) You can use the following command

    restore filelistonly from disk = ''. Take the logical file names from this command and substitute instead of 'mydb_data' and 'mydb_log' in the command above.

  • Closed.

    Finally with all your it works here is how it looks

     

    RESTORE FILELISTONLY

    FROM DISK =

    'I:\Data\ZIMH.BAK' -- location of backup

    RESTORE DATABASE XALTZIMH

    FROM DISK = 'I:\Data\ZIMH.BAK'

    WITH RECOVERY,

    MOVE 'ZIMH_Data' TO 'I:\Data\ZIMH_Data.MDF',

    MOVE 'ZIMH_log' TO 'I:\Data\ZIMH_Data.LDF'

Viewing 5 posts - 1 through 4 (of 4 total)

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