Have you gotten the ORA-20000 error when working with Oracle PL/SQL? Learn what causes it and how to resolve it in this article.
The ORA-20000 error code is displayed when there is some PL/SQL code that calls RAISE_APPLICATION_ERROR.
Also, the code is displayed along with another, more helpful, error code.
Similar to the ORA-06550 error, the ORA-20000 error often has another error that is the cause of this error.
There are a few common errors that appear when you see the ORA-20000 error, so I’ll mention them here.
ORA-20000 Solution: ORA-10027
Often, the ORA-20000 error is accompanied by the ORA-10027 error:
ORA-20000: ORA-10027: buffer overflow, limit of 2000 bytes
The ORA-20000 error occurs when using the DBMS_OUTPUT package. This package has all kinds of default buffer sizes, the values of which depend on your version of Oracle.
This example shows that the buffer limit is 2000 bytes, which means you can only output 2000 bytes at a time.
When the ORA-10027 error happens, it means that you have tried to output something that is more than the buffer limit.
To resolve this error, you can increase the buffer limit:
This increases it to 10,000 bytes. You can increase it up to 1,000,000 bytes:
Other Solutions of ORA-20000
Because ORA-20000 is such a generic error and is always accompanied by another error, focus on those errors first.
You can read my guide to the Oracle errors here to find out how to resolve all of the Oracle errors.
Lastly, if you enjoy the information and career advice I’ve been providing, sign up to my newsletter below to stay up-to-date on my articles. You’ll also receive a fantastic bonus. Thanks!