Expiration/deletion hold and release

You can hold deletion and expiration of specific archive objects in response to a pending or ongoing action that requires that particular data be held. In the event an action is initiated that might require access to data, that data must be available until the action is concluded and access to the data is no longer required as part of that process. After determining that the suspension is no longer required (released), normal deletion and expiration timing resumes per the original retention period.

Before you begin

Verify that the server is licensed by issuing a test dsmRetentionEvent call:
  1. Query for one object you want to hold and get the ID.
  2. Issue the dsmBeginTxn, dsmRetentionEvent with Hold, and dsmEndTxn.
  3. If the server is not licensed, you receive a vote of abort with reason code DSM_RC_ABORT_LICENSE_VIOLATION.
Restrictions:
  1. You cannot issue more than one dsmRetentionEvent call in a single transaction.
  2. You cannot issue a hold on an object that is already under hold.

Procedure

  1. To hold objects, complete the following steps:
    1. Query the server for all the objects that you want to place under hold. Get the object ID for each object.
    2. Issue a dsmBeginTxn call, then issue a dsmRetentionEvent call with the list of objects, followed by a dsmEventType: eventHoldObj call. If the number of objects exceeds the value of maxObjPerTxn, use multiple transactions.
    3. Use the qryRespArchiveData response on the dsmGetNextQObj function call to confirm that the objects are put under hold. Check the value of objHeld in qryRespArchiveData.
  2. To release objects from hold, complete the following steps:
    1. Query the server for all the objects that you want to release from hold. Get the object ID for each object.
    2. Issue a dsmBeginTxn call, then issue a dsmRetentionEvent call with the list of objects, followed by a dsmEventType: eventReleaseObj call. If the number of objects exceeds the value of maxObjPerTxn, use multiple transactions.
    3. Use the qryRespArchiveData response on the dsmGetNextQObj function call to confirm if the objects were released from hold. Check the value of objHeld in qryRespArchiveData.