oracle tutorial webinars

ORA-02063: Preceding String Error

Sometimes an error crops up in Oracle that seems to have no solution of its own. Instead, these errors tag along with other errors in a quest to halt databases and frustrate database managers. The ORA-02063 is one of these followers – an error with an abstract cause, little information for its solution and a set of errors that accompany it. However, just as with any error, there is a way to tackle this error.

The Problem

The Oracle docs state that the ORA-02063 error, “preceding stringstring from stringstring”, is caused by an Oracle error that is received from a remote database link. The My Oracle Support Community (MOSC) gives a description of the ORA-02063 error, saying that it happens when “you want to query or update a remote table and receive the following error”:

ORA-02063: preceding line from <name of a database link>
This notes that the error can typically occur in response to an error at a remote database or table. In fact, when an error is generated at a remote database it usually is accompanied by an ORA-02063.

One interesting note is that the ORA-02063 typically pops up in conjunction with the ORA-02042 error, so we should talk a little more about the ORA-02042 error for a moment to establish a strong background. The ORA-02042 is an error caused by too many distributed transactions; we will speak more about what these are momentarily. The cause of this error is that the distributed transaction table was full due to too many distributed transactions remaining active.  Let’s now turn to what steps can be taken to develop a solution to these errors and see how fixing one error can possibly correct the other.

The Solution

The unfortunate aspect of an error like the ORA-02063 is that, due to its often-nebulous origins, it can be unclear about how to proceed and develop a quick and simple solution to the problem. In this case, the advice aligns pretty well with Oracle Docs. Their suggestion for action is to “refer to the preceding error message”, which can be an admittedly frustrating solution to the problem. It is also a great piece of advice, and it is in line with our initial recommendation for any error. Check the preceding error, check your logs, go back over the moments just prior to the error occurring and search for anything that may seem abnormal. The preceding error can help provide a bit more evidence and cam possibly pointing to a specific line that is causing the problems.
In practical terms, sometimes the ORA-02063 error happens when a select is issued over a database link and not a distributed transaction. In this case, a solution must be executed at the remote database. When this is the case, the parameter known as distributed_transactions must be increased at the remote database. In what can be a quick solution to the problem, go ahead and increase the distributed_transactions parameter at the local database if the problem does not seem to be based remotely.

What is a ‘distributed transaction’? If working in a distributed environment, when a select is issued in a session without the SET TRANSACTION READ ONLY command, the select query is considered a distributed transaction. This ties back in with the ORA-02042. As probably inferred, we can attack the ORA-02042 in an attempt to uproot the ORA-02063 error. The simple action is to run fewer transactions. We can do this by checking how many concurrent distributed transactions take place, as mentioned above, and employ the workaround of increasing the parameter.
Looking forward

This type of error provides the perfect example of how one small problem can lead to multiple database issues. That is why it is absolutely crucial to take note of any abnormalities in your system, especially in regards to how it is running and bits of code that seem out of place. Taking the time to make an adjustment early is a great habit and can save a lot of grief. For more tips and information on how to develop these types of habits, or for additional support for this error, it is recommended to contact a licensed Oracle consultant.