Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 965 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 965 Bytes

Dev env setup

  1. Setup Python vituall enviroment

      cd mssql-py/
      python3 -m venv ./venv
      source venv/bin/activate
  2. Install deps

     python -m pip install -r requirements.txt
  3. Run tests

       pytest

Setup Local sql server 2019 with docker

  • username: sa
  • pwd: mssql-pass1
  • port: 1433
  1. 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
  2. Connect to sql server

    docker exec -it mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P mssql-pass1

Local testing cli

  • 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