Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2008

    Unanswered: db2 export/import - intergrity constrain

    db2 9.7 on Win 2008 R2

    One of my tables has around 200million rows (45 GB table size).
    Around 100 million rows are useless and should be deleted.
    So, I am planning to export the wanted data (can be done using date coloumn), then drop and recreate the table and Import the data back.

    I was told that that there are intergrity constrains and triggers for this table and I will not be able to do this easly.
    However, how can I check that are there intergrity constrains? or triggers?
    And how can I do this task smoothly ?

    Please help me.
    Thanks, valan.

  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    there is a view syscat.tabdep
    SYSCAT.TABDEP catalog view
    that gives info about dependencies
    according to this you will have to take an action : drop trigger/foreign key...before the operation and redo this after the intervention
    db2look can give all info about ddl for objects and can also include drop statements..
    db2look - DB2 Statistics and DDL extraction tool command
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  3. #3
    Join Date
    Apr 2011
    Yep with a lot of triggers and other constraints you may just want to run batch deletes over the weekend or something.

    100 million rows is really not "that" much depending on the size and speed of your server.

  4. #4
    Join Date
    Dec 2008


    Thanks for the quick advise. I will try this on Monday and let you know the status.
    Regards, Valan.

Posting Permissions

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