Recreating database tables from the exported table DDL


When an EAR file deploys, the target database is selected and a Table.ddl file is created that contains the SQL statements to create the tables for the bean.

The Table.ddl file is created by the Assembly Toolkit (ATK).

Here is a DB2 example of how to create tables using the Table.ddl file

  1. Extract the Table.ddl file from the container-managed bean enterprise bean JAR file into a working directory such as /tmp.

  2. cd /tmp

  3. Run the following DB2 commands:

    db2cmdA new
    db2 connect dbname
    db2 -tf Table.ddl
    db2 disconnect all