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

    Unanswered: re-arrange tables

    I have 2000+ tables in DB2 database (AIX) created by a software installation process. All these tables were created in default tablespace (index, lob, etc. in the same tablespace), so, I want to re-arrange these tables to tablespaces with correct page sizes, separate data/index/lob, etc.

    I know I can get DDLs and change it for each table manually for all these 2000+ tables, but, I am wondering whether anybody can give me better solution. I thought I could reverse-engineer table DDL from syscat.columns, but, the sql solution seems to cumbersome. Any idea how I can accomplish the re-arrange short-n-sweet? Thanks a lot.
    Last edited by rajaraja_cholan; 10-01-13 at 11:38.

  2. #2
    Join Date
    Jan 2013
    Posts
    15

  3. #3
    Join Date
    Dec 2008
    Posts
    44
    Thanks, I am at DB2 9.5

  4. #4
    Join Date
    Dec 2008
    Posts
    44
    db2look; CREATE TABLE tbl1 LIKE tbl IN tbs1...; LOAD tbl1 and DROP tbl; RENAME tbl1 TO tbl; create missing db obj from db2look...

    Thanks for whoever try to help.

Posting Permissions

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