Cheat Sheet SQL Server on Linux

Installing SQL Server 2017 on Linux

Microsoft’s documentation seems to work well. 

Ubutu Installation Cheat Sheet

  1. Import the repository keys (use links from above)
  2. Register SQL Server repository (use links from above)
  3. Install SQL Server
    • sudo apt-get update
    • sudo apt-get install -y mssql-server
  4. Configure SQL Server.  During the setup you will be asked for SA password which is capitalized on Linux.
    • sudo /opt/mssql/bin/mssql-conf setup
  5. Enable SQL Server Agent for 2017 CU4+ (not enabled by default on Linuxhttps://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-sql-agent?view=sql-server-2017
    • sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
    • sudo systemctl restart mssql-server

5. Install SQL Server Tools

  1. Import the repository keys using link in Microsoft documentation above
  2. Register the repository using link in Microsoft documentation above
  3. sudo apt-get update
  4. sudo apt-get install mssql-tools unixodbc-dev
  5. sudo apt-get install mssql-tools

Useful Commands

Service Commands

  1. Start SQL Service : systemclt start mssql-server
  2. Stop SQL Service: systemclt stop mssql-server

Setup SQL Server or perform Edition Upgrade

  1. /opt/mssql/bin/mssql-conf setup
This entry was posted in Database Administration, Linux and tagged , , . Bookmark the permalink.

Leave a comment