| Oracle8i SQL Reference Release 2 (8.1.6) A76989-01 |
|
SQL Statements (continued), 5 of 17
To recompile an invalid standalone stored function. Explicit recompilation eliminates the need for implicit run-time recompilation and prevents associated run-time compilation errors and performance overhead.
The ALTER FUNCTION statement is similar to "ALTER PROCEDURE". For information on how Oracle recompiles functions and procedures, see Oracle8i Concepts.
|
Note:
This statement does not change the declaration or definition of an existing function. To redeclare or redefine a function, use the |
The function must be in your own schema or you must have ALTER ANY PROCEDURE system privilege.
To explicitly recompile the function GET_BAL owned by the user MERRIWEATHER, issue the following statement:
ALTER FUNCTION merriweather.get_bal COMPILE;
If Oracle encounters no compilation errors while recompiling GET_BAL, GET_BAL becomes valid. Oracle can subsequently execute it without recompiling it at run time. If recompiling GET_BAL results in compilation errors, Oracle returns an error, and GET_BAL remains invalid.
Oracle also invalidates all objects that depend upon GET_BAL. If you subsequently reference one of these objects without explicitly recompiling it first, Oracle recompiles it implicitly at run time.
|
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|