February 3, 2005 at 10:23 pm
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.
February 4, 2005 at 12:16 am
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
February 4, 2005 at 1:29 am
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.
February 4, 2005 at 9:12 am
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.
February 5, 2005 at 1:11 am
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