What is the timestamp mode of remote dependency?
What is the timestamp mode of remote dependency?
Rating:
The timestamp mode of remote dependency is one of the two remote dependency modes that are used by Oracle server to manage remote dependencies among objects. This is the default mode of remote dependency, i.e., if a remote dependency mode is not explicitly specified, Oracle server uses the timestamp mode. However, the REMOTE_DEPENDENCIES_MODE parameter can be set to TIMESTAMP in order to explicitly specify the timestamp mode.
When the timestamp mode of remote dependency is used, each PL/SQL program unit carries a timestamp that is set by Oracle server when the unit is created or recompiled. Whenever a PL/SQL program or a relevant schema object is altered, all of its dependent program units are marked as invalid and must be recompiled before they can be executed.
When a procedure compiles, Oracle server records the timestamp of that compilation within the P code of the procedure. When a local procedure referencing a remote procedure compiles, Oracle server also records the timestamp of the remote procedure into the P code of the local procedure.
When the local procedure is invoked, Oracle server compares the two timestamps of the referenced remote procedure. If the timestamps are equal (indicating that the remote procedure has not recompiled), Oracle server executes the local procedure. If the timestamps are not equal (indicating that the remote procedure has recompiled), Oracle server invalidates the local procedure and returns a runtime error.
Rating:
Other articles
- What is dynamic SQL?
- What is the syntax for creating an INSTEAD OF trigger?
- What is the DBMS_OUTPUT Oracle supplied package?
- What is the EXECUTE IMMEDIATE statement?
- What are the different subprograms provided with the DBMS_JOB Oracle supplied package?