# SYSCS_UTIL.SYSCS_FREEZE_DATABASE system procedure

The `SYSCS_UTIL.SYSCS_FREEZE_DATABASE` system procedure temporarily freezes the database for backup.

See "Using operating system commands with the freeze and unfreeze system procedures to perform an online backup" in the Derby Server and Administration Guide for more information on using this procedure.

## Syntax

    SYSCS_UTIL.SYSCS_FREEZE_DATABASE()

No result set is returned by this procedure.

## Execute privileges

If authentication and SQL authorization are both enabled, only the database owner has execute privileges on this procedure by default. See "Configuring user authentication" and "Configuring user authorization" in the Derby Security Guide for more information. The database owner can grant access to other users.

## Example

    String backupdirectory = "c:/mybackups/" + JCalendar.getToday();
    CallableStatement cs = conn.prepareCall
    ("CALL SYSCS_UTIL.SYSCS_FREEZE_DATABASE()");
    cs.execute();
    cs.close();
    // user supplied code to take full backup of "backupdirectory"
    // now unfreeze the database once backup has completed:
    CallableStatement cs = conn.prepareCall
    ("CALL SYSCS_UTIL.SYSCS_UNFREEZE_DATABASE()");
    cs.execute();
    cs.close();

Parent topic: Built-in system procedures
Related reference
SYSCS_UTIL.SYSCS_CHECK_TABLE system function
SYSCS_UTIL.SYSCS_BACKUP_DATABASE system procedure
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_NOWAIT system procedure
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE system procedure
SYSCS_UTIL.SYSCS_BACKUP_DATABASE_AND_ENABLE_LOG_ARCHIVE_MODE_NOWAIT system procedure
SYSCS_UTIL.SYSCS_UNFREEZE_DATABASE system procedure