-
Install Docker CE on your PC. Download Docker-CE from store.docker.com
-
Install docker-compose
pip install docker-compose
- if you do not have python installed on your PC, install python first. https://www.python.org/downloads/
-
Install SQL Ops Studio from https://aka.ms/sqlopsstudio
- Clone this repository
git clone https://github.com/erickangMSFT/cli-docker.git
- Start mssql and mssql-cli docker containers using docker-compose
cd cli-docker docker-compose -f simaple-demo.yaml up -d
- Enter mssql-cli docker shell and execute mssql-cli
docker exec -ti mssql-cli sh export MSSQL_CLI_USER=sa MSSQL_CLI_PASSWORD=SqlDevOps2017 MSSQL_CLI_SERVER=mssql mssql-cli
- Run demo in mssql-cli prompt
\? --list all databases \ld use WideWorldImporters; --change database --list all schema \ls q --list all tables with partial word search for 'peop' \lt peop -- request: please add \lsp to list stored procedure -- open file into mssql-cli \e CTRL + R to search previously exected queries. F3 to enable multiline query select top 3 * from sys.databases where name like %wide%; -- 1. Join suggestion for tables and columns select top 3 * from "Application"."People" p join -- show join suggestion here --2. Join suggestion for columns select top 3 * from "Application"."People" p join "Sales"."Customers" c on -- show join suggestion here q
All docker images are published to https://hub.docker.com/r/ericskang/sqltools. Note that the published images are NOT OFFICIAL and FOR TEST USE ONLY.
-
Build docker images To build your own docker images, run following.
./build_all.sh
-
Test images To test, execute each step in test.sh
vim test.sh