SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE system procedure
Derby Reference Manual
157
CallableStatement cs = conn.prepareCall
("CALL
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT(?,
?)");
cs.setString(1, "c:/backupdir");
cs.setInt(2, 0);
cs.execute();
SQL examples
The following example backs up the database to the
c:/backupdir
directory, enables
log archive mode, and does not delete any existing online archived log files:
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('c:/
backupdir', 0)
The following example backs up the database to the
c:/backupdir
directory and, if this
backup is successful, deletes existing online archived log files:
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('c:/
backupdir', 1)
SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE system procedure
The
SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE
stored procedure removes as
many compiled statements (plans) as possible from the database-wide statement cache.
The procedure does not remove statements related to currently executing queries or to
activations that are about to be garbage collected, so the cache is not guaranteed to be
completely empty after a call to this procedure.
Syntax
SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE()
Execute privileges
If authentication and SQL authorization are both enabled, only the
execute privileges on this procedure by default. See "Enabling user authentication" and
"Setting the SQL standard authorization mode" in the Derby Developer's Guide for more
information. The database owner can grant access to other users.
JDBC Example
CallableStatement cs = conn.prepareCall
("CALL SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE()");
cs.execute();
cs.close();
SQL Example
CALL SYSCS_UTIL.SYSCS_EMPTY_STATEMENT_CACHE();
SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE system procedure
The
SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE
system procedure checkpoints the
database by flushing all cached data to disk.
Syntax
SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE()
No result is returned by this procedure.
Execute privileges