Why Are Schemas Flagged As Diff When Owners are Mapped?

SteveTSteveT Posts: 3
edited July 1, 2014 2:32PM in SQL Compare Previous Versions
I'm using SQL Compare V10 to compare tables between a Production and QA database. In this situation, the Prod and QA databases use the same table objects, however they are owned by a different schema:
Example: In Prod we have PROD.TABLE1, in QA we have QA.TABLE1

I have mapped owners PROD to QA so they are treated as equivalent, however these names are flagged as differences in the output/report.

I understand that they are different due to different names, but I though that was the whole purpose of mapping owners(schemas) ?

I could not find an option work around this, any ideas?

Comments

  • I could not reproduce your issue in SQL Compare version 10.7. Creating the database as below and then mapping SCHEMAA to SCHEMAB and vice-versa creates a comparison where SCHEMAA.Table1 is compared to SCHEMAB.Table1 and vice-versa.

    The only thing I noticed is that if the tables are different for a reason other than the table name, the SQL view highlights the name as a difference. So for example the code below creates a system-generated primary key and that is the reason they show up in the different objects list of the results. If you then use the option to ignore the names on constraints, then the tables are shown as equal.

    It's the SQL view windows that are broken, but this does not affect the actual result.

    If this is your issue, please let me know.
    CREATE SCHEMA SchemaA AUTHORIZATION dbo;
    GO 
    CREATE SCHEMA SchemaB AUTHORIZATION dbo;
    GO
    CREATE TABLE SchemaA.Table1(
    ID int PRIMARY KEY,
    DATA nvarchar(50)
    )
    GO
    CREATE TABLE SchemaB.Table1(
    ID int PRIMARY KEY,
    DATA nvarchar(50)
    )
    GO
    
  • After careful examination, I found that you are correct. The only tables listed are the ones that actually have a difference. The part that bothers me is that the table and index scripting highlights the fully qualified table name as a difference. When I check off "Ignore Constraint and Index Names", it does not stop the highlighting of the fully-qualified table names in the report; I wish I could achieve that to avoid confusion for the folks I will forward the report to.
Sign In or Register to comment.