database-deployment

How do I exclude database triggers from a DACPAC project created in Visual Studio?

邮差的信 提交于 2021-01-29 08:16:12
问题 I have a database project in Visual Studio, and I need to exclude the database triggers from the generated DACPAC, because one of them is LockdownTriggers which prevents triggers from being altered - and that's causing issues with the other triggers; as soon as LockdownTriggers is deployed, it's automatically enabled. and then the rest of the deployment fails trying to alter other triggers that are now locked. Is there any way to prevent the database triggers from being deployed as part of

SQL Server 2008 R2 Stuck in Single User Mode

帅比萌擦擦* 提交于 2020-01-11 15:26:12
问题 Having executed a DB deploy (from a VS SQL Server database project) on a local database, which failed, the database has been left in a state where it has single user mode left on (the deploy runs as single user mode). When I connect to it from SSMS and try something like the following: ALTER DATABASE MyDatabase SET MULTI_USER; GO I get the error: Changes to the state or options of database 'MyDatabase' cannot be made at this time. The database is in single-user mode, and a user is currently

How to Package/Publish SQL databases with ASP.NET MVC 2 Website?

大兔子大兔子 提交于 2019-12-13 06:44:09
问题 I'm trying to deploy my ASP.NET MVC 2 Website for the first time on a local IIS 7 server, which is configured and running. I've made successful deployments using the Web Deploy option without the databases (so the site isn't fully working yet). Most of the deployment settings are pretty intuitive, however, I have problems with the Package/Publish SQL -tab in the project settings. Here's how it looks like with the errors I'm getting (click for bigger view). It asks for Connection String, but 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

Update database feature not working in Publish Web dialog in Visual Studio 2012

╄→尐↘猪︶ㄣ 提交于 2019-12-07 04:06:53
问题 I'm developing an ASP.NET Web Forms application under Visual Studio 2012. I'm using Web Deploy and Publish Web dialog for application deploy. I'm trying to deploy a database schema using the Update database feature. I entered a connection string pointing to remote SQL Server. If I click the "Test connection" button Visual Studio says test connection is succeeded. Then I go to Preview tab and click the Preview database link. And in the opened window I have the message Web deployment task

What is the syntax for adding multiple arguments onto the “Variables” parameter in sqlpackage.exe?

半世苍凉 提交于 2019-12-06 02:38:59
问题 I am using SqlPackage.exe for my deployment. I have read the documentation here for the usage of SqlPackage.exe . The documentation only states the synax for one variable: Specifies a name value pair for an action specific variable; {VariableName}={Value}. The DACPAC file contains the list of valid SQLCMD variables. An error will result if a value is not provided for every variable. My problem is that the documentation does not say how to pass multiple arguments into the Variables parameter.

DACPAC not including composite objects

白昼怎懂夜的黑 提交于 2019-12-04 16:16:33
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 composite objects get included in the DACPAC? SmudgerDan As Peter Schott said in the comments above, I needed

What is the syntax for adding multiple arguments onto the “Variables” parameter in sqlpackage.exe?

混江龙づ霸主 提交于 2019-12-04 05:18:51
I am using SqlPackage.exe for my deployment. I have read the documentation here for the usage of SqlPackage.exe . The documentation only states the synax for one variable: Specifies a name value pair for an action specific variable; {VariableName}={Value}. The DACPAC file contains the list of valid SQLCMD variables. An error will result if a value is not provided for every variable. My problem is that the documentation does not say how to pass multiple arguments into the Variables parameter. For example, I want to do this: sqlpackage.exe ...args go here... /Variables:VarToOverride=Value1