Program Units and Referenced Objects【每日一译】--2013-1-12

本文详细介绍了Oracle数据库中如何自动使程序单元失效的机制。当一个程序单元引用的对象定义发生改变时,Oracle会自动使该程序单元变为无效状态。文章列举了不同场景下程序单元如何受到影响,例如表、视图或存储过程的修改都会导致依赖它们的程序单元变为无效。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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:

O自动使程序单元无效当相关的对象的定义被修改。比如,假定一个独立的过程包含

几个语句,涉及到表,视图,另外单独过程和一个公共包体过程。在这种情况下,以

下条件将保持:

■ 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.

#如果相关的包的包体被替换,那么依赖的过程将不受影响。但,如果相关的包的说明部

份被替换,那么依赖的过程将无效。这个是对于使用包的过程与相关对象的最小化依赖的机制。

#当你创建一个表,索引,和视图,然后删除表,所有依赖于这个表的对象将无效,包括视图,

包,包体,函数,和过程。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值