title: Move SQL Server 2008 database files to a new folder location
body: <p>Logical Name</p>
  
  <ul>
  <li><code>my_Data</code></li>
  <li><code>my_Log</code></li>
  </ul>
  
  <p>Path:</p>
  
  <ul>
  <li><code>C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA</code></li>
  <li><code>C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA</code></li>
  </ul>
  
  <p>FileName:</p>
  
  <ul>
  <li><code>my.MDF</code></li>
  <li><code>my_1.LDF</code></li>
  </ul>
  
  <p>What would be the sql script to move these files to a new location: <code>D:\DATA</code></p>
  
  <p>Database is live so I would need to close existing connections.</p>