To change the name of the physical file you have to take the SQL Server database Offline
- Open SQL Server Management Studio
- Right-click on Database which you want to rename
- Click on Tasks
- Then select Take Offline
Change the name of the physical files at the OS level and then Bring the database Online.