DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Oracle Database Schema Comparison

  1. #1
    Join Date
    Nov 2000
    Posts
    57
    Is there any tool to compare the tables/indexes/constraints between two schemas for the same database...?

    If any tool is available to find the differences between the schemas then how to have the necessary changes to make the two schemas in sinc.

    Eg.,

    User 1 has a table with 5 columns where one table is having a constraint

    User 2 has a table with 10 columns without any constraint

    Both has the same table name except the constraints and columns.

    How to deal with this to make the schemas as same.

    Hope to have your answer ASAP.

    regards,
    Srikanth

  2. #2
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    268
    Hi,
    you can user this:
    connect schema1/passwd;
    spool schema1.txt;
    select UT.TABLE_NAME,UTC.COLUMN_NAME,DATA_TYPE,DATA_LENGTH, UCC.CONSTRAINT_NAME
    from USER_TABLES UT, USER_TAB_COLUMNS UTC, USER_CONS_COLUMNS UCC
    where UT.TABLE_NAME = UTC.TABLE_NAME and
    UTC.COLUMN_NAME = UCC.COLUMN_NAME(+)
    order by UT.TABLE_NAME, UTC.COLUMN_NAME;
    spool off;
    connect schema2/passwd;
    spool schema2.txt;
    select UT.TABLE_NAME,UTC.COLUMN_NAME,DATA_TYPE,DATA_LENGTH, UCC.CONSTRAINT_NAME
    from USER_TABLES UT, USER_TAB_COLUMNS UTC, USER_CONS_COLUMNS UCC
    where UT.TABLE_NAME = UTC.TABLE_NAME and
    UTC.COLUMN_NAME = UCC.COLUMN_NAME(+)
    order by UT.TABLE_NAME, UTC.COLUMN_NAME;
    spool off;
    exit;

  3. #3
    Join Date
    Jan 2001
    Posts
    2,828

    Talking

    Hello

    I think thsi link could be helpful for you .

    http://www.embarcadero.com/products/...mdatasheet.htm

    http://www.toad.com

    look also for the change mangement pack which can be downloaded from technet.oracle.com

    personally i prefer dbartisan for this kind of work

    regards
    hrishy

    [Edited by hrishy on 07-17-2001 at 07:34 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width