On May 14, 11:31 am, Dave Hart <david.john.h...@gmail.com> wrote:
> Hi,
> I have a script that has to run in 9i and 10g.  At the end of the
> script the DBMS_UTILITY.COMPILE_SCHEMA procedure gets called to
> recompile the schema.
>
> This works in 10g but not in 9i:
> DBMS_UTILITY.COMPILE_SCHEMA(USER);
>
> In 9i I have to use this syntax (add the EXEC) to get it to run and
> then the script won't compile in 10g:
> EXEC DBMS_UTILITY.COMPILE_SCHEMA(USER);
>
> WHERE:
> USER is the current logged in user.
>
> Is there a way to write this write script so that it will work in both
> databases?
>
> Thanks,
> Dave

I'm lost, apparently, as I cannot get anything to execute in 10g using
the syntax you describe:

SQL*Plus: Release 10.2.0.3.0 - Production on Fri May 15 08:00:49 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

idle> connect *****/&&&&&&&&&&
Connected.
SQL> dbms_utility.compile_schema(USER)
SP2-0734: unknown command beginning "dbms_utili..." - rest of line
ignored.
SQL>

The EXEC instruction is absolutely necessary in 10g to run any package
or procedure outside of PL/SQL.

You need to post this script so we can see what you've written before
anyone can provide insight into your issue.


David Fitzjarrell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to