Resolution of Schema Object Dependencies【每日一译】--2013-1-9

当SQL语句引用用户对象或依赖对象时,Oracle会检查这些对象的状态。如果所有对象都有效,则立即执行SQL语句;若引用的对象无效,则尝试编译;成功编译后继续执行;若无法成功编译,则保持无效状态,返回错误并回滚SQL语句。

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

When a schema object is referenced directly in a SQL statement or indirectly through a
reference to a dependent object, Oracle checks the status of the object explicitly
specified in the SQL statement and any referenced objects, as necessary. Oracle’s action
depends on the status of the objects that are directly and indirectly referenced in a SQL

statement:

当一用户对象直接相关在一个SQL语句或者与一个通过依赖对象间接相关的,O显式核对对象

对象在一个指定的SQL语句和任何相关的对象,如果需要。O的行为取决于直接或间接相关于

SQL语句中的对象的状态:

■ If every referenced object is valid, then Oracle runs the SQL statement
immediately without any additional work.
■ If any referenced view or PL/SQL program unit (procedure, function, or package)
is invalid, then Oracle automatically attempts to compile the object.
■ If all invalid referenced objects can be compiled successfully, then they are
compiled and Oracle runs the SQL statement.
■ If an invalid object cannot be compiled successfully, then it remains invalid.
Oracle returns an error and rolls back the failing SQL statement. The rest of the

transaction is unaltered and can be committed or rolled back by the user.

#如果每个相关的对象都可用,那么O快速运行SQL语句而不需要额外的工作。

#如果任何相关的视图或者PL/SQL程序单元(过程,函数,或者包)不可用的,

那么O自动尝试去编译对象。

#如果所有不可用的相关对象成功编译,那么它们被编译后并且O运行SQL语句

#如果一个不可用对象不能成功编译,那么它保持不可用的。O返回一个错误并

且回滚失败的SQL语句。剩余未修改的事务通过用户可以被提交或者回滚。

Note: Oracle attempts to recompile an invalid object dynamically
only if it has not been replaced since it was detected as invalid. This
optimization eliminates unnecessary recompilations

备注:O动态尝试编译一个无效对象仅当从它被检测到不可用并且没有被远的时。

这个优化机制消除了不必的重新编译。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值