Moving SQL Databases to Another Drive
December 11. 2013 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:
- Detach the DB (via ‘Tasks’)
- Move the mdf and ldf files to the new location. (They are usually located somewhere under ‘C:\Program Files\Microsoft SQL Server\’.)
- 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.