ORA-00900: invalid SQL statement error

Sandeep Kumar picture Sandeep Kumar · Feb 27, 2010 · Viewed 18.9k times · Source

While running dbms command

execute dbms_utility.analyze_schema('MCC','ESTIMATE',30);

I got ORA-00900: invalid SQL statement error.

Can anyone tell me what could be the reason?

Answer

FerranB picture FerranB · Feb 27, 2010

The execute sentence is only for SQL*Plus utility.

To call a PLSQL statement from the most of applications/languages you have to try some of the following, It depends on where you are playing:

Option 1. Without /.

begin
  dbms_utility.analyze_schema('MCC','ESTIMATE',30);
end;

Option 2. With /

begin
  dbms_utility.analyze_schema('MCC','ESTIMATE',30);
end;
/