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.
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.
The following example backs up the database to the c:/backupdir directory:
CallableStatement cs = conn.prepareCall ("CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE(?, ?)"); 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('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('c:/backupdir', 1)