問題描述
我在 Visual Studio 中有一個數(shù)據(jù)庫項目,我需要從生成的 DACPAC 中排除數(shù)據(jù)庫觸發(fā)器,因為其中之一是 LockdownTriggers
可防止觸發(fā)器被更改 - 這會導(dǎo)致問題其他觸發(fā)器;一旦部署 LockdownTriggers
,它就會自動啟用.然后部署的其余部分嘗試更改現(xiàn)在鎖定的其他觸發(fā)器失敗.有什么辦法可以防止將數(shù)據(jù)庫觸發(fā)器部署為 DACPAC 的一部分嗎?或者至少排除LockdownTriggers
,或者在部署結(jié)束之前阻止它被啟用?
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 the DACPAC? Or at least exclude LockdownTriggers
, or prevent it from being enabled until the deployment is over?
推薦答案
我找到了!在網(wǎng)上搜索了更多,看起來我需要高級部署設(shè)置";(可通過項目屬性">調(diào)試">高級"訪問).
I found it! Searched around online some more and it looks like I need "Advanced Deployment Settings" (accessible via Project Properties > Debug > Advanced).
這篇關(guān)于如何從 Visual Studio 中創(chuàng)建的 DACPAC 項目中排除數(shù)據(jù)庫觸發(fā)器?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!