Comparing schemas ignoring the schema name

2019-06-14 08:58发布

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?

0条回答
登录 后发表回答