<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!ENTITY metainfo SYSTEM "metainfo.sgm">
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
<!ENTITY Dash "&ndash;">
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<refentry id="start-database-1">
<refmeta><refentrytitle>start-database</refentrytitle><manvolnum>1</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="start-database">start&ndash;database &mdash;
starts the bundled Java DB</primary></indexterm><indexterm><primary sortas="starts the bundled Derby database">
starts the bundled Java DB &mdash; start-database</primary></indexterm><refname>
start-database</refname><refpurpose>starts the Java DB</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>start-database</command><arg>&Dash;&Dash;dbhost <replaceable>
0.0.0.0</replaceable></arg><arg>&Dash;&Dash;dbport <replaceable>1527</replaceable></arg>
<arg>&Dash;&Dash;dbhome <replaceable>DERBY_INSTALL</replaceable></arg><arg>&Dash;&Dash;echo=<replaceable>
false</replaceable></arg><arg choice="opt">&Dash;&Dash;terse=<replaceable>
false</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>The <command>start-database</command> 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 command only for working with applications
deployed to the Application Server. Java DB 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. When <option>dbhome</option> is not specified, the
default is the value of DERBY_INSTALL, which defaults to <replaceable>install-dir
</replaceable><literal>/javadb</literal>. It is important to use the <literal>
dbhome</literal> option when you want to create the database files at a particular
location. <?Pub Caret>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><title>&opts-tt;</title>
<variablelist termlength="medium">
<varlistentry><term><option role="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&Dash;dbhome</option></term>
<listitem><para>The absolute path to the directory where Java DB and the <literal>
derby.log</literal> files are created. The default is DERBY_INSTALL.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;e</option> <option role="nodash">&Dash;&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 role="nodash">&Dash;t</option> <option role="nodash">&Dash;&Dash;terse
</option></term><listitem><para>Setting to false displays detailed database
information. Default is false.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&exam-tt;</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><title>&exit-tt;</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><title>&also-tt;</title>
<para><link linkend="stop-database-1"><citerefentry><refentrytitle>stop-database
</refentrytitle><manvolnum>1</manvolnum></citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000005805>
