Database Connection URL Attributes
Page 13 of 17

shutdown=true

Function

Shuts down the specified database if you specify a databaseName. (Reconnecting to the database reboots the database.)

Shuts down the database of the current connection if you use it in conjunction with the current=true attribute (the entire call to DriverManager must be executed within an SQL-J statement).

Shuts down the entire Cloudscape system if and only if you do not specify a databaseName or current=true.

When you are shutting down a single database, it lets Cloudscape perform a final checkpoint on the database.

When you are shutting down a system, it lets Cloudscape perform a final checkpoint on all system databases, deregister the JDBC driver, and shut down within the JVM before the JVM exits. A successful shutdown always results in an SQLException indicating that Cloudscape has shut down and that there is no connection. Once Cloudscape is shut down, you can restart it by reloading the driver. For details on restarting Cloudscape, see Shutting Down the System in the Cloudscape Developer's Guide.

Checkpointing means writing all data and transaction information to disk so that no recovery needs to be performed at the next connection.

Used to shut down the entire system only when it is embedded in an application. Shut down a server framework the prescribed way; see the Cloudscape Server and Administration Guide.

NOTE: Any request to the DriverManager with a shutdown=true attribute raises an exception.

You can issue the DriverManager.getConnection request with a shutdown=true attribute within a connection, and thus within an SQL-J statement:

-- shuts down current database
CALL (CLASS java.sql.DriverManager).getConnection(
    'jdbc:cloudscape:;current=true;shutdown=true');

Combining with Other Attributes

Combine with current=true to shut down the current database.

When not combined with other attributes or databaseName, it shuts down the Cloudscape system.

Example

-- shuts down entire system
jdbc:cloudscape:;shutdown=true

-- shuts down salesDB
jdbc:cloudscape:salesDB;shutdown=true

-- shuts down current database
jdbc:cloudscape:;current=true;shutdown=true