Applies to:PL/SQL - Version: 18.104.22.168 to 22.214.171.124 - Release: to 11.1
Information in this document applies to any platform.
Checked for relevance on 25-Feb-2010
When a local piece of PL/SQL references a remote package, function, or procedure, the local PL/SQL engine needs to know if the reference is still valid, or, if the remote procedure has changed.
The locally compiled PL/SQL code is 'dependent' on the remote code. The following two models can be used in Oracle to track this dependency:
The method used is determined by the server initialization <Parameter:REMOTE_DEPENDENCIES_MODE>. This can be set at the instance (initSID.ora) or session (ALTER SESSION) level.
Additionally, we allow 'runtime binding' which allows client PLSQL to delay the actual binding up of a reference to a SCHEMA.OBJECT.
The 'signature' basically means the interface (procedure name, parameter types or modes) is the same, even if the underlying implementation has changed.
A description of the factors that the SIGNATURE depends on can be found in Chapter 7 of the Oracle Application Developers Guide in the section on Remote Dependencies (up to Version 10.1) or in Chapter 6 of the Oracle Database Concepts guide (Version 10.2 onwards). It is important to read this section because a few disadvantages exist to using a SIGNATURE dependency model.
The main disadvantage is that a few changes to a stored package / procedure require manual recompilation of the calling PL/SQL. For example, if an overloaded version of an existing procedure is added, then the caller still uses the original version until the caller is recompiled.
In the case of server to server calls, the local PL/SQL block is implicitly recompiled on the next call after an ORA-4062 error. In the case of client tools to server calls, the client Form or Report usually needs to be recompiled explicitly.
Client tools, such as Developer, attempt to use SIGNATURE mode by issuing 'ALTER SESSION' statements. Therefore, the init.ora parameter setting is over-ridden for these products (provided users have the 'ALTER SESSION' privilege).
For example, if the remote procedure contains a definition MYPROC( A NUMBER ),and this is changed to MYPROC( A NUMBER, B NUMBER ), the signature has changed. Therefore, it is expected behaviour that any PL/SQL calling MYPROC must be recompiled.
Many Oracle tools which include a client-side PL/SQL engine issue an
'ALTER SESSION SET REMOTE_DEPENDENCIES_MODE=SIGNATURE'
statement to set the SIGNATURE dependency model. Errors from issuing this statement may be silently ignored. For example, if a user does not have the 'ALTER SESSION' privilege, then the REMOTE_DEPENDENCIES_MODE is left at the default mode (taken from the init.ora parameter setting).
Bug 5249142 ORA-04062: signature of package "SYS.UTL_RAW" has been changed
If the signature changes, an ORA-4062 error is correctly signaled. For client PL/SQL objects, changes to a signature require the client form or report to be recompiled. This is correct behaviour.