microsoft / go-sqlcmd

The new sqlcmd, CLI for SQL Server and Azure SQL (winget install sqlcmd / sqlcmd create mssql / sqlcmd open ads)
https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility
MIT License
334 stars 58 forks source link

`sqlcmd create` add "--open ads --file https://aka.ms/my-repro.sql" #310

Open stuartpa opened 1 year ago

stuartpa commented 1 year ago

The sqlcmd create command makes it much easier to share a local environment with others using a single command-line that runs on every common OS (Windows/Mac/Linux).

To also enable sharing of a "repro" script in the same single command-line add --open ads --file https://aka.ms/repro.sql" to sqlcmd create

e.g.:

sqlcmd create mssql --using https://aka.ms/AdventureWorksLT.bak --open ads --file https://tiny.url/my-repro.sql

This command would not "execute" any SQL. It would load the my-repro.sql in an ADS query windows, and connect to the SQL Server just started in a local container.