Getting Started using Derby with Glassfish and SJSAS 8.2
The start-database command may be used to start an instance of the Derby network server:
start-database [––dbhost 0.0.0.0] [––dbport 1527] [––dbhome install_dir/derby]The default value for the host is 0.0.0.0, which allows for Derby to listen on localhost as well as the ip/hostname interfaces.
The value for the dbhome property represents the location of where the derby databases reside. The default is <glassfish/sjsas_HOME>/derby.
You may also use the asadmin command stop-database to shutdown an instance of the Derby network server that is running:
stop-database [––dbhost 0.0.0.0] [––dbport 1527]
The derby configuration that ships with glassfish and SJSAS 8.2 also provides several useful scripts which can assist you with utilizing Derby successfully.
To run these scripts, you need to do the following:
- set the environment variable DERBY_INSTALL to point to the <glassfish/sjsas_HOME>/derby directory
- unset your CLASSPATH environment variable
- DERBY_SERVER_HOST the host that the network server will listen on (may also be set to 0.0.0.0 to enable all listeners)
- DERBY_SERVER_PORT the port number for the network server to listen on
The following scripts are available for use in the <glassfish/sjsas_HOME>/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 info regarding the derby environment
- NetworkServerControl.ksh/bat - Script which provides a means of executing commands on the NetworkServerControl API.
For more information, see the Derby tools and admin guide for additional details on these utilities
- Login or register to post comments
- Printer-friendly version
- lancea's blog
- 2378 reads





