Sun GlassFish Enterprise Server v3 Prelude Administration Guide

ProcedureTo Start the Database

Enterprise Server includes an implementation of Java DB, 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 command.

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

    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 5–1 Starting a Database

The following example command starts Java DB on port 5001 of localhost:


asadmin start-database --dbhost=localhost --dbport=5001

Information similar to the followingt is displayed (partial output):


Database started in Network Server mode on host localhost and port 5001.
--------- Derby Network Server Information --------
Version: CSS10020/10.2.2.1 - (538595)  Build: 538595  DRDA Product Id: CSS10020
-- listing properties --
derby.drda.traceDirectory=C:\prelude\v3_prelude_release\distrib...
derby.drda.maxThreads=0
derby.drda.keepAlive=true
derby.drda.minThreads=0
derby.drda.portNumber=5001
derby.drda.logConnections=false
derby.drda.timeSlice=0
derby.drda.startNetworkServer=false
derby.drda.host=localhost
derby.drda.traceAll=false
.
.
.
Starting database in the background.
Log redirected to C:\prelude\v3_prelude_release\distributions\web\target\glassfi
sh\databases\derby.log.
Command start-database executed successfully.

See Also

To see the full syntax and options of the command, type asadmin start-database --help at the command line.