Recreating database tables from the exported table data definition language

Why and when to perform this task

When an EAR file deploys the target database is selected. Then an appropriate Table.ddl file is created that contains the SQL statements to create the table for the bean. To create your table, using the Table.ddl file for DB2:

Steps for this task

  1. The container-managed bean (CMP) enterprise bean JAR file has a Table.ddl file that the Assembly Toolkit (ATK) generates. Extract the Table.ddl file to a working directory such as C:\temp.
  2. Run this command -- C:\temp>db2cmd
    A new command window appears in which you enter the following commands.
  3. Run this command -- C:\temp>db2 connect to dbname
  4. Run this command -- C:\temp>db2 -tf Table.ddl
    The command runs and creates tables for your CMP enterprise bean.
  5. Run this command -- C:\temp>db2 disconnect all



Searchable topic ID:   recdbddl
Last updated: Jun 21, 2007 4:55:42 PM CDT    WebSphere Application Server Network Deployment, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tdat_recdbddl.html

Library | Support | Terms of Use | Feedback