Comparing schemas ignoring the schema name

末鹿安然 提交于 2019-12-10 12:09:34

问题


I'm using the SQL Server Data Tools to compare the tables two schemas. The schemas are similar and should be adapted to be the same. Now my problem is, that those two schemas are differently named.

Example:

[sourceDB]
    [FOO].[table1]
    [FOO].[table2]

[targetDB]
    [BAR].[table1]
    [BAR].[table2]

When I run the compare, it wants to remove both tables in schema BAR and recreate them with schema FOO. What I want is to just compare both tables regardless of the schema name and get a script that alters the tables in schema BAR. Is there a way to do this?

来源:https://stackoverflow.com/questions/50236164/comparing-schemas-ignoring-the-schema-name

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