If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 linked comparison

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-10, 18:02
rogue49 rogue49 is offline
Registered User
 
Join Date: Oct 2003
Location: Near D.C.
Posts: 47
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.

ex
select owner, table_name from dba_tables
minus
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?

ex.
select tabschema, tabname from syscat.tables
minus
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.
Reply With Quote
  #2 (permalink)  
Old 01-03-11, 19:37
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On