Wednesday, December 3, 2008

DBA_VARRAYS

DBA_VARRAYS describes all varrays in the database. Its columns are the same as those in ALL_VARRAYS.

Related Views

· ALL_VARRAYS describes the varrays accessible to the current user.

· USER_VARRAYS describes the varrays owned by the current user. This view does not display the OWNER column.

Column

Datatype

NULL

Description

OWNER

VARCHAR2(30)

Owner of the table containing the varray

PARENT_TABLE_NAME

VARCHAR2(30)

Name of the containing table

PARENT_TABLE_COLUMN

VARCHAR2(4000)

Name of the varray column or attribute

TYPE_OWNER

VARCHAR2(30)

Owner of the varray type

TYPE_NAME

VARCHAR2(30)

Name of the varray type

LOB_NAME

VARCHAR2(30)

Name of the LOB if the varray is stored in a LOB

STORAGE_SPEC

VARCHAR2(30)

Indicates whether the storage was defaulted (DEFAULT) or user-specified (USER_SPECIFIED)

RETURN_TYPE

VARCHAR2(20)

Return type of the column:

· LOCATOR

· VALUE

ELEMENT_SUBSTITUTABLE

VARCHAR2(25)

Indicates whether the varray element is substitutable (Y) or not (N)

Note:

1.

select * from dba_varrays where owner = 'SDE';

OWNER

PARENT_TABLE_NAME

PARENT_

TABLE_

COLUMN

TYPE_

OWNER

TYPE_NAME

LOB_NAME

STORAGE_

SPEC

RETURN_

TYPE

ELEMENT_

SUBSTITUTABLE

SDE

USER_ST_GEOM_INDEX_V

ST_FUNCS

SDE

ST_FUNCS_ARRAY

DEFAULT

VALUE

N

SDE

ST_GEOMETRY_INDEX

ST_FUNCS

SDE

ST_FUNCS_ARRAY

SYS_LOB0000048808C00025$$

DEFAULT

VALUE

N

2. Oracle Metalink has a note (69661.1) on how to determine type or table dependents of an object type.

The following 3 queries can be run to determine dependencies:
-------------------------------------------------------------
 
-- Find nested tables
select owner, parent_table_name, parent_table_column
from dba_nested_tables
where (table_type_owner, table_type_name) in
 (select owner, type_name
  from dba_coll_types
  where elem_type_owner = ''
  and elem_type_name = '');
 
-- Find VARRAYs
select owner, parent_table_name, parent_table_column
from dba_varrays
where (type_owner, type_name) in
 (select owner, type_name
  from dba_coll_types
  where elem_type_owner = ''
  and elem_type_name = '
 
 
-- Find object tables
select owner, table_name
from dba_object_tables
where table_type_owner = ''
 and table_type = ''
 and nested = 'NO';

Oracle data dictionary views

Oracle dynamic performance views

No comments:

Post a Comment