Monday, April 23, 2018

ORA-01013: user requested cancel of current operation

If ORA-01013 appears in the alert log file, it would mean that your application is closing a session forcefully and database records this as action canceled by the user/application (as name description of this error suggests). It would mean that most of the time it is not something that can be handled from the database side to stop this message from appearing in the alert log file. But, sometimes this error may be because Oracle internally kills some process that crosses a timeline already defined. In the following I would provide further detail of this.

In applications, sometimes this functionality is added to cancel certain operations if an operation does not return in certain amount of time. For example, I need to cancel a report if it takes longer than 10 minutes. So application will cancel the query running to generate the report (this is just like we cancel some task using CTL+C during our normal computer use). A timeout can also be set at the application server level where application is deployed to cancel the request if it is not returned in a certain amount of time.

In the alert log file, you may also find the name of trace file generated with this error. You can take a look into that trace file for further details. For example, in one of my databases I found in the trace file that operation that was canceled (thus logging ORA-01013 in alert log file) was a query (selet client_name,status from dba_autotask_client).  Since oracle also has internal auto tasks i.e. Optimizer stats collection, space advisor and/or tuning advisor and these tasks run automatically in the background. During execution of autotasks, somehow this query got hung and thus execution was automatically canceled by Oracle and ORA-01013 was logged in the alert log file. Later I found that server’s memory was exhausted and probably that was causing this internal process to fail and return ORA-01013. Once the memory was freed, I stopped receiving this error.

This is just an informative message and nothing specifically you can do about it unless some internal Oracle functionality is failing again and again. You might receive a complaint from the end users about some reports being timed out, and you would need to consult application team to increase the timeout, or further tuning of some process may be needed to have it finished within the application time limits to avoid this cancellation of task.

No comments:

Post a Comment

Popular Posts - All Times