What could be the reason and prerequisites for Error: ORA-01013 user requested cancel of current operation?
Instead of waiting for the completion, Oracle provides the option to cancel running SQL statements. If a running statement is terminated, an ORA-01013 return code is issued by the Oracle. This return code is an information or confirmation message and is not an error.
The error is not logged in the system log or as a short dump by the database interface. There is a technically unavoidable exception while the system is processing a recursive statement if an error ORA-01013 is triggered and by an error ORA-00604, the error ORA-01013 is consequently preceded. In this situation, ORA-00604 is only recognized by the database interface which may be more or less critical, depending on the subsequent error, and in the system log the error is logged or as short dump.
In the SAP environment a termination may occur with an ORA-01013 error due to various reasons:
1. A tool with CTRL-C might have been stopped;
2. With "Stop transaction", a transaction might have been stopped explicitly.
3. Due to rdisp/max_wprun_time, a SAP timeout may occur.
4. 0 may be lower than Oracle <= 8.0.6: SQLNET.EXPIRE_TIME.
How can I get this issue fixed?
1. If the explicit or implicit execution of an SQL statement in tools are terminated such as SVRMGRL, SQLPLUS, SAPDBA, BRBACKUP, BRARCHIVE, BRCONNECT, BRRESTORE or BRRECOVER with CTRL+C, an ORA-01013 error is logged by the system logs. This is not an error and this behavior is normal.
2. In current R/3 Releases, in the upper left corner of the window a running transaction with the "Stop transaction" menu option can be terminated. A "Cancel" command is then send command to the Oracle session with this mechanism which with an ORA-01013 error then terminates. Therefore, if an ORA-01013 error has been logged by the system, the circumstances of the termination should be asked to the relevant user to determine if the message was triggered by another event or if the user has canceled the transaction intentionally.
3. In the SAP environment based on the rdisp/max_wprun_time parameter, if a timeout is triggered, a "Cancel" command is send by the R/3 system to the database session that triggers an error ORA-01013. Therefore, it is essential to check in connection with the ORA-01013 whether lengthy SELECTs have occurred. In the trace of the affected work process, the lengthy statement will also be logged, where necessary. The long-running program should be optimized.
Network problems are the most likely cause if the problem cannot be reproduced.
1. In the sqlnet.ora file a period (in minutes) can be specified with the Oracle Net SQLNET.EXPIRE_TIME parameter, after which automatically an inactive link (for example, following a network problem) is closed. This parameter is set to 0 (that is, it is inactive) in the SAP standard system. As a side effect, a long-lasting but still active session may be terminated with an ORA-01013 error if the parameter is set to a value higher than 0. SQLNET.EXPIRE_TIME should be reset to 0.