<!--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="stop-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="">
<!-- @(#)stop-database.1 1.9 07/04/25 SMI; -->
<refmeta><refentrytitle>stop-database</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">30 Jan 2007</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>stop<option>database</option></primary>
</indexterm><indexterm><primary>stops the bundled Java DB</primary></indexterm>
<refname>stop-database</refname><refpurpose>stops Java DB</refpurpose>
</refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>stop-database</command>  [<option role="double-dash">dbhost</option> <replaceable>
0.0.0.0</replaceable>] [<option role="double-dash">dbport</option> <replaceable>1527
</replaceable>]</synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>The <command>stop-database</command> <?Pub Caret>command stops a process
of the Java DB server. Java DB is based upon Apache Derby. The database is
typically started with the <command>asadmin start-database</command> command.
Note that a single host can have multiple database server processes running
on different ports. This command stops the database server process for the
specified port only. </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>stop-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. The default is 1527.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Using the stop-database command</title>
<para>The following command stops Java DB on the host host1 and port 5001:</para>
<screen>asadmin> <userinput>stop-database --dbhost host1 --dbport 5001</userinput>
Connection obtained for host: host1, port number 5001.
Shutdown successful.
Command stop-database executed successfully.</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.
This file is located in the directory you specified using the <literal>dbhome</literal> option
when you ran <literal>start-database</literal>, or if you did not specify <literal>
dbhome</literal>, the value of DERBY_INSTALL, which defaults to <replaceable>install-dir
</replaceable><literal>/javadb</literal>.</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="start-database-1">start-database(1)</olink></para>
</refsect1>
</refentry>
