background image
<< Built-in system procedures | DELETE_ARCHIVED_LOG_FILES >>

SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE

<< Built-in system procedures | DELETE_ARCHIVED_LOG_FILES >>
Derby Reference Manual
155
An input argument of type VARCHAR(32672) that specifies the path to a directory,
where the backup should be stored. Relative paths are resolved based on the current
user directory,
user.dir
, of the JVM where the database backup is occurring.
Relative paths are not resolved based on the derby home directory. To avoid
confusion, use the absolute path.
Execute privileges
If authentication and SQL authorization are both enabled, only the
database owner
has
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
The following example backs up the database to the
c:/backupdir
directory:
CallableStatement cs = conn.prepareCall
("CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE_NOWAIT(?)");
cs.setString(1, "c:/backupdir");
cs.execute();
cs.close();
SQL example
The following example backs up the database to the
c:/backupdir
directory:
CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE_NOWAIT('c:/backupdir');
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE
system procedure
The
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE
system procedure backs up the database to a specified backup directory and enables the
database for log archive mode.
Syntax
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE
(IN BACKUPDIR VARCHAR(32672), IN SMALLINT DELETE_ARCHIVED_LOG_FILES)
No result is returned from the procedure.
BACKUPDIR
An input argument of type VARCHAR(32672) that specifies the path to a directory,
where the backup should be stored. Relative paths are resolved based on the current
user directory,
user.dir
, of the JVM where the database backup is occurring.
Relative paths are not resolved based on the derby home directory. To avoid
confusion, use the absolute path
DELETE_ARCHIVED_LOG_FILES
If the input parameter value for the DELETE_ARCHIVED_LOG_FILES parameter is a
non-zero value, online archived log files that were created before this backup will be
deleted. The log files are deleted only after a successful backup.
Execute privileges
If authentication and SQL authorization are both enabled, only the
database owner
has
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