Skip to content

ADD_BACKUP_INC_ITEM

接口/方法功能

备份计划项变更接口,增量备份方式。

接口/方法声明

DBMS_BACKUP.ADD_BACKUP_INC_ITEM(PLANNAME VARCHAR,FILENAME VARCHAR,TIME_OFFSET INTERVAL DAY TO MINUTE,IPERIOD INTERVAL DAY TO MINUTE DEFAULT NULL)

参数说明

参数名称参数类型参数解释默认值
PLANNAMEVARCHAR备份计划名称
FILENAMEVARCHAR备份数据文件名
TIME_OFFSETINTERVAL DAY TO MINUTE相较于备份计划开始时间偏移(单位:分钟),偏移不能超过计划周期
IPERIODINTERVAL DAY TO MINUTE计划执行周期(单位:分钟),参数为NULL时进行全量备份

操作示例

BEGIN
    BEGIN TRANSACTION;
    DBMS_BACKUP.CREATE_PLAN('back1','BAK','/BACKUP','2022-03-10 10:06:22',INTERVAL '1 0:0' DAY TO MINUTE);
    DBMS_BACKUP.ADD_BACKUP_ITEM('back1','all.BAK',INTERVAL '0 0:0' DAY TO MINUTE);
    DBMS_BACKUP.ADD_BACKUP_INC_ITEM('back1',INTERVAL '0 0:1' DAY TO MINUTE,INTERVAL '1 0:0' DAY TO MINUTE);
    COMMIT TRANSACTION;
END;