BACKUP DATABASE [MPRM] TO DISK = N'\\rauf\shared\MPRM_15_5_10.BAK'
WITH NOFORMAT, NOINIT, NAME = N'MPRM-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
The backup process worked, and I got a file named MPRM_15_5_10.BAK
in my shared
folder (D:\shared\
). This is a backup created from another machine.
When I try to restore the backup, using the following script
RESTORE DATABASE [MPRM]
FROM DISK = N'\\rauf\shared\MPRM_15_5_10.BAK'
WITH FILE = 1, NOUNLOAD, STATS = 10
I get the following errors
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "E:\DATABASES\MPRM.mdf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Line 1
File 'MPRM' cannot be restored to 'E:\DATABASES\MPRM.mdf'. Use WITH MOVE to identify a valid location for the file.
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "E:\DATABASES\MPRM_log.ldf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 3156, Level 16, State 3, Line 1
File 'MPRM_log' cannot be restored to 'E:\DATABASES\MPRM_log.ldf'. Use WITH MOVE to identify a valid location for the file.
Msg 3119, Level 16, State 1, Line 1
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Why the system asks about *.mdf, *.ldf
files ? Is it anything related with Backup option rather than Restore script ?
I logged in with Windows Authentication
WITH MOVE
option – Damien_The_Unbeliever[MPRM]
fromMPRM_15_5_10.BAK
. Right ? – Rauf.mdf
and.ldf
) go?? That's your problem - it tries to re-create the files in the exact same location where they were on the source system where you took the backup - but that drive/directory doesn't exist on the target system where you're trying to restore it to – marc_s