Generating data definition language
You can generate data definition language (DDL) if there are features in the server configuration that require access to a database.
Before you begin
- Start the server.
- Export the code
JAVA_HOME=<java64_path>
, where<java64_path>
is the path to a 64-bit Java 8.0 or later software development kit (SDK). - Export the code
PATH=$JAVA_HOME/bin:$PATH
. Now the ddlGen utility can find Java. - Export the code
WLP_USER_DIR=<wlp_path>
, where<wlp_path>
is the path to the root of the Liberty server configuration. For example, if server1 is configured at the path /wlpconfig/servers/server1, theWLP_USER_DIR
is equal to/wlpconfig
.
About this task
The utility generates data definition language (DDL) for each feature that is configured in the server that requires access to a database. You can change the path that the ddlGen utility uses to search for the server by exporting the environment variable, WLP_USER_DIR, in the command line where the utility is run.
Procedure
Results
The following table shows the nonzero codes that might be returned:
Return Code | Explanation |
---|---|
0 | Success. The DDL is generated to ${server.output.dir}/ddl. |
20 | The action provided is not valid. |
21 | The server was not found. Message CWWKD0100E shows the file system directory where the utility looked for the server. This location can be changed by exporting the WLP_USER_DIR variable in the command line where the utility is run. |
22 | The localConnector feature is not present in the server configuration or the server was not started. |
23 | The MBean that generates DDL was not found. |
24 | The MBean that generates DDL reported an error. The server logs contain more details about the error. |
25 | The server output directory was not found. This error can occur if the value of the WLP_OUTPUT_DIR variable does not match the value used by the server. |
255 | An unexpected error occurred. |