Visual Studio SQL Server Data Tools Comparison Mappings

扶醉桌前 提交于 2019-12-11 05:18:35

问题


Does Visual Studio SQL Server Data Tools (any version) support changing the default comparison mappings, for objects with different names, and/or in different schemas?

For example, I want to compare tables in two SQL Server databases, but the tables are in different schemas in each database:

database1.SchemaA.MyTable

database2.SchemaB.MyTable

Can these tables be compared with each other using SSDT, and if so how can I do it? I cannot find any mapping options or documentation.


回答1:


As far as I know, no, you cannot do the comparison using SSDT if they are in different schema. The database doesn't matter though, you could specify the connection and database when running schema compare, but not the schema.

One workaround to get it working in less than ideal way would be to:

  • deploy your SchemaA.MyTable locally
  • after the schema has been deployed successfully, replace the table definition of SchemaA.MyTable with that of SchemaB.MyTable
  • Run sqlcompare with your project as the source and the local db (where you deployed your project in step 1) as the target.


来源:https://stackoverflow.com/questions/45439613/visual-studio-sql-server-data-tools-comparison-mappings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!