The SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT system procedure backs up the database to a specified backup directory and enables the database for log archive mode.
This procedure returns an error if there are any transactions in progress that have unlogged operations at the start of the backup, instead of waiting for those transactions to complete.
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT (IN BACKUPDIR VARCHAR(32672), IN SMALLINT DELETE_ARCHIVED_LOG_FILES)
No result is returned from the procedure.
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.
The following example backs up the database to the c:/backupdir directory and enables log archive mode:
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();
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)
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT('c:/backupdir', 1)