Oracle Error ORA-03171: Recovery was terminated during query execution

Oracle Error Message

ORA-03171: Recovery was terminated during query execution

Reason for the Error

Recovery was terminated. A query can ocassionally deadlock when recovery is terminated because it needs a block with changes that are made after the point at which recovery was terminated.

Solution

Retry the query. Avoid cancelling recovery on standby.