Dropping a partition

The dropPartition command generates a script to drop a partition from the database model and thereby delete all ImageMaster documents contained within the partition. This command can only be used on a list- or range-partitioned database.

The command takes the following required arguments:

dropPartition <name>

Parameter

Description

<name>

The name of the partition to drop

In case of range partitioning, it is only possible to drop the partition at the lower or upper end of the partitioning range. It is impossible to drop a partition between two others.

Table 432: dropPartition command – mandatory arguments

Precondition checks

Dropping a partition deletes all documents and other data stored inside the partition as well. This may lead to problems if there exist references to such documents within the partition to be dropped from outside of the partition. To guard against this, the generated script will contain precondition checks which verify that no such documents exist in the partition. If a precondition check fails, the script execution will abort.

These checks require additional database indices that do not exist in the default database model. Without them, execution of the checks will be slow on large databases. The following options are available:

  • Generate a script to create the needed indices with the --create-check-indices option (see below).

  • Use the --ignore-check-indices option to ignore missing indices and generate the script anyway. This is recommended only for small databases.

  • If it is absolutely sure that a certain check is not needed (for example because the corresponding ImageMaster feature is not used), a check can be excluded from the generated script. The options to disable the checks are described below.

Parameter

Description

--create-check-indices

Generate a script to create additional indices for fast precondition checks (the resulting script will not drop a partition)

--ignore-check-indices

Ignore missing indices for precondition checks (precondition checks may be slow)

--disable-folder-checks

Disable the precondition checks for folder entries

This check ensures that the partition contains no folder entries and no documents referenced by folder entries. Dropping such a partition would render the ImageMaster folder structure unusable. This check may be disabled only if it is otherwise ensured that no such folder entries exist in the database.

--disable-link-checks

Disable the precondition checks for master data links

This check ensures that the partition does not contain any referenced master data documents. Dropping such a partition would render the linked detail documents unusable. This check may be disabled only if it is otherwise ensured that the partition to drop does not contain any master data documents.

--disable-retention-checks

Disable the precondition checks for retention management violations

This check ensures that dropping the partition does not delete any document with active retention management protections. Ignoring this check may delete protected documents, but the database model would remain otherwise intact.

‑‑disable‑singleinstance‑checks

Disable the precondition checks for attachment single instancing

This check ensures that the SingleInstancePartition database option is not enabled in the database model. If this option is enabled, dropping any partition is dangerous because it is impossible to verify if dropped file references may still be needed by single-instanced documents outside of the partition to drop. It is not recommended disabling this check.

--execute-immediately

If specified then the tool directly executes the SQL commands through the JDBC connection of the database.

Table 433: dropPartition command – optional arguments

Note:

Disabling a precondition check can result in invalid references in the database model which will render the involved documents or folder entries unusable. Therefore, much care must be taken when disabling a check to ensure by other means that no document exists which violates any required precondition!

Note:

Dropping a partition only deletes the metadata of the contained ImageMaster documents. The binary objects stored in the corresponding archives are not deleted but any reference to the archived files is lost. Therefore it is recommended organizing the file archives in the same way as the database partitions so the corresponding file archive can be deleted as a whole as well after dropping the partition in the database.