Program Units and Referenced Objects (244)

本文详细介绍了Oracle数据库中如何自动使程序单元失效的机制。当所引用的对象定义发生更改时,Oracle会自动使相应的程序单元变为无效状态。文章列举了不同情况下程序单元受影响的具体实例,包括表、视图和其他过程等的修改对依赖程序的影响。

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-984628/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值