This section provides instructions for using the Java DB database implementation bundled with Application Server 8.2.
Sun Java System Application Server 8.2 introduces two new asadmin commands for starting and stopping the Java DB Network Server.
The start-database command starts an instance of the Java DB network server:
start-database [--dbhost 0.0.0.0] [--dbport 1527] [--dbhome "path/derby"] |
The default value for the host is 0.0.0.0, which allows for Java DB to listen on localhost as well as the IP and hostname interfaces. The value for the dbhome property is the location of the Java DB databases. The default path is appserver_install_dir/derby.
The asadmin stop-database command is used to shut down an instance of the Java DB network server that is running:
stop-database [--dbhost 0.0.0.0] [--dbport 1527] |
The Java DB configuration that ships with Application Server 8.2 also includes several useful scripts that can help you use Java DB. The following scripts are available for use in the appserver_install_dir/derby/frameworks/NetworkServer/bin directory:
startNetworkServer.ksh/bat – Script to start the network server
stopNetworkServer.ksh/bat – Script to stop the network server
ij.ksh/bat – interactive JDBC scripting tool
dblook.ksh/bat – Script to view all or part of the DDL for a database
sysinfo.ksh/bat – Script to display versioning information regarding the Java DB environment
NetworkServerControl.ksh/bat – Script that provides a means of running commands on the NetworkServerControl API
Set the DERBY_INSTALL environment variable to point to the appserver_install_dir/derby directory.
Unset your CLASSPATH environment variable.
(Optional) You can also set the following properties:
Set DERBY_SERVER_HOST to the host on which the network server will listen.
Can also be set to 0.0.0.0 to enable all listeners.
Set DERBY_SERVER_PORT to the port number on which the network server will listen.
For more information about these utilities, see the Derby Tools and Admin guides.