[英]how to resolve dependency when comparing schema in TFS for SQL Server project or when creating .DACPAC files in SSMS?
I have SQL server project setup in TFS. 我在TFS中安装了SQL Server项目。 when i am trying to compare schema from source control project with Target project, i am getting some error on Unresolved reference.
当我尝试将源控制项目中的架构与目标项目中的架构进行比较时,我在“未解决的引用”上遇到了一些错误。 so i tried to add database reference from using "Add Database Reference" dialog box and it is asking me to add .DACPAC file.
所以我试图通过使用“添加数据库引用”对话框来添加数据库引用,它要求我添加.DACPAC文件。
to create .DACPAC file i went in SSMS and right clicked on DB and selected Tasks->Extract Data-tier Application option. 创建.DACPAC文件,我进入SSMS,右键单击DB,然后选择Tasks-> Extract Data-tier Application选项。 it is getting failed because it can not resolve dependency for some of database objects (which uses linked server connection).
之所以失败,是因为它无法解决某些数据库对象(使用链接服务器连接)的依赖性。 so my question is how can i resolve this dependency so that i can add .DACPAC file in TFS to compare schema and generate scripts for deployment from TFS.
所以我的问题是如何解决这种依赖性,以便可以在TFS中添加.DACPAC文件以比较架构并生成用于从TFS进行部署的脚本。 i am using Visual Studio 2013.
我正在使用Visual Studio 2013。
Thanks for your help. 谢谢你的帮助。
The correct way to handle it would be to also create a dacpac for the database the other end of the linked server and add a database reference as "Other Server, Other Database". 正确的处理方法是在链接服务器的另一端为数据库创建一个dacpac,并添加一个数据库引用为“ Other Server,Other Database”。
Instead of SSMS I would create a new ssdt project in ssdt and import each database as it will be more reliable than the ssms extract. 代替SSMS,我将在ssdt中创建一个新的ssdt项目并导入每个数据库,因为它比ssms提取更为可靠。
Ed 埃德
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.