2009년 2월 8일 일요일

Data Dictionary - SYS_TABLES

System Table Description
ALL_ARGUMENTS Arguments in object accessible to the user
ALL_CATALOG All tables, views, synonyms, sequences accessible to the user
ALL_COL_COMMENTS Comments on columns of accessible tables and views
ALL_CONSTRAINTS Constraint definitions on accessible tables
ALL_CONS_COLUMNS Information about accessible columns in constraint definitions
ALL_DB_LINKS Database links accessible to the user
ALL_ERRORS Current errors on stored objects that user is allowed to create
ALL_INDEXES Descriptions of indexes on tables accessible to the user
ALL_IND_COLUMNS COLUMNs comprising INDEXes on accessible TABLES
ALL_LOBS Description of LOBs contained in tables accessible to the user
ALL_OBJECTS Objects accessible to the user
ALL_OBJECT_TABLES Description of all object tables accessible to the user
ALL_SEQUENCES Description of SEQUENCEs accessible to the user
ALL_SNAPSHOTS Snapshots the user can access
ALL_SOURCE Current source on stored objects that user is allowed to create
ALL_SYNONYMS All synonyms accessible to the user
ALL_TABLES Description of relational tables accessible to the user
ALL_TAB_COLUMNS Columns of user's tables, views and clusters
ALL_TAB_COL_STATISTICS Columns of user's tables, views and clusters
ALL_TAB_COMMENTS Comments on tables and views accessible to the user
ALL_TRIGGERS Triggers accessible to the current user
ALL_TRIGGER_COLS Column usage in user's triggers or in triggers on user's tables
ALL_TYPES Description of types accessible to the user
ALL_UPDATABLE_COLUMNS Description of all updatable columns
ALL_USERS Information about all users of the database
ALL_VIEWS Description of views accessible to the user
DATABASE_COMPATIBLE_LEVEL Database compatible parameter set via init.ora
DBA_DB_LINKS All database links in the database
DBA_ERRORS Current errors on all stored objects in the database
DBA_OBJECTS All objects in the database
DBA_ROLES All Roles which exist in the database
DBA_ROLE_PRIVS Roles granted to users and roles
DBA_SOURCE Source of all stored objects in the database
DBA_TABLESPACES Description of all tablespaces
DBA_TAB_PRIVS All grants on objects in the database
DBA_TRIGGERS All triggers in the database
DBA_TS_QUOTAS Tablespace quotas for all users
DBA_USERS Information about all users of the database
DBA_VIEWS Description of all views in the database
DICTIONARY Description of data dictionary tables and views
DICT_COLUMNS Description of columns in data dictionary tables and views
GLOBAL_NAME global database name
NLS_DATABASE_PARAMETERS Permanent NLS parameters of the database
NLS_INSTANCE_PARAMETERS NLS parameters of the instance
NLS_SESSION_PARAMETERS NLS parameters of the user session
PRODUCT_COMPONENT_VERSION version and status information for component products
ROLE_TAB_PRIVS Table privileges granted to roles
SESSION_PRIVS Privileges which the user currently has set
SESSION_ROLES Roles which the user currently has enabled.
SYSTEM_PRIVILEGE_MAP Description table for privilege type codes. Maps privilege type numbers to type names
TABLE_PRIVILEGES Grants on objects for which the user is the grantor, grantee, owner, or an enabled role or PUBLIC is the grantee
TABLE_PRIVILEGE_MAP Description table for privilege (auditing option) type codes. Maps privilege (auditing option) type numbers to type names





A.2.9
 ALL_TABLES

Description of tables accessible to the user:

