- Plesk for Windows
The default directory for storing database files of MS SQL is changed in SQL Management Studio > Database Settings > Database default locations to
However, new database files are being created and stored in
How to change the default directory for MS SQL?
Note: To apply the solution from this article, it is required to have administrative RDP access to the server. Please contact your hosting provider support or server's administrator if you don't have administrative RDP access or ask them to apply the solution.
Warning: existing databases will continue using the default MSSQL directory and will not respect the changes
By default, the location for new databases in MS SQL is defined by the location of the
database file, this database is to be moved to the desired path (e.g,
D:\MSSQL\DATA) and SQL server is to be reconfigured accordingly:
- Connect to the server via RDP;
- Open SQL Server Configuration Manager.
- In the results pane, right-click the named instance of SQL Server, and then click
A red box on the icon next to the server name and on the toolbar indicates that the server stopped successfully;
Note: XXX should be replaced by the actual path, it depends on the version of the MS SQL server;
Full Controlpermissions for the MS SQL service account, for example NT Service\MSSQL$MSSQLSERVERXXXX, to the new DATA directory. Detailed steps are described here.
- In SQL Server Configuration Manager > right-click SQL Server > Properties > Startup Parameters specify new paths for the master database:
-eC:\Program Files (x86)\Parallels\Plesk\Databases\MSSQL\MSSQLXXX.MSSQLSERVERXXX\MSSQL\Log\ERRORLOG;
- Start MS SQL Server service by right-clicking on the corresponding SQL Server > Start.