Configuring Derby Version 10.0

Use Derby Version 10.0 as a backend database with application servers that are configured only for development and test purposes.

 

Before you begin

Cloudscape provides a tool to migrate Cloudscape V5.1.60.x to Derby. Download the tool and find more information at http://www-306.ibm.com/software/data/cloudscape/support/.

Currently the following restrictions apply to use of Derby with WebSphere Application Server:

The WAS Supported hardware and software Web page, at http://www.ibm.com/software/webservers/appserv/doc/latest/prereq.html, provides up-to-date information on supported databases. If you have additional questions about support for Derby, contact IBM Support.

 

About this task

Derby enables the following two frameworks:

 

Procedure

  1. Start the Network Server on the machine that hosts the database instance.

    To start the Network Server, run the startNetworkServer.bat file, which is located in the WAS_HOME/derby/bin/networkserver directory. On UNIX platforms, the file is startNetworkServer.sh.

  2. If necessary, update the derby.properties file, which is located in the WAS_HOME/derby directory. By default Network Server only listens on the local host. If your application environment requires remote hosts to access Network Server, consider updating the derby.properties file according to these recommendations:
    • Uncomment the derby.drda.host property. This alteration enables connections from other hosts, and effectively sets the Derby Network Server host address to 0.0.0.0. This value is interpreted by Network Server as meaning all IP address that belong to the host machine.
    • In the case that your Derby host has multiple IP addresses but you want only one of those addresses to accept connections, replace 0.0.0.0 with that IP address.
    • To avoid a security exposure: While running a Network Server instance that accepts connections from remote hosts, run the Network Server under a security manager, such as a Java security manager. To set up such a policy, use a procedure similar to that of running Cloudscape Network Server under a security manager. Consult the Configuring Cloudscape V5.1.60.x topic for reference.
    • Finally, remember that Network Server administrative commands, such as sysinfo and stopNetworkServer, can only be executed on the host where the server was started, regardless of the derby.drda.host property setting.

    By editing other entries in the derby.properties file, you can enable other important capabilities, such as trace. We can also change the port number on which Network Server listens; the default port number is 1527.

    Leave one property unchanged, however: The derby.drda.loadSYSIBM property in the derby.properties file controls whether a SYSIBM schema is created on the first connection to the database. Leave this property at the default value, which is true.
  3. Stop the Network Server by invoking the stopNetworkServer.bat file.

    We can find this file in the WAS_HOME/derby/bin/networkserver directory. On UNIX platforms, the file is stopNetworkServer.sh.

  4. Define a Derby Network Server JDBC provider using the Universal JDBC Driver to connect with WebSphere Application Server.
  5. Restart Network Server.

 

What to do next

Review the .bat/sh tools that WebSphere Application Server provides with Derby. The Network Server tools are in the WAS_HOME/derby/bin/networkserver; the Embedded framework tools are in the WAS_HOME/derby/bin/embedded directory. All of the tools in the following list are provided for both Derby frameworks.

Note: When you run ij, surround the dbname by double quotation marks (" ") if it includes the full path name; for example: ij> connect '"c:temp;create=true"'

This is ' " " ' without spaces.