title: Unable to restore SQL Server 2008 R2 Express backup file onto SQL Server 2012 Express
body: <p>I have a <code>.bak</code> file which I created using SQL Server 2008 R2 Express .</p>
  
  <p>I tried to restore it to a SQL Server 2012 Express but got the following error messages:</p>
  
  <blockquote>
    <p>Msg 5133, Level 16, State 1, Line 2<br>
    Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RealEstate.mdf" failed with the operating system error 3(The system cannot find the path specified.).  </p>
    
    <p>Msg 3156, Level 16, State 3, Line 2<br>
    File 'RealEstate' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RealEstate.mdf'. Use WITH MOVE to identify a valid location for the file.  </p>
    
    <p>Msg 5133, Level 16, State 1, Line 2<br>
    Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RealEstate_log.ldf" failed with the operating system error 3(The system cannot find the path specified.).  </p>
    
    <p>Msg 3156, Level 16, State 3, Line 2
    File 'RealEstate_log' cannot be restored to 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\RealEstate_log.ldf'. Use WITH MOVE to identify a valid location for the file.</p>
    
    <p>Msg 3119, Level 16, State 1, Line 2<br>
    Problems were identified while planning for the RESTORE statement. Previous messages provide details.</p>
    
    <p>Msg 3013, Level 16, State 1, Line 2<br>
    RESTORE DATABASE is terminating abnormally.</p>
  </blockquote>
  
  <p>Can somebody please help me solve this problem?</p>
  
  <p>For your information,</p>
  
  <p>the <code>.bak</code> file was created from the SQL Server 2008 R2 database running on my old PC which died last month.</p>
  
  <p>I just bought a new PC and decided to install SQL Server 2012 instead.</p>
  
  <p>I would like to restore this <code>.bak</code> file into the SQL Server 2012 running on my new PC.</p>
  
  <p>In SQL Server 2008 R2, the databases are stored in </p>
  
  <pre><code>C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
  </code></pre>
  
  <p>Meanwhile in SQL Server 2012, the databases are stored in </p>
  
  <pre><code>C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA.
  </code></pre>
  
  <p>I wonder if the original path is indeed stored in the <code>.bak</code> file. Does anybody know about this?</p>