Change SQL Database Directory
The SQL databases are saved by default in the directory C:\Program Files\Microsoft SQL Server\...
. However, you can change this default directory.
Configure the change of the default directory before creating the databases. Otherwise, this change must be performed for each database.
How to change the SQL database directory:
-
Open the Microsoft SQL Server Management Studio. The tool is installed with the G-Core SQL installer. If not, you must install it manually. You can find the download file on the Microsoft website.
-
Right-click on the SQL database server and select Server Properties from the pop-up menu.
-
In the Server Properties dialog window, select the Database Settings page.
-
In the Database default locations section, you can change the directory for the Data, for the Log and for the Backup of the selected database.
-
Click on the
button of the respective directory. The Locate Folder dialog window opens.
-
Select the required directory and click OK.
Alternatively, it is possible to change a registry key that defines the default directory. Note that an incorrect setting in the registry can damage the system.