Column name Description
OWNER Owner of the table
TABLE_NAME Name of the table
TABLESPACE_NAME Name of the tablespace containing the table
CLUSTER_NAME N/A
IOT_NAME Name of the index organized table
PCT_FREE N/A
PCT_USED N/A
INI_TRANS N/A
MAX_TRANS N/A
INITIAL_EXTENT N/A
NEXT_EXTENT N/A
MIN_EXTENTS N/A
MAX_EXTENTS N/A
PCT_INCREASE N/A
FREELISTS Number of process freelists allocated to this segment
FREELIST_GROUPS Number of freelist groups allocated to this segment
LOGGING Logging attribute
BACKED_UP N/A
NUM_ROWS Number of rows in the table
BLOCKS N/A
EMPTY_BLOCKS N/A
AVG_SPACE N/A
CHAIN_CNT N/A
AVG_ROW_LEN Average length of a row in the table in bytes
AVG_SPACE_FREELIST_BLOCKS Average freespace of all blocks on a freelist
NUM_FREELIST_BLOCKS Number of blocks on the freelist
DEGREE Number of threads per instance for scanning the table
INSTANCES Number of instances across which the table is to be scanned
CACHE Whether the cluster is to be cached in the buffer cache
TABLE_LOCK Whether the table locking is enabled or disabled
SAMPLE_SIZE Sample size used in analyzing this table
LAST_ANALYZED Date on which this table was most recently analyzed
PARTITIONED Whether this table is partitioned
IOT_TYPE Whether the table is an index-organized table
TEMPORARY Can the current session only see data that it placed in this object itself?
SECONDARY N/A
NESTED Whether the table is a nested table
BUFFER_POOL Default buffer pool for the object
ROW_MOVEMENT N/A
GLOBAL_STATS N/A
USER_STATS N/A
DURATION N/A
SKIP_CORRUPT N/A
MONITORING N/A
CLUSTER_OWNER N/A
DEPENDENCIES N/A
COMPRESSION N/A


A.2.10
 ALL_TAB_COLUMNS

Columns of all tables, views, and clusters accessible to the user:

Column name Description
OWNER Owner of the table or view
TABLE_NAME Table or view name
COLUMN_NAME Column name
DATA_TYPE Data type of the column
DATA_TYPE_MOD Data type modifier of the column
DATA_TYPE_OWNER Owner of the data type of the column
DATA_LENGTH Maximum length of the column in bytes
DATA_PRECISION N/A
DATA_SCALE Digits to the right of decimal point in a number
NULLABLE Whether the column permits nulls? Value is n if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY key.
COLUMN_ID Sequence number of the column as created
DEFAULT_LENGTH N/A
DATA_DEFAULT N/A
NUM_DISTINCT Number of distinct values in each column of the table
LOW_VALUE For tables with more than three rows, the second lowest and second highest values. These statistics are expressed in hexadecimal notation for the internal representation of the first 32 bytes of the values.
HIGH_VALUE N/A
DENSITY N/A
NUM_NULLS Number of nulls in the column
NUM_BUCKETS Number of buckets in histogram for the column
LAST_ANALYZED Date on which this column was most recently analyzed
SAMPLE_SIZE Sample size used in analyzing this column
CHARACTER_SET_NAME Name of the character set
CHAR_COL_DECL_LENGTH Length of the character set
GLOBAL_STATS N/A
USER_STATS N/A
AVG_COL_LEN Average length of the column (in bytes)
CHAR_LENGTH Displays the length of the column in characters
CHAR_USED N/A


A.2.11
 ALL_TAB_COMMENTS

Comments on tables and views accessible to the user:

Column name Description
OWNER Owner of the object
TABLE_NAME Name of the object
TABLE_TYPE Type of the object
COMMENTS Comments on the object


A.2.12
 ALL_USERS

Information about all users of the database:

Column name Description
USERNAME Name of the user
USER_ID N/A
CREATED N/A


A.2.13
 ALL_VIEWS

Text of views accessible to the user:

Column name Description
OWNER Owner of the view
VIEW_NAME Name of the view
TEXT_LENGTH Length of the view text
TEXT View text. Only the first row of text is returned, even if multiple rows exist.
TYPE_TEXT_LENGTH Length of the type clause of the typed view
TYPE_TEXT Type clause of the typed view
OID_TEXT_LENGTH Length of the WITH OID clause of the typed view
OID_TEXT WITH OID clause of the typed view
VIEW_TYPE_OWNER Owner of the type of the view, if the view is a typed view
VIEW_TYPE Type of the view, if the view is a typed view
SUPERVIEW_NAME N/A




ALL_TABLES

 

ALL_TABLES describes the relational tables accessible to the current user. To gather statistics for this view, use the ANALYZE SQL statement.

Related Views

  • DBA_TABLES describes all relational tables in the database.
  • USER_TABLES describes the relational tables owned by the current user. This view does not display the OWNER column.

Note:

Columns marked with an asterisk (*) are populated only if you collect statistics on the table with the ANALYZE statement or the DBMS_STATS package.
Column Datatype NULL Description
OWNER VARCHAR2(30) NOT NULL Owner of the table
TABLE_NAME VARCHAR2(30) NOT NULL Name of the table
TABLESPACE_NAME VARCHAR2(30)   Name of the tablespace containing the table; NULL for partitioned, temporary, and index-organized tables
CLUSTER_NAME VARCHAR2(30)   Name of the cluster, if any, to which the table belongs
IOT_NAME VARCHAR2(30)   Name of the index-organized table, if any, to which the overflow or mapping table entry belongs. If the IOT_TYPE column is not NULL, then this column contains the base table name.
STATUS VARCHAR2(8)   If a previous DROP TABLE operation failed, indicates whether the table is unusable (UNUSABLE) or valid (VALID)
PCT_FREE NUMBER   Minimum percentage of free space in a block; NULL for partitioned tables
PCT_USED NUMBER   Minimum percentage of used space in a block; NULL for partitioned tables
INI_TRANS NUMBER   Initial number of transactions; NULL for partitioned tables
MAX_TRANS NUMBER   Maximum number of transactions; NULL for partitioned tables
INITIAL_EXTENT NUMBER   Size of the initial extent (in bytes); NULL for partitioned tables
NEXT_EXTENT NUMBER   Size of secondary extents (in bytes); NULL for partitioned tables
MIN_EXTENTS NUMBER   Minimum number of extents allowed in the segment; NULL for partitioned tables
MAX_EXTENTS NUMBER   Maximum number of extents allowed in the segment; NULL for partitioned tables
PCT_INCREASE NUMBER   Percentage increase in extent size; NULL for partitioned tables
FREELISTS NUMBER   Number of process freelists allocated to the segment; NULL for partitioned tables
FREELIST_GROUPS NUMBER   Number of freelist groups allocated to the segment; NULL for partitioned tables
LOGGING VARCHAR2(3)   Indicates whether or not changes to the table are logged; NULL for partitioned tables:
  • YES


ALL_TAB_COLUMNS

 

ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. To gather statistics for this view, use the ANALYZE SQL statement or the DBMS_STATS package.

Related Views

  • DBA_TAB_COLUMNS describes the columns of all tables, views, and clusters in the database.
  • USER_TAB_COLUMNS describes the columns of the tables, views, and clusters owned by the current user. This view does not display theOWNER column.
Column Datatype NULL Description
OWNER VARCHAR2(30) NOT NULL Owner of the table, view, or cluster
TABLE_NAME VARCHAR2(30) NOT NULL Name of the table, view, or cluster
COLUMN_NAME VARCHAR2(30) NOT NULL Column name
DATA_TYPE VARCHAR2(106)   Datatype of the column
DATA_TYPE_MOD VARCHAR2(3)   Datatype modifier of the column
DATA_TYPE_OWNER VARCHAR2(30)   Owner of the datatype of the column
DATA_LENGTH NUMBER NOT NULL Length of the column (in bytes)
DATA_PRECISION NUMBER   Decimal precision for NUMBER datatype; binary precision forFLOAT datatype; NULL for all other datatypes
DATA_SCALE NUMBER   Digits to the right of the decimal point in a number
NULLABLE VARCHAR2(1)   Indicates whether a column allows NULLs. The value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY. The constraint should be in anENABLE VALIDATE state.
COLUMN_ID NUMBER   Sequence number of the column as created
DEFAULT_LENGTH NUMBER   Length of the default value for the column
DATA_DEFAULT LONG   Default value for the column
NUM_DISTINCT NUMBER   Number of distinct values in the columnFoot 1
LOW_VALUE RAW(32)   Low value in the columnFootref 1
HIGH_VALUE RAW(32)   High value in the columnFootref 1
DENSITY NUMBER   Density of the columnFootref 1
NUM_NULLS NUMBER   Number of NULLs in the column
NUM_BUCKETS NUMBER   Number of buckets in the histogram for the column

Note: The number of buckets in a histogram is specified in the SIZE parameter of the ANALYZE SQL statement. However, Oracle Database does not create a histogram with more buckets than the number of rows in the sample. Also, if the sample contains any values that are very repetitious, Oracle Database creates the specified number of buckets, but the value indicated by this column may be smaller because of an internal compression algorithm.

LAST_ANALYZED DATE   Date on which this column was most recently analyzed
SAMPLE_SIZE NUMBER   Sample size used in analyzing this column
CHARACTER_SET_NAME VARCHAR2(44)   Name of the character set:
  • CHAR_CS

  • NCHAR_CS

