dacpac

Improve the performance of dacpac deployment using c#

痴心易碎 提交于 2019-12-23 12:52:35
问题 We are deploying to MS SQL Server localdb for integration testing. We build a Database Project and the resulting dacpac file is copied in order to be used by the IntegrationTests project. So far we have: DatabaseProject.sqlproj bin/debug/DatabaseProject.dacpac IntegrationTests.csproj bin/debug/DatabaseProject.dacpac We have an assembly setup in the IntegrationTests project where a new fresh database is created and the dacpac is deployed to localdb . In the TearDown the database is deleted so

MSDeploy/WebDeploy - Deploy Composite Database Project via DacPac

喜夏-厌秋 提交于 2019-12-23 11:55:05
问题 We have a database project with views which join to tables in another database. The other database is in a different solution. This failed to build until we added a reference to a DacPac from the other database. I believe these views are considered “Composite Database Objects” because they reference objects not included as scripts in the database but rather referenced in the DacPac. We can successfully deploy this project from the VS to the target database. Now we are trying to automate the

How to publish DACPAC file to a SQL Server database project via SQLPackage.exe of SSDT?

我是研究僧i 提交于 2019-12-21 03:51:05
问题 I'm using SSDT for Visual Studio 2012 here and using its command-line tool SQLPackage.exe to publish a .dacpac file. I want to publish that to an SQL Server database project . I'm trying to use parameter at this guide but cannot find ways how to do it. How can I do that? 回答1: Are you trying to publish to a Database, or create a database project from a dacpac? These are two different things. To create a database project based on a dacpac, create a new SQL Server Database Project in Visual

How to make DACPAC update only one schema?

半腔热情 提交于 2019-12-21 01:26:22
问题 I have a VS2013 solution with *.sqlproj project that contains objects specific to this solution. The issue is that this is database common also for other projects. My problem is to automatically deploy changes within my schema to database without affecting other objects. By default DACPAC updates whole database that is not desired in my case. I tried to write deployment contributor http://msdn.microsoft.com/en-us/library/dn268597(v=vs.103).aspx but it seems there is no way to have it within

DACPAC won't deploy because 'can't connect to server'?

北慕城南 提交于 2019-12-18 06:08:22
问题 I'm trying to deploy a DACPAC to LocalDB 2012 but it's just not having it: Stack trace is as follows: ================================== Could not deploy package. (Microsoft.SqlServer.Dac) ------------------------------ Program Location: at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context) at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, Action`2 reportStatus, CancellationToken cancellationToken) at Microsoft

SQL Dacpac Deploy using SqlPackage and DropObjectsNotInSource with DoNotDropUsers

浪尽此生 提交于 2019-12-13 13:54:11
问题 I am running SqlPackage in my CI build to deploy dacpacs and pass in a publish.xml file using the /Profile switch. I have the following three options set in the profile: <DropObjectsNotInSource>True</DropObjectsNotInSource> <DoNotDropPermissions>True</DoNotDropPermissions> <DoNotDropUsers>True</DoNotDropUsers> However when I run the dacpac deploy it still tries to drop my users. Any ideas? 回答1: There is (unfortunately) a bug in SqlPackage.exe's handling of publish profiles, whereby the

SSDT/SqlPackage drops statistics

此生再无相见时 提交于 2019-12-13 07:48:17
问题 During build we generate dacpac files of our database based on a SSDT .sqlproject. This dacpac later gets deployed to production using sqlpackage. Despite using the /p:DropStatisticsNotInSource=False switch, sqlpackage will drop all statistics, that were added after the last sync of the sqlproject with the production database. We can also reproduce this using a publish profile and the generate script option of SSDT: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="14.0" xmlns=

sqlpackage breaks when trying to alter a FILESTREAM column

南笙酒味 提交于 2019-12-13 01:51:50
问题 I have a SQL Database project, where I have recently amended a FILESTREAM column to allow nulls. I am trying to publish the project's dacpac to a db where the column already exists, as a filestream column, but is currently NOT NULL . I am performing the publish using the sqlpackage.exe command line tool (version 12.0.2882.1). However, it produces the error: Error SQL72014: .Net SqlClient Data Provider: Msg 4990, Level 16, State 1, Line 1 Cannot alter column 'document' in table 'Document' to

Overriding DefaultDataPath and DefaultLogPath variables when using SqlPackage to publishing a dacpac

半腔热情 提交于 2019-12-12 12:29:29
问题 The environment: Using a SQL Server Database Tool in Visual Studio 2013, Update 4 to create a DacPac for publishing a database. Using TFS build to build and drop the database project. Using SqlPackage version to publish the dacpac to SQL Server 2012. Using the SqlPackage Action "Publish", the script for deployment is generated using the following variables based on the target database's defaults : :setvar DefaultDataPath "H:\YourServerDefault" :setvar DefaultLogPath "H:\YourServerDefault" I

DACPAC not including composite objects

*爱你&永不变心* 提交于 2019-12-12 08:59:54
问题 I have a VS2012 database project which includes tables, stored procs, views etc. I then have a second database project which contains a database reference to the first project. I have ensured that the "Include composite objects" options is selected from the "Project Properties -> Debug -> Advanced" menu. When I build the second project and take the resulting DACPAC file and deploy it through SSMS2012 it doesn't create the firsts project's objects. Am I missing something? Why don't the