Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get information about compile error in Oracle/TOAD

Tags:

oracle

toad

I'm using TOAD to develop a stored function in an Oracle database. When I click the "run as script" button in TOAD, it tells me that the script was executed with 0 errors and 1 compile errors. Where do I see the specific compile error(s). I'm fairly new to TOAD so I might be missing something obvious about the interface like a tab/window to see such error messages.

like image 527
Shane Wealti Avatar asked Aug 10 '11 15:08

Shane Wealti


People also ask

How do I find the compilation error in SQL?

After you use the CREATE command to create a stored procedure, a message is displayed if the stored procedure has any compilation errors. To see the errors, you use SHOW ERRORS. When you specify SHOW ERRORS with no arguments, SQL*Plus shows compilation errors for the most recently created or altered stored procedure.

How do I see compilation errors in PL SQL Developer?

Add 'show errors' after the create or replace, and use F5 instead of Ctrl+Enter. This will run the entire script, and ask Oracle to show us any errors for the session.

How do you check for errors in PL SQL?

Answer: When you run PL/SQL the code is interpreted at runtime, and you may see these types of errors: Syntax errors: These are indicated by the "Warning: Procedure created with compilation errors" message. You can display the error with the "show errors" SQL*Plus command).

Why do I get compile error?

Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors in the code, or, more unusually, due to errors in the compiler itself. A compilation error message often helps programmers debugging the source code.


2 Answers

You can either add SHOW ERRORS to the end of the script, which will print the error message(s) to the "script output" tab, or compile the function using the "Execute Statement" command in Toad, which will cause the errors to be displayed in a box at the bottom of the editor.

like image 97
Allan Avatar answered Sep 23 '22 04:09

Allan


Or you can look in USER_ERRORS table afterwards

like image 37
Gary Myers Avatar answered Sep 24 '22 04:09

Gary Myers