Local procedure A calls remote procedure B. Procedure B was compiled at 8 A.M. Procedure A
was modified and recompiled at 9 A.M. Remote procedure B was later modified and recompiled at
11 A.M.
The dependency mode is set to TIMESTAMP.
What happens when procedure A is invoked at 1 P.M?
A.
There is no affect on procedure A and it runs successfully.
B.
Procedure B is invalidated and recompiles when invoked.
C.
Procedure A is invalidated and recompiles for the first time it is invoked.
D.
Procedure A is invalidated and recompiles for the second time it is invoked.
Explanation:
When the local procedure is invoked, at run time the Oracle server compares the two time stamps
of the referenced remote procedure. If the time stamps are equal (indicating that the remote
procedure has not recompiled), the Oracle server executes the local procedure. If the time
stamps are not equal (indicating that the remote procedure has recompiled), the Oracle server
invalidates the local procedure and returns a runtime error.
If the local procedure, which is now tagged as invalid, is invoked a second time, the Oracle server
recompiles it before executing, in accordance with the automatic local dependency mechanism.
So if a local procedure returns a run-time error the first time that it is invoked, indicating that the
remote procedure’s time stamp has changed, you should develop a strategy to re-invoke the local
procedure.