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 > Compare DB2 Schemas via query..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-13-11, 19:23
jassack04 jassack04 is offline
Registered User
 
Join Date: Oct 2011
Posts: 2
Compare DB2 Schemas via query..

Hi All,

I would like to write a query that can compare 2 database schema's, providing output on differences, if any.

I've done a search and everyone seems to be recommending a tool for this approach, however, I have been directed and restricted to doing this through a query in Toad (my DBA does not want to use the utility built into Toad because apparently it has some issues?).

I am very new to DB2 and SQL and have been having a lot of trouble getting any results. I've gone through a pile of tutorials, but I am having difficulty understanding some of the more complex queries I've seen, and not finding a lot that can help in this instance anyways. I would be eternally grateful for any help with this!
Reply With Quote
  #2 (permalink)  
Old 10-13-11, 20:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You need two things:
  • SQL Reference Vol 1, Appendix D, System Catalog Views
  • An understanding of "where exists", and "where not exists" SQL sub-query syntax

You can get the manuals here:
IBM DB2® Version 9.7 for Linux®, UNIX®, and Windows® English manuals - United States

Good luck.
__________________
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
  #3 (permalink)  
Old 10-17-11, 13:50
jassack04 jassack04 is offline
Registered User
 
Join Date: Oct 2011
Posts: 2
Thanks for pointing me in the right direction Marcus, I'll look into this stuff and hopefully get somewhere!

Quote:
Originally Posted by Marcus_A View Post
You need two things:
  • SQL Reference Vol 1, Appendix D, System Catalog Views
  • An understanding of "where exists", and "where not exists" SQL sub-query syntax

You can get the manuals here:
IBM DB2® Version 9.7 for Linux®, UNIX®, and Windows® English manuals - United States

Good luck.
Reply With Quote
Reply

Tags
db2, schema compare, sql

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