Options

How to compare tables in different schemas

ppdppd Posts: 4
edited October 17, 2011 2:18PM in SQL Compare Previous Versions
Using SQL Compare 6, is it possible to compare tables from one database that are in dbo, to tables in another database that are broken out into various schemas. For example, our original database has all of the tables in dbo. In our new database, we have put the tables in various schemas for organization purposes. Now, we would like to compare tables from dbo in the original database to their counterpart in the new database that is actually in a different schema. Is it possible to create some sort of mapping that tells the tool that a table from database A maps to a specific schema.table in database B? Thanks for your help.

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    The 'Map owners' button at the bottom-left of the comparison project window allows you to do this. Mapping 'owners' on a SQL 2005 server is the same as mapping schema.

    Enjoy!
  • Options
    Hi Brian,

    I had tried doing that originally, but here is the issue that I had: All of the tables in the first database belong to dbo. In the second database, there are a few tables that belong to dbo, but the other tables are broken into multiple schemas (HR, ACCT, PAYROLL, INV, etc). Since the mapping tool already mapped dbo to dbo, there did not appear to be a way to map dbo to multiples schemas from the second database. I tried unmapping dbo, and then tried to map it to more and one shema (holding down the <CTRL> key, but that didn't work). Any suggestions? Thanks.
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Unfortunately not. It can only map one whole schema to another one.
  • Options
    Ok. Thanks for the quick response and for answering my questions.
  • Options
    SQL Compare 9.5 has a table mapping feature that might help you. Please visit http://www.red-gate.com/MessageBoard/vi ... 1312#51312 for more information.

    David Atkinson
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.