Tivoli Header

Tivoli Storage Manager Using the Application Program Interface

dsmDeleteObj

The dsmDeleteObj function call inactivates backup objects, deletes backup objects, or 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 TSM 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.

Note:
Your node must have the appropriate permission that your TSM administrator set. To delete archive objects, you must have archive delete authority. You do not need backup delete authority to inactivate a backup object.

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:
dtArchive The object to delete previously was archived.
dtBackup The object to inactivate previously was backed up.
dtBackupID The object to delete previously was backed up.

To use this delete type, you must have a TSM server, version 3.7.04 or later.

Attention: 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 ( ).

Table 22. Return Codes for dsmDeleteObj

Return Code Explanation
DSM_RC_FS_NOT_REGISTERED (2061) Filespace name is not registered.
DSM_RC_WRONG_VERSION_PARM (2065) Application client API version is different from the TSM library version.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]