Sun GlassFish Enterprise Server v3 Administration Guide

ProcedureTo Start the Database

Enterprise Server includes an implementation of Java DB (formerly known as Derby), however, you can use any JDBC-compliant database. The database is not started automatically when you start Enterprise Server, so if you have applications that require a database, you need to start Java DB manually by using the local start-database subcommand.

  1. Start the database by using the start-database(1) subcommand.

    When the database server starts, or a client connects to it successfully, the following files are created at the location that is specified by the --dbhome option:

    • The derby.log file contains the database server process log along with its standard output and standard error information.

    • The database files contain your schema (for example, database tables).

Example 14–1 Starting a Database

This example starts Derby on the host host1 and port 5001.

asadmin> start-database --dbhost host1 --dbport 5001 --terse=true
Starting database in the background. 
Log redirected to /opt/SUNWappserver/databases/javadb.log.
Command start-database executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help start-database at the command line.