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.
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.
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.
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).
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.
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.
Or you can look in USER_ERRORS table afterwards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With