Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Near D.C.

    Unanswered: db2 linked comparison

    I've found when I'm using Oracle that I can do a quick compare between databases by db link.
    set up the Oracle Net Client path in tnsnames,
    then create the dblink using a user with dba rights in the other.

    select owner, table_name from dba_tables
    select owner, table_name from dba_tables@dblinkname

    From what I know, In DB2 with federated...
    I need to use a distinct and static nickname for each object.
    Or I can do a path-through query...but that is just for one server at a time.

    Is there a way to get the effect of a pass-through, but also have access to the current too?

    select tabschema, tabname from syscat.tables
    select tabschema, tabname from syscat.tables (as pass-through reference)

    Right now, I'd have to setup a nickname for each and every dictionary view I'd want to query otherwise...a bit tedious.

    Any input would be appreciated.

  2. #2
    Join Date
    May 2003
    I just make export the relevent syscat tables (tables, columns, indexes, etc) and then load them to new tables in the other database using a different schema name (not syscat) and then write some SQL to do the compare.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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