soa.delete_instances_in_parallel 不适用于所有分区

soa.delete_instances_in_parallel is not working for all the partitions

我们的组织中有 4 个不同的分区。我们希望一次针对一个具有不同保留期的分区。以下 pl/sql 块适用于一个分区,但不适用于其他分区。请指教

PL/SQL块:

DECLARE
max_creation_date timestamp;
min_creation_date timestamp;
batch_size integer;
max_runtime integer;

DOP integer;
max_count integer;
purge_partitioned_component boolean;
SOA_PARTITION_NAME  VARCHAR2(200);

BEGIN
min_creation_date := to_timestamp('2015-01-01','YYYY-MM-DD');
max_creation_date := sysdate - 0;
max_runtime := 60;
batch_size := 10000;
DOP := 3;
max_count := 1000000;
SOA_PARTITION_NAME := 'default'; --define multiple partitions
DEV_SOAINFRA.soa.delete_instances_in_parallel (
min_creation_date => min_creation_date,
max_creation_date => max_creation_date,
batch_size => batch_size,
max_runtime => max_runtime,
DOP => DOP,
max_count => max_count,
SOA_PARTITION_NAME => SOA_PARTITION_NAME
);
END;

谢谢。

正如您从块本身看到的那样,它有一个 "partition" 选项。 "SOA_PARTITION_NAME := 'default'; "

使用下面的脚本,调用时请指定 SOA_PARTITION_NAME

DECLARE
max_creation_date timestamp;
min_creation_date timestamp;
batch_size integer;
max_runtime integer;

DOP integer;
max_count integer;
purge_partitioned_component boolean;
SOA_PARTITION_NAME  VARCHAR2(200);

BEGIN
min_creation_date := to_timestamp('2015-01-01','YYYY-MM-DD');
max_creation_date := sysdate - 0;
max_runtime := 60;
batch_size := 10000;
DOP := 3;
max_count := 1000000;
SOA_PARTITION_NAME := SOA_PARTITION_NAME; --define multiple partitions
DEV_SOAINFRA.soa.delete_instances_in_parallel (
min_creation_date => min_creation_date,
max_creation_date => max_creation_date,
batch_size => batch_size,
max_runtime => max_runtime,
DOP => DOP,
max_count => max_count,
SOA_PARTITION_NAME => SOA_PARTITION_NAME
);
END;

您可以将其设为变量并直接调用此程序包,或从调度中的 OSB 或 SOA 调用。

希望对您有所帮助。