Skip to content

Latest commit

 

History

History

authelia

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

MSSQL Docker Guide

Some basic commands to use mssql docker container

✨Prerequisites

Running a sample

docker-compose up

To stop and remove all containers of the sample application run:

docker-compose down

To stop and remove all containers with Volume of the sample application run:

docker-compose down -v

✨ MSSQL Config

  • username - sa
  • password - Passw0rd.
  • port - 1433

🎓 MSSQL Commands

  1. Run the following command to open the mssql client terminal and enter the password (Passw0rd.) when prompted.
docker exec -it mssql_container /opt/mssql-tools/bin/sqlcmd -S localhost -U sa
  1. To See list of database:
select name from sys.databases;
GO
  1. Create database command
create database lks;
GO
  1. Change database context command
use lks;
GO
  1. Create database command
drop database lks;
GO

Author

👤 RajawatBanna