-
Setup Python vituall enviroment
cd mssql-py/ python3 -m venv ./venv source venv/bin/activate
-
Install deps
python -m pip install -r requirements.txt
-
Run tests
pytest
- username: sa
- pwd: mssql-pass1
- port: 1433
-
Prepare sql server 2019 instance with docker
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=mssql-pass1" -p 1433:1433 --name mssql -d mcr.microsoft.com/mssql/server:2019-CU14-ubuntu-20.04
-
Connect to sql server
docker exec -it mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P mssql-pass1
-
Show all logins where the password was changed within 1 days and set to never expire
python -m mssql check --server localhost --database test --username sa --password mssql-pass1 --port 1433