Results 1 to 5 of 5

Thread: db structure

  1. #1
    Join Date
    Oct 2007
    Posts
    246

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    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.7.0.6 os 6.1.0.0

  4. #4
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    I just have a quick question, how did the change get to production if it was never in development???
    Dave

  5. #5
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    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.7.0.6 os 6.1.0.0

Posting Permissions

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