Resolution of Schema Object Dependencies【每日一译】--20130103

来源:互联网 发布:图像压缩算法 编辑:程序博客网 时间:2024/06/06 00:25
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.

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

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

O自动尝试去编译对象。

#如果所有的不可用的相关对象可以被成功编译,那么它们会被编译和O执行SQL语句。

#如果不可用的对象不能被成功地编译,那么它保留不可用的状态。

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.

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返回错误并且回滚失败SQL语句。事务的剩下工作不会被改变并且可以被提交或者是回滚的通过用户自己。

备注:O尝试动态编译不可用对象仅当在它被确定为不可用之前没有被替换过。这个优化操作消除了不需要的

重编译。

原创粉丝点击