Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2013

    Unanswered: enable and disable all constraints

    i am new to db2. i need to copy all the tables from one schema to another i need to disable all the constraints before truncate and enable after loading for all the tables.

  2. #2
    Join Date
    Apr 2008
    Iasi, Romania
    Provided Answers: 3
    Take a look to db2move
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  3. #3
    Join Date
    Apr 2006
    Provided Answers: 11
    db2look before and
    to remove fk.. something like :
    db2 -x "select 'alter table '||rtrim(tbcreator)||'.'||tbname|| \
    ' drop foreign key '||name||';' \
    from sysibm.systabconst where tbcreator='"${SCHEMA}"' \
    and constraintyp='F'"
    similar for other constraints..
    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-V11 Fundamentals- DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

Posting Permissions

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