title: Restore database in SQL Server 2005
body: <pre><code>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
  </code></pre>
  
  <p>The backup process worked, and I got a file named <code>MPRM_15_5_10.BAK</code> in my <code>shared</code> folder (<code>D:\shared\</code>). This is a backup created from another machine.</p>
  
  <p>When I try to restore the backup, using the following script</p>
  
  <pre><code>RESTORE DATABASE [MPRM] 
  FROM DISK = N'\\rauf\shared\MPRM_15_5_10.BAK' 
  WITH FILE = 1,  NOUNLOAD, STATS = 10
  </code></pre>
  
  <p>I get the following errors</p>
  
  <blockquote>
    <p>Msg 5133, Level 16, State 1, Line 1<br>
    Directory lookup for the file "E:\DATABASES\MPRM.mdf" failed with the operating system error 2(The system cannot find the file specified.).<br>
    Msg 3156, Level 16, State 3, Line 1<br>
    File 'MPRM' cannot be restored to 'E:\DATABASES\MPRM.mdf'. Use WITH MOVE to identify a valid location for the file.<br>
    Msg 5133, Level 16, State 1, Line 1<br>
    Directory lookup for the file "E:\DATABASES\MPRM_log.ldf" failed with the operating system error 2(The system cannot find the file specified.).<br>
    Msg 3156, Level 16, State 3, Line 1<br>
    File 'MPRM_log' cannot be restored to 'E:\DATABASES\MPRM_log.ldf'. Use WITH MOVE to identify a valid location for the file.<br>
    Msg 3119, Level 16, State 1, Line 1<br>
    Problems were identified while planning for the RESTORE statement. Previous messages provide details.<br>
    Msg 3013, Level 16, State 1, Line 1<br>
    RESTORE DATABASE is terminating abnormally.</p>
  </blockquote>
  
  <p>Why the system asks about <code>*.mdf, *.ldf</code> files ? Is it anything related with Backup option rather than Restore script ?</p>
  
  <p>I logged in with <code>Windows Authentication</code></p>