question

OracleApprender avatar image
OracleApprender asked

How can we view the PL/SQL errors?

After compiling a PL/SQL package we got few errors, how would we view these errors? And command for this ?

queryoracleplsql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dmann avatar image
dmann answered

Depends on the tool you are using.

If you are using SQLPLUS and you commit code to the database and it complains about errors, just use this command:

SHOW ERRORS

If you are looking for invalid objects in the database you can always run a query against DBA_OBJECTS:

SELECT OBJECT_NAME, OBJECT_TYPE FROM DBA_OBJECTS WHERE STATUS='INVALID';

If you are using a graphical tool (like Toad, SQL Developer) you can usually browse for invalid pl/sql objects (usually indicated with a "Red X" next to it in the pick lists). Open the object, run the compile command, and the tool will usually show you exactly where there error is and a short description about it.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

SQL Tools seems to pinpoint errors, too.
0 Likes 0 ·
Toad shows the error messages in-line in the editor. If you click on the error, it takes you to the line:cur pos. IF you dbl-clicj you get help on the error.
0 Likes 0 ·
OracleApprender avatar image
OracleApprender answered

dmann's answer for this question is correct. SHOW ERRORS is working fine.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.