Questions tagged [sqlpackage]

A command line utility for automating SSDT database deployment tasks.

SqlPackage.exe is a command line utility that automates the following database development tasks:

  • Extract: Creates a database snapshot (.dacpac) file from a live SQL Server or Windows Azure SQL Database.

  • Export: Exports a live database - including database schema and user data - from SQL Server or Windows Azure SQL Database to a BACPAC package (.bacpac file).

  • Import: Imports the schema and table data from a BACPAC package into a new user database in an instance of SQL Server or Windows Azure SQL Database.

  • Publish: Incrementally updates a database schema to match the schema of a source .dacpac file. If the database does not exist on the server, the publish operation will create it. Otherwise, an existing database will be updated.

  • DeployReport: Creates an XML report of the changes that would be made by a publish action.

  • DriftReport: Creates an XML report of the changes that have been made to a registered database since it was last registered.

  • Script: Creates a Transact-SQL incremental update script that updates the schema of a target to match the schema of a source.

The SqlPackage.exe command line allows you to specify these actions along with action specific parameters and properties.

196 questions
1
vote
0 answers

sqlpackage DeployReport generate empty xml

I'm trying to use sqlpackage.exe with DeployReport action (following this documentation), but I'm getting empty xml:
arielma
  • 1,308
  • 1
  • 11
  • 29
1
vote
1 answer

sqlpackage exception: Unrecognized command line argument BlockOnPossibleDataLoss

I'm running the below command in my CMD: sqlpackage /action:Publish /SourceFile:"Database Services\bin\Release\Database Services.dacpac" /TargetConnectionString:"Data Source=TEST05,123;Integrated Security=True;Persist Security…
arielma
  • 1,308
  • 1
  • 11
  • 29
1
vote
0 answers

SqlPackage and sensitivity classification

I've recently updated the SqlPackage and it now tries to rebuild tables every time I deploy (): PRINT N'Starting rebuilding table [dbo].[Users]...'; GO BEGIN TRANSACTION; SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET…
hazzik
  • 13,019
  • 9
  • 47
  • 86
1
vote
0 answers

What are all the Microsoft SQL Server "Table Options"?

I am upgrading a number of identical SQL Server databases via dacpac. Some of the target databases have Change Tracking enabled. So I wish to include IgnoreTableOptions=true in the publish profile. If I don't, the dacpac deployment turns off Change…
Paul M
  • 351
  • 3
  • 14
1
vote
1 answer

SSDT Changing Scoped Credentials for different environments

I am looking to use continuous integration to deploy my SSDT project to a UAT and production environments and use external tables which point to azure data lake. The following statements need to be changed depending on the environment:- CREATE…
1
vote
1 answer

Use SQL variables in DACPAC deployment to differentiate permissions

I have a SQL database on Azure and deploy any schema changes to it using SqlPackage.exe, using a .dacpac file. I am looking to modify this such that I can use a sql variable to control certain changes in the schema, based on the environment I am…
Snooks
  • 91
  • 1
  • 11
1
vote
1 answer

Getting error while executing DACPAC file (using sqlpackage.exe)

I am getting below error while executing DACPAC file using SQLPackage. The column [dbo].[Temp].[GMTOffset] on table [dbo].[Temp] must be added, but the column has no default value and does not allow NULL values. If the table contains data, the ALTER…
user13624867
  • 225
  • 4
  • 14
1
vote
1 answer

Azure agent: where to find SqlPackage.exe

I use a Microsoft hosted agent for building and verifying my project including an sql project. On this azure agent I need to find the SqlPackage.exe file to call it via a powershell task. I know that there is the SqlServerDacpacDeployment task but…
Ackdari
  • 3,222
  • 1
  • 16
  • 33
1
vote
1 answer

SSDT - Exclude certain schema along with unnamed constraint

Task: Automate database deployment (SSDT/dacpac deployment with CI/CD) The database is a 3rd party database It also includes our own customized tables/SP/Fn/Views in separate schemas Should exclude 3rd party objects while deploying the database…
Santhoshkumar KB
  • 437
  • 4
  • 12
1
vote
1 answer

Schema Compare and SqlPackage 150 case sensitivity issues

So I installed the new SqlPackage 150 (having had 140 before with no issues) and deploying the database twice (sqlpackage is a joke, this twice needs to be done on any update to see what new quirks it has when it alters untouched code), I noticed…
CodeAngry
  • 12,760
  • 3
  • 50
  • 57
1
vote
1 answer

SQlPackage For DacPac Deploy using .net C# System.Diagnostics.process

Am trying to call SQlPackage from a windowsfroms project using System.Diagnostics.process Below is the code snippet i am using to call Sqlpacakage with dacpac path and connection string as argument ProcessStartInfo procStartInfo = new…
Aravind Goud
  • 120
  • 2
  • 17
1
vote
0 answers

SSDT Re-alter Trigger when nothing has changed

I'm using SSDT database project to create deployment scripts for my database. One of the trigger, [trddl_GrantUserRights] is re-alter every time when the deployment runs. Nothing has changed in the definition of the trigger in the project…
Tahir
  • 95
  • 1
  • 9
1
vote
0 answers

How to handle SQLPackage.exe full transaction log error for deploying dacpac?

I recently automatize deployment of SSIS projects and SQL Server database with powershell scripts. I use SQLPackage.exe (dacpac framework) to deploy .dacpac in order to automatize update database structure. My issue: Dacpac try to rebuild huge…
1
vote
2 answers

Error SQL72016: Cannot open database XXX requested by the login. The login failed

We are facing an issue related to bacpac import from local SQL instace to Azure SQL. We generate a bacpac in our local SQL (DAC\140..\sqlpackage) and then we import this bacpac to Azure. We are facing this issue: Error SQL72016: Cannot open…
1
vote
2 answers

SqlPackage cannot import permission 'EAES'

When I try to deploy an SQL Server Database using SqlPackage I get a strange error. The call is: SqlPackage.exe /Action:Publish /SourceFile:myDb.dacpac /TargetServerName:myServer /TargetDatabaseName:myDb /OverwriteFiles:True /Diagnostics:True The…
abbgrade
  • 548
  • 5
  • 19