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 Version 5.1.60.x
to Derby. To download the tool, go to the introductory page for Cloudscape
on the IBM developerWorks Web site. (A link is provided in the IBM Suggests
section of this article.) In the Support section of this developerWorks page,
you see the Cloudscape 5.1 migration tool link. Before clicking on this link,
however, you might want to click on the Cloudscape Migration information link,
which leads to important migration instructions and tips.
Currently
the following restrictions apply to use of Derby with WebSphere Application
Server:
- 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 WebSphere Application Server only for
development and test purposes.
The WebSphere Application Server Supported hardware and software Web
page provides up-to-date information on supported databases. (Find the link
in the IBM Suggests section of this article.) If you have additional questions
about support for Derby, contact IBM Support.
About this task
Derby enables the following two frameworks:
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, you must 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 Version 5.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. You 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.
You 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.
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.