====== SQL Server in Linux ====== ===== Installation ===== ^ Distro ^ Instructions ^ | Red Hat | [[https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat|link]] | | Suse | [[https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-suse|link]] | | Ubuntu | [[https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu|link]] | | Docker | [[https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker|link]] | ===== Server Control ===== **Check status of SQL Server Service** systemctl status mssql-server **Stop the SQL Server Service** sudo systemctl stop mssql-server **Start the SQL Server Service** sudo systemctl start mssql-server **Restart the SQL Server Service** sudo systemctl restart mssql-server **Disable the SQL Server Service** sudo systemctl stop mssql-server sudo systemctl disable mssql-server **Enable the SQL Server Service** sudo systemctl enable mssql-server sudo systemctl start mssql-server (You can get a script to simplify these commands [[https://github.com/jfcarr/shell-scripts/blob/master/ssctrl.sh|here]].) ===== Log Files ===== ^ Type ^ Location ^ | SQL Server engine | /var/opt/mssql/log/errorlog | | Installer | /var/opt/mssql/setup-< time stamp representing time of install> | Log files are UTF-16 encoded. If needed (e.g., for 'more' or 'less' commands), you can encode in UTF-8 as follows: sudo iconv –f UTF-16LE –t UTF-8 -o {{tag>database}}