Sun GlassFish Enterprise Server v3 Prelude Quick Start Guide

Starting and Stopping the Database Server

A database server is not started by default when you start the Enterprise Server domain. If you have applications that need a database back end, you must start and stop the database server manually.

ProcedureTo Start the Sun GlassFish Java DB Server

The instructions in this procedure describe how to start the Java DB server that is bundled with Enterprise Server, but they apply for the most part to any database you want to use.

Before You Begin

At least one Enterprise Server domain must be started before you start the database server.

    Use the asadmin start-database command.

    The general form for the command is:


    as-install/bin/asadmin start-database --dbhome directory-path
    

    For example, to start the Sun GlassFish from its default location:


    as-install/bin/asadmin start-database --dbhome as-install/javadb
    

ProcedureTo Stop the Java DB Server

    Use the asadmin stop-database command:


    as-install/bin/asadmin stop-database