Page 1 of 1

invalid object for describe

Posted: Thu 12 Dec 2019 08:16
by valentl
Hello,
Can I get more information about this error message?
When I try to execute a stored procedure, which is invalid, and cannot be validated, I cannot get any information about that object.

for example Defsession.Execproc('updateemp',[]) I get ORA-24372: invalid object for describe, and nothing more.

Where can I catch the statement, which is executed, or prepared?
on the session.onerror event, I can find nothing.

Re: invalid object for describe

Posted: Fri 13 Dec 2019 12:10
by MaximG
Do you use our product in OCI Mode or Direct Mode? Is 'updateemp' the name of a procedure or a synonym? Please send us the DDL script for creating 'updateemp'.

Re: invalid object for describe

Posted: Sat 14 Dec 2019 13:37
by valentl
I use OCI mode.

The 'updatetemp' is only a sample.
In some circumstances, somethimes procedures are in invalid state, and cannot be validated, for example, parameters of an other procedure has changed.
At this time, if you try to call it from ODAC, you get this error message, and nothing more.

create or replace procedure somethingwrong as
begin
end;
/

If you try to execute it with
DefSession.ExecProc('somethingwrong',[]);

you will get
ORA-24372: invalid object for describe

Re: invalid object for describe

Posted: Mon 16 Dec 2019 13:31
by MaximG
The error ORA-24372 is returned by the Oracle server, not our components. If you would like to get more information about the error in addition to the error message "invalid object for describe", you may contact Oracle support.

Re: invalid object for describe

Posted: Tue 17 Dec 2019 07:15
by valentl
Of course, I know, that there is no more information in the error message, but, is it possible to get any information about the current statement, which caused the problem?
Somewhere, in the Orasession?
I tried to check the SQL and OraSQL property of the Orasession, but these properties are empty.

Re: invalid object for describe

Posted: Tue 24 Dec 2019 17:49
by MaximG
To construct a complete SQL statement for running your stored procedure, we have to describe its parameters, but we can't do that because the server returns the error discussed here and we can't affect this behavior in any way.

Re: invalid object for describe

Posted: Mon 30 Dec 2019 10:34
by valentl
Of course, it is obvious.
My only problem is, that I cannot see, what is the statement, that failed.
If the procedure does not exists, it is not a problem, because I get
ORA-04043: object somethingwrong does not exist

But, as I see, even the dbMonitor does not helps me to find the invalid object, becuase the statement is not monitored, but the error appears at the previous SQL statement. Which, of course, executed without errors.
This is the Delphi code:
osn_piramis.Open;
with TOraQuery.Create(Application) do
try
SQL.Text:='select * from dual';
Open;
Close;
finally
Free;
end;

DefSession.ExecProc('somethingwrong',[]);

This is the db Monitor log.

c:\temp\Project64.exe (host: LSO62-VALENTL.lsoft.hu)
2019. 12. 30. 11:25:59 n/a ODAC monitoring is started Complete
2019. 12. 30. 11:26:00 1,000 Connect: pir2019_meo@fejleszt11n [osn_piramis$B8B71384]
Complete
2019. 12. 30. 11:26:02 0,093 SQL Execute [$062BB1A0] : select * from dual
Complete
2019. 12. 30. 11:26:02 0,016 Object destroyed: TOraQuery ($062BB1A0)Error: ORA-24372: invalid object for describe

Re: invalid object for describe

Posted: Wed 08 Jan 2020 10:19
by MaximG
As we mentioned earlier, the error discussed here occurs when you try to describe parameters while a SQL statement for executing the DefSession.ExecProc method has not been built yet.
Therefore, you only see information about the error returned by the Oracle server in the logs of the dbMonitor tool, and no information about the database object or what causes the error is available in the logs.
Please clarify what solution you suggest and what additional information you'd like to get in dbMonitor?

Re: invalid object for describe

Posted: Wed 08 Jan 2020 10:43
by valentl
Thank you for the answer.
Of course, I understand the problem, the SQL statement to be executed, is not built yet, but an error occurs.
My problem is, that it is not enough information to me, to start the investigation.

Re: invalid object for describe

Posted: Thu 09 Jan 2020 14:07
by MaximG
Please clarify what information you expect from our data access components in this case?

Re: invalid object for describe

Posted: Thu 13 Feb 2020 11:38
by valentl
Hello,

Any information would help.
I've found a "hack".
I wrote a class helper for the EDaError, and I see, that the component property in this case is TORASQL.
This OraSQL component has an FStoredProcName field, which contains the stored procedure name, which I want to execeute, but due to the invalid state, it fails.
I will use this fstoredprocname to make the error message more clear.

Re: invalid object for describe

Posted: Fri 14 Feb 2020 17:21
by MaximG
We are glad that you found a necessary solution. Please don't hesitate to contact us with questions concerning ODAC usage.