Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2008
    Posts
    45

    Unanswered: Create Database Ddl

    Hi friends,

    db2look does not give the create database statement.I tried control center and even that did not help.Is there a way we can get the create database statement for a database in db2??

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    "create database" is not DDL, it is a DB2 Command. See the Command Reference manual for details. Most of the settings that you will need to replicate the database can be obtained with the following command on the existing database:

    db2 get db cfg
    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
    Jan 2008
    Posts
    45
    Thanks..Is there a way to get CREATE DATABASE command for an existing database ?? Suppose i want to move a database from one environment to other with out using backup,restore option i might need the create database command.Is there a way to know that ??

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I don't think there is a way, unless the Control Center does it. The database code page and territory code are in the "db2 get db cfg" and everything else will default to a value, but can be changed later.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2008
    Posts
    45
    thanks for the info..Quest tool does that i believe.Do you know any APIs that we can use to generate DDL or CREATE DATABASE command??

Posting Permissions

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