Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2007
    Posts
    28

    Talking Unanswered: Can you load a valid DB2 DDL into DB2 to create tables/databases?

    Hello everyone.

    I was wondering if this is possible, it seems like it should be valid but I can't find the option anywhere in the DB2 Devlopement Center or Warehouse Center.

    I have a flat file that contains DB2 DDL SQL.

    I want to load this file into some program to create the tables in DB2.

    the file looks like this:
    CREATE DISTINCT TYPE functionType_32767 AS VARCHAR(32767);
    CREATE TABLE "MSM".
    "bridgeLink"
    (
    "ActivateCommandText" CharVar_32767
    ,
    "AggregationParent" ObjectLinkList
    ,
    "AggregationPriorityValue" Integer
    ....
    ....


    I can load this DB2 .DDL into a model tool, such as Rational Software Architect, and it will show all the tables so its valid DB2 DDL but now I want to actually create the database from this script and I'm confused on how I can do this.


    Thanks any help would be great!
    IBM: Tivoli zSeries Co-op

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Code:
    db2 -tf <filename>
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Open Control Center.

    Tools>>>Command Editor.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Aug 2007
    Posts
    28
    Thanks that worked great!
    IBM: Tivoli zSeries Co-op

Posting Permissions

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