SqlDbx
You are not logged in.
Pages: 1
Is there any way in SQLDbx to execute "show errors" command after unsuccessful compilation?
Offline
show errors is a SQL* Plus command and not part of Oracle SQL. I am not sure why you need to call it. SqlDbx after detecting compilation error basically emulates this command to display compilation errors
Offline
Just to explain why I need it. Example:
We have and invalid trigger and trying to recompile it. Trigger could not be recompiled due to errors in it and recompilation attempt issuing ORA-24344 - success with compilation error. And that is what I see in SQLDbx. Now, I need to know error details, like LINE/COL ERROR and that is what SQLPlus provides by "show errors" command. Unfortunately as it is impossible in SQLDbx I need to go to SQLPlus and repeat the same recompiling and then retrieve errors. So that is where a nature of my question comes from - just trying to avoid switching between SQLDbx and SQLPlus.
Last edited by Teo (2011-02-16 06:23:52)
Offline
When SqlDbx encounters compilation error it should display error lines.
I am not sure why it does not work in your case.
Can you try to compile invalid procedure or package.
Does SqlDbx correctly displays error in this case?
What version of Oracle you use?
Offline
I've tried to recompile invalid procedure and the output I got is the same:
ALTER PROCEDURE <procedure_name> COMPILE;
ORA-24344: success with compilation error
And that's it.
Oracle version:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
SQLDbx - 3.48
Last edited by Teo (2011-02-16 09:35:43)
Offline
Very strange. I can not reproduce this behavior.
After 24344 error SqlDbx executes following query.
Does it return results in your case.
SELECT LINE, TEXT FROM USER_ERRORS WHERE NAME = 'procedure_name'
Offline
Here is a very simple test case:
I've change "BEGIN" to "BEGIN 1234".
After compile
SELECT LINE, TEXT FROM USER_ERRORS WHERE NAME = 'procedure_name'
Returns nothing
But SQLPlus "show errors" returns:
Warning: Procedure altered with compilation errors.
SQL> show error
Errors for PROCEDURE <name>:
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/9 PLS-00103: Encountered the symbol "1234" when expecting one of
the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "1234" was ignored.
Last edited by Teo (2011-02-16 10:50:05)
Offline
Thank you for your help. This issue will have to be investigated further.
Offline
Can you please check if below query displays errors.
SELECT LINE, TEXT FROM ALL_ERRORS WHERE NAME = 'procedure_name'
Offline
Yes, this one returns almost the same errors details, I've checked with different errors. The only difference I've noticed, that error output missed column line. For the same test case I've got:
====
LINE TEXT
6 PLS-00103: Encountered the symbol "1234" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "1234" was ignored.
====
Notice that SQLPlus returns 6/9 for Line/Col and not just a line. Everything other is the same for different test cases.
Offline
Thank you very much for your help. This will be fixed in a next release
Offline
Thanks a lot, that would really help.
Offline
Pages: 1