DB2® Advanced Copy Services (ACS) API functions return a defined set of possible return codes.
Return code | Description |
---|---|
DB2ACS_RC_OK | The operation was successful. |
DB2ACS_RC_LINK_EXIST | The session was previously activated. |
DB2ACS_RC_COMM_ERROR | There was a communication error with a storage device, such as a tape drive. |
DB2ACS_RC_INV_VERSION | The version of the database manager's DB2 ACS library and the version of the DB2 ACS API driver are not compatible. |
DB2ACS_RC_INV_ACTION | The database manager requested an action from the DB2 ACS API driver that is invalid. |
DB2ACS_RC_NO_DEV_AVAIL | There is currently no storage device, such as a tape drive, available to use. |
DB2ACS_RC_OBJ_NOT_FOUND | The DB2 ACS API driver could not find the snapshot backup object specified by the database manager. |
DB2ACS_RC_OBJS_FOUND | The DB2 ACS API driver found more than one snapshot backup object that matches the specification given by the database manager. |
DB2ACS_RC_INV_USERID | The database manager passed an invalid user id to the DB2 ACS API driver. |
DB2ACS_RC_INV_PASSWORD | The database manager passed an invalid password to the DB2 ACS API driver. |
DB2ACS_RC_INV_OPTIONS | The database manager specified invalid options. |
DB2ACS_RC_INIT_FAILED | The database manager attempted to initialize a DB2 ACS session, but the initialization failed. |
DB2ACS_RC_INV_DEV_HANDLE | The database manager passed a storage device handle that is invalid. |
DB2ACS_RC_BUFF_SIZE | The database manager specified a buffer size that is invalid. |
DB2ACS_RC_END_OF_DATA | The DB2 ACS API driver cannot find any more snapshot backup objects. |
DB2ACS_RC_END_OF_TAPE | The storage device unexpectedly reached the end of tape backup media. |
DB2ACS_RC_DATA_RESEND | A storage device, such as a tape drive, requested that the database manager resend the most recent buffer of data. |
DB2ACS_RC_COMMIT_FAILED | The DB2 ACS API driver could not commit a transaction. |
DB2ACS_RC_DEV_ERROR | There was an error with a storage device, such as a tape drive. |
DB2ACS_RC_WARNING | The storage hardware returned a warning. Look in the database manager diagnostic logs for more information. |
DB2ACS_RC_LINK_NOT_EXIST | The session was not activated previously. |
DB2ACS_RC_MORE_DATA | There is more data to be transferred from the storage location to the database manager. |
DB2ACS_RC_ENDOFMEDIA_NO_DATA | The storage device reached the end of the storage media without finding any data. |
DB2ACS_RC_ENDOFMEDIA | The storage device reached the end of the storage media. |
DB2ACS_RC_MAX_LINK_GRANT | The maximum number of links has been established. The database manager cannot establish more links. |
DB2ACS_RC_IO_ERROR | The DB2 ACS API driver encountered an error resulting from input or output operations. |
DB2ACS_RC_DELETE_FAILED | The DB2 ACS API driver could not successfully delete snapshot backup objects specified by the database manager. |
DB2ACS_RC_INV_BKUP_FNAME | The database manager specified an invalid filename for the snapshot backup object. |
DB2ACS_RC_NOT_ENOUGH_SPACE | The DB2 ACS API driver estimated that there is not enough storage space to perform a snapshot backup of the database specified by the database manager. |
DB2ACS_RC_ABORT_FAILED | The database manager attempted to abort a DB2 ACS operation, but the attempt to abort failed. |
DB2ACS_RC_UNEXPECTED_ERROR | The DB2 ACS API driver encountered a severe, unknown error. |
DB2ACS_RC_NO_DATA | The DB2 ACS API driver did not return any data to the database manager. |
DB2ACS_RC_OBJ_OUT_OF_SCOPE | The database manager attempted to perform a DB2 ACS operation on a recovery object that is not managed by the DB2 ACS API driver. |
DB2ACS_RC_INV_CALL_SEQUENCE | The database manager made calls to DB2 ACS API functions in a sequence that is invalid. For example, the database manager must call db2ACSInitialize before calling any other DB2 ACS API function except db2ACSQueryAPIVersion. |
DB2ACS_RC_SHARED_STORAGE_GROUP | The database manager attempted to perform a snapshot operation against a storage object that is being used by another database or application. |
The db2ACS_ReturnCode data structure contains diagnostic information (specifically a return code and message text) that help you determine why an error occurred and what to do about it. This information is written to the db2diag.log file. You should consult the db2diag.log file because the reason code returned with the standard message might not be accurate. Table 2 contains a list of the return codes that you might see for snapshot operations using a custom script.
Return code | Error condition | User response |
---|---|---|
1 | Memory allocation failed | Free up memory on the system. |
2 | Options missing | Provide at least the name of the script to the library. |
3 | Key not found | The backup image presented by the protocol file is no longer usable. Move the protocol file away. |
4 | Checksum mismatch | The backup image presented by the protocol file is no longer usable. Move the protocol file away |
5 | Meta data read failed | The backup image presented by the protocol file is no longer usable. Move the protocol file away |
6 | Reading of one protocol file failed | Ensure that the userid issuing the operation is allowed to read the protocol file. |
7 | Writing to the protocol file failed | Ensure that there is enough free space available in the file system, and check other circumstances that can cause the flush to fail. |
8 | Repository check failed | Ensure that the repository path exists and the userid issuing the operation can read and write to this path. |
9 | Script check failed | Ensure that the script exists and the userid issuing the operation is allowed to read and execute the script. |
10 | Opening of a protocol file candidate during query, restore, or delete failed | Check the privileges of all files, particularly the one reported in the db2diag.log file. |
11 | Closing of protocol file failed | Ensure that the file system of the protocol file repository has enough space. |
12 | Pipe open failed | Ensure that the operating system has enough resources. |
13 | Pipe close failed | Ensure that the operating system has enough resources. |
14 | Script failed with given return code | Check the return code of the script; this information can be found in the db2diag.log file. |
15 | Wrong object type | Rerun the operation. |
16 | Reading of the options file failed | Check the options file. |
17 | Closing of the options file failed | Check the operating system. |
18 | Wrong query type | Rerun the operation. |
19 | Option length too long | Reduce the number of options that you specify. |