

In the files section you will see the logical name in the first column. To lookup the logical_name open up the properties of your database. logical_name: the logical name of the file (see the screenshot below).

database_name: name of your database you want to move (eg.Fire up your SQL Server Management Studio and run a query with the following syntax:ĪLTER DATABASE database_name MODIFY FILE( NAME = logical_name, FILENAME = 'new_path\os_file_name' ) Here’s what you need to do.įirst you need to start with altering the model, temp and msdb database. In my case I want to move them to my G-drive (for data) and my F-drive (for logs).

So this time an article to show you how to move your SQL Server 2008 (r2) system databases.
