Questions tagged [dac]

Questions utilizing the DAC tag are expected to relate to some aspect of Microsoft Data Tier Applications or DAC. Questions can include the DAC framework or DACfx, schema scripts from DACPAC, and combined data/schema scripts BACPAC. For questions about digital-analog converters, use [digital-analog-converter].

A DAC is a self-contained unit of deployment that enables data-tier developers and DBAs to package SQL Server objects, including database and instance objects, into a single entity called DAC package. Developers can build a DAC package using the Data-tier Application project system in Visual Studio, whereas SQL Server Management Studio (SSMS) users can extract a DAC and generate a DAC package file for an existing database.

A DAC package can be deployed to an instance of SQL Server to create a new DAC instance. The DAC deployment installs a new database on the instance, creates the database objects, and creates the logins associated with the users of the database. If a previous version of the DAC is already available, the DAC package can be used to upgrade the existing DAC instance to a newer version.

Questions utilizing the DAC tag are expected to relate to some aspect of Microsoft Data Tier Applications or DAC. Questions might also include related subjects such as the DAC framework or DACfx, as well as schema scripts known as DACPAC, and combined data/schema scripts BACPAC.

178 questions
12
votes
1 answer

How to create/open DAC application in Visual Studio 2012?

I am having a hard time figuring how to actually create or even open a DAC application with Visual Studio 2012. I am using SQL Server 2012. I have SSDT installed. Creating from Visual Studio: According to online documentation I should be able to…
Peter Aron Zentai
  • 11,482
  • 5
  • 41
  • 71
11
votes
2 answers

SQL Azure and Powershell for DACPAC deploy

I am deploying a dacpac built on visual studio 2012 to SQL Azure using powershell and running into issues which I think could be related to some version incompatiblity. The publish works fine when I do it from visual studio but throws an exception…
infinity
  • 1,900
  • 4
  • 29
  • 48
8
votes
3 answers

Is there any way to stop SqlPackage.exe setting default Filegroup in deployment script?

We are using Sql Server database projects to create deployment scripts from DacPac using SqlPackage.exe. We have different SQL Server Filegroups setup in various environments. When deploying we exclude Filegroups as we want objects to create in the…
Mike
  • 123
  • 8
8
votes
1 answer

ADO.Net change "Persist Security Info" default back to True

Information: We have a 3rd party application we use for production at our company. This program uses a DSN to connect up to our SQL Server 2012 database through ODBC. This application works properly under Server 2003 (MADC 2.8) however when i bring…
Random Developer
  • 1,334
  • 2
  • 12
  • 31
7
votes
0 answers

DacServices ExportBacpac Exception with Windows Users

I'm using the Data-tier Application Framework (DACFx) in an attempt to export schema and data from a subset of the tables in my database. var dacServices = new DacServices(connectionString); dacServices.ExportBacpac("database.bacpac", database,…
John Russell
  • 2,177
  • 4
  • 26
  • 47
6
votes
1 answer

DacServices.Deploy to SQL Server LocalDB 2016 failing - unable to connect

This call to DacServices.Deploy has been working great for SQL Server LocalDB 2014, but fails when SQL Server LocalDB 2016 is installed: string dacConnectionString = $"Server=(localdb)\\mssqllocaldb; Integrated Security=true;…
crimbo
  • 10,308
  • 8
  • 51
  • 55
6
votes
2 answers

Dacpac must not drop extra columns

I have happily been writing a product which uses a, Sql Server Database Project and life has been good until we discovered a problem in upgrades. While we create tables, stored procedures and various other database artefacts, once deployed at…
Louis Lewis
  • 1,298
  • 10
  • 25
5
votes
1 answer

Complex data migration in the Data-tier Application Framework (DAC Fx)

I am excited to make the leap to using DAC Fx and declarative database development. The major obstacle for me is how to handle complex data migrations across several different versions of the schema. In the old world, we can simply run all of our…
5
votes
0 answers

Using sqlcmd to execute deploy scripts generated by DAC in a transaction

We have a DACPAC (sqlproj) solution which has some tables and a post-deployment script which runs some DML queries. If the DML query fails (I'm raising an error with severity=20), I would like to rollback all changes - including the DDL changes…
Ash
  • 241
  • 4
  • 15
4
votes
1 answer

STM32 - why the code does not modify the registers like it is supposed to?

I am using STM32F072C8T6 microcontroller with HAL library. I write a program to send out an analog voltage through the DAC pin of the microcontroller but it does not work. I ran the debugger, and I could see that none of the DAC registers changed…
cuckoo
  • 111
  • 2
  • 9
4
votes
1 answer

Error SQL0: The reference to external elements from the source named 'MyDatabase.dacpac' could not be resolved, because no such source is loaded

I'm getting this error when using sqlpackage.exe, or the DacFx DLLs, to programmatically publish a dacpac (A), compiled and provided by a different team, which in turn has a dependency on another dacpac (B). I can confirm that: The reference to B…
Simon Green
  • 1,131
  • 1
  • 10
  • 28
4
votes
1 answer

How can I get temporal table schema information from DACFx API?

Consider the following TSql code: CREATE TABLE Employee ( [EmployeeID] int NOT NULL PRIMARY KEY CLUSTERED , [Name] nvarchar(100) NOT NULL , [Position] varchar(100) NOT NULL , [Department] varchar(100) NOT NULL , [Address]…
Crono
  • 10,211
  • 6
  • 43
  • 75
4
votes
1 answer

DacServices Rollback if new constraint validation fails

We are updating our databases using the DacServices. However sometimes new constraints get added that cause Constraint Violations, which require us to write a migration script to make sure the Data in the column is valid. However with the…
Ranger1230
  • 159
  • 1
  • 10
4
votes
4 answers

Dacpac Upgrade database Times a little silly

Edit: Updated to state it isn't hanging, just takes AGES! I'm trying to update an existing sql server database using a dacpac. I can create a new SQL server database with the (stripped down) example below in 30 seconds. The issue I'm having is that…
Fetchez la vache
  • 4,940
  • 4
  • 36
  • 55
4
votes
0 answers

Using MSDeploy parameters to set the "additional provider settings" in a Web Deploy package

UPDATE: see Microsoft's official response below. I imagine there is a non-offical hack to accomplish this, so I'm leaving the question up. UPDATE 2: Vote up my WebDeploy feature request to Microsoft on this issue. I use MSDeploy heavily at my shop,…
Steve Jansen
  • 9,398
  • 2
  • 29
  • 34
1
2 3
11 12