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.
- WebSphere Application Server internal components, such as the Java Messaging Service, do not support Derby 10.0.
- You cannot use Derby Version 10.0 as a production database. Use this first release of Derby with WAS only for development and test purposes.
About this task
Derby enables the following two frameworks:
- Embedded: This framework is similar to that of Cloudscape V5.1.60.x. To use this framework, define a Derby JDBC provider. See the Derby section in the minimum required settings article for more information.
You must use the embedded framework if you are running XA. Network Server does not support XA.
- Network Server: This framework removes these limitations of the Embedded framework:
- inability to access a remote Cloudscape instance
- only one JVM can boot up the same database instance
The following steps describe how to configure and run the Network Server framework.
Procedure
- 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.
- 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.- 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.
- Define a Derby Network Server JDBC provider using the Universal JDBC Driver to connect with WebSphere Application Server.
- 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.
- sysinfo: displays database version information
- ij: manipulates the database instances
Tip: Use ij as an alternative for the old Cloudscape cview tool, which does not exist in Derby.- dblook: dumps DDL information
- networkServerControl: controls the networkServer process (can be used for functions such as ping and trace)
- startNetworkServer: starts the networkServer process
- stopNetworkServer: stops the networkServer process
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.
The Derby Web site: http://incubator.apache.org/derby/index.html