To install Microsoft SQL Server
in your container, you have to run the following commands in the IDE terminal.
Import the public repository GPG keys:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Register the Microsoft Ubuntu repository:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2019.list)"
echo "deb [arch=amd64] https://packages.microsoft.com/debian/8/prod jessie main" | sudo tee /etc/apt/sources.list.d/mssql-cli.list
Update the package index and install the mssql-server
and the mssql-cli
packages.
sudo apt-get update
sudo apt-get install -y mssql-server mssql-cli
After the package installation finishes, run the following command and follow the prompts in the terminal.
sudo /opt/mssql/bin/mssql-conf setup
You can check if your Microsoft SQL Server is running with the following command:
sudo service mssql-server status
If Microsoft SQL Server isn't running, you can start it using the command:
sudo systemctl start mssql-server
See the official documentation for more information on interacting with your database using the command line interface.