Below is the query that I am using to restore my database.
However, whenever I run it, i always get this error message:
Msg 4038, Level 16, State 1, Line 1
Cannot find file ID 1 on device 'D:\DB_Backup\MMS.BAK'.Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
This is my query:
RESTORE DATABASE METERIAL_MANAGEMENT_2
FROM DISK = 'D:\DB_Backup\MMS.BAK'
WITH
MOVE 'METERIAL_MANAGEMENT' TO 'D:\DATA\METERIAL_MANAGEMENT_2.mdf',
MOVE 'METERIAL_MANAGEMENT_log' TO 'D:\DATA\METERIAL_MANAGEMENT_2_Log.ldf'
RESTORE DATABASE
, which is used to restore a database from a file, not back up a database to a file. UseBACKUP DATABASE
to create the backup file.RESTORE FILELISTONLY FROM DISK = 'D:\DB_BACKUP\MMS.BAK';
to see what backups are listed in the file. Perhaps the file doesn't contain any valid database backups, or is corrupted in some way.