Results 1 to 9 of 9
  1. #1
    Join Date
    May 2003
    Posts
    369

    Unanswered: data loads and row count comparison on DB2 UDB

    Hi folks,

    I am tasked with performing data loads and to compare row counts on our two separate DB2 UDB database servers. Problem is no documentation exists and I need to run the data loads and improve problems with row counts on the data loaded from our campus site to the colo site. Any tips and tricks on doing this with DB2 UDB 7.1 on AIX? Thanks !

    Scott
    DB2 UDB DBA

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: data loads and row count comparison on DB2 UDB

    Sorry ... I'm completely lost ...

    Cheers

    Sathyaram

    Originally posted by mixxalot
    Hi folks,

    I am tasked with performing data loads and to compare row counts on our two separate DB2 UDB database servers. Problem is no documentation exists and I need to run the data loads and improve problems with row counts on the data loaded from our campus site to the colo site. Any tips and tricks on doing this with DB2 UDB 7.1 on AIX? Thanks !

    Scott
    DB2 UDB DBA

  3. #3
    Join Date
    May 2003
    Posts
    369

    Re: data loads and row count comparison on DB2 UDB

    Sathyaram

    We are running a nitely batch job to load a batch of data from our main site to a secondary backup site using DB2 UDB. I am tasked with coming up with a method for disaster recovery for these nitely batch loads that will check row counts of the data tables that are moved to the secondary site that will ensure data integrity. How can I do this using the LOAD, EXPORT, IMPORT, and DB2MOVE commands? We use a mix of these commands for our data loads since we have a mix of data tables in seperate batch jobs. Thanks.

  4. #4
    Join Date
    Apr 2003
    Posts
    191

    Re: data loads and row count comparison on DB2 UDB

    Hi mixxalot,

    LOAD, EXPORT, IMPORT and db2move can create human readable message files. You can extract the information with a text processing tool, write it to a summary file and finally diff the summary files.

    I would use perl for a task like this but a shell skript should do as well.

    Johann

    Originally posted by mixxalot
    Sathyaram

    We are running a nitely batch job to load a batch of data from our main site to a secondary backup site using DB2 UDB. I am tasked with coming up with a method for disaster recovery for these nitely batch loads that will check row counts of the data tables that are moved to the secondary site that will ensure data integrity. How can I do this using the LOAD, EXPORT, IMPORT, and DB2MOVE commands? We use a mix of these commands for our data loads since we have a mix of data tables in seperate batch jobs. Thanks.

  5. #5
    Join Date
    Apr 2003
    Location
    Florida
    Posts
    79
    Maybe I'm missing something - but can't you just make a remote connection, perform "SELECT COUNT(*) FROM <remote table>" and compare that result with local UDB data counts?

    Or

    Compare your local Export / Import counts if you are selecting all the data from remote site and Replacing target table.

    Maybe this helps - Good Luck
    Rick

  6. #6
    Join Date
    May 2003
    Posts
    369

    script for compare row count

    yep sounds good. just wondering if a script already exists after all would be nice to focus on dba stuff instead of having to recreate the wheel. any good place for db2 udb dba scripts? I would much rather focus on performance tuning and backup recovery stuff that needs to get done.

  7. #7
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: script for compare row count

    MArtin Hubel's www.db-hq.net

    http://sourceforge.net/projects/dbtutools/

    in addition, you can search for db2 on the sourceforge website ...

    ftp://www.redbooks.ibm.com/redbooks/SG246012/shells.zip

    sathyaram

    Originally posted by mixxalot
    yep sounds good. just wondering if a script already exists after all would be nice to focus on dba stuff instead of having to recreate the wheel. any good place for db2 udb dba scripts? I would much rather focus on performance tuning and backup recovery stuff that needs to get done.

  8. #8
    Join Date
    May 2003
    Posts
    369

    thanx

    once again sathyaram I appreciate your help. we have a huge dba environment where I currently am the only db2 dba so it helps a lot.

    thanks
    scott
    db2 udb dba

  9. #9
    Join Date
    May 2003
    Location
    Amsterdam
    Posts
    65
    One possible way would be to do a reorgchk (with current or update statistics) on both systems and compare the two output files.
    Anton Versteeg
    IBM Netherlands

Posting Permissions

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