Step 3: Creating an empty database schema

Use SQL scripts to create a dedicated schema in the database if you are using database persistence.

About this task

In this procedure, the WebSphere Application Server installation home directory is C:/Program Files/IBM/WebSphere/AppServer.

  1. To create an empty database schema, follow the procedure below, which goes through the steps for a Derby database as an example.

    You create a Derby database schema in one of the following ways:

    • By setting a custom property: After you have defined the Derby data source, you modify the createDatabase custom property and set it to create. The database is created by the first database connection.

    • From the command line: follow the steps below.

  2. To populate the database with tables, views, and so on, continue to Step 6: Deploying the Rule Execution Server Management EAR, and then to Step 7: Populating a Rule Execution Server database.

To create a Derby database schema:

Procedure

  1. Stop the application server.
  2. Launch <WasInstallDir>/derby/bin/embedded/ij.bat or ij.sh.
  3. Create the database and connect to it.

    For example, to create the new database resdb as the user resAdmin and connect to it, use the following command:

    ij>connect 'jdbc:derby:<WasInstallDir>/derby/databases/resdb;user=resAdmin;password=resAdmin;create=true';
  4. Close the ij utility.
    ij> quit;
  5. Start the application server.