<!--Arbortext, Inc., 1988-2008, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<?Pub UDT _bookmark _target>
<?Pub EntList bull rArr sect>
<refentry id="start-database-1"><?Pub Tag atict:info tracking="off" ref="2"><?Pub Tag
atict:user user="hl34125" fullname=""><?Pub Tag atict:user user="pmdavies"
fullname=""><?Pub Tag atict:user user="ah95648" fullname="">
<!-- @(#)start-database.1 1.9 07/04/25 SMI; -->
<refmeta><refentrytitle>start-database</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">3 Oct 2008</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2008, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>start<option>database</option></primary>
</indexterm><indexterm><primary>starts the bundled Java DB</primary></indexterm>
<refname>start-database</refname><refpurpose>starts the Java DB</refpurpose>
</refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>start-database</command>  [<option role="double-dash">dbhost</option> <replaceable>
0.0.0.0</replaceable>] [<option role="double-dash">dbport</option> <replaceable>1527
</replaceable>]
 [<option role="double-dash">dbhome</option> <replaceable>DERBY_INSTALL</replaceable>] [<option
role="double-dash">echo</option>=<replaceable>false</replaceable>]
 [<option role="double-dash">terse</option>=<replaceable>false</replaceable>]</synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>The <command>start-database</command> command starts the Java DB server.
Use this command only for working with applications deployed to the server.
Java DB<?Pub Caret> is based upon Apache Derby. </para>
<para>When the Java DB database server is started 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, please see the Apache Derby
documentation.</para>
<para>When the database server starts, or a client connects to it successfully,
two types of files are created:</para>
<itemizedlist>
<listitem><para>The <filename>derby.log</filename> file that contains the
database server process log along with its standard output and standard error
information.</para></listitem>
<listitem><para>The database files that contain your schema (for example,
database tables).</para></listitem>
</itemizedlist>
<para>Both types of files are created at the location specified by the <literal>dbhome
</literal> option. It is important to use the <literal>dbhome</literal> option
when you want to create the database files at a particular location. The <literal>
start-database</literal> command starts the database process, even if it cannot
write to the log file. </para>
<para>This command is supported in local mode only.</para>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="medium">
<varlistentry><term><option role="double-dash">dbhost</option></term>
<listitem><para>The host name or IP address of the Java DB server process.
The default is the IP address 0.0.0.0, which denotes all network interfaces
on the host where you run the <command>start-database</command> command.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">dbport</option></term>
<listitem><para>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.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">dbhome</option></term>
<listitem><para>The absolute path to the directory where Java DB and the <literal>
derby.log</literal> files are created. If this option is not specified, the
command searches for Java DB in the current directory and then at <replaceable>install-dir
</replaceable><literal>/databases</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>e</option> <option role="double-dash">echo</option></term>
<listitem><para>Setting to true will echo the command line statement on the
standard output. Default is false.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>t</option> <option role="double-dash">terse</option></term>
<listitem><para>Setting to false displays detailed database information. Default
is false.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Using the start-database command</title>
<para>The following command starts Java DB on the host host1 and port 5001:</para>
<screen>asadmin> <userinput>start-database --dbhost host1 --dbport 5001 --terse=true
</userinput>
Starting database in the background.  Log redirected to /opt/SUNWappserver/javdb/derby.log.

</screen>
</example>
</refsect1>
<refsect1 role="exit-status"><title></title>
<para>The exit status applies to errors in executing the <command>asadmin</command> command.
For information on database errors, see the <filename>derby.log</filename> file.</para>
<variablelist termlength="medium">
<varlistentry><term>0</term>
<listitem><para>command executed successfully</para>
</listitem>
</varlistentry>
<varlistentry><term>1</term>
<listitem><para>error in executing the command</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="asrefman" targetptr="stop-database-1">stop-database(1)</olink></para>
</refsect1>
</refentry>
