Red Gate forums :: View topic - Why Are Schemas Flagged As Diff When Owners are Mapped?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Why Are Schemas Flagged As Diff When Owners are Mapped?

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
SteveT



Joined: 27 Jun 2014
Posts: 2

PostPosted: Fri Jun 27, 2014 9:32 pm    Post subject: Why Are Schemas Flagged As Diff When Owners are Mapped? Reply with quote

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?
Back to top
View user's profile Send private message
Admin
Site Admin


Joined: 15 Aug 2004
Posts: 9

PostPosted: Mon Jun 30, 2014 2:08 pm    Post subject: Reply with quote

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.
Code:
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
Back to top
View user's profile Send private message Send e-mail
SteveT



Joined: 27 Jun 2014
Posts: 2

PostPosted: Tue Jul 01, 2014 7:32 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group