- Launch docker database
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1234:1433 -d mcr.microsoft.com/mssql/server:2019-latest
- connect to database in SQL Server Management Studio (SSMS) or Azure Data Studio
- user: sa
- password: yourStrong(!)Password
- server: localhost,1234
- create database NOT NEEDED
create database mermaidToSql
- Restore backup
- download AdventureWorksLT2019.bak that corresponds with mssql 2019
- copy into sql server docker machine
docker cp ./AdventureWorksLT2019.bak containerName:/
- run restore from SSMS or Azure Data Studio
- TODO: NOT WORKING....
- generate output see
schemacrawler \ --server=sqlserver --database=AdventureworksLTS2019 \ --port=1234 --user=sa --host=host.docker.internal --password="yourStrong(!)Password" \ --info-level=maximum \ --command script \ --script-language python \ --script ./share/mermaid.py > ./share/output_mssql.md
- other commands
schemacrawler -h
-
schemacrawler \ --server=sqlserver --database=AdventureworksLTS2019 \ --user=sa --host=host.docker.internal,1234 --password="yourStrong(!)Password" \ --info-level=maximum --command=schema > ./share/raw_mssql.txt
-
schemacrawler \ --server=sqlserver --database="AdventureworksLTS2019" \ --user=sa --host="host.docker.internal,1234" --password="yourStrong(!)Password" \ --info-level=maximum execute --command list