dsmDeleteObj
The dsmDeleteObj function call inactivates backup objects, deletes backup objects, or it deletes archive objects in storage. The dtBackup type inactivates the currently active backup copy only. The dtBackupID type removes from the server whichever object ID is specified. Call this function from within a transaction.
See dsmBeginTxn for more information.
Before you send dsmDeleteObj, send the query sequence that is described in Querying the IBM Storage Protect system to obtain the information for delInfo. The call to dsmGetNextQObj returns a data structure named qryRespBackupData for backup queries or qryRespArchiveData for archive queries. These data structures contain the information that you need for delInfo.
The value of maxObjPerTxn determines the maximum number of objects that you can delete in a single transaction. To obtain this value, call dsmQuerySessInfo.
Syntax
dsInt16_t dsmDeleteObj (dsUint32_t dsmHandle,
dsmDelType delType,
dsmDelInfo delInfo) Parameters
- dsUint32_t dsmHandle (I)
- The handle that associates this call with a previous dsmInitEx call.
- dsmDelType delType (I)
- Indicates what type of object (backup or archive) to delete. Possible
values include:
Name Description dtArchive The object to delete was previously archived. dtBackup The object to inactivate was previously backed up. dtBackupID The object to delete was previously backed up. Restriction: Using this delType with objID removes the backup object from the server. Only an owner of an object can delete it.You can delete any version (active or inactive) of an object. The server reconciles the versions. If you delete an active version of an object, the first inactive version becomes active. If you delete an inactive version of an object, all older versions will advance. The node must be registered with backDel permission.
- dsmDelInfo delInfo (I)
- A structure whose fields identify the object. The fields are different,
depending on whether the object is a backup object or an archive object. The
structure to inactivate a backup object,
delBack, contains the object name and the object copy group. The structure for an archive object,delArch, contains the object ID.The structure to remove a backup object,
delBackID, contains the object ID.
Return codes
The return code numbers are provided in parentheses ( ).
| Return code | Explanation |
|---|---|
| DSM_RC_FS_NOT_REGISTERED (2061) | File space name is not registered. |
| DSM_RC_WRONG_VERSION_PARM (2065) | Application client API version is different from the IBM® Storage Protect library version. |