0 Comments

Since the space on my SSD was getting scarce, I decided to transfer the database files to a different drive. It was much easier than I expected:

  1. Detach the DB (via ‘Tasks’)
  2. Move the mdf and ldf files to the new location. (They are usually located somewhere under ‘C:\Program Files\Microsoft SQL Server\’.)
  3. Attach the DB by choosing the mdf file.

Thanks to the instructions from katieandemil. They were especially appropriate since I also had SQL Server 2008 R2 installed.

If you rather like to use Transact-SQL follow this stackoverflow post.