Interacting with databases in VS Code
While there is no built-in database manager for VS Code like there is in Visual Studio 2019 for Windows, Microsoft has published a very nice extension called SQL Server (mssql
). For more information on installing this extension, refer to Chapter 12, Overviewing VS Code Extensions. The following screenshot shows the extension after it's installed:
Can you run SQL Server on Linux and Mac?
In a word, yes. You can run SQL Server on Linux or Mac in a Docker container. Once you have Docker running on your machine, run the following commands from the terminal:
sudo docker pull mcr.microsoft.com/mssql/server:2019-latest
sudo docker run -d --name vstt -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=!mySuper_Secure_Password787' -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest
Make sure you change the --name
and SA_PASSWORD
values to reasonable values...