ORA-04062: timestamp of package "x" has been changed PDF Print E-mail
All in One - Developer
Written by Administrator   
Thursday, 01 October 2009 12:11

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(package, function, or procedure) is still valid, or, if the remote procedure has changed.

The locally compiled PL/SQL code is dependent on the remote code. This dependency is tracked by two models either TIMESTAMPS OR SIGNATURES in oracle.  

Check it :

SELECT name, value
FROM gv$parameter
WHERE name = 'remote_dependencies_mode';

 

REMOTE_DEPENDENCIES_MODE = Timestamp
The local PL/SQL block can only execute the remote PL/SQL block if the timestamp on the remote procedure matches the timestamp stored in the locally compiled PL/SQL block. If the timestamps do not match, the local PL/SQL must be recompiled.

REMOTE_DEPENCIES_MODE = Signature
The local PL/SQL block can still execute the remote PL/SQL block if its "signature" is the same, even if the timestamp has changed.

The term "signature" basically means the interface (procedure name, parameter types or modes) is the same, even if the underlying implementation has changed.

 
* You can alter the mode dynamically by using the DDL statements. For example, this example alters the dependency model for the current session:

Solution : ALTER SESSION SET REMOTE_DEPENDENCIES_MODE = {SIGNATURE | TIMESTAMP}

Thise example alters the dependency model systemwide after startup:
Solution : ALTER SYSTEM SET REMOTE_DEPENDENCIES_MODE = {SIGNATURE | TIMESTAMP}

 

Last Updated ( Thursday, 01 October 2009 16:20 )