jdbc:derby:;shutdown=trueA successful
shutdown always results in an SQLException to indicate that has
shut down and that there is no other exception.
You can also shut down
an individual database if you specify the databaseName. You can shut
down the database of the current connection if you specify the default connection
instead of a database name (within an SQL statement).
// shutting down a database from your application
DriverManager.getConnection(
"jdbc:derby:sample;shutdown=true");
If user
authentication
and
SQL authorization
are both enabled, only the
database owner
can shut down the database.
// shutting down an authenticated database as database owner
DriverManager.getConnection(
"jdbc:derby:securesample;user=joeowner;password=secret;shutdown=true");