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. 如果引用包体被替换,则依赖过程不受影响。但是当引用包的声明被替换后,依赖过程将处于无效状态
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-984628/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10599713/viewspace-984628/
本文详细介绍了Oracle数据库中如何自动使程序单元失效的机制。当所引用的对象定义发生更改时,Oracle会自动使相应的程序单元变为无效状态。文章列举了不同情况下程序单元受影响的具体实例,包括表、视图和其他过程等的修改对依赖程序的影响。
1847

被折叠的 条评论
为什么被折叠?



