Data-Tier Application (dac) and SqlPackage.exe

Can you install tools to export/deploy DacPac files without requiring a Visual Studio installation?

Favourite SqlPackage commands

Command Line reference  https://msdn.microsoft.com/en-us/library/hh550080%28v=vs.103%29.aspx

Extract DACPAC I didn’t find that the /p:IgnoreUserLoginMappings={True | False} switch made any difference. Users were still created on default deployment.

The definition in the reference is not easy to interpret: “Specifies whether relationships between users and logins will be ignored.”  Does that mean it will still attempt to create users, or not?

Deploy DACPAC   “C:\Program Files\Microsoft SQL Server\120\DAC\bin\SQlPackage.exe” /a:publish /tcs:”Data Source=localhost;Initial
Catalog=mydb;Integrated Security=true” /sf:”C:\Temp\db_backup\ADatabase.dacpac”
/p:ExcludeObjectTypes=RoleMembership;users;Logins;

This excludes users and logins, necessary if deploying to environment that doesn’t support users that were in the source.  If there are objects owned by a custom user the deployment will still fail.