Oracle 视图 V$OBJECT_DEPENDENCY 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$OBJECT_DEPENDENCY用于查询某对象之间的依赖关系。该视图仅用于数据库版本 10.2.0.367.0 及更高版本,出现在 Oracle 数据库中的性能诊断和视图 v$object_dependency 中。它可以把单一对象的依赖关系全部显示出来,更加明晰的展示出某一对象,例如存储过程、函数、索引,它们之间的依赖关系。
使用方法:
1. 执行 select * from V$OBJECT_DEPENEDENCY; 来查看某个对象的依赖。
2. 执行 SELECT DEPENDENCY_TYPE, REFERENCED_NAME FROM V$OBJECT_DEPENDENCY WHERE NAME = ‘存储过程名’; 来查看某个存储过程的依赖关系。例如,结果中DEPENDENCY_TYPE表示依赖类型,REFERENCED_NAME表示依从对象名称。
3. 执行 SELECT REFERENCED_TYPE, REFERENCED_NAME FROM V$OBJECT_DEPENDENCY WHERE NAME = ‘索引名’; 来查看某个索引的依赖关系。结果中REFERENCED_TYPE表示依赖的对象类型,REFERENCED_NAME表示依赖的对象名字。
官方英文解释
V$OBJECT_DEPENDENCY
displays the objects depended on by a package, procedure, or cursor that is currently loaded in the shared pool. For example, together with V$SESSION
and V$SQL
, this view can be used to determine which tables are used in the SQL statement that a user is currently executing.
See Also:
“V$SESSION” and “V$SQL”
Column | Datatype | Description |
---|---|---|
|
|
Address of a procedure, package, or cursor that is currently loaded in the shared pool |
|
|
Hash value of a procedure, package, or cursor that is currently loaded in the shared pool |
|
|
Owner of the object that is depended on |
|
|
Name of the object that is depended on |
|
|
Address of the object that is depended on. These can be used to look up more information on the object in |
|
|
Hash value of the object that is depended on. These can be used to look up more information on the object in |
|
|
Type of the object that is depended on |
|
|
The ID of the container to which the data pertains. Possible values include:
|