Program Units and Referenced Objects (244)

tsinglee發表於2007-11-25

Oracle automatically invalidates a program unit when the definition of a referenced
object is altered. For example, assume that a standalone procedure includes several
statements that reference a table, a view, another standalone procedure, and a public
package procedure. In that case, the following conditions hold:
■ If the referenced table is altered, then the dependent procedure is invalidated.
■ If the base table of the referenced view is altered, then the view and the dependent
procedure are invalidated.
■ If the referenced standalone procedure is replaced, then the dependent procedure
is invalidated.
■ If the body of the referenced package is replaced, then the dependent procedure is
not affected. However, if the specification of the referenced package is replaced,
then the dependent procedure is invalidated. This is a mechanism for minimizing
dependencies among procedures and referenced objects by using packages.
■ Whenever you create a table, index, and view, and then drop the table, all objects
dependent on that table are invalidated, including views, packages, package
bodies, functions, and procedures.

程式結構和引用物件
1. 如果引用包體被替換,則依賴過程不受影響。但是當引用包的宣告被替換後,依賴過程將處於無效狀態

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-984628/,如需轉載,請註明出處,否則將追究法律責任。

相關文章