Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010

    Unanswered: database creation

    I want to generate an database creation script from the existing database.
    Do we have any command for this to do in db2 ?

    DB2Look doesnot generate the database creation syntax .

  2. #2
    Join Date
    May 2003
    There is no simple way to do it. However you could find all the necessary information in various places:

    The code set, territory code, log path, database page size, etc are in the db cfg (db2 get db cfg).

    The db path is in the db2 node directory (db2 list db directory).

    The information about tablespaces (syscatspace, tempspace1, and userspace1) are in "db2 list tablespaces" and or 'db2 list tablespace containers for x".

    If you have 9.7 you can get most or all of the information in the DB2 administrative views (not sure about 9.5).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Dec 2008
    Toronto, Canada
    and for user-defined tablespaces and bufferpools you can use db2look with l option:

    db2look -d db_name -l
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

Posting Permissions

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