Open stuartpa opened 1 year ago
Also add support for SAS tokens when using https URL to Azure Storage. And support managed identity auth as well.
This is how a user can hack up .bacpac support today, make this a seamless part of the --using flag:
sqlcmd create mssql --user-database db1|sleep 5; echo sleeping; sleep 3|sqlpackage /a:import /SourceFile:db1.bacpac /tu:"username" /tp:"REDACTED" /tsn:"localhost,1433" /tdn:"db1"
--using should also support more protcols than just http(s)://, it should definitely support file:\, including c:\ etc.
this would be awesome. you could create a dev database from a backup in seconds
I expected it to work already with a local path. Don't understand the limitation to only use url
--using should also support more protcols than just http(s)://, it should definitely support file:, including c:\ etc.
this would be awesome. you could create a dev database from a backup in seconds
I expected it to work already with a local path. Don't understand the limitation to only use url
@giammin, check out #319, is there missing from this PR? We implemented this initial --using support as an MVP in the spirit of Ries' "Lean Startup". This functionality was asked for very clearly in early user testing of sqlcmd create
. The feedback has been very positive, and we are looking to round out the MVP now.
nothing missing, awesome work!
The initial PR for the --using flag (in
sqlcmd create mssql
) enables the scenario:i.e. create a new local T/SQL endpoint with the AdventureWorks database downloaded and restored from a URL
--using should support all normal source type that contain databases, e.g. .bacpac files, and .mdf/.ldf (in archive files, like .zip/.7z etc.).
--using should just do the right thing depending on what it finds, e.g. do a restore of a .bak file / do an attach of a .mdf/.ldf file etc.
--using should also support more protcols than just http(s)://, it should definitely support file:\, including c:\ etc.
(the idea here is the end user shouldn't need to know the mechanism required to get the database attached to the engine, they just provide the URL to the file, and sqlcmd does the rest).