

We can verify this setting by creating a new database also. Now, connect to SQL Server using SSMS again and verify the default file locations. We do not get any success or failure message here. These configurations will be enabled once we restart the SQL Server services in Linux. opt/mssql/bin/mssql-conf set faultlogdir /DefaultDBPath Modify default log file path: Run the below command to change default log file path. opt/mssql/bin/mssql-conf set faultdatadir /DefaultDBPath Modify default data file path: Run the below command to change default data file path. Modify default directory for the log file Modify the default directory for the data file In this article, we will focus just on the modifying default locations for the database files and the backup files.īelow are the configurations available to modify the default file locations. In the above screenshot, you can see the various configuration options available with mssql-conf utility. We can get the list of configuration available under mssql-conf utility, run the below command. We can find the mssql-conf utility under the /opt/mssql/bin. We will change the default file locations using the mssql-conf utility. Now, we are ready to change the default file location to this directory. In the below screenshot, you can see the group and owner for / DefaultDBPath is set to mssql. Without this, SQL Server cannot access this path. We need to change the group and the owner of this directory to mssql. If we look at the group owner and the directory permissions, currently it is set to root. We can go to this directory and can see there are no files in it currently. In below command, we are creating a directory ‘ /DefaultDBPath‘. Run the command with the administrative permission.
#Filemaker server backup path free
Therefore, we will create a new directory with mkdir command in the desired location having sufficient free space. Now we want to change this default path for both the data files and the log files.

We do not need to specify the locations of the database file so that it will create all the files in that folder. Once we create any database, it goes to this default location only. data files, log files and the backup files. You can find all database file in this path, i.e. Here we can view the content using the ‘ ls -lrt‘ command. Let us go to the default path ( /var/opt/mssql/data). In the above screenshot, you can see the default file location is ‘ /var/opt/mssql/data‘. It needs to be changed using the Linux configuration utility of SQL Server, i.e. However, we cannot change the default location here using SSMS. If we connect to SQL Server on Linux using SSMS, we can see the ‘database default file locations’.

SQL Server on Linux does not have GUI based configuration during the installation instead it is command based. During installation, we do not get an option to configure the SQL Server database directories. In SQL Server on Linux, we cannot change the default file locations with this method. If we opted for the default installation of SQL Server, we could still change the default location using SSMS connect to the database instance and go to server properties and in the ‘Database setting’ page, and modify the locations. We can set different directories for the Data root directory, user database, database log files and backup directory during the installation itself. While installing SQL Server on Windows, the SQL Server installer gives you the option to configure the data file, log file and the backup directories. In this article, we will view the process to change the default database files and backup locations in SQL Server on Linux. In a previous article, we explored the process to change default SQL dump file location in SQL Server.
