SQL Server on Linux – Configuration (Ubuntu)
Following on from my
previous post where we installed SQL Server with the default configuration this article goes into more detail regarding the configuration options available on Linux to customize your SQL Server environment.
- Installing SQL Server Agent
- Changing Default Directories
- Enabling Availability Groups for High Availability
- Configure SQL Server Memory Settings
- Configuring the TCP port for SQL Server
- Enabling and Disabling Traceflags
- Removing/Reverting a Setting back to default
- Viewing Non Default Settings
SQL Server Agent Install
The first configuration option we are going to look at is installing the SQL Server Agent. Although you could use something like CRON to automate jobs on Linux most SQL Server DBA will be more comfortable with SQL Server Agent.- Update Local Repositories
- Install SQL Server Agent
- Restart SQL Server
SQL Server Default Data and Log File Directories
Now we will change the default directory for user database and log files. In this scenario, i am moving the default data directory from /var/opt/mssql/data to /opt/mssql/data and the default log directory from /var/opt/mssql/data to var/opt/mssql/logs. NOTE: Before Making these changes in a production environment it is recommended to take backups of all databases.- Create the folders required to store newly created databases and assign correct permissions
- We will now use the mssql-conf script to change the default directories. The mssql-conf script is stored by default in the /opt/mssql/bin directory and is the script to set most of the sql server configuration options.