SQL Server in Linux
Database
Docker
Installation
Distro | Instructions |
---|---|
Red Hat | link |
Suse | link |
Ubuntu | link |
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 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 <errorlog> -o <output errorlog file>