
Administration Commands                         start-database(1)

NAME
     start-database - starts the Java DB

SYNOPSIS
     start-database  [--dbhost host] [--dbport port-no]
     [--dbhome db-file-path] [--echo={false|true}]
     [ --terse ={false|true}]

DESCRIPTION
     The start-database command starts the Java DB server that is
     available  with  the  Sun  Java  System  Application  Server
     software for use with the Application Server. Use this  com-
     mand  only  for  working  with  applications deployed to the
     Application Server. Java DB is based upon Apache Derby.

     When the Java DB database server is started  by  using  this
     command,  the  database  server is started in Network Server
     mode.  Clients  connecting  to  it  must  use  the  Java  DB
     ClientDriver.  For  details  on  connecting to the database,
     such as the Driver Class Name and Connection  URL,  see  the
     Apache Derby documentation.

     When the database server starts, or a client connects to  it
     successfully, the following files are created:

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

         o    The database files that contain  your  schema  (for
              example, database tables)

     These files are created at the location that is specified by
     the  --dbhome  option.  If the --dbhome option is not speci-
     fied, the start-database command determines where to  create
     these files as follows:

         o    If the current working directory  contains  a  file
              that is named derby.log, the start-database command
              creates the files in the current working directory.

         o    Otherwise, the start-database command  creates  the
              files in the as-install/databases directory.

     To create the database files at a particular  location,  you
     must set the --dbhome option.

Java EE 5           Last change: 14 Apr 2008                    1

Administration Commands                         start-database(1)

     The start-database command starts the database process, even
     if it cannot write to the log file.

     This command is supported in local mode only.

OPTIONS
     --dbhost

         The host name or IP address of the Java DB  server  pro-
         cess.  The  default  is  the  IP  address 0.0.0.0, which
         denotes all network interfaces on the host where you run
         the start-database command.

     --dbport
         The port number where the Java  DB  server  listens  for
         client  connections. This port must be available for the
         listen socket, otherwise the database  server  will  not
         start. The default is 1527.

     --dbhome

         The absolute path to the directory  where  the  database
         files  and  the  derby.log  file  are created. If the --
         dbhome option is not specified, the start-database  com-
         mand determines where to create these files as follows:

             o    If the current  working  directory  contains  a
                  file   that  is  named  derby.log,  the  start-
                  database  command  creates  the  files  in  the
                  current working directory.

             o    Otherwise, the start-database  command  creates
                  the  files  in  the as-install/databases direc-
                  tory.
         To create the database files at a  particular  location,
         you must set the --dbhome option.

     -e --echo
         Setting to true echoes the command line statement on the
         standard output. Default is false.

     -t --terse

         Setting to false displays detailed database information.
         Default is false.

Java EE 5           Last change: 14 Apr 2008                    2

Administration Commands                         start-database(1)

EXAMPLES
     Example 1 Using the start-database command

     The following command starts Java DB 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/derby.log.

EXIT STATUS
     The exit status applies to errors in executing  the  asadmin
     command.   For  information  on  database  errors,  see  the
     derby.log file.

     0                           command executed successfully

     1                           error in executing the command

SEE ALSO
     stop-database(1)

Java EE 5           Last change: 14 Apr 2008                    3