CHAR_COL_DECL_LENGTH NUMBER   Declaration length of the character type column
GLOBAL_STATS VARCHAR2(3)   For partitioned tables, indicates whether column statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO)
USER_STATS VARCHAR2(3)   Indicates whether statistics were entered directly by the user (YES) or not (NO)
AVG_COL_LEN NUMBER   Average length of the column (in bytes)
CHAR_LENGTH NUMBER   Displays the length of the column in characters. This value only applies to the following datatypes:
  • CHAR

  • VARCHAR2

  • NCHAR

  • NVARCHAR

CHAR_USED VARCHAR2(1)   Indicates that the column uses BYTE length semantics (B) orCHAR length semantics (C), or whether the datatype is not any of the following (NULL):
  • CHAR

  • VARCHAR2

  • NCHAR

  • NVARCHAR2

V80_FMT_IMAGE VARCHAR2(3)   Indicates whether the column data is in release 8.0 image format (YES) or not (NO)
DATA_UPGRADED VARCHAR2(3)   Indicates whether the column data has been upgraded to the latest type version format (YES) or not (NO)
HISTOGRAM VARCHAR2(15)   Indicates existence/type of histogram:
  • NONE

  • FREQUENCY

  • HEIGHT BALANCED



ALL_CONSTRAINTS

ALL_CONSTRAINTS describes constraint definitions on tables accessible to the current user.

Related Views

  • DBA_CONSTRAINTS describes all constraint definitions in the database.

  • USER_CONSTRAINTS describes constraint definitions on tables in the current user's schema.

Column Datatype NULL Description
OWNER VARCHAR2(30) NOT NULL Owner of the constraint definition
CONSTRAINT_NAME VARCHAR2(30) NOT NULL Name of the constraint definition
CONSTRAINT_TYPE VARCHAR2(1)   Type of the constraint definition:
  • C - Check constraint on a table

  • P - Primary key

  • U - Unique key

  • R - Referential integrity

  • V - With check option, on a view

  • O - With read only, on a view

  • H - Hash expression

  • F - Constraint that involves a REF column

  • S - Supplemental logging

TABLE_NAME VARCHAR2(30) NOT NULL Name associated with the table (or view) with the constraint definition
SEARCH_CONDITION LONG   Text of search condition for a check constraint
R_OWNER VARCHAR2(30)   Owner of the table referred to in a referential constraint
R_CONSTRAINT_NAME VARCHAR2(30)   Name of the unique constraint definition for the referenced table
DELETE_RULE VARCHAR2(9)   Delete rule for a referential constraint:
  • CASCADE

  • SET NULL

  • NO ACTION

STATUS VARCHAR2(8)   Enforcement status of the constraint:
  • ENABLED

  • DISABLED

DEFERRABLE VARCHAR2(14)   Indicates whether the constraint is deferrable (DEFERRABLE) or not (NOT DEFERRABLE)
DEFERRED VARCHAR2(9)   Indicates whether the constraint was initially deferred (DEFERRED) or not (IMMEDIATE)
VALIDATED VARCHAR2(13)   Indicates whether all data obeys the constraint (VALIDATED) or not (NOT VALIDATED)
GENERATED VARCHAR2(14)   Indicates whether the name of the constraint is user-generated (USER NAME) or system-generated (GENERATED NAME)
BAD VARCHAR2(3)   Indicates whether this constraint specifies a century in an ambiguous manner (BAD) or not (NULL). To avoid errors resulting from this ambiguity, rewrite the constraint using the TO_DATE function with a four-digit year.

See Also: the TO_DATE function in Oracle Database SQL Language Reference and Oracle Database Advanced Application Developer's Guide

RELY VARCHAR2(4)   Indicates whether an enabled constraint is enforced (RELY) or unenforced (NULL)

See Also: the constraints in Oracle Database SQL Language Reference

LAST_CHANGE DATE   When the constraint was last enabled or disabled
INDEX_OWNER VARCHAR2(30)   Name of the user owning the index
INDEX_NAME VARCHAR2(30)   Name of the index (only shown for unique and primary-key constraints)
INVALID VARCHAR2(7)   Indicates whether the constraint is invalid (INVALID) or not (NULL)
VIEW_RELATED VARCHAR2(14)   Indicates whether the constraint depends on a view (DEPEND ON VIEW) or not (NULL)


댓글 없음:

댓글 쓰기