Change SQL Server Data File Location
To change the storage location of SQL Server data files, follow these steps:
- Open SQL Server Management Studio and connect to the appropriate SQL Server instance.
- Find the database in the File Explorer for which you want to change the location of the data files, right-click on it, and choose the “Properties” option.
- Select the “File” tab in the popped-up properties window.
- In the file tab, locate the data file you want to modify and enter the new data file path in the “current file path” section.
- Click “OK” to save the changes and close the properties window.
- It is important to note that after changing the location of the data files, you need to restart the SQL Server database engine service in order for the changes to take effect.
Please take extra caution when changing the location of data files to avoid disrupting the normal operation of the database. It is recommended to back up the database before making any changes, just in case.