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 > db structure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-10, 23:34
Mathew_paul Mathew_paul is offline
Registered User
 
Join Date: Oct 2007
Posts: 200
db structure

hi

is there any way to compare the structure between database for example

production and development region
the structure of production is changed lots of time, but some to the deve servers structure are old,

i do collect a colcount of all the tables in both server and do diff in aix

kindly suggest
regds
Paul
Reply With Quote
  #2 (permalink)  
Old 02-02-10, 08:23
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You can do: "export to outfile.csv of del select * from production.syscat.columns order by tabschema,tabname,colno" and compare/diff the results. Note: you will want to replace the wildcard * I used with the appropriate columns, I was just being lazy.

Andy
Reply With Quote
  #3 (permalink)  
Old 02-02-10, 10:09
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Quote:
Originally Posted by Mathew_paul View Post
hi

is there any way to compare the structure between database for example

production and development region
the structure of production is changed lots of time, but some to the deve servers structure are old,

i do collect a colcount of all the tables in both server and do diff in aix

kindly suggest
regds
Paul
What does a COLCOUNT really gives you? yes both tables have 10 columns, but are those 10 the same?

you have partially answered your question already btw. run db2look on both and then use diff. I have been using it for many yrs to monitor unauthorized changes to DDL and grants.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #4 (permalink)  
Old 02-02-10, 13:28
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
I just have a quick question, how did the change get to production if it was never in development???
Dave
Reply With Quote
  #5 (permalink)  
Old 02-02-10, 13:32
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Quote:
Originally Posted by dav1mo View Post
I just have a quick question, how did the change get to production if it was never in development???
Dave

Shhhhh



__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
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