Forum Discussion
joaonl
May 06, 2021Copper Contributor
More information about sqlpackage.exe
Hi,
I would like to ask if somebody can provide more information sqlpackage.exe.
Use case:
- We develop a product, that is distributed using a setup.
- Our product is composed by a .Net application that uses a SQL Server database.
- The setup installs the binaries and creates a database on the SQL Server.
How the setup gets the database:
- We extract the database creation scripts using sqlpackage.exe extract and script actions.
- For the reference data we use BCP to extract the data to install.
My 2 questions (for now):
- Are we allowed to distribute Microsoft Command Line Utilities together with our setup?
- Instead of having the steps for the database creation listed above, we would be interested instead, on having a .bacpac file and having that file imported in the target database. However I cannot change the target location of the data and log files. Is there a way to do this (SSMS allows it)?
- I have been trying to understand how to use the SQLCMD variables. I do understand that they will override any variable declared in SQLCMD when executing scripts, but I fail to understand what are the use of them for the sqlpackage publish action, since this is executed by sqlpackage.exe and not SQLCMD,
Note: I don't want to use management studio to do any of the steps, just the command line utilities.
Thank you
Joao
No RepliesBe the first to reply