SqlDbx Forum

SqlDbx

You are not logged in.

#1 2011-02-14 15:15:24

Teo
Member

"show errors" command. Is it possible?

Is there any way in SQLDbx to execute "show errors" command after unsuccessful compilation?

Offline

#2 2011-02-16 00:19:20

sqldbxhelp
Administrator

Re: "show errors" command. Is it possible?

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

#3 2011-02-16 05:32:05

Teo
Member

Re: "show errors" command. Is it possible?

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

#4 2011-02-16 07:41:49

sqldbxhelp
Administrator

Re: "show errors" command. Is it possible?

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

#5 2011-02-16 08:13:19

Teo
Member

Re: "show errors" command. Is it possible?

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

#6 2011-02-16 10:39:27

sqldbxhelp
Administrator

Re: "show errors" command. Is it possible?

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

#7 2011-02-16 10:46:06

Teo
Member

Re: "show errors" command. Is it possible?

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

#8 2011-02-16 12:35:08

sqldbxhelp
Administrator

Re: "show errors" command. Is it possible?

Thank you for your help. This issue will have to be investigated further.

Offline

#9 2011-02-17 00:00:26

sqldbxhelp
Administrator

Re: "show errors" command. Is it possible?

Can you please check if below query displays errors.
SELECT LINE, TEXT FROM ALL_ERRORS WHERE NAME = 'procedure_name'

Offline

#10 2011-02-17 03:56:52

Teo
Member

Re: "show errors" command. Is it possible?

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

#11 2011-02-17 16:55:10

sqldbxhelp
Administrator

Re: "show errors" command. Is it possible?

Thank you very much for your help. This will be fixed in a next release

Offline

#12 2011-02-18 02:01:12

Teo
Member

Re: "show errors" command. Is it possible?

Thanks a lot, that would really help.

Offline

Board footer

Powered by FluxBB