sqlpackage

Using SqlPackage.exe on a server without SSMS installed

家住魔仙堡 提交于 2020-08-05 09:27:44
问题 I have a windows 2012 server. The server can access my SQL database. I don't have access to the SQL database server, and I don't have access to install SSMS on the windows 2012 server running my website. I want to use SqlPackage.exe to update my database scheme with a .dacpac file I get the following error: Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.SqlServer.Dac.DacPackage' threw an exception. ---> System.TypeInitializationException: The type

Can I use the DeployReport option when deploying a dacpac through Release Management

依然范特西╮ 提交于 2020-06-18 17:41:46
问题 I'd like to be able to setup a WinRM dacpac deployment task in MS Release Management to create a report of the schema compare and not actually deploy the database. Then I could have an environment approval and abandon the deployment if unexpected changes are reported. If the changes are as expected, the next environment would actually deploy the database. Is there a way to do that using the available WinRM DB deployment task? If so, how? 回答1: 'Publish' is hardcoded in the task script, so we

Error: The reference to external elements from the source named 'master.dacpac' could not be resolved

孤街浪徒 提交于 2020-05-11 05:13:07
问题 I am building a database dacpac using sqlpackage on a windows machine. The project contains a reference to master.dacpac I take the move the dacpac to a linux machine ( mssql-server-linux docker image) and restore the database. deploy-database.sh # publish dacpac using sqlpackage ./sqlpackage/sqlpackage /Action:Publish /sf:"/MyDb.dacpac" /tu:sa /tp:Password1 /tdn:MyDb /tsn:localhost Error: No file was supplied for reference master.dacpac; deployment might fail. When package was created, the

Error: The reference to external elements from the source named 'master.dacpac' could not be resolved

守給你的承諾、 提交于 2020-05-11 05:12:33
问题 I am building a database dacpac using sqlpackage on a windows machine. The project contains a reference to master.dacpac I take the move the dacpac to a linux machine ( mssql-server-linux docker image) and restore the database. deploy-database.sh # publish dacpac using sqlpackage ./sqlpackage/sqlpackage /Action:Publish /sf:"/MyDb.dacpac" /tu:sa /tp:Password1 /tdn:MyDb /tsn:localhost Error: No file was supplied for reference master.dacpac; deployment might fail. When package was created, the

Execute SSDT project/dacpac deployment script in single transaction, including pre/post scripts

。_饼干妹妹 提交于 2020-05-09 06:47:05
问题 I am using SQLPackage.exe utility together with Database project's publish profiles to run changes to the SQL Server database. From my understanding, this is the deployment process: Pre-Deployment Script Main Deployment Post-Deployment Script I have "Include transactional scripts" option checked in the publish profile advanced settings, however, that seems to apply to Main Deployment section only. My questions is: If Main deployment fails, is Pre-Deployment script committed? As well as, if

Create User in dacpac deployed by SqlPackage.exe leads to login failed SqlException

依然范特西╮ 提交于 2020-01-04 02:06:31
问题 Problem I'm trying to automate SQL deployment including User and Roles. It works when I create the user in Sql Management Studio, but when I deploy dacpack I get SqlException: Login Failed for user 'MyUser' Description I have SQL Server 2016 installed on localhost with both Sql Server and Windows authentication enabled. I have Sql Database project in Visual Studio with these files: MyUser.sql [build action=build] CREATE USER [MyUser] WITH Password='$(MyUserPassword)'; RolesMembership.sql

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

允我心安 提交于 2020-01-02 03:00:12
问题 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 default Filegroup. In database project settings the default Filegroup is not changed from PRIMARY. This presents a problem when attempting to deploy to an environment where the default Filegroup is not PRIMARY because the following code is included

Unable to publish DACPAC to Azure SQL Database using sqlpackage.exe

℡╲_俬逩灬. 提交于 2019-12-24 08:25:47
问题 When trying to apply a DACPAC to an Azure SQL Database I'm getting the following from sqlpackage.exe: *** An error occurred during deployment plan generation. Deployment cannot continue. The Element or Annotation class SqlDatabaseOptions does not contain the Property class CatalogCollation. I've managed to use VS2017 with SSDT to create a package and then deploy it to another database using the SQL Server Object Explorer but it fails when I use sqlpackage.exe found in C:\Program Files (x86)

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

Latest SSDT vs. SqlPackage incompatibility for SQL Server 2014

ぃ、小莉子 提交于 2019-12-20 01:07:18
问题 One of our build servers has just been updated to the latest "Microsoft SQL Server Update for database tooling" (version 12.0.60629.0) and is now incompatible with the version of SqlPackage.exe we have (in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120\SqlPackage.exe). The SQL Server database project (targeting SQL Server 2014) builds without error, but when we attempt to deploy the .dacpac to the target server using SqlPackage.exe, we get