title: SQL Server Logical File Name usages?
body: <p>I'm restoring a Bak file</p>
  
  <pre><code>RESTORE DATABASE WEbERP2 FROM DISK = 'c:\r\WEbERP_backup_201105210100.bak'
  WITH REPLACE , MOVE 'WEbERP' TO 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WEbERP2.mdf',
  MOVE 'WEbERP_log' TO 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\WEbERP2_log.ldf',REPLACE
  </code></pre>
  
  <p>Im restoring it AS <strong>WEbERP2</strong>             //2 !!!</p>
  
  <p>and it works.</p>
  
  <p>the Db is opened as a new Db named :<strong>WEbERP2</strong></p>
  
  <p>But the logical name is still : <strong>WebErp.</strong> </p>
  
  <p>I know that the functionality is fine .</p>
  
  <p>But still I'm having trouble to understand its usages.</p>
  
  <p><img src="https://i.stack.imgur.com/lVcRI.jpg" alt="enter image description here"></p>
  
  <p>I know I can change it by :</p>
  
  <pre><code>ALTER DATABASE xxx MODIFY FILE (NAME=N...
  </code></pre>
  
  <p>But I want to understand its usages , and when its important to change it.</p>