Oracle9i Database Reference -- Contents

Skip Headers

Oracle9i Database Reference
Release 2 (9.2)
Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to next page
View PDF

Contents

Title and Copyright Information

Send Us Your Comments

Preface

Audience
Organization
Related Documentation
Conventions
Documentation Accessibility

What's New in Oracle9i Database Reference?

Oracle9i Release 2 (9.2) New Features in Oracle9i Database Reference
Oracle9i Release 1 (9.0.1) New Features in Oracle9i Database Reference

1 Initialization Parameters

Uses of Initialization Parameters
Types of Initialization Parameters
Parameter Files
Server Parameter Files
Initialization Parameter Files
Changing Parameter Values
Dynamic Parameters
Displaying Current Parameter Values
Parameters You Should Not Specify in the Parameter File
When Parameters Are Set Incorrectly
Reading the Parameter Descriptions
Parameter Descriptions
ACTIVE_INSTANCE_COUNT
AQ_TM_PROCESSES
ARCHIVE_LAG_TARGET
AUDIT_FILE_DEST
AUDIT_SYS_OPERATIONS
AUDIT_TRAIL
BACKGROUND_CORE_DUMP
BACKGROUND_DUMP_DEST
BACKUP_TAPE_IO_SLAVES
BITMAP_MERGE_AREA_SIZE
BLANK_TRIMMING
BUFFER_POOL_KEEP
BUFFER_POOL_RECYCLE
CIRCUITS
CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCES
CLUSTER_INTERCONNECTS
COMMIT_POINT_STRENGTH
COMPATIBLE
CONTROL_FILE_RECORD_KEEP_TIME
CONTROL_FILES
CORE_DUMP_DEST
CPU_COUNT
CREATE_BITMAP_AREA_SIZE
CURSOR_SHARING
CURSOR_SPACE_FOR_TIME
DB_n K_CACHE_SIZE
DB_BLOCK_BUFFERS
DB_BLOCK_CHECKING
DB_BLOCK_CHECKSUM
DB_BLOCK_SIZE
DB_CACHE_ADVICE
DB_CACHE_SIZE
DB_CREATE_FILE_DEST
DB_CREATE_ONLINE_LOG_DEST_n
DB_DOMAIN
DB_FILE_MULTIBLOCK_READ_COUNT
DB_FILE_NAME_CONVERT
DB_FILES
DB_KEEP_CACHE_SIZE
DB_NAME
DB_RECYCLE_CACHE_SIZE
DB_WRITER_PROCESSES
DBLINK_ENCRYPT_LOGIN
DBWR_IO_SLAVES
DG_BROKER_CONFIG_FILE n
DG_BROKER_START
DISK_ASYNCH_IO
DISPATCHERS
DISTRIBUTED_LOCK_TIMEOUT
DML_LOCKS
DRS_START
ENQUEUE_RESOURCES
EVENT
FAL_CLIENT
FAL_SERVER
FAST_START_IO_TARGET
FAST_START_MTTR_TARGET
FAST_START_PARALLEL_ROLLBACK
FILE_MAPPING
FILESYSTEMIO_OPTIONS
FIXED_DATE
GC_FILES_TO_LOCKS
GLOBAL_CONTEXT_POOL_SIZE
GLOBAL_NAMES
HASH_AREA_SIZE
HASH_JOIN_ENABLED
HI_SHARED_MEMORY_ADDRESS
HS_AUTOREGISTER
IFILE
INSTANCE_GROUPS
INSTANCE_NAME
INSTANCE_NUMBER
JAVA_MAX_SESSIONSPACE_SIZE
JAVA_POOL_SIZE
JAVA_SOFT_SESSIONSPACE_LIMIT
JOB_QUEUE_PROCESSES
LARGE_POOL_SIZE
LICENSE_MAX_SESSIONS
LICENSE_MAX_USERS
LICENSE_SESSIONS_WARNING
LOCAL_LISTENER
LOCK_NAME_SPACE
LOCK_SGA
LOG_ARCHIVE_DEST
LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_STATE_n
LOG_ARCHIVE_DUPLEX_DEST
LOG_ARCHIVE_FORMAT
LOG_ARCHIVE_MAX_PROCESSES
LOG_ARCHIVE_MIN_SUCCEED_DEST
LOG_ARCHIVE_START
LOG_ARCHIVE_TRACE
LOG_BUFFER
LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT
LOG_CHECKPOINTS_TO_ALERT
LOG_FILE_NAME_CONVERT
LOG_PARALLELISM
LOGMNR_MAX_PERSISTENT_SESSIONS
MAX_COMMIT_PROPAGATION_DELAY
MAX_DISPATCHERS
MAX_DUMP_FILE_SIZE
MAX_ENABLED_ROLES
MAX_ROLLBACK_SEGMENTS
MAX_SHARED_SERVERS
NLS_CALENDAR
NLS_COMP
NLS_CURRENCY
NLS_DATE_FORMAT
NLS_DATE_LANGUAGE
NLS_DUAL_CURRENCY
NLS_ISO_CURRENCY
NLS_LANGUAGE
NLS_LENGTH_SEMANTICS
NLS_NCHAR_CONV_EXCP
NLS_NUMERIC_CHARACTERS
NLS_SORT
NLS_TERRITORY
NLS_TIMESTAMP_FORMAT
NLS_TIMESTAMP_TZ_FORMAT
O7_DICTIONARY_ACCESSIBILITY
OBJECT_CACHE_MAX_SIZE_PERCENT
OBJECT_CACHE_OPTIMAL_SIZE
OLAP_PAGE_POOL_SIZE
OPEN_CURSORS
OPEN_LINKS
OPEN_LINKS_PER_INSTANCE
OPTIMIZER_DYNAMIC_SAMPLING
OPTIMIZER_FEATURES_ENABLE
OPTIMIZER_INDEX_CACHING
OPTIMIZER_INDEX_COST_ADJ
OPTIMIZER_MAX_PERMUTATIONS
OPTIMIZER_MODE
ORACLE_TRACE_COLLECTION_NAME
ORACLE_TRACE_COLLECTION_PATH
ORACLE_TRACE_COLLECTION_SIZE
ORACLE_TRACE_ENABLE
ORACLE_TRACE_FACILITY_NAME
ORACLE_TRACE_FACILITY_PATH
OS_AUTHENT_PREFIX
OS_ROLES
PARALLEL_ADAPTIVE_MULTI_USER
PARALLEL_AUTOMATIC_TUNING
PARALLEL_EXECUTION_MESSAGE_SIZE
PARALLEL_INSTANCE_GROUP
PARALLEL_MAX_SERVERS
PARALLEL_MIN_PERCENT
PARALLEL_MIN_SERVERS
PARALLEL_THREADS_PER_CPU
PARTITION_VIEW_ENABLED
PGA_AGGREGATE_TARGET
PLSQL_COMPILER_FLAGS
PLSQL_NATIVE_C_COMPILER
PLSQL_NATIVE_LIBRARY_DIR
PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT
PLSQL_NATIVE_LINKER
PLSQL_NATIVE_MAKE_FILE_NAME
PLSQL_NATIVE_MAKE_UTILITY
PLSQL_V2_COMPATIBILITY
PRE_PAGE_SGA
PROCESSES
QUERY_REWRITE_ENABLED
QUERY_REWRITE_INTEGRITY
RDBMS_SERVER_DN
READ_ONLY_OPEN_DELAYED
RECOVERY_PARALLELISM
REMOTE_ARCHIVE_ENABLE
REMOTE_DEPENDENCIES_MODE
REMOTE_LISTENER
REMOTE_LOGIN_PASSWORDFILE
REMOTE_OS_AUTHENT
REMOTE_OS_ROLES
REPLICATION_DEPENDENCY_TRACKING
RESOURCE_LIMIT
RESOURCE_MANAGER_PLAN
ROLLBACK_SEGMENTS
ROW_LOCKING
SERIAL _REUSE
SERVICE_NAMES
SESSION_CACHED_CURSORS
SESSION_MAX_OPEN_FILES
SESSIONS
SGA_MAX_SIZE
SHADOW_CORE_DUMP
SHARED_MEMORY_ADDRESS
SHARED_POOL_RESERVED_SIZE
SHARED_POOL_SIZE
SHARED_SERVER_SESSIONS
SHARED_SERVERS
SORT_AREA_RETAINED_SIZE
SORT_AREA_SIZE
SPFILE
SQL_TRACE
SQL92_SECURITY
STANDBY_ARCHIVE_DEST
STANDBY_FILE_MANAGEMENT
STAR_TRANSFORMATION_ENABLED
STATISTICS_LEVEL
TAPE_ASYNCH_IO
THREAD
TIMED_OS_STATISTICS
TIMED_STATISTICS
TRACE_ENABLED
TRACEFILE_IDENTIFIER
TRANSACTION_AUDITING
TRANSACTIONS
TRANSACTIONS_PER_ROLLBACK_SEGMENT
UNDO_MANAGEMENT
UNDO_RETENTION
UNDO_SUPPRESS_ERRORS
UNDO_TABLESPACE
USE_INDIRECT_DATA_BUFFERS
USER_DUMP_DEST
UTL_FILE_DIR
WORKAREA_SIZE_POLICY

2 Static Data Dictionary Views

ALL_ALL_TABLES
ALL_APPLY
ALL_APPLY_CONFLICT_COLUMNS
ALL_APPLY_DML_HANDLERS
ALL_APPLY_ERROR
ALL_APPLY_KEY_COLUMNS
ALL_APPLY_PARAMETERS
ALL_APPLY_PROGRESS
ALL_ARGUMENTS
ALL_ASSOCIATIONS
ALL_AUDIT_POLICIES
ALL_BASE_TABLE_MVIEWS
ALL_CAPTURE
ALL_CAPTURE_PARAMETERS
ALL_CAPTURE_PREPARED_DATABASE
ALL_CAPTURE_PREPARED_SCHEMAS
ALL_CAPTURE_PREPARED_TABLES
ALL_CATALOG
ALL_CLUSTER_HASH_EXPRESSIONS
ALL_CLUSTERS
ALL_COL_COMMENTS
ALL_COL_PRIVS
ALL_COL_PRIVS_MADE
ALL_COL_PRIVS_RECD
ALL_COLL_TYPES
ALL_CONS_COLUMNS
ALL_CONS_OBJ_COLUMNS
ALL_CONSTRAINTS
ALL_CONTEXT
ALL_DB_LINKS
ALL_DEF_AUDIT_OPTS
ALL_DEPENDENCIES
ALL_DIM_ATTRIBUTES
ALL_DIM_CHILD_OF
ALL_DIM_HIERARCHIES
ALL_DIM_JOIN_KEY
ALL_DIM_LEVEL_KEY
ALL_DIM_LEVELS
ALL_DIMENSIONS
ALL_DIRECTORIES
ALL_ERRORS
ALL_EVALUATION_CONTEXT_TABLES
ALL_EVALUATION_CONTEXT_VARS
ALL_EVALUATION_CONTEXTS
ALL_EXTERNAL_LOCATIONS
ALL_EXTERNAL_TABLES
ALL_IND_COLUMNS
ALL_IND_EXPRESSIONS
ALL_IND_PARTITIONS
ALL_IND_SUBPARTITIONS
ALL_INDEXES
ALL_INDEXTYPE_COMMENTS
ALL_INDEXTYPE_OPERATORS
ALL_INDEXTYPES
ALL_INTERNAL_TRIGGERS
ALL_JAVA_ARGUMENTS
ALL_JAVA_CLASSES
ALL_JAVA_DERIVATIONS
ALL_JAVA_FIELDS
ALL_JAVA_IMPLEMENTS
ALL_JAVA_INNERS
ALL_JAVA_LAYOUTS
ALL_JAVA_METHODS
ALL_JAVA_NCOMPS
ALL_JAVA_RESOLVERS
ALL_JAVA_THROWS
ALL_JOBS
ALL_JOIN_IND_COLUMNS
ALL_LIBRARIES
ALL_LOB_PARTITIONS
ALL_LOB_SUBPARTITIONS
ALL_LOB_TEMPLATES
ALL_LOBS
ALL_LOG_GROUP_COLUMNS
ALL_LOG_GROUPS
ALL_METHOD_PARAMS
ALL_METHOD_RESULTS
ALL_MVIEW_AGGREGATES
ALL_MVIEW_ANALYSIS
ALL_MVIEW_DETAIL_RELATIONS
ALL_MVIEW_JOINS
ALL_MVIEW_KEYS
ALL_MVIEW_LOGS
ALL_MVIEW_REFRESH_TIMES
ALL_MVIEWS
ALL_NESTED_TABLES
ALL_OBJ_COLATTRS
ALL_OBJECT_TABLES
ALL_OBJECTS
ALL_OPANCILLARY
ALL_OPARGUMENTS
ALL_OPBINDINGS
ALL_OPERATOR_COMMENTS
ALL_OPERATORS
ALL_OUTLINE_HINTS
ALL_OUTLINES
ALL_PART_COL_STATISTICS
ALL_PART_HISTOGRAMS
ALL_PART_INDEXES
ALL_PART_KEY_COLUMNS
ALL_PART_LOBS
ALL_PART_TABLES
ALL_PARTIAL_DROP_TABS
ALL_PENDING_CONV_TABLES
ALL_POLICIES
ALL_POLICY_CONTEXTS
ALL_POLICY_GROUPS
ALL_PROCEDURES
ALL_PROPAGATION
ALL_PUBLISHED_COLUMNS
ALL_QUEUE_TABLES
ALL_QUEUES
ALL_REFRESH
ALL_REFRESH_CHILDREN
ALL_REFRESH_DEPENDENCIES
ALL_REFS
ALL_REGISTERED_MVIEWS
ALL_REGISTRY_BANNERS
ALL_RULE_SET_RULES
ALL_RULE_SETS
ALL_RULES
ALL_SEQUENCES
ALL_SOURCE
ALL_SOURCE_TABLES
ALL_SQLJ_TYPE_ATTRS
ALL_SQLJ_TYPE_METHODS
ALL_SQLJ_TYPES
ALL_STORED_SETTINGS
ALL_STREAMS_GLOBAL_RULES
ALL_STREAMS_SCHEMA_RULES
ALL_STREAMS_TABLE_RULES
ALL_SUBPART_COL_STATISTICS
ALL_SUBPART_HISTOGRAMS
ALL_SUBPART_KEY_COLUMNS
ALL_SUBPARTITION_TEMPLATES
ALL_SUBSCRIBED_COLUMNS
ALL_SUBSCRIBED_TABLES
ALL_SUBSCRIPTIONS
ALL_SUMDELTA
ALL_SYNONYMS
ALL_TAB_COL_STATISTICS
ALL_TAB_COLUMNS
ALL_TAB_COMMENTS
ALL_TAB_HISTOGRAMS
ALL_TAB_MODIFICATIONS
ALL_TAB_PARTITIONS
ALL_TAB_PRIVS
ALL_TAB_PRIVS_MADE
ALL_TAB_PRIVS_RECD
ALL_TAB_SUBPARTITIONS
ALL_TABLES
ALL_TRIGGER_COLS
ALL_TRIGGERS
ALL_TYPE_ATTRS
ALL_TYPE_METHODS
ALL_TYPE_VERSIONS
ALL_TYPES
ALL_UNUSED_COL_TABS
ALL_UPDATABLE_COLUMNS
ALL_USERS
ALL_USTATS
ALL_VARRAYS
ALL_VIEWS
ALL_XML_SCHEMAS
ALL_XML_TAB_COLS
ALL_XML_TABLES
ALL_XML_VIEW_COLS
ALL_XML_VIEWS
AUDIT_ACTIONS
CATALOG
CAT
CHAINED_ROWS
CHANGE_SOURCES
CHANGE_SETS
CHANGE_TABLES
CLU
CODE_PIECES
CODE_SIZE
COL
COLS
COLUMN_PRIVILEGES
DATABASE_PROPERTIES
DBA_2PC_NEIGHBORS
DBA_2PC_PENDING
DBA_ALL_TABLES
DBA_APPLICATION_ROLES
DBA_APPLY
DBA_APPLY_CONFLICT_COLUMNS
DBA_APPLY_DML_HANDLERS
DBA_APPLY_ERROR
DBA_APPLY_INSTANTIATED_OBJECTS
DBA_APPLY_KEY_COLUMNS
DBA_APPLY_PARAMETERS
DBA_APPLY_PROGRESS
DBA_AQ_AGENT_PRIVS
DBA_AQ_AGENTS
DBA_ASSOCIATIONS
DBA_ATTRIBUTE_TRANSFORMATIONS
DBA_AUDIT_EXISTS
DBA_AUDIT_OBJECT
DBA_AUDIT_POLICIES
DBA_AUDIT_SESSION
DBA_AUDIT_STATEMENT
DBA_AUDIT_TRAIL
DBA_AW_PS
DBA_AWS
DBA_BASE_TABLE_MVIEWS
DBA_BLOCKERS
DBA_CAPTURE
DBA_CAPTURE_PARAMETERS
DBA_CAPTURE_PREPARED_DATABASE
DBA_CAPTURE_PREPARED_SCHEMAS
DBA_CAPTURE_PREPARED_TABLES
DBA_CATALOG
DBA_CLU_COLUMNS
DBA_CLUSTER_HASH_EXPRESSIONS
DBA_CLUSTERS
DBA_COL_COMMENTS
DBA_COL_PRIVS
DBA_COLL_TYPES
DBA_CONS_COLUMNS
DBA_CONS_OBJ_COLUMNS
DBA_CONSTRAINTS
DBA_CONTEXT
DBA_DATA_FILES
DBA_DB_LINKS
DBA_DDL_LOCKS
DBA_DEPENDENCIES
DBA_DIM_ATTRIBUTES
DBA_DIM_CHILD_OF
DBA_DIM_HIERARCHIES
DBA_DIM_JOIN_KEY
DBA_DIM_LEVEL_KEY
DBA_DIM_LEVELS
DBA_DIMENSIONS
DBA_DIRECTORIES
DBA_DML_LOCKS
DBA_DMT_FREE_SPACE
DBA_DMT_USED_EXTENTS
DBA_ERRORS
DBA_EVALUATION_CONTEXT_TABLES
DBA_EVALUATION_CONTEXT_VARS
DBA_EVALUATION_CONTEXTS
DBA_EXP_FILES
DBA_EXP_OBJECTS
DBA_EXP_VERSION
DBA_EXTENTS
DBA_EXTERNAL_LOCATIONS
DBA_EXTERNAL_TABLES
DBA_FGA_AUDIT_TRAIL
DBA_FREE_SPACE
DBA_FREE_SPACE_COALESCED
DBA_IND_COLUMNS
DBA_IND_EXPRESSIONS
DBA_IND_PARTITIONS
DBA_IND_SUBPARTITIONS
DBA_INDEXES
DBA_INDEXTYPE_COMMENTS
DBA_INDEXTYPE_OPERATORS
DBA_INDEXTYPES
DBA_INTERNAL_TRIGGERS
DBA_JAVA_ARGUMENTS
DBA_JAVA_CLASSES
DBA_JAVA_DERIVATIONS
DBA_JAVA_FIELDS
DBA_JAVA_IMPLEMENTS
DBA_JAVA_INNERS
DBA_JAVA_LAYOUTS
DBA_JAVA_METHODS
DBA_JAVA_NCOMPS
DBA_JAVA_POLICY
DBA_JAVA_RESOLVERS
DBA_JAVA_THROWS
DBA_JOBS
DBA_JOBS_RUNNING
DBA_JOIN_IND_COLUMNS
DBA_KGLLOCK
DBA_LIBRARIES
DBA_LMT_FREE_SPACE
DBA_LMT_USED_EXTENTS
DBA_LOB_PARTITIONS
DBA_LOB_SUBPARTITIONS
DBA_LOB_TEMPLATES
DBA_LOBS
DBA_LOCK
DBA_LOCK_INTERNAL
DBA_LOCKS
DBA_LOG_GROUP_COLUMNS
DBA_LOG_GROUPS
DBA_LOGSTDBY_EVENTS
DBA_LOGSTDBY_LOG
DBA_LOGSTDBY_NOT_UNIQUE
DBA_LOGSTDBY_PARAMETERS
DBA_LOGSTDBY_PROGRESS
DBA_LOGSTDBY_SKIP
DBA_LOGSTDBY_SKIP_TRANSACTION
DBA_LOGSTDBY_UNSUPPORTED
DBA_METHOD_PARAMS
DBA_METHOD_RESULTS
DBA_MVIEW_AGGREGATES
DBA_MVIEW_ANALYSIS
DBA_MVIEW_DETAIL_RELATIONS
DBA_MVIEW_JOINS
DBA_MVIEW_KEYS
DBA_MVIEW_LOG_FILTER_COLS
DBA_MVIEW_LOGS
DBA_MVIEW_REFRESH_TIMES
DBA_MVIEWS
DBA_NESTED_TABLES
DBA_OBJ_AUDIT_OPTS
DBA_OBJ_COLATTRS
DBA_OBJECT_SIZE
DBA_OBJECT_TABLES
DBA_OBJECTS
DBA_OPANCILLARY
DBA_OPARGUMENTS
DBA_OPBINDINGS
DBA_OPERATOR_COMMENTS
DBA_OPERATORS
DBA_ORPHAN_KEY_TABLE
DBA_OUTLINE_HINTS
DBA_OUTLINES
DBA_PART_COL_STATISTICS
DBA_PART_HISTOGRAMS
DBA_PART_INDEXES
DBA_PART_KEY_COLUMNS
DBA_PART_LOBS
DBA_PART_TABLES
DBA_PARTIAL_DROP_TABS
DBA_PENDING_CONV_TABLES
DBA_PENDING_TRANSACTIONS
DBA_POLICIES
DBA_POLICY_CONTEXTS
DBA_POLICY_GROUPS
DBA_PRIV_AUDIT_OPTS
DBA_PROCEDURES
DBA_PROFILES
DBA_PROPAGATION
DBA_PROXIES
DBA_PUBLISHED_COLUMNS
DBA_QUEUE_SCHEDULES
DBA_QUEUE_TABLES
DBA_QUEUES
DBA_RCHILD
DBA_REFRESH
DBA_REFRESH_CHILDREN
DBA_REFS
DBA_REGISTERED_MVIEW_GROUPS
DBA_REGISTERED_MVIEWS
DBA_REGISTRY
DBA_REGISTRY_HIERARCHY
DBA_REPAIR_TABLE
DBA_RESUMABLE
DBA_RGROUP
DBA_ROLE_PRIVS
DBA_ROLES
DBA_ROLLBACK_SEGS
DBA_RSRC_CONSUMER_GROUP_PRIVS
DBA_RSRC_CONSUMER_GROUPS
DBA_RSRC_MANAGER_SYSTEM_PRIVS
DBA_RSRC_PLAN_DIRECTIVES
DBA_RSRC_PLANS
DBA_RULE_SET_RULES
DBA_RULE_SETS
DBA_RULES
DBA_SEGMENTS
DBA_SEQUENCES
DBA_SOURCE
DBA_SOURCE_TABLES
DBA_SQLJ_TYPE_ATTRS
DBA_SQLJ_TYPE_METHODS
DBA_SQLJ_TYPES
DBA_STMT_AUDIT_OPTS
DBA_STORED_SETTINGS
DBA_STREAMS_GLOBAL_RULES
DBA_STREAMS_SCHEMA_RULES
DBA_STREAMS_TABLE_RULES
DBA_SUBPART_COL_STATISTICS
DBA_SUBPART_HISTOGRAMS
DBA_SUBPART_KEY_COLUMNS
DBA_SUBPARTITION_TEMPLATES
DBA_SUBSCRIBED_COLUMNS
DBA_SUBSCRIBED_TABLES
DBA_SUBSCRIPTIONS
DBA_SYNONYMS
DBA_SYS_PRIVS
DBA_TAB_COL_STATISTICS
DBA_TAB_COLUMNS
DBA_TAB_COMMENTS
DBA_TAB_HISTOGRAMS
DBA_TAB_MODIFICATIONS
DBA_TAB_PARTITIONS
DBA_TAB_PRIVS
DBA_TAB_SUBPARTITIONS
DBA_TABLES
DBA_TABLESPACES
DBA_TEMP_FILES
DBA_TRANSFORMATIONS
DBA_TRIGGER_COLS
DBA_TRIGGERS
DBA_TS_QUOTAS
DBA_TYPE_ATTRS
DBA_TYPE_METHODS
DBA_TYPE_VERSIONS
DBA_TYPES
DBA_UNDO_EXTENTS
DBA_UNUSED_COL_TABS
DBA_UPDATABLE_COLUMNS
DBA_USERS
DBA_USTATS
DBA_VARRAYS
DBA_VIEWS
DBA_WAITERS
DBA_XML_SCHEMAS
DBA_XML_TAB_COLS
DBA_XML_TABLES
DBA_XML_VIEW_COLS
DBA_XML_VIEWS
DBMS_ALERT_INFO
DBMS_LOCK_ALLOCATED
DEPTREE
DICT
DICT_COLUMNS
DICTIONARY
ERROR_SIZE
EXCEPTIONS
FILE_LOCK
FILE_PING
FILEXT$
GLOBAL_NAME
HS_ALL_CAPS
HS_ALL_DD
HS_ALL_INITS
HS_BASE_CAPS
HS_BASE_DD
HS_CLASS_CAPS
HS_CLASS_DD
HS_CLASS_INIT
HS_EXTERNAL_OBJECT_PRIVILEGES
HS_EXTERNAL_OBJECTS
HS_EXTERNAL_USER_PRIVILEGES
HS_FDS_CLASS
HS_FDS_INST
HS_INST_CAPS
HS_INST_DD
HS_INST_INIT
IDEPTREE
IND
INDEX_HISTOGRAM
INDEX_STATS
MAP_OBJECT
NLS_DATABASE_PARAMETERS
NLS_INSTANCE_PARAMETERS
NLS_SESSION_PARAMETERS
OBJ
PARSED_PIECES
PARSED_SIZE
PLAN_TABLE
PLUGGABLE_SET_CHECK
PRODUCT_COMPONENT_VERSION
PROXY_USERS
PSTUBTBL
PUBLIC_DEPENDENCY
PUBLICSYN
QUEUE_PRIVILEGES
RESOURCE_COST
RESOURCE_MAP
ROLE_ROLE_PRIVS
ROLE_SYS_PRIVS
ROLE_TAB_PRIVS
SEQ
SESSION_CONTEXT
SESSION_PRIVS
SESSION_ROLES
SOURCE_SIZE
STMT_AUDIT_OPTION_MAP
SYN
SYSCATALOG
SYSFILES
SYSSEGOBJ
SYSTEM_PRIVILEGE_MAP
SYS_OBJECTS
TAB
TABLE_PRIVILEGE_MAP
TABLE_PRIVILEGES
TABS
TABQUOTAS
TRUSTED_SERVERS
TS_PITR_CHECK
TS_PITR_OBJECTS_TO_BE_DROPPED
UNI_PLUGGABLE_SET_CHECK
USER_ALL_TABLES
USER_AQ_AGENT_PRIVS
USER_ARGUMENTS
USER_ASSOCIATIONS
USER_ATTRIBUTE_TRANSFORMATIONS
USER_AUDIT_OBJECT
USER_AUDIT_POLICIES
USER_AUDIT_SESSION
USER_AUDIT_STATEMENT
USER_AUDIT_TRAIL
USER_AW_PS
USER_AWS
USER_BASE_TABLE_MVIEWS
USER_CATALOG
USER_CLU_COLUMNS
USER_CLUSTER_HASH_EXPRESSIONS
USER_CLUSTERS
USER_COL_COMMENTS
USER_COL_PRIVS
USER_COL_PRIVS_MADE
USER_COL_PRIVS_RECD
USER_COLL_TYPES
USER_CONS_COLUMNS
USER_CONS_OBJ_COLUMNS
USER_CONSTRAINTS
USER_DB_LINKS
USER_DEPENDENCIES
USER_DIM_ATTRIBUTES
USER_DIM_CHILD_OF
USER_DIM_HIERARCHIES
USER_DIM_JOIN_KEY
USER_DIM_LEVEL_KEY
USER_DIM_LEVELS
USER_DIMENSIONS
USER_ERRORS
USER_EVALUATION_CONTEXT_TABLES
USER_EVALUATION_CONTEXT_VARS
USER_EVALUATION_CONTEXTS
USER_EXTENTS
USER_EXTERNAL_LOCATIONS
USER_EXTERNAL_TABLES
USER_FREE_SPACE
USER_IND_COLUMNS
USER_IND_EXPRESSIONS
USER_IND_PARTITIONS
USER_IND_SUBPARTITIONS
USER_INDEXES
USER_INDEXTYPE_COMMENTS
USER_INDEXTYPE_OPERATORS
USER_INDEXTYPES
USER_INTERNAL_TRIGGERS
USER_JAVA_ARGUMENTS
USER_JAVA_CLASSES
USER_JAVA_DERIVATIONS
USER_JAVA_FIELDS
USER_JAVA_IMPLEMENTS
USER_JAVA_INNERS
USER_JAVA_LAYOUTS
USER_JAVA_METHODS
USER_JAVA_NCOMPS
USER_JAVA_POLICY
USER_JAVA_RESOLVERS
USER_JAVA_THROWS
USER_JOBS
USER_JOIN_IND_COLUMNS
USER_LIBRARIES
USER_LOB_PARTITIONS
USER_LOB_SUBPARTITIONS
USER_LOB_TEMPLATES
USER_LOBS
USER_LOG_GROUP_COLUMNS
USER_LOG_GROUPS
USER_METHOD_PARAMS
USER_METHOD_RESULTS
USER_MVIEW_AGGREGATES
USER_MVIEW_ANALYSIS
USER_MVIEW_DETAIL_RELATIONS
USER_MVIEW_JOINS
USER_MVIEW_KEYS
USER_MVIEW_LOGS
USER_MVIEW_REFRESH_TIMES
USER_MVIEWS
USER_NESTED_TABLES
USER_OBJ_AUDIT_OPTS
USER_OBJ_COLATTRS
USER_OBJECT_SIZE
USER_OBJECT_TABLES
USER_OBJECTS
USER_OPANCILLARY
USER_OPARGUMENTS
USER_OPBINDINGS
USER_OPERATOR_COMMENTS
USER_OPERATORS
USER_OUTLINE_HINTS
USER_OUTLINES
USER_PART_COL_STATISTICS
USER_PART_HISTOGRAMS
USER_PART_INDEXES
USER_PART_KEY_COLUMNS
USER_PART_LOBS
USER_PART_TABLES
USER_PARTIAL_DROP_TABS
USER_PASSWORD_LIMITS
USER_PENDING_CONV_TABLES
USER_POLICIES
USER_POLICY_CONTEXTS
USER_POLICY_GROUPS
USER_PROCEDURES
USER_PROXIES
USER_PUBLISHED_COLUMNS
USER_QUEUE_SCHEDULES
USER_QUEUE_TABLES
USER_QUEUES
USER_REFRESH
USER_REFRESH_CHILDREN
USER_REFS
USER_REGISTERED_MVIEWS
USER_REGISTRY
USER_RESOURCE_LIMITS
USER_RESUMABLE
USER_ROLE_PRIVS
USER_RSRC_CONSUMER_GROUP_PRIVS
USER_RSRC_MANAGER_SYSTEM_PRIVS
USER_RULE_SET_RULES
USER_RULE_SETS
USER_RULES
USER_SEGMENTS
USER_SEQUENCES
USER_SOURCE
USER_SOURCE_TABLES
USER_SQLJ_TYPE_ATTRS
USER_SQLJ_TYPE_METHODS
USER_SQLJ_TYPES
USER_STORED_SETTINGS
USER_SUBPART_COL_STATISTICS
USER_SUBPART_HISTOGRAMS
USER_SUBPART_KEY_COLUMNS
USER_SUBPARTITION_TEMPLATES
USER_SUBSCRIBED_COLUMNS
USER_SUBSCRIBED_TABLES
USER_SUBSCRIPTIONS
USER_SYNONYMS
USER_SYS_PRIVS
USER_TAB_COL_STATISTICS
USER_TAB_COLUMNS
USER_TAB_COMMENTS
USER_TAB_HISTOGRAMS
USER_TAB_MODIFICATIONS
USER_TAB_PARTITIONS
USER_TAB_PRIVS
USER_TAB_PRIVS_MADE
USER_TAB_PRIVS_RECD
USER_TAB_SUBPARTITIONS
USER_TABLES
USER_TABLESPACES
USER_TRANSFORMATIONS
USER_TRIGGER_COLS
USER_TRIGGERS
USER_TS_QUOTAS
USER_TYPE_ATTRS
USER_TYPE_METHODS
USER_TYPE_VERSIONS
USER_TYPES
USER_UNUSED_COL_TABS
USER_UPDATABLE_COLUMNS
USER_USERS
USER_USTATS
USER_VARRAYS
USER_VIEWS
USER_XML_SCHEMAS
USER_XML_TAB_COLS
USER_XML_TABLES
USER_XML_VIEW_COLS
USER_XML_VIEWS

3 Dynamic Performance (V$) Views

About Dynamic Performance Views
V$ Views
GV$ Views
V$ACCESS
V$ACTIVE_INSTANCES
V$ACTIVE_SESS_POOL_MTH
V$AQ
V$ARCHIVE
V$ARCHIVE_DEST
V$ARCHIVE_DEST_STATUS
V$ARCHIVE_GAP
V$ARCHIVE_PROCESSES
V$ARCHIVED_LOG
V$BACKUP
V$BACKUP_ASYNC_IO
V$BACKUP_CORRUPTION
V$BACKUP_DATAFILE
V$BACKUP_DEVICE
V$BACKUP_PIECE
V$BACKUP_REDOLOG
V$BACKUP_SET
V$BACKUP_SPFILE
V$BACKUP_SYNC_IO
V$BGPROCESS
V$BH
V$BUFFER_POOL
V$BUFFER_POOL_STATISTICS
V$CACHE
V$CACHE_LOCK
V$CACHE_TRANSFER
V$CIRCUIT
V$CLASS_CACHE_TRANSFER
V$COMPATIBILITY
V$COMPATSEG
V$CONTEXT
V$CONTROLFILE
V$CONTROLFILE_RECORD_SECTION
V$COPY_CORRUPTION
V$CR_BLOCK_SERVER
V$DATABASE
V$DATABASE_BLOCK_CORRUPTION
V$DATABASE_INCARNATION
V$DATAFILE
V$DATAFILE_COPY
V$DATAFILE_HEADER
V$DATAGUARD_STATUS
V$DB_CACHE_ADVICE
V$DB_OBJECT_CACHE
V$DB_PIPES
V$DBFILE
V$DBLINK
V$DELETED_OBJECT
V$DISPATCHER
V$DISPATCHER_RATE
V$ENABLEDPRIVS
V$ENQUEUE_LOCK
V$ENQUEUE_STAT
V$EVENT_NAME
V$EXECUTION
V$FALSE_PING
V$FAST_START_SERVERS
V$FAST_START_TRANSACTIONS
V$FILE_CACHE_TRANSFER
V$FILESTAT
V$FIXED_TABLE
V$FIXED_VIEW_DEFINITION
V$GC_ELEMENT
V$GC_ELEMENTS_WITH_COLLISIONS
V$GCSHVMASTER_INFO
V$GCSPFMASTER_INFO
V$GES_BLOCKING_ENQUEUE
V$GES_CONVERT_LOCAL
V$GES_CONVERT_REMOTE
V$GES_ENQUEUE
V$GES_LATCH
V$GES_RESOURCE
V$GES_STATISTICS
V$GLOBAL_BLOCKED_LOCKS
V$GLOBAL_TRANSACTION
V$HS_AGENT
V$HS_PARAMETER
V$HS_SESSION
V$HVMASTER_INFO
V$INDEXED_FIXED_COLUMN
V$INSTANCE
V$INSTANCE_RECOVERY
V$LATCH
V$LATCH_CHILDREN
V$LATCH_MISSES
V$LATCH_PARENT
V$LATCHHOLDER
V$LATCHNAME
V$LIBRARY_CACHE_MEMORY
V$LIBRARYCACHE
V$LICENSE
V$LOADISTAT
V$LOADPSTAT
V$LOCK
V$LOCK_ACTIVITY
V$LOCKED_OBJECT
V$LOG
V$LOG_HISTORY
V$LOGFILE
V$LOGHIST
V$LOGMNR_CONTENTS
V$LOGMNR_DICTIONARY
V$LOGMNR_LOGS
V$LOGMNR_PARAMETERS
V$LOGSTDBY
V$LOGSTDBY_STATS
V$MANAGED_STANDBY
V$MAP_COMP_LIST
V$MAP_ELEMENT
V$MAP_EXT_ELEMENT
V$MAP_FILE
V$MAP_FILE_EXTENT
V$MAP_FILE_IO_STACK
V$MAP_LIBRARY
V$MAP_SUBELEMENT
V$MTTR_TARGET_ADVICE
V$MYSTAT
V$NLS_PARAMETERS
V$NLS_VALID_VALUES
V$OBJECT_DEPENDENCY
V$OBJECT_USAGE
V$OBSOLETE_PARAMETER
V$OFFLINE_RANGE
V$OPEN_CURSOR
V$OPTION
V$PARALLEL_DEGREE_LIMIT_MTH
V$PARAMETER
V$PARAMETER2
V$PGA_TARGET_ADVICE
V$PGA_TARGET_ADVICE_HISTOGRAM
V$PGASTAT
V$PQ_SESSTAT
V$PQ_SLAVE
V$PQ_SYSSTAT
V$PQ_TQSTAT
V$PROCESS
V$PROXY_ARCHIVEDLOG
V$PROXY_DATAFILE
V$PWFILE_USERS
V$PX_PROCESS
V$PX_PROCESS_SYSSTAT
V$PX_SESSION
V$PX_SESSTAT
V$QUEUE
V$QUEUEING_MTH
V$RECOVER_FILE
V$RECOVERY_FILE_STATUS
V$RECOVERY_LOG
V$RECOVERY_PROGRESS
V$RECOVERY_STATUS
V$REQDIST
V$RESERVED_WORDS
V$RESOURCE
V$RESOURCE_LIMIT
V$RMAN_CONFIGURATION
V$ROLLNAME
V$ROLLSTAT
V$ROWCACHE
V$ROWCACHE_PARENT
V$ROWCACHE_SUBORDINATE
V$RSRC_CONSUMER_GROUP
V$RSRC_CONSUMER_GROUP_CPU_MTH
V$RSRC_PLAN
V$RSRC_PLAN_CPU_MTH
V$SEGMENT_STATISTICS
V$SEGSTAT
V$SEGSTAT_NAME
V$SESS_IO
V$SESSION
V$SESSION_CONNECT_INFO
V$SESSION_CURSOR_CACHE
V$SESSION_EVENT
V$SESSION_LONGOPS
V$SESSION_OBJECT_CACHE
V$SESSION_WAIT
V$SESSTAT
V$SGA
V$SGA_CURRENT_RESIZE_OPS
V$SGA_RESIZE_OPS
V$SGA_DYNAMIC_COMPONENTS
V$SGA_DYNAMIC_FREE_MEMORY
V$SGASTAT
V$SHARED_POOL_ADVICE
V$SHARED_POOL_RESERVED
V$SHARED_SERVER
V$SHARED_SERVER_MONITOR
V$SORT_SEGMENT
V$SPPARAMETER
V$SQL
V$SQL_BIND_DATA
V$SQL_BIND_METADATA
V$SQL_CURSOR
V$SQL_PLAN
V$SQL_PLAN_STATISTICS
V$SQL_PLAN_STATISTICS_ALL
V$SQL_REDIRECTION
V$SQL_SHARED_CURSOR
V$SQL_SHARED_MEMORY
V$SQL_WORKAREA
V$SQL_WORKAREA_ACTIVE
V$SQL_WORKAREA_HISTOGRAM
V$SQLAREA
V$SQLTEXT
V$SQLTEXT_WITH_NEWLINES
V$STANDBY_LOG
V$STATISTICS_LEVEL
V$STATNAME
V$STREAMS_APPLY_COORDINATOR
V$STREAMS_APPLY_READER
V$STREAMS_APPLY_SERVER
V$STREAMS_CAPTURE
V$SUBCACHE
V$SYSSTAT
V$SYSTEM_CURSOR_CACHE
V$SYSTEM_EVENT
V$SYSTEM_PARAMETER
V$SYSTEM_PARAMETER2
V$TABLESPACE
V$TEMP_CACHE_TRANSFER
V$TEMP_EXTENT_MAP
V$TEMP_EXTENT_POOL
V$TEMP_SPACE_HEADER
V$TEMPFILE
V$TEMPORARY_LOBS
V$TEMPSEG_USAGE
V$TEMPSTAT
V$THREAD
V$TIMER
V$TIMEZONE_NAMES
V$TRANSACTION
V$TRANSACTION_ENQUEUE
V$TYPE_SIZE
V$UNDOSTAT
V$VERSION
V$VPD_POLICY
V$WAITSTAT

4 Database Limits

Datatype Limits
Physical Database Limits
Logical Database Limits
Process and Runtime Limits

5 SQL Scripts

Creating the Data Dictionary
Creating Additional Data Dictionary Structures
The "NO" Scripts
Database Migration Scripts
Java Scripts

A Oracle Wait Events

Displaying Wait Events
Wait Events and Parameters
Parameter Descriptions
Wait Event Descriptions
alter system set dispatchers
batched allocate scn lock request
BFILE check if exists
BFILE check if open
BFILE closure
BFILE get length
BFILE get name object
BFILE get path object
BFILE internal seek
BFILE open
BFILE read
buffer busy waits
buffer deadlock
buffer for checkpoint
buffer latch
buffer read retry
checkpoint completed
checkpoint range buffer not saved
control file parallel write
control file sequential read
control file single write
conversion file read
db file parallel read
db file parallel write
db file scattered read
db file sequential read
db file single write
DFS db file lock
DFS lock handle
direct path read
direct path write
dispatcher shutdown
dispatcher timer
duplicate cluster key
enqueue
file identify
file open
free buffer waits
free global transaction table entry
free process state object
global cache busy
global cache lock cleanup
global cache freelist wait
global cache null to s
global cache null to x
global cache open s
global cache open x
global cache s to x
inactive session
inactive transaction branch
index block split
instance recovery
instance state change
io done
kcl bg acks
latch activity
latch free
library cache load lock
library cache lock
library cache pin
lock manager wait for remote message
log buffer space
log file parallel write
log file sequential read
log file single write
log file switch (archiving needed)
log file switch (checkpoint incomplete)
log file switch (clearing log file)
log file switch completion
log file sync
log switch/archive
on-going SCN fetch to complete
parallel execution create server
parallel execution dequeue wait
parallel execution qref latch
parallel execution server shutdown
parallel execution signal server
pending global transaction(s)
pipe get
pipe put
PL/SQL lock timer
pmon rdomain attach
pmon timer
process startup
queue messages
rdbms ipc message
rdbms ipc message block
rdbms ipc reply
redo wait
row cache lock
scginq AST call
single-task message
smon timer
SQL*Net break/reset to client
SQL*Net break/reset to dblink
SQL*Net message from client
SQL*Net message from dblink
SQL*Net message to client
SQL*Net message to dblink
SQL*Net more data from client
SQL*Net more data from dblink
SQL*Net more data to client
SQL*Net more data to dblink
switch logfile command
timer in sksawat
transaction
unbound tx
undo segment extension
undo segment recovery
undo segment tx slot
virtual circuit status
WMON goes to sleep
write complete waits
writes stopped by instance recovery or database suspension

B Oracle Enqueue Names

C Statistics Descriptions

Displaying Statistics
Statistics Descriptions

Index

Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback

资料来源

资料来源：Oracle OTN 文档库

收集整理：Snowywolf

整理时间：2003-07

适用版本：Oracle9i SQL Reference, Release 2 (9.2)

版权声明

您可以自由地将此文档复制发行，但请保留此声明页。

请勿将此文档用于任何商业用途。

联系作者

ITPUB号：Snowywolf

E m a i l：Snowywolf2008@yahoo.com.cn

姓 名：李绍俊

雪狼 作品
Oracle
Copyright © 2000, 2002 Oracle Corporation.
All Rights Reserved.


Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Oracle9i

Database Reference

Release 2 (9.2)

October 2002

Part No. A96536-02

Oracle9i Database Reference, Release 2 (9.2)

Part No. A96536-02

Copyright © 1996, 2002 Oracle Corporation. All rights reserved.

Primary Author: Tony Morales

Contributing Author: Diana Lorentz

Contributors: Nipun Agarwal, Angela Amor, Rick Anderson, Lance Ashdown, Mark Bauer, Ruth Baylis, Neerja Bhatt, Tudor Bosman, George Candea, Wilson Chan, Sumanta Chatterjee, Eugene Chong, Michele Cyran, Mary Ann Davidson, Connie Dialeris Green, Harvey Eneman, Bruce Ernst, Ira Greenberg, Steve Harris, Thuvan Hoang, Lilian Hobbs, Namit Jain, Hakkan Jakobsson, Bob Jenkins, Mark Johnson, Jonathan Klein, Sushil Kumar, Tirthankar Lahiri, Bill Lee, Nina Lewis, Yunrui Li, Juan Loaiza, Neil MacNaughton, Kant Patel, Shankar Raman, Ari Mozes, Subramanian Muralidhar, Ravi Murthy, Karuna Muthiah, Arvind Nithrakashyap, Ronald Obermarck, Cetin Ozbutun, Christopher Racicot, Mark Ramacher, Suvendu Ray, Ann Rhee, Vivian Schupmann, Harlan Sexton, Helen Slattery, Ekrem Soylemez, Debbie Steiner, Seema Sundara, Juan Tellez, Alex Tsukerman, Kothanda Umamageswaran, Randy Urbano, Steve Vivian, Eric Voss, Tak Wang, Steve Wertheimer, Andy Witkowski, Daniel Wong, Graham Wood, Brian Wright, Aravind Yalamanchi, Qin Yu, Mohamed Ziauddin

The Programs (which include both the software and documentation) contain proprietary information of Oracle Corporation; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent and other intellectual and industrial property laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.

The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.

If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on behalf of the U.S. Government, the following notice is applicable:

Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial computer software" and use, duplication, and disclosure of the Programs, including documentation, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065.

The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the Programs.

Oracle is a registered trademark, and Oracle Store, Oracle7, Oracle8, Oracle8i, Oracle9i, PL/SQL, Pro*C/C++, SQL*Net, and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. Other names may be trademarks of their respective owners.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Preface

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Preface

This manual provides reference information about database initialization parameters, static data dictionary views, dynamic performance views, database limits, and SQL scripts that are part of the Oracle database system.

Oracle9i Database Reference contains information that describes the features and functionality of the Oracle9i (also known as the standard edition) and the Oracle9i Enterprise Edition products. Oracle9i and the Oracle9i Enterprise Edition have the same basic features. However, several advanced features are available only with the Enterprise Edition, and some of these are optional. For example, to use application failover, you must have the Enterprise Edition with the Oracle9i Real Application Clusters option.

See Also:

Oracle9i Database New Features for information about the differences between Oracle9i and the Oracle9i Enterprise Edition and the features and options that are available to you.

This preface contains these topics:

  • Audience
  • Organization
  • Related Documentation
  • Conventions
  • Documentation Accessibility

Audience

Oracle9i Database Reference is intended for database administrators, system administrators, and database application developers.

To use this document, you need TO BE FAMILIAR WITH THE FOLLOWING:

  • Oracle database management system (DBMS) concepts
  • Your operating system environment

Organization

This document contains:

Chapter 1, "Initialization Parameters"

This chapter describes the database initialization parameters you can specify in the parameter file to start or configure an instance.

Chapter 2, "Static Data Dictionary Views"

This chapter describes the Oracle data dictionary tables and views, also known as static data dictionary views.

Chapter 3, "Dynamic Performance (V$) Views"

This chapter describes the dynamic performance views, also known as the V$ views.

Chapter 4, "Database Limits"

This chapter lists the limits of values associated with database functions and objects.

Chapter 5, "SQL Scripts"

This chapter describes the SQL scripts that are required for optimal operation of the Oracle database server.

Appendix A, "Oracle Wait Events"

This appendix describes some event names, wait times, and parameters for wait events displayed by the V$SESSION_WAIT and V$SYSTEM_EVENT views.

Appendix B, "Oracle Enqueue Names"

This appendix lists some enqueues used by Oracle9i.

Appendix C, "Statistics Descriptions"

This appendix describes some statistics stored in the V$SESSION_WAIT and V$SYSSTAT dynamic performance views.

Related Documentation

For more information, see these Oracle resources:

  • Oracle9i Database Concepts for a comprehensive introduction to the concepts and terminology used in this manual
  • Oracle9i Database Administrator's Guide for information about administering the Oracle database server
  • Oracle9i Database Migration for the procedures for upgrading a previous release of Oracle to the new Oracle9i release
  • Oracle9i SQL Reference for information on Oracle's SQL commands and functions
  • Oracle9i Application Developer's Guide - Fundamentals for information about developing database applications within the Oracle database server

Many of the examples in this book use the sample schemas of the seed database, which is installed by default when you install Oracle. Refer to Oracle9i Sample Schemas for information on how these schemas were created and how you can use them yourself.

In North America, printed documentation is available for sale in the Oracle Store at

http://oraclestore.oracle.com/

Customers in Europe, the Middle East, and Africa (EMEA) can purchase documentation from

http://www.oraclebookshop.com/

Other customers can contact their Oracle representative to purchase printed documentation.

To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at

http://otn.oracle.com/admin/account/membership.html

If you already have a username and password for OTN, then you can go directly to the documentation section of the OTN Web site at

http://otn.oracle.com/docs/index.htm

To access the database documentation search engine directly, please visit

http://tahiti.oracle.com

Conventions

This section describes the conventions used in the text and code examples of this documentation set. It describes:

  • Conventions in Text
  • Conventions in Code Examples
  • Conventions for Microsoft Windows Operating Systems

Conventions in Text

We use various conventions in text to help you more quickly identify special terms. The following table describes those conventions and provides examples of their use.

Convention Meaning Example

Bold

Bold typeface indicates terms that are defined in the text or terms that appear in a glossary, or both.

When you specify this clause, you create an index-organized table.

Italics

Italic typeface indicates book titles or emphasis.

Oracle9i Database Concepts

Ensure that the recovery catalog and target database do not reside on the same disk.

UPPERCASE monospace (fixed-width font)

Uppercase monospace typeface indicates elements supplied by the system. Such elements include parameters, privileges, datatypes, RMAN keywords, SQL keywords, SQL*Plus or utility commands, packages and methods, as well as system-supplied column names, database objects and structures, usernames, and roles.

You can specify this clause only for a NUMBER column.

You can back up the database by using the BACKUP command.

Query the TABLE_NAME column in the USER_TABLES data dictionary view.

Use the DBMS_STATS.GENERATE_STATS procedure.

lowercase monospace (fixed-width font)

Lowercase monospace typeface indicates executables, filenames, directory names, and sample user-supplied elements. Such elements include computer and database names, net service names, and connect identifiers, as well as user-supplied database objects and structures, column names, packages and classes, usernames and roles, program units, and parameter values.

Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown.

Enter sqlplus to open SQL*Plus.

The password is specified in the orapwd file.

Back up the datafiles and control files in the /disk1/oracle/dbs directory.

The department_id, department_name, and location_id columns are in the hr.departments table.

Set the QUERY_REWRITE_ENABLED initialization parameter to true.

Connect as oe user.

The JRepUtil class implements these methods.

lowercase monospace (fixed-width font) italic

Lowercase monospace italic font represents placeholders or variables.

You can specify the parallel_clause.

Run U old_release.SQL where old_release refers to the release you installed prior to upgrading.

Conventions in Code Examples

Code examples illustrate SQL, PL/SQL, SQL*Plus, or other command-line statements. They are displayed in a monospace (fixed-width) font and separated from normal text as shown in this example:

SELECT username FROM dba_users WHERE username = 'MIGRATE';

The following table describes typographic conventions used in code examples and provides examples of their use.

Convention Meaning Example
[ ]

Brackets enclose one or more optional items. Do not enter the brackets.

DECIMAL (digits [ , precision ])

{ }

Braces enclose two or more items, one of which is required. Do not enter the braces.

{ENABLE | DISABLE}

|

A vertical bar represents a choice of two or more options within brackets or braces. Enter one of the options. Do not enter the vertical bar.

{ENABLE | DISABLE}
[COMPRESS | NOCOMPRESS]

...

Horizontal ellipsis points indicate either:

  • That we have omitted parts of the code that are not directly related to the example
  • That you can repeat a portion of the code

CREATE TABLE ... AS subquery;

SELECT col1, col2, ... , coln FROM
employees;

 .
 .
 .

Vertical ellipsis points indicate that we have omitted several lines of code not directly related to the example.

SQL> SELECT NAME FROM V$DATAFILE;
NAME
------------------------------------
/fsl/dbs/tbs_01.dbf
/fs1/dbs/tbs_02.dbf
.
.
.
/fsl/dbs/tbs_09.dbf
9 rows selected.

Other notation

You must enter symbols other than brackets, braces, vertical bars, and ellipsis points as shown.

acctbal NUMBER(11,2);
acct    CONSTANT NUMBER(4) := 3;

Italics

Italicized text indicates placeholders or variables for which you must supply particular values.

CONNECT SYSTEM/system_password
DB_NAME = database_name

UPPERCASE

Uppercase typeface indicates elements supplied by the system. We show these terms in uppercase in order to distinguish them from terms you define. Unless terms appear in brackets, enter them in the order and with the spelling shown. However, because these terms are not case sensitive, you can enter them in lowercase.

SELECT last_name, employee_id FROM
employees;
SELECT * FROM USER_TABLES;
DROP TABLE hr.employees;

lowercase

Lowercase typeface indicates programmatic elements that you supply. For example, lowercase indicates names of tables, columns, or files.

Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown.

SELECT last_name, employee_id FROM
employees;
sqlplus hr/hr
CREATE USER mjones IDENTIFIED BY ty3MU9;

Conventions for Microsoft Windows Operating Systems

The following table describes conventions for Microsoft Windows operating systems and provides examples of their use.

Convention Meaning Example

Choose Start >

How to start a program.

To start the Oracle Database Configuration Assistant, choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Database Configuration Assistant.

File and directory names

File and directory names are not case sensitive. The following special characters are not allowed: left angle bracket (<), right angle bracket (>), colon (:), double quotation marks ("), slash (/), pipe (|), and dash (-). The special character backslash (\) is treated as an element separator, even when it appears in quotes. If the file name begins with \\, then Windows assumes it uses the Universal Naming Convention.

c:\winnt"\"system32 is the same as C:\WINNT\SYSTEM32

C:\>

Represents the Windows command prompt of the current hard disk drive. The escape character in a command prompt is the caret (^). Your prompt reflects the subdirectory in which you are working. Referred to as the command prompt in this manual.

C:\oracle\oradata>

The backslash (\) special character is sometimes required as an escape character for the double quotation mark (") special character at the Windows command prompt. Parentheses and the single quotation mark (') do not require an escape character. Refer to your Windows operating system documentation for more information on escape and special characters.

C:\>exp scott/tiger TABLES=emp QUERY=\"WHERE job='SALESMAN' and sal<1600\"

C:\>imp SYSTEM/password FROMUSER=scott TABLES=(emp, dept)

HOME_NAME

Represents the Oracle home name. The home name can be up to 16 alphanumeric characters. The only special character allowed in the home name is the underscore.

C:\> net start Oracle HOME_NAME TNSListener

ORACLE_HOME and ORACLE_BASE

In releases prior to Oracle8i release 8.1.3, when you installed Oracle components, all subdirectories were located under a top level ORACLE_HOME directory that by default used one of the following names:

  • C:\orant for Windows NT
  • C:\orawin98 for Windows 98

This release complies with Optimal Flexible Architecture (OFA) guidelines. All subdirectories are not under a top level ORACLE_HOME directory. There is a top level directory called ORACLE_BASE that by default is C:\oracle. If you install Oracle9i release 1 (9.0.1) on a computer with no other Oracle software installed, then the default setting for the first Oracle home directory is C:\oracle\ora90. The Oracle home directory is located directly under ORACLE_BASE.

All directory path examples in this guide follow OFA conventions.

Refer to Oracle9i Database Getting Started for Windows for additional information about OFA compliances and for information about installing Oracle products in non-OFA compliant directories.

Go to the ORACLE_BASE\ORACLE_HOME\rdbms\admin directory.

Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle Corporation is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at

http://www.oracle.com/accessibility/
Accessibility of Code Examples in Documentation

JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle Corporation does not own or control. Oracle Corporation neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Send Us Your Comments

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Send Us Your Comments

Oracle9i Database Reference, Release 2 (9.2)

Part No. A96536-02

Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this document. Your input is an important part of the information used for revision.

  • Did you find any errors?
  • Is the information clearly presented?
  • Do you need more information? If so, where?
  • Are the examples correct? Do you need more examples?
  • What features did you like most?

If you find any errors or have any other suggestions for improvement, please indicate the document title and part number, and the chapter, section, and page number (if available). You can send comments to us in the following ways:

  • Electronic mail: infodev_us@oracle.com
  • FAX: (650) 506-7227 Attn: Server Technologies Documentation Manager
  • Postal service:
    Oracle Corporation
    Server Technologies Documentation
    500 Oracle Parkway, Mailstop 4op11
    Redwood Shores, CA 94065
    USA

If you would like a reply, please give your name, address, telephone number, and (optionally) electronic mail address.

If you have problems with the software, please contact your local Oracle Support Services.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
ýýýý««««««««


What's New in SQL Reference?

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

What's New in SQL Reference?

This section describes new features of Oracle9i release 2 and provides pointers to additional information. New features information from previous releases is also retained to help those users upgrading to the current release.

The following sections describe the new features in the Oracle9i SQL Reference:

  • Oracle9i Release 2 (9.2) New Features in the SQL Reference
  • Oracle9i Release 1 (9.0.1) New Features in the SQL Reference
  • Oracle8i New Features in SQL Reference

Oracle9i Release 2 (9.2) New Features in the SQL Reference

The following built-in conditions are new to this release:

  • EQUALS_PATH
  • UNDER_PATH

The following built-in expression is enhanced in this release:

  • The syntax for type constructor expressions now allows creation of new user-defined constructors (see "Type Constructor Expressions" ).

The following built-in functions are new to this release:

  • DEPTH
  • EXTRACTVALUE
  • PATH
  • UPDATEXML
  • XMLAGG
  • XMLCONCAT
  • XMLCOLATTVAL
  • XMLELEMENT
  • XMLFOREST
  • XMLSEQUENCE
  • XMLTRANSFORM

The following privileges are new or enhanced in this release:

  • DEBUG CONNECT SESSION system privilege (new)
  • DEBUG ANY PROCEDURE system privilege (new)
  • DEBUG object privilege (new)
  • EXECUTE object privilege on procedures, packages, libraries, and object types (enhanced)
  • GRANT ANY OBJECT PRIVILEGE system privilege

The following top-level SQL statements are new or enhanced in this release:

  • ALTER DATABASE has new syntax for managing standby databases, for managed standby recovery, and for logical standby.
  • ALTER OPERATOR lets you recompile an existing user-defined operator.
  • ALTER TABLE contains new clauses that let you rename a column or a constraint.
  • CREATE DATABASE :
    • Contains two new clauses for assigning passwords to the SYS and SYSTEM users
    • Lets you create a locally managed SYSTEM tablespace
  • CREATE SYNONYM now allows creation of synonyms for object types.
  • CREATE TABLE :
    • Allows creation of a default list partition to capture rows that do not fall within any of the other list partitions
    • Allows creation of range-list composite-partitioned tables
    • Contains syntax for creating a table of type XMLType and for creating range-list composite-partitioned tables
    • Allows data compression of data in table and partition segments
  • CREATE TYPE allows creation of object types with of NCHAR, NVARCHAR2, and NCLOB attributes.
  • CREATE VIEW now contains syntax for creating an XML view by transforming a table of type XMLType.
  • SELECT provides syntax for "flashback queries", which let you query data at a specified system change number or time in the past.

Oracle9i Release 1 (9.0.1) New Features in the SQL Reference

The following built-in datatypes were new or modified in this release:

  • Oracle provides SQL-based interfaces for defining new types when the built-in or ANSI-supported types are not sufficient. See "Oracle-Supplied Types" .
  • "CHAR Datatype" can take the CHAR or BYTE parameter to indicate character or byte semantics, respectively.
  • "INTERVAL YEAR TO MONTH Datatype" and "INTERVAL DAY TO SECOND Datatype" are provided for additional datetime functionality
  • "TIMESTAMP Datatype" is provided for additional datetime functionality.
  • "VARCHAR2 Datatype" can take the CHAR or BYTE parameter to indicate character or byte semantics, respectively.

The following expression forms were new or enhanced in this release:

  • "CASE Expressions" (enhanced with searched case expression)
  • "CURSOR Expressions" (enhanced; they can be passed as REF CURSOR arguments to functions)
  • "Datetime Expressions" (new)
  • "INTERVAL Expressions" (new)
  • "Scalar Subquery Expressions" (new)

The following condition was new in this release:

  • IS OF type Conditions

The following built-in functions were new to this release:

  • ASCIISTR
  • BIN_TO_NUM
  • COALESCE
  • COMPOSE
  • CURRENT_DATE
  • CURRENT_TIMESTAMP
  • DBTIMEZONE
  • DECOMPOSE
  • EXISTSNODE
  • EXTRACT (datetime)
  • EXTRACT (XML)
  • FIRST
  • FROM_TZ
  • GROUP_ID
  • GROUPING_ID
  • LAST
  • LOCALTIMESTAMP
  • NULLIF
  • PERCENTILE_CONT
  • PERCENTILE_DISC
  • RAWTONHEX
  • ROWIDTONCHAR
  • SESSIONTIMEZONE
  • SYS_CONNECT_BY_PATH
  • SYS_DBURIGEN
  • SYS_EXTRACT_UTC
  • SYS_XMLAGG
  • SYS_XMLGEN
  • SYSTIMESTAMP
  • TO_CHAR (character)
  • TO_CLOB
  • TO_DSINTERVAL
  • TO_NCHAR (character)
  • TO_NCHAR (datetime)
  • TO_NCHAR (number)
  • TO_NCLOB
  • TO_TIMESTAMP
  • TO_TIMESTAMP_TZ
  • TO_YMINTERVAL
  • TREAT
  • TZ_OFFSET
  • UNISTR
  • WIDTH_BUCKET

The following functions were enhanced for this release:

  • INSTR
  • LENGTH
  • SUBSTR

The following privileges were new to this release:

  • EXEMPT ACCESS POLICY system privilege
  • RESUMABLE system privilege
  • SELECT ANY DICTIONARY system privilege
  • UNDER ANY TYPE system privilege
  • UNDER ANY VIEW system privilege
  • UNDER object privilege

The following top-level SQL statements were new to this release:

  • CREATE PFILE
  • CREATE SPFILE
  • MERGE

The following SQL statements had new syntax:

  • ALTER DATABASE has new syntax that lets you end a "hot backup" procedure while the database is mounted. It also has new syntax related to standby databases.
  • ALTER INDEX lets you gather statistics on index usage.
  • ALTER OUTLINE allows modification of both public and private outlines.
  • ALTER ROLE lets you identify a role using an application-specified package.
  • ALTER SESSION lets you specify whether statements issued during the session can be suspended under some conditions.
  • ALTER SYSTEM has extended SET clause and new RESET clause; lets you put the database in quiesed state.
  • ALTER TABLE allows partitioning by a list of specified values.
  • ALTER TYPE lets you modify the attribute or method definition of an object type.
  • ALTER VIEW lets you add constraints to views.
  • ANALYZE now has ONLINE and OFFLINE clauses as part of the VALIDATE STRUCTURE syntax. In addition, you can now choose whether to collect standard statistics, user-defined statistics, or both.
  • constraints has been enhanced to facilitate index handling when dropping or disabling constraints.
  • CREATE CONTEXT has added syntax to let you initialize the context from the LDAP directory or from an OCI interface and to make the context accessible throughout an instance.
  • CREATE CONTROLFILE allows creation of Oracle-managed files.
  • CREATE DATABASE lets you create default temporary tablespaces when you create the database; lets you create undo tablespaces.
  • CREATE FUNCTION lets you create pipelined and parallel table functions and user-defined aggregate functions.
  • CREATE OUTLINE allows creation of both public and private outlines.
  • CREATE ROLE lets you identify a role using an application-specified package.
  • CREATE TABLE allows creation of external tables (tables whose data is outside the database); allows creation of Oracle-managed files; allows partitioning by a list of specified values.
  • CREATE TABLESPACE allows for segment space management by bitmaps as well as by free lists; allows creation of Oracle-managed files; lets you create undo tablespaces.
  • CREATE TEMPORARY TABLESPACE allows creation of Oracle-managed files.
  • CREATE TYPE lets you create subtypes.
  • CREATE VIEW lets you create subviews of object views; lets you define constraints on views.
  • DROP TABLESPACE has added syntax that lets you drop operating system files when you drop the contents from a dropped tablespace.
  • file_specification allows creation of Oracle-managed files.
  • INSERT has added syntax that lets you insert default column values.
  • SELECT lets you specify multiple groupings in the GROUP BY clause, for selective analysis across multiple dimensions; lets you assign names to subquery blocks; has new ANSI-compliant join syntax.
  • SET TRANSACTION lets you specify a name for a transaction.
  • UPDATE has added syntax that lets you update to default column values.

Oracle8i New Features in SQL Reference

The following SQL functions were new to this version:

  • BITAND
  • CORR
  • COVAR_POP
  • COVAR_SAMP
  • CUME_DIST
  • DENSE_RANK
  • FIRST_VALUE
  • LAG
  • LAST_VALUE
  • LEAD
  • NTILE
  • NUMTOYMINTERVAL
  • NUMTODSINTERVAL
  • NVL2
  • PERCENT_RANK
  • RANK
  • RATIO_TO_REPORT
  • REGR_ (Linear Regression) Functions
  • STDDEV_POP
  • STDDEV_SAMP
  • VAR_POP
  • VAR_SAMP

The following top-level SQL statements were new to Release 8.1.5:

  • ALTER DIMENSION
  • ALTER JAVA
  • ALTER OUTLINE
  • ASSOCIATE STATISTICS
  • CALL
  • CREATE CONTEXT
  • CREATE DIMENSION
  • CREATE INDEXTYPE
  • CREATE JAVA
  • CREATE OPERATOR
  • CREATE OUTLINE
  • CREATE TEMPORARY TABLESPACE
  • DISASSOCIATE STATISTICS
  • DROP CONTEXT
  • DROP DIMENSION
  • DROP INDEXTYPE
  • DROP JAVA
  • DROP OPERATOR
  • DROP OUTLINE

In addition, the following features were enhanced:

  • The aggregate functions have expanded functionality. See "Aggregate Functions" .
  • When specifying LOB storage parameters, you can now specify caching of LOBs for read-only purposes. See CREATE TABLE .
  • The section on Expressions now contains a new expression. See "CASE Expressions" .
  • Subqueries can now be unnested. See "Unnesting of Nested Subqueries".
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Introduction to Oracle SQL

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

1
Introduction to Oracle SQL

Structured Query Language (SQL) is the set of statements with which all programs and users access data in an Oracle database. Application programs and Oracle tools often allow users access to the database without using SQL directly, but these applications in turn must use SQL when executing the user's request. This chapter provides background information on SQL as used by most database systems.

This chapter contains these topics:

  • History of SQL
  • SQL Standards
  • Embedded SQL
  • Lexical Conventions
  • Tools Support

History of SQL

Dr. E. F. Codd published the paper, "A Relational Model of Data for Large Shared Data Banks", in June 1970 in the Association of Computer Machinery (ACM) journal, Communications of the ACM. Codd's model is now accepted as the definitive model for relational database management systems (RDBMS). The language, Structured English Query Language ("SEQUEL") was developed by IBM Corporation, Inc., to use Codd's model. SEQUEL later became SQL (still pronounced "sequel"). In 1979, Relational Software, Inc. (now Oracle Corporation) introduced the first commercially available implementation of SQL. Today, SQL is accepted as the standard RDBMS language.

SQL Standards

Oracle Corporation strives to comply with industry-accepted standards and participates actively in SQL standards committees. Industry-accepted committees are the American National Standards Institute (ANSI) and the International Standards Organization (ISO), which is affiliated with the International Electrotechnical Commission (IEC). Both ANSI and the ISO/IEC have accepted SQL as the standard language for relational databases. When a new SQL standard is simultaneously published by these organizations, the names of the standards conform to conventions used by the organization, but the standards are technically identical.

The latest SQL standard was adopted in July 1999 and is often called SQL:99. The formal names of this standard are:

  • ANSI X3.135-1999, "Database Language SQL", Parts 1 ("Framework"), 2 ("Foundation"), and 5 ("Bindings")
  • ISO/IEC 9075:1999, "Database Language SQL", Parts 1 ("Framework"), 2 ("Foundation"), and 5 ("Bindings")

    See Also:

    Appendix B, "Oracle and Standard SQL" for a detailed description of Oracle's conformance to the SQL:99 standards

How SQL Works

The strengths of SQL provide benefits for all types of users, including application programmers, database administrators, managers, and end users. Technically speaking, SQL is a data sublanguage. The purpose of SQL is to provide an interface to a relational database such as Oracle, and all SQL statements are instructions to the database. In this SQL differs from general-purpose programming languages like C and BASIC. Among the features of SQL are the following:

  • It processes sets of data as groups rather than as individual units.
  • It provides automatic navigation to the data.
  • It uses statements that are complex and powerful individually, and that therefore stand alone. Flow-control statements were not part of SQL originally, but they are found in the recently accepted optional part of SQL, ISO/IEC 9075-5: 1996. Flow-control statements are commonly known as "persistent stored modules" (PSM), and Oracle's PL/SQL extension to SQL is similar to PSM.

Essentially, SQL lets you work with data at the logical level. You need to be concerned with the implementation details only when you want to manipulate the data. For example, to retrieve a set of rows from a table, you define a condition used to filter the rows. All rows satisfying the condition are retrieved in a single step and can be passed as a unit to the user, to another SQL statement, or to an application. You need not deal with the rows one by one, nor do you have to worry about how they are physically stored or retrieved. All SQL statements use the optimizer, a part of Oracle that determines the most efficient means of accessing the specified data. Oracle also provides techniques that you can use to make the optimizer perform its job better.

SQL provides statements for a variety of tasks, including:

  • Querying data
  • Inserting, updating, and deleting rows in a table
  • Creating, replacing, altering, and dropping objects
  • Controlling access to the database and its objects
  • Guaranteeing database consistency and integrity

SQL unifies all of the preceding tasks in one consistent language.

Common Language for All Relational Databases

All major relational database management systems support SQL, so you can transfer all skills you have gained with SQL from one database to another. In addition, all programs written in SQL are portable. They can often be moved from one database to another with very little modification.

Embedded SQL

Embedded SQL refers to the use of standard SQL statements embedded within a procedural programming language. The embedded SQL statements are documented in the Oracle precompiler books.

Embedded SQL is a collection of these statements:

  • All SQL commands, such as SELECT and INSERT, available with SQL with interactive tools
  • Dynamic SQL execution commands, such as PREPARE and OPEN, which integrate the standard SQL statements with a procedural programming language

Embedded SQL also includes extensions to some standard SQL statements. Embedded SQL is supported by the Oracle precompilers. The Oracle precompilers interpret embedded SQL statements and translate them into statements that can be understood by procedural language compilers.

Each of these Oracle precompilers translates embedded SQL programs into a different procedural language:

  • Pro*C/C++ precompiler
  • Pro*COBOL precompiler

    See Also:

    Pro*C/C++ Precompiler Programmer's Guide and Pro*COBOL Precompiler Programmer's Guide for a definition of the Oracle precompilers and embedded SQL statements

Lexical Conventions

The following lexical conventions for issuing SQL statements apply specifically to Oracle's implementation of SQL, but are generally acceptable in other SQL implementations.

When you issue a SQL statement, you can include one or more tabs, carriage returns, spaces, or comments anywhere a space occurs within the definition of the statement. Thus, Oracle evaluates the following two statements in the same manner:

SELECT last_name,salary*12,MONTHS_BETWEEN(hire_date, SYSDATE)
   FROM employees;

SELECT last_name,
     salary * 12,
          MONTHS_BETWEEN( hire_date, SYSDATE )
FROM employees;

Case is insignificant in reserved words, keywords, identifiers and parameters. However, case is significant in text literals and quoted names.

See Also:

"Text Literals" for a syntax description

Tools Support

Most (but not all) Oracle tools support all features of Oracle SQL. This reference describes the complete functionality of SQL. If the Oracle tool that you are using does not support this complete functionality, you can find a discussion of the restrictions in the manual describing the tool, such as SQL*Plus User's Guide and Reference.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Basic Elements of Oracle SQL, 1 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

2
Basic Elements of Oracle SQL

This chapter contains reference information on the basic elements of Oracle SQL. These elements are the simplest building blocks of SQL statements. Therefore, before using the statements described in Chapter 9 through Chapter 18, you should familiarize yourself with the concepts covered in this chapter, as well as in Chapter 3, "Operators", Chapter 4, "Expressions", Chapter 6, "Functions", and Chapter 8, "SQL Queries and Subqueries".

This chapter contains these sections:

  • Datatypes
  • Literals
  • Format Models
  • Nulls
  • Pseudocolumns
  • Comments
  • Database Objects
  • Schema Object Names and Qualifiers
  • Syntax for Schema Objects and Parts in SQL Statements
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Basic Elements of Oracle SQL, 2 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Datatypes

Each value manipulated by Oracle has a datatype. A value's datatype associates a fixed set of properties with the value. These properties cause Oracle to treat values of one datatype differently from values of another. For example, you can add values of NUMBER datatype, but not values of RAW datatype.

When you create a table or cluster, you must specify a datatype for each of its columns. When you create a procedure or stored function, you must specify a datatype for each of its arguments. These datatypes define the domain of values that each column can contain or each argument can have. For example, DATE columns cannot accept the value February 29 (except for a leap year) or the values 2 or 'SHOE'. Each value subsequently placed in a column assumes the column's datatype. For example, if you insert '01-JAN-98' into a DATE column, then Oracle treats the '01-JAN-98' character string as a DATE value after verifying that it translates to a valid date.

Oracle provides a number of built-in datatypes as well as several categories for user-defined types that can be used as datatypes. The syntax of Oracle datatypes appears in the diagrams that follow. The text of this section is divided into the following sections:

  • Oracle Built-in Datatypes
  • ANSI, DB2, and SQL/DS Datatypes
  • User-Defined Types
  • Oracle-Supplied Types

    Note:

    The Oracle precompilers recognize other datatypes in embedded SQL programs. These datatypes are called external datatypes and are associated with host variables. Do not confuse built-in datatypes and user-defined types with external datatypes. For information on external datatypes, including how Oracle converts between them and built-in datatypes or user-defined types, see Pro*COBOL Precompiler Programmer's Guide, and Pro*C/C++ Precompiler Programmer's Guide.

datatypes::=

Text description of sql_elements24.gif follows
Text description of datatypes

Oracle_built_in_datatypes::=

Text description of sql_elements20.gif follows
Text description of Oracle_built_in_datatypes

character_datatypes::=

Text description of sql_elements26.gif follows
Text description of character_datatypes

number_datatypes::=

Text description of sql_elements21.gif follows
Text description of number_datatypes

long_and_raw_datatypes::=

Text description of sql_elements22.gif follows
Text description of long_and_raw_datatypes

datetime_datatypes::=

Text description of sql_elements23.gif follows
Text description of datetime_datatypes

large_object_datatypes::=

Text description of sql_elements25.gif follows
Text description of large_object_datatypes

rowid_datatypes::=

Text description of sql_elements27.gif follows
Text description of rowid_datatypes

The ANSI-supported datatypes appear in the figure that follows. Table 2-6 shows the mapping of ANSI-supported datatypes to Oracle built-in datatypes.

ANSI_supported_datatypes::=

Text description of sql_elements30.gif follows
Text description of ANSI_supported_datatypes

Oracle_supplied_types::=

Text description of sql_elements11.gif follows
Text description of Oracle_supplied_types

any_types::=

Text description of sql_elements13.gif follows
Text description of any_types

XML_types::=

Text description of sql_elements14.gif follows
Text description of XML_types

spatial_type::=

Text description of sql_elements19.gif follows
Text description of spatial_type

media_types::=

Text description of sql_elements58.gif follows
Text description of media_types

Oracle Built-in Datatypes

Table 2-1 summarizes Oracle built-in datatypes.

Table 2-1 Built-In Datatype Summary
Codea Built-In Datatype Description

1

VARCHAR2(size) [BYTE | CHAR]

Variable-length character string having maximum length size bytes or characters. Maximum size is 4000 bytes, and minimum is 1 byte or 1 character. You must specify size for VARCHAR2.

BYTE indicates that the column will have byte length semantics; CHAR indicates that the column will have character semantics.

1

NVARCHAR2(size)

Variable-length character string having maximum length size characters. Maximum size is determined by the national character set definition, with an upper limit of 4000 bytes. You must specify size for NVARCHAR2.

2

NUMBER(p,s)

Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can range from -84 to 127.

8

LONG

Character data of variable length up to 2 gigabytes, or 231 -1 bytes.

12

DATE

Valid date range from January 1, 4712 BC to December 31, 9999 AD.

180

TIMESTAMP (fractional_seconds_precision)

Year, month, and day values of date, as well as hour, minute, and second values of time, where fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values of fractional_seconds_precision are 0 to 9. The default is 6.

181

TIMESTAMP (fractional_seconds_precision) WITH TIME ZONE

All values of TIMESTAMP as well as time zone displacement value, where fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values are 0 to 9. The default is 6.

231

TIMESTAMP (fractional_seconds_precision) WITH LOCAL TIME ZONE

All values of TIMESTAMP WITH TIME ZONE, with the following exceptions:

  • Data is normalized to the database time zone when it is stored in the database.
  • When the data is retrieved, users see the data in the session time zone.

182

INTERVAL YEAR (year_precision) TO MONTH

Stores a period of time in years and months, where year_precision is the number of digits in the YEAR datetime field. Accepted values are 0 to 9. The default is 2.

183

INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision)

Stores a period of time in days, hours, minutes, and seconds, where

  • day_precision is the maximum number of digits in the DAY datetime field. Accepted values are 0 to 9. The default is 2.
  • fractional_seconds_precision is the number of digits in the fractional part of the SECOND field. Accepted values are 0 to 9. The default is 6.

23

RAW(size)

Raw binary data of length size bytes. Maximum size is 2000 bytes. You must specify size for a RAW value.

24

LONG RAW

Raw binary data of variable length up to 2 gigabytes.

69

ROWID

Base 64 string representing the unique address of a row in its table. This datatype is primarily for values returned by the ROWID pseudocolumn.

208

UROWID [(size)]

Base 64 string representing the logical address of a row of an index-organized table. The optional size is the size of a column of type UROWID. The maximum size and default is 4000 bytes.

96

CHAR(size)[BYTE | CHAR]

Fixed-length character data of length size bytes. Maximum size is 2000 bytes. Default and minimum size is 1 byte.

BYTE and CHAR have the same semantics as for VARCHAR2.

96

NCHAR(size)

Fixed-length character data of length size characters. Maximum size is determined by the national character set definition, with an upper limit of 2000 bytes. Default and minimum size is 1 character.

112

CLOB

A character large object containing single-byte characters. Both fixed-width and variable-width character sets are supported, both using the CHAR database character set. Maximum size is 4 gigabytes.

112

NCLOB

A character large object containing Unicode characters. Both fixed-width and variable-width character sets are supported, both using the NCHAR database character set. Maximum size is 4 gigabytes. Stores national character set data.

113

BLOB

A binary large object. Maximum size is 4 gigabytes.

114

BFILE

Contains a locator to a large binary file stored outside the database. Enables byte stream I/O access to external LOBs residing on the database server. Maximum size is 4 gigabytes.
a The codes listed for the datatypes are used internally by Oracle. The datatype code of a column or object attribute is returned by the DUMP function.
Character Datatypes

Character datatypes store character (alphanumeric) data, which are words and free-form text, in the database character set or national character set. They are less restrictive than other datatypes and consequently have fewer properties. For example, character columns can store all alphanumeric values, but NUMBER columns can store only numeric values.

Character data is stored in strings with byte values corresponding to one of the character sets, such as 7-bit ASCII or EBCDIC, specified when the database was created. Oracle supports both single-byte and multibyte character sets.

These datatypes are used for character data:

  • CHAR Datatype
  • NCHAR Datatype
  • NVARCHAR2 Datatype
  • VARCHAR2 Datatype

CHAR Datatype

The CHAR datatype specifies a fixed-length character string. Oracle subsequently ensures that all values stored in that column have the length specified by size. If you insert a value that is shorter than the column length, then Oracle blank-pads the value to column length. If you try to insert a value that is too long for the column, then Oracle returns an error.

The default length for a CHAR column is 1 byte and the maximum allowed is 2000 bytes. A 1-byte string can be inserted into a CHAR(10) column, but the string is blank-padded to 10 bytes before it is stored.

When you create a table with a CHAR column, by default you supply the column length in bytes. The BYTE qualifier is the same as the default. If you use the CHAR qualifier, for example CHAR(10 CHAR), then you supply the column length in characters. A character is technically a codepoint of the database character set. Its size can range from 1 byte to 4 bytes, depending on the database character set. The BYTE and CHAR qualifiers override the semantics specified by the NLS_LENGTH_SEMANTICS parameter, which has a default of byte semantics.

Note:

To ensure proper data conversion between databases with different character sets, you must ensure that CHAR data consists of well-formed strings. See Oracle9i Database Globalization Support Guide for more information on character set support.
See Also:

"Datatype Comparison Rules" for information on comparison semantics

NCHAR Datatype

Beginning with Oracle9i, the NCHAR datatype is redefined to be a Unicode-only datatype. When you create a table with an NCHAR column, you define the column length in characters. You define the national character set when you create your database.

The column's maximum length is determined by the national character set definition. Width specifications of character datatype NCHAR refer to the number of characters. The maximum column size allowed is 2000 bytes.

If you insert a value that is shorter than the column length, then Oracle blank-pads the value to column length. You cannot insert a CHAR value into an NCHAR column, nor can you insert an NCHAR value into a CHAR column.

The following example compares the col1 column of tab1 with national character set string 'NCHAR literal':

SELECT translated_description from product_descriptions
   WHERE translated_name = N'LCD Monitor 11/PM';
See Also:

Oracle9i Database Globalization Support Guide for information on Unicode datatype support

NVARCHAR2 Datatype

Beginning with Oracle9i, the NVARCHAR2 datatype is redefined to be a Unicode-only datatype. When you create a table with an NVARCHAR2 column, you supply the maximum number of characters it can hold. Oracle subsequently stores each value in the column exactly as you specify it, provided the value does not exceed the column's maximum length.

The column's maximum length is determined by the national character set definition. Width specifications of character datatype NVARCHAR2 refer to the number of characters. The maximum column size allowed is 4000 bytes.

See Also:

Oracle9i Database Globalization Support Guide for information on Unicode datatype support

VARCHAR2 Datatype

The VARCHAR2 datatype specifies a variable-length character string. When you create a VARCHAR2 column, you supply the maximum number of bytes or characters of data that it can hold. Oracle subsequently stores each value in the column exactly as you specify it, provided the value does not exceed the column's maximum length. If you try to insert a value that exceeds the specified length, then Oracle returns an error.

You must specify a maximum length for a VARCHAR2 column. This maximum must be at least 1 byte, although the actual string stored is permitted to be a zero-length string (''). You can use the CHAR qualifier, for example VARCHAR2(10 CHAR), to give the maximum length in characters instead of bytes. A character is technically a codepoint of the database character set. CHAR and BYTE qualifiers override the setting of the NLS_LENGTH_SEMANTICS parameter, which has a default of bytes. The maximum length of VARCHAR2 data is 4000 bytes. Oracle compares VARCHAR2 values using nonpadded comparison semantics.

Note:

To ensure proper data conversion between databases with different character sets, you must ensure that VARCHAR2 data consists of well-formed strings. See Oracle9i Database Globalization Support Guide for more information on character set support.
See Also:

"Datatype Comparison Rules" for information on comparison semantics

VARCHAR Datatype

The VARCHAR datatype is currently synonymous with the VARCHAR2 datatype. Oracle recommends that you use VARCHAR2 rather than VARCHAR. In the future, VARCHAR might be defined as a separate datatype used for variable-length character strings compared with different comparison semantics.

NUMBER Datatype

The NUMBER datatype stores zero, positive, and negative fixed and floating-point numbers with magnitudes between 1.0 x 10-130 and 9.9...9 x 10125 (38 nines followed by 88 zeroes) with 38 digits of precision. If you specify an arithmetic expression whose value has a magnitude greater than or equal to 1.0 x 10126, then Oracle returns an error.

Specify a fixed-point number using the following form:

NUMBER(p,s)

where:

  • p is the precision, or the total number of digits. Oracle guarantees the portability of numbers with precision ranging from 1 to 38.
  • s is the scale, or the number of digits to the right of the decimal point. The scale can range from -84 to 127.

Specify an integer using the following form:

NUMBER(p)

This represents a fixed-point number with precision p and scale 0 and is equivalent to NUMBER(p,0).

Specify a floating-point number using the following form:

NUMBER

The absence of precision and scale designators specifies the maximum range and precision for an Oracle number.

See Also:

"Floating-Point Numbers"

Scale and Precision

Specify the scale and precision of a fixed-point number column for extra integrity checking on input. Specifying scale and precision does not force all values to a fixed length. If a value exceeds the precision, then Oracle returns an error. If a value exceeds the scale, then Oracle rounds it.

Table 2-2 show how Oracle stores data using different precisions and scales.

Table 2-2 Storage of Scale and Precision
Actual Data | Specified As | Stored As
7456123.89 | NUMBER | 7456123.89
7456123.89 | NUMBER(9) | 7456124
7456123.89 | NUMBER(9,2) | 7456123.89
7456123.89 | NUMBER(9,1) | 7456123.9
7456123.89 | NUMBER(6) | exceeds precision
7456123.89 | NUMBER(7,-2) | 7456100
7456123.89 | NUMBER(7,2) | exceeds precision

Negative Scale

If the scale is negative, then the actual data is rounded to the specified number of places to the left of the decimal point. For example, a specification of (10,-2) means to round to hundreds.

Scale Greater than Precision

You can specify a scale that is greater than precision, although it is uncommon. In this case, the precision specifies the maximum number of digits to the right of the decimal point. As with all number datatypes, if the value exceeds the precision, then Oracle returns an error message. If the value exceeds the scale, then Oracle rounds the value. For example, a column defined as NUMBER(4,5) requires a zero for the first digit after the decimal point and rounds all values past the fifth digit after the decimal point. Table 2-3 show the effects of a scale greater than precision:

Table 2-3 Scale Greater Than Precision
Actual Data | Specified As | Stored As
.01234 | NUMBER(4,5) | .01234
.00012 | NUMBER(4,5) | .00012
.000127 | NUMBER(4,5) | .00013
.0000012 | NUMBER(2,7) | .0000012
.00000123 | NUMBER(2,7) | .0000012

Floating-Point Numbers

Oracle lets you specify floating-point numbers, which can have a decimal point anywhere from the first to the last digit or can have no decimal point at all. An exponent may optionally be used following the number to increase the range (for example, 1.777 e-20). A scale value is not applicable to floating-point numbers, because the number of digits that can appear after the decimal point is not restricted.

You can specify floating-point numbers with the range of values discussed in "NUMBER Datatype" . The format is defined in "Number Literals" . Oracle also supports the ANSI datatype FLOAT. You can specify this datatype using one of these syntactic forms:

  • FLOAT specifies a floating-point number with decimal precision 38 or binary precision 126.
  • FLOAT(b) specifies a floating-point number with binary precision b. The precision b can range from 1 to 126. To convert from binary to decimal precision, multiply b by 0.30103. To convert from decimal to binary precision, multiply the decimal precision by 3.32193. The maximum of 126 digits of binary precision is roughly equivalent to 38 digits of decimal precision.

LONG Datatype

LONG columns store variable-length character strings containing up to 2 gigabytes, or 231-1 bytes. LONG columns have many of the characteristics of VARCHAR2 columns. You can use LONG columns to store long text strings. The length of LONG values may be limited by the memory available on your computer.

Note:

Oracle Corporation strongly recommends that you convert LONG columns to LOB columns as soon as possible. Creation of new LONG columns is scheduled for desupport.

LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases. See the modify_col_properties clause of ALTER TABLE and TO_LOB for more information on converting LONG columns to LOB.

You can reference LONG columns in SQL statements in these places:

  • SELECT lists
  • SET clauses of UPDATE statements
  • VALUES clauses of INSERT statements

The use of LONG values is subject to some restrictions:

  • A table can contain only one LONG column.
  • You cannot create an object type with a LONG attribute.
  • LONG columns cannot appear in WHERE clauses or in integrity constraints (except that they can appear in NULL and NOT NULL constraints).
  • LONG columns cannot be indexed.
  • A stored function cannot return a LONG value.
  • You can declare a variable or argument of a PL/SQL program unit using the LONG datatype. However, you cannot then call the program unit from SQL.
  • Within a single SQL statement, all LONG columns, updated tables, and locked tables must be located on the same database.
  • LONG and LONG RAW columns cannot be used in distributed SQL statements and cannot be replicated.
  • If a table has both LONG and LOB columns, you cannot bind more than 4000 bytes of data to both the LONG and LOB columns in the same SQL statement. However, you can bind more than 4000 bytes of data to either the LONG or the LOB column.
  • A table with LONG columns cannot be stored in a tablespace with automatic segment-space management.

LONG columns cannot appear in certain parts of SQL statements:

  • GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements
  • The UNIQUE operator of a SELECT statement
  • The column list of a CREATE CLUSTER statement
  • The CLUSTER clause of a CREATE MATERIALIZED VIEW statement
  • SQL built-in functions, expressions, or conditions
  • SELECT lists of queries containing GROUP BY clauses
  • SELECT lists of subqueries or queries combined by the UNION, INTERSECT, or MINUS set operators
  • SELECT lists of CREATE TABLE ... AS SELECT statements
  • ALTER TABLE ... MOVE statements
  • SELECT lists in subqueries in INSERT statements

Triggers can use the LONG datatype in the following manner:

  • A SQL statement within a trigger can insert data into a LONG column.
  • If data from a LONG column can be converted to a constrained datatype (such as CHAR and VARCHAR2), a LONG column can be referenced in a SQL statement within a trigger.
  • Variables in triggers cannot be declared using the LONG datatype.
  • :NEW and :OLD cannot be used with LONG columns.

You can use the Oracle Call Interface functions to retrieve a portion of a LONG value from the database.

See Also:

Oracle Call Interface Programmer's Guide
Datetime and Interval Datatypes

The datetime datatypes are DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE. Values of datetime datatypes are sometimes called "datetimes". The interval datatypes are INTERVAL YEAR TO MONTH and INTERVAL DAY TO SECOND. Values of interval datatypes are sometimes called intervals.

Both datetimes and intervals are made up of fields. The values of these fields determine the value of the datatype. Table 2-4 lists the datetime fields and their possible values for datetimes and intervals.

Table 2-4 Datetime Fields and Values
Datetime Field | Valid Values for Datetime | Valid Values for INTERVAL
YEAR | -4712 to 9999 (excluding year 0) | Any positive or negative integer
MONTH | 01 to 12 | 0 to 11
DAY | 01 to 31 (limited by the values of MONTH and YEAR, according to the rules of the current NLS calendar parameter) | Any positive or negative integer
HOUR | 00 to 23 | 0 to 23
MINUTE | 00 to 59 | 0 to 59
SECOND | 00 to 59.9(n), where "9(n)" is the precision of time fractional seconds The "9(n)" portion is not applicable for DATE. | 0 to 59.9(n), where "9(n)" is the precision of interval fractional seconds
TIMEZONE_HOUR (See Note that follows.) | -12 to 14 (This range accommodates daylight savings time changes.) Not applicable for DATE. | Not applicable
TIMEZONE_MINUTE (See Note that follows.) | 00 to 59. Not applicable for DATE. | Not applicable
Note: TIMEZONE_HOUR and TIMEZONE_MINUTE are specified together and interpreted as an entity in the format +|- hh:mm, with values ranging from -12:59 to +14:00.
TIMEZONE_REGION | Query the TZNAME column of the V$TIMEZONE_NAMES data dictionary view. Not applicable for DATE. | Not applicable
TIMEZONE_ABBR | Query the TZABBREV column of the V$TIMEZONE_NAMES data dictionary view. Not applicable for DATE. | Not applicable
Note:

To avoid unexpected results in your DML operations on datetime data, you can verify the database and session time zones by querying the built-in SQL functions DBTIMEZONE and SESSIONTIMEZONE. If the time zones have not been set manually, Oracle uses the operating system time zone by default. If the operating system time zone is not a valid Oracle time zone, Oracle uses UTC as the default value.

DATE Datatype

The DATE datatype stores date and time information. Although date and time information can be represented in both character and number datatypes, the DATE datatype has special associated properties. For each DATE value, Oracle stores the following information: century, year, month, date, hour, minute, and second.

You can specify a date value as a literal, or you can convert a character or numeric value to a date value with the TO_DATE function. To specify a date as a literal, you must use the Gregorian calendar. You can specify an ANSI date literal, as shown in this example:

DATE '1998-12-25'

The ANSI date literal contains no time portion, and must be specified in exactly this format ('YYYY-MM-DD'). Alternatively you can specify an Oracle date literal, as in the following example:

TO_DATE('98-DEC-25:17:30','YY-MON-DD:HH24:MI')

The default date format for an Oracle date literal is specified by the initialization parameter NLS_DATE_FORMAT. This example date format includes a two-digit number for the day of the month, an abbreviation of the month name, the last two digits of the year, and a 24-hour time designation.

Oracle automatically converts character values that are in the default date format into date values when they are used in date expressions.

If you specify a date value without a time component, then the default time is 12:00:00 am (midnight). If you specify a date value without a date, then the default date is the first day of the current month.

Oracle DATE columns always contain both the date and time fields. If your queries use a date format without a time portion, then you must ensure that the time fields in the DATE column are set to zero (that is, midnight). Otherwise, Oracle may not return the query results you expect. Here are some examples that assume a table my_table with a number column row_num and a DATE column datecol:

INSERT INTO my_table VALUES (1, SYSDATE);
INSERT INTO my_table VALUES (2, TRUNC(SYSDATE));

SELECT * FROM my_table;

   ROW_NUM DATECOL
---------- ---------
         1 04-OCT-00
         2 04-OCT-00

SELECT * FROM my_table
   WHERE datecol = TO_DATE('04-OCT-00','DD-MON-YY');

   ROW_NUM DATECOL
---------- ---------
         2 04-OCT-00

If you know that the time fields of your DATE column are set to zero, then you can query your DATE column as shown in the immediately preceding example, or by using the DATE literal:

SELECT * FROM my_table WHERE datecol = DATE '2000-10-04';

However, if the DATE column contains nonzero time fields, then you must filter out the time fields in the query to get the correct result. For example:

SELECT * FROM my_table WHERE TRUNC(datecol) = DATE '2000-10-04';

Oracle applies the TRUNC function to each row in the query, so performance is better if you ensure the zero value of the time fields in your data. To ensure that the time fields are set to zero, use one of the following methods during inserts and updates:

  • Use the TO_DATE function to mask out the time fields:
    INSERT INTO my_table VALUES
   (3, TO_DATE('4-APR-2000','DD-MON-YYYY'));
  • Use the DATE literal:
    INSERT INTO my_table VALUES (4, '04-OCT-00');
  • Use the TRUNC function:
    INSERT INTO my_table VALUES (5, TRUNC(SYSDATE));

The date function SYSDATE returns the current system date and time. The function CURRENT_DATE returns the current session date. For information on SYSDATE, the TO_* datetime functions, and the default date format, see Chapter 6, "Functions".

Date Arithmetic

You can add and subtract number constants as well as other dates from dates. Oracle interprets number constants in arithmetic date expressions as numbers of days. For example, SYSDATE + 1 is tomorrow. SYSDATE - 7 is one week ago. SYSDATE + (10/1440) is ten minutes from now. Subtracting the hiredate column of the sample table employees from SYSDATE returns the number of days since each employee was hired. You cannot multiply or divide DATE values.

Oracle provides functions for many common date operations. For example, the ADD_MONTHS function lets you add or subtract months from a date. The MONTHS_BETWEEN function returns the number of months between two dates. The fractional portion of the result represents that portion of a 31-day month.

Because each date contains a time component, most results of date operations include a fraction. This fraction means a portion of one day. For example, 1.5 days is 36 hours.

See Also:
  • "Datetime Functions" for more information on date functions
  • "Datetime/Interval Arithmetic" for information on arithmetic involving other datetime and interval datatypes
Using Julian Dates

A Julian date is the number of days since January 1, 4712 bc. Julian dates allow continuous dating from a common reference. You can use the date format model "J" with date functions TO_DATE and TO_CHAR to convert between Oracle DATE values and their Julian equivalents.

Example

This statement returns the Julian equivalent of January 1, 1997:

SELECT TO_CHAR(TO_DATE('01-01-1997', 'MM-DD-YYYY'),'J')
    FROM DUAL;

TO_CHAR
--------
2450450
See Also:

"Selecting from the DUAL Table" for a description of the DUAL table

TIMESTAMP Datatype

The TIMESTAMP datatype is an extension of the DATE datatype. It stores the year, month, and day of the DATE datatype, plus hour, minute, and second values. This datatype is useful for storing precise time values. Specify the TIMESTAMP datatype as follows:

TIMESTAMP [(fractional_seconds_precision)]

where fractional_seconds_precision optionally specifies the number of digits Oracle stores in the fractional part of the SECOND datetime field. When you create a column of this datatype, the value can be a number in the range 0 to 9. The default is 6. When you specify TIMESTAMP as a literal, the fractional_seconds_precision value can be any number of digits up to 9, as follows:

TIMESTAMP'1997-01-31 09:26:50.124'
See Also:

TO_TIMESTAMP for information on converting character data to TIMESTAMP data

TIMESTAMP WITH TIME ZONE Datatype

TIMESTAMP WITH TIME ZONE is a variant of TIMESTAMP that includes a time zone displacement in its value. The time zone displacement is the difference (in hours and minutes) between local time and UTC (Coordinated Universal Time--formerly Greenwich Mean Time). This datatype is useful for collecting and evaluating date information across geographic regions.

Specify the TIMESTAMP WITH TIME ZONE datatype as follows:

TIMESTAMP [(fractional_seconds_precision)] WITH TIME ZONE

where fractional_seconds_precision optionally specifies the number of digits Oracle stores in the fractional part of the SECOND datetime field. When you create a column of this datatype, the value can be a number in the range 0 to 9. The default is 6. When you specify TIMESTAMP WITH TIME ZONE as a literal, the fractional_seconds_precision value can be any number of digits up to 9. For example:

TIMESTAMP '1997-01-31 09:26:56.66 +02:00'

Two TIMESTAMP WITH TIME ZONE values are considered identical if they represent the same instant in UTC, regardless of the TIME ZONE offsets stored in the data. For example,

TIMESTAMP '1999-04-15 8:00:00 -8:00'

is the same as

TIMESTAMP '1999-04-15 11:00:00 -5:00'

That is, 8:00 a.m. Pacific Standard Time is the same as 11:00 a.m. Eastern Standard Time.

You can replace the UTC offset with the TZR (time zone region) format element. For example, the following example has the same value as the preceding example:

TIMESTAMP '1999-04-15 8:00:00 US/Pacific'

To eliminate the ambiguity of boundary cases when the daylight savings time switches, use both the TZR and a corresponding TZD format element. The following example ensures that the preceding example will return a daylight savings time value:

TIMESTAMP '1999-10-29 01:30:00 US/Pacific PDT'

If you do not add the TZD format element, and the datetime value is ambiguous, then Oracle returns an error if you have the ERROR_ON_OVERLAP_TIME session parameter set to TRUE. If that parameter is set to FALSE, then Oracle interprets the ambiguous datetime as standard time.

Note:

Oracle's time zone data is derived from the public domain information available at ftp://elsie.nci.nih.gov/pub/. Oracle's time zone data may not reflect the most recent data available at this site. Please refer to Oracle9i Database Globalization Support Guide for more information on Oracle time zone data.
See Also:
  • "Support for Daylight Savings Times" and Table 2-15, " Datetime Format Elements" for information on daylight savings support
  • TO_TIMESTAMP_TZ for information on converting character data to TIMESTAMP WITH TIME ZONE data
  • ALTER SESSION for information on the ERROR_ON_OVERLAP_TIME session parameter

TIMESTAMP WITH LOCAL TIME ZONE Datatype

TIMESTAMP WITH LOCAL TIME ZONE is another variant of TIMESTAMP that includes a time zone displacement in its value. It differs from TIMESTAMP WITH TIME ZONE in that data stored in the database is normalized to the database time zone, and the time zone displacement is not stored as part of the column data. When users retrieve the data, Oracle returns it in the users' local session time zone. The time zone displacement is the difference (in hours and minutes) between local time and UTC (Coordinated Universal Time--formerly Greenwich Mean Time). This datatype is useful for displaying date information in the time zone of the client system in a two-tier application.

Specify the TIMESTAMP WITH LOCAL TIME ZONE datatype as follows:

TIMESTAMP [(fractional_seconds_precision)] WITH LOCAL TIME ZONE

where fractional_seconds_precision optionally specifies the number of digits Oracle stores in the fractional part of the SECOND datetime field. When you create a column of this datatype, the value can be a number in the range 0 to 9. The default is 6.

There is no literal for TIMESTAMP WITH LOCAL TIME ZONE.

Note:

Oracle's time zone data is derived from the public domain information available at ftp://elsie.nci.nih.gov/pub/. Oracle's time zone data may not reflect the most recent data available at this site. Please refer to Oracle9i Database Globalization Support Guide for more information on Oracle time zone data.
See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for examples of using this datatype
  • CAST for information on converting character data to TIMESTAMP WITH LOCAL TIME ZONE

INTERVAL YEAR TO MONTH Datatype

INTERVAL YEAR TO MONTH stores a period of time using the YEAR and MONTH datetime fields. This datatype is useful for representing the precise difference between two datetime values.

Specify INTERVAL YEAR TO MONTH as follows:

INTERVAL YEAR [(year_precision)] TO MONTH

where year_precision is the number of digits in the YEAR datetime field. The default value of year_precision is 2.

Note:

You have a great deal of flexibility when specifying interval values as literals. Please refer to "Interval Literals" for detailed information on specify interval values as literals.

INTERVAL DAY TO SECOND Datatype

INTERVAL DAY TO SECOND stores a period of time in terms of days, hours, minutes, and seconds. This datatype is useful for representing the difference between two datetime values when only the year and month values are significant.

Specify this datatype as follows:

INTERVAL DAY [(day_precision)]
   TO SECOND [(fractional_seconds_precision)]

where

  • day_precision is the number of digits in the DAY datetime field. Accepted values are 0 to 9. The default is 2.
  • fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values are 0 to 9. The default is 6.

    Note:

    You have a great deal of flexibility when specifying interval values as literals. Please refer to "Interval Literals" for detailed information on specify interval values as literals.

Datetime/Interval Arithmetic

Oracle lets you derive datetime and interval value expressions. Datetime value expressions yield values of datetime datatype. Interval value expressions yield values of interval datatype. Table 2-5 lists the operators that you can use in these expressions.

Table 2-5 Operators in Datetime/Interval Value Expressions
Operand 1 | Operator | Operand 2 | Result Type
Datetime | + | Interval | Datetime
Datetime | - | Interval | Datetime
Interval | + | Datetime | Datetime
Datetime | - | Datetime | Intervala
Interval | + | Interval | Interval
Interval | - | Interval | Interval
Interval | * | Numeric | Interval
Numeric | * | Interval | Interval
Interval | / | Numeric | Interval
a This operation is not valid for DATE values.

For example, you can add an interval value expression to a start time. Consider the sample table oe.orders with a column order_date. The following statement adds 30 days to the value of the order_date column:

SELECT order_id, order_date + INTERVAL '30' DAY FROM orders;

Oracle performs all timestamp arithmetic in UTC time. For TIMESTAMP WITH LOCAL TIME ZONE, Oracle converts the datetime value from the database time zone to UTC and converts back to the database time zone after performing the arithmetic. For TIMESTAMP WITH TIME ZONE, the datetime value is always in UTC, so no conversion is necessary.

Support for Daylight Savings Times

Oracle automatically determines, for any given time zone region, whether daylight savings is in effect and returns local time values based accordingly. The datetime value is sufficient for Oracle to determine whether daylight savings time is in effect for a given region in all cases except boundary cases. A boundary case occurs during the period when daylight savings goes into or comes out of effect. For example, in the US-Pacific region, when daylight savings goes into effect, the time changes from 2:00 a.m. to 3:00 a.m. The one hour interval between 2 and 3 a.m. does not exist. When daylight savings goes out of effect, the time changes from 2:00 a.m. back to 1:00 a.m., and the one-hour interval between 1 and 2 a.m. is repeated.

To resolve these boundary cases, Oracle uses the TZR and TZD format elements, as described in Table 2-15 . TZR represents the time zone region in datetime input strings. Examples are 'Australia/North', 'UTC', and 'Singapore'. TZD represents an abbreviated form of the time zone region with daylight savings information. Examples are 'PST' for US/Pacific standard time and 'PDT' for US/Pacific daylight time. To see a listing of valid values for the TZR and TZD format elements, query the TZNAME and TZABBREV columns of the V$TIMEZONE_NAMES dynamic performance view.

Note:

Timezone region names are needed by the daylight savings feature. The region names are stored in two time zone files. The default time zone file is a small file containing only the most common time zones to maximize performance. If your time zone is not in the default file, then you will not have daylight savings support until you provide a path to the complete (larger) file by way of the ORA_TZFILE environment variable. Please refer to Oracle9i Database Administrator's Guide for more information about setting the ORA_TZFILE environment variable.
Note:

Oracle's time zone data is derived from the public domain information available at ftp://elsie.nci.nih.gov/pub/. Oracle's time zone data may not reflect the most recent data available at this site. Please refer to Oracle9i Database Globalization Support Guide for more information on Oracle time zone data.
See Also:
  • "Date Format Models" for information on the format elements
  • Oracle9i Database Reference for information on the dynamic performance views

Datetime and Interval Example

The following example shows how to declare some datetime and interval datatypes.

CREATE TABLE time_table (
   start_time      TIMESTAMP,
   duration_1      INTERVAL DAY (6) TO SECOND (5),
   duration_2      INTERVAL YEAR TO MONTH);

The start_time column is of type TIMESTAMP. The implicit fractional seconds precision of TIMESTAMP is 6.

The duration_1 column is of type INTERVAL DAY TO SECOND. The maximum number of digits in field DAY is 6 and the maximum number of digits in the fractional second is 5. The maximum number of digits in all other datetime fields is 2.

The duration_2 column is of type INTERVAL YEAR TO MONTH. The maximum number of digits of the value in each field (YEAR and MONTH) is 2.

RAW and LONG RAW Datatypes

The RAW and LONG RAW datatypes store data that is not to be interpreted (not explicitly converted when moving data between different systems) by Oracle. These datatypes are intended for binary data or byte strings. For example, you can use LONG RAW to store graphics, sound, documents, or arrays of binary data, for which the interpretation is dependent on the use.

Note:

Oracle Corporation strongly recommends that you convert LONG RAW columns to binary LOB (BLOB) columns. LOB columns are subject to far fewer restrictions than LONG columns. See TO_LOB for more information.

RAW is a variable-length datatype like VARCHAR2, except that Oracle Net (which connects user sessions to the instance) and the Import and Export utilities do not perform character conversion when transmitting RAW or LONG RAW data. In contrast, Oracle Net and Import/Export automatically convert CHAR, VARCHAR2, and LONG data from the database character set to the user session character set (which you can set with the NLS_LANGUAGE parameter of the ALTER SESSION statement), if the two character sets are different.

When Oracle automatically converts RAW or LONG RAW data to and from CHAR data, the binary data is represented in hexadecimal form, with one hexadecimal character representing every four bits of RAW data. For example, one byte of RAW data with bits 11001011 is displayed and entered as 'CB'.

Large Object (LOB) Datatypes

The built-in LOB datatypes BLOB, CLOB, and NCLOB (stored internally) and BFILE (stored externally), can store large and unstructured data such as text, image, video, and spatial data up to 4 gigabytes in size.

When creating a table, you can optionally specify different tablespace and storage characteristics for LOB columns or LOB object attributes from those specified for the table.

LOB columns contain LOB locators that can refer to out-of-line or in-line LOB values. Selecting a LOB from a table actually returns the LOB's locator and not the entire LOB value. The DBMS_LOB package and Oracle Call Interface (OCI) operations on LOBs are performed through these locators.

LOBs are similar to LONG and LONG RAW types, but differ in the following ways:

  • LOBs can be attributes of a user-defined datatype (object).
  • The LOB locator is stored in the table column, either with or without the actual LOB value. BLOB, NCLOB, and CLOB values can be stored in separate tablespaces. BFILE data is stored in an external file on the server.
  • When you access a LOB column, the locator is returned.
  • A LOB can be up to 4 gigabytes in size. BFILE maximum size is operating system dependent, but cannot exceed 4 gigabytes.
  • LOBs permit efficient, random, piece-wise access to and manipulation of data.
  • You can define more than one LOB column in a table.
  • With the exception of NCLOB, you can define one or more LOB attributes in an object.
  • You can declare LOB bind variables.
  • You can select LOB columns and LOB attributes.
  • You can insert a new row or update an existing row that contains one or more LOB columns or an object with one or more LOB attributes. (You can set the internal LOB value to NULL, empty, or replace the entire LOB with data. You can set the BFILE to NULL or make it point to a different file.)
  • You can update a LOB row/column intersection or a LOB attribute with another LOB row/column intersection or LOB attribute.
  • You can delete a row containing a LOB column or LOB attribute and thereby also delete the LOB value. Note that for BFILEs, the actual operating system file is not deleted.

You can access and populate rows of an internal LOB column (a LOB column stored in the database) simply by issuing an INSERT or UPDATE statement. However, to access and populate a LOB attribute that is part of an object type, you must first initialize the LOB attribute using the EMPTY_CLOB or EMPTY_BLOB function. You can then select the empty LOB attribute and populate it using the DBMS_LOB package or some other appropriate interface.

Restrictions on LOB Columns

LOB columns are subject to the following restrictions:

  • Distributed LOBs are not supported. Therefore, you cannot use a remote locator in SELECT or WHERE clauses of queries or in functions of the DBMS_LOB package.

    The following syntax is not supported for LOBs:

    SELECT lobcol FROM table1@remote_site;
INSERT INTO lobtable SELECT type1.lobattr FROM table1@remote_
site;
SELECT DBMS_LOB.getlength(lobcol) FROM table1@remote_site;

    However, you can use a remote locator in others parts of queries that reference LOBs. The following syntax is supported on remote LOB columns:

    CREATE TABLE t AS SELECT * FROM table1@remote_site;
INSERT INTO t SELECT * FROM table1@remote_site;
UPDATE t SET lobcol = (SELECT lobcol FROM table1@remote_site);
INSERT INTO table1@remote_site ...
UPDATE table1@remote_site ...
DELETE table1@remote_site ...

    For the first three types of statement, which contain subqueries, only standalone LOB columns are allowed in the select list. SQL functions or DBMS_LOB APIs on LOBs are not supported. For example, the following statement is supported:

    CREATE TABLE AS SELECT clob_col FROM tab@dbs2;

    However, the following statement is not supported:

    CREATE TABLE AS SELECT dbms_lob.substr(clob_col) from tab@dbs2;
  • Clusters cannot contain LOBs, either as key or nonkey columns.
  • You cannot create a varray of LOBs.
  • You cannot specify LOB columns in the ORDER BY clause of a query, or in the GROUP BY clause of a query or in an aggregate function.
  • You cannot specify a LOB column in a SELECT ... DISTINCT or SELECT ... UNIQUE statement or in a join. However, you can specify a LOB attribute of an object type column in a SELECT ... DISTINCT statement or in a query that uses the UNION or MINUS set operator if the column's object type has a MAP or ORDER function defined on it.
  • You cannot specify LOB columns in ANALYZE ... COMPUTE or ANALYZE ... ESTIMATE statements.
  • The first (INITIAL) extent of a LOB segment must contain at least three database blocks.
  • When creating an UPDATE DML trigger, you cannot specify a LOB column in the UPDATE OF clause.
  • You cannot specify a LOB as a primary key column.
  • You cannot specify a LOB column as part of an index key. However, you can specify a LOB column in the function of a function-based index or in the indextype specification of a domain index. In addition, Oracle Text lets you define an index on a CLOB column.
  • In an INSERT or UPDATE operation, you can bind data of any size to a LOB column, but you cannot bind data to a LOB attribute of an object type. In an INSERT ... AS SELECT operation, you can bind up to 4000 bytes of data to LOB columns.

    See Also:

    "Keywords and Parameters" section of individual SQL statements in Oracle9i SQL Reference for additional semantics for the use of LOBs
  • If a table has both LONG and LOB columns, you cannot bind more than 4000 bytes of data to both the LONG and LOB columns in the same SQL statement. However, you can bind more than 4000 bytes of data to either the LONG or the LOB column.

    Notes:
    • Oracle8i Release 2 (8.1.6) and higher support the CACHE READS setting for LOBs. If you have such LOBs and you downgrade to an earlier release, Oracle generates a warning and converts the LOBs from CACHE READS to CACHE LOGGING. You can subsequently alter the LOBs to either NOCACHE LOGGING or NOCACHE NOLOGGING.
    • For a table on which you have defined a DML trigger, if you use OCI functions or DBMS_LOB routines to change the value of a LOB column or the LOB attribute of an object type column, Oracle does not fire the DML trigger.
    See Also:
    • Oracle9i Application Developer's Guide - Large Objects (LOBs) for more information about LOBs, including details about migrating from LONG to LOB and about the CACHE READS setting
    • EMPTY_BLOB, EMPTY_CLOB
    • "Oracle-Supplied Types" for alternative ways of storing image, audio, video, and spatial data

The following example shows how the sample table pm.print_media was created. (This example assumes the existence of the textdoc_tab object table, which is nested table in the print_media table.)

CREATE TABLE print_media
    ( product_id        NUMBER(6)
    , ad_id             NUMBER(6)
    , ad_composite      BLOB
    , ad_sourcetext     CLOB
    , ad_finaltext      CLOB
    , ad_fltextn        NCLOB
    , ad_textdocs_ntab  textdoc_tab
    , ad_photo          BLOB
    , ad_graphic        BFILE
    , ad_header         adheader_typ
    , press_release     LONG
    ) NESTED TABLE ad_textdocs_ntab STORE AS textdocs_nestedtab;
See Also:
  • Oracle9i Supplied PL/SQL Packages and Types Reference and Oracle Call Interface Programmer's Guide for more information about these interfaces and LOBs
  • the modify_col_properties clause of ALTER TABLE and TO_LOB for more information on converting LONG columns to LOB columns

BFILE Datatype

The BFILE datatype enables access to binary file LOBs that are stored in file systems outside the Oracle database. A BFILE column or attribute stores a BFILE locator, which serves as a pointer to a binary file on the server's file system. The locator maintains the directory alias and the filename.

You can change the filename and path of a BFILE without affecting the base table by using the BFILENAME function.

See Also:

BFILENAME for more information on this built-in SQL function

Binary file LOBs do not participate in transactions and are not recoverable. Rather, the underlying operating system provides file integrity and durability. The maximum file size supported is 4 gigabytes.

The database administrator must ensure that the file exists and that Oracle processes have operating system read permissions on the file.

The BFILE datatype enables read-only support of large binary files. You cannot modify or replicate such a file. Oracle provides APIs to access file data. The primary interfaces that you use to access file data are the DBMS_LOB package and the OCI.

See Also:
  • Oracle9i Application Developer's Guide - Large Objects (LOBs) and Oracle Call Interface Programmer's Guide for more information about LOBs.
  • CREATE DIRECTORY

BLOB Datatype

The BLOB datatype stores unstructured binary large objects. BLOBs can be thought of as bitstreams with no character set semantics. BLOBs can store up to 4 gigabytes of binary data.

BLOBs have full transactional support. Changes made through SQL, the DBMS_LOB package, or the OCI participate fully in the transaction. BLOB value manipulations can be committed and rolled back. However, you cannot save a BLOB locator in a PL/SQL or OCI variable in one transaction and then use it in another transaction or session.

CLOB Datatype

The CLOB datatype stores single-byte and multibyte character data. Both fixed-width and variable-width character sets are supported, and both use the CHAR database character set. CLOBs can store up to 4 gigabytes of character data.

CLOBs have full transactional support. Changes made through SQL, the DBMS_LOB package, or the OCI participate fully in the transaction. CLOB value manipulations can be committed and rolled back. However, you cannot save a CLOB locator in a PL/SQL or OCI variable in one transaction and then use it in another transaction or session.

NCLOB Datatype

The NCLOB datatype stores Unicode data using the national character set. Both fixed-width and variable-width character sets are supported. NCLOBs can store up to 4 gigabytes of character text data.

NCLOBs have full transactional support. Changes made through SQL, the DBMS_LOB package, or the OCI participate fully in the transaction. NCLOB value manipulations can be committed and rolled back. However, you cannot save an NCLOB locator in a PL/SQL or OCI variable in one transaction and then use it in another transaction or session.

See Also:

Oracle9i Database Globalization Support Guide for information on Unicode datatype support
ROWID Datatype

Each row in the database has an address. You can examine a row's address by querying the pseudocolumn ROWID. Values of this pseudocolumn are strings representing the address of each row. These strings have the datatype ROWID. You can also create tables and clusters that contain actual columns having the ROWID datatype. Oracle does not guarantee that the values of such columns are valid rowids.

See Also:

"Pseudocolumns" for more information on the ROWID pseudocolumn

Restricted Rowids

Beginning with Oracle8, Oracle SQL incorporated an extended format for rowids to efficiently support partitioned tables and indexes and tablespace-relative data block addresses (DBAs) without ambiguity.

Character values representing rowids in Oracle7 and earlier releases are called restricted rowids. Their format is as follows:

block.row.file

where:

  • block is a hexadecimal string identifying the data block of the datafile containing the row. The length of this string depends on your operating system.
  • row is a four-digit hexadecimal string identifying the row in the data block. The first row of the block has a digit of 0.
  • file is a hexadecimal string identifying the database file containing the row. The first datafile has the number 1. The length of this string depends on your operating system.

Extended Rowids

The extended ROWID datatype stored in a user column includes the data in the restricted rowid plus a data object number. The data object number is an identification number assigned to every database segment. You can retrieve the data object number from the data dictionary views USER_OBJECTS, DBA_OBJECTS, and ALL_OBJECTS. Objects that share the same segment (clustered tables in the same cluster, for example) have the same object number.

Extended rowids are stored as base 64 values that can contain the characters A-Z, a-z, 0-9, as well as the plus sign (+) and forward slash (/). Extended rowids are not available directly. You can use a supplied package, DBMS_ROWID, to interpret extended rowid contents. The package functions extract and provide information that would be available directly from a restricted rowid as well as information specific to extended rowids.

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for information on the functions available with the DBMS_ROWID package and how to use them

Compatibility and Migration

The restricted form of a rowid is still supported in Oracle9i for backward compatibility, but all tables return rowids in the extended format.

See Also:

Oracle9i Database Migration Guide for information regarding compatibility and migration issues

UROWID Datatype

Each row in a database has an address. However, the rows of some tables have addresses that are not physical or permanent or were not generated by Oracle. For example, the row addresses of index-organized tables are stored in index leaves, which can move. Rowids of foreign tables (such as DB2 tables accessed through a gateway) are not standard Oracle rowids.

Oracle uses "universal rowids" (urowids) to store the addresses of index-organized and foreign tables. Index-organized tables have logical urowids and foreign tables have foreign urowids. Both types of urowid are stored in the ROWID pseudocolumn (as are the physical rowids of heap-organized tables).

Oracle creates logical rowids based on a table's primary key. The logical rowids do not change as long as the primary key does not change. The ROWID pseudocolumn of an index-organized table has a datatype of UROWID. You can access this pseudocolumn as you would the ROWID pseudocolumn of a heap-organized table (that is, using the SELECT ROWID statement). If you wish to store the rowids of an index-organized table, then you can define a column of type UROWID for the table and retrieve the value of the ROWID pseudocolumn into that column.

Note:

Heap-organized tables have physical rowids. Oracle Corporation does not recommend that you specify a column of datatype UROWID for a heap-organized table.
See Also:
  • Oracle9i Database Concepts for more information on universal rowids
  • "ROWID Datatype" for a discussion of the address of database rows

ANSI, DB2, and SQL/DS Datatypes

SQL statements that create tables and clusters can also use ANSI datatypes and datatypes from IBM's products SQL/DS and DB2. Oracle recognizes the ANSI or IBM datatype name that differs from the Oracle datatype name, records it as the name of the datatype of the column, and then stores the column's data in an Oracle datatype based on the conversions shown in Table 2-6 and Table 2-7.

Table 2-6 ANSI Datatypes Converted to Oracle Datatypes
ANSI SQL Datatype | Oracle Datatype
CHARACTER(n) CHAR(n) | CHAR(n)
CHARACTER VARYING(n) CHAR VARYING(n) | VARCHAR(n)
NATIONAL CHARACTER(n) NATIONAL CHAR(n) NCHAR(n) | NCHAR(n)
NATIONAL CHARACTER VARYING(n) NATIONAL CHAR VARYING(n) NCHAR VARYING(n) | NVARCHAR2(n)
NUMERIC(p,s) DECIMAL(p,s)a | NUMBER(p,s)
INTEGER INT SMALLINT | NUMBER(38)
FLOAT(b)b DOUBLE PRECISIONc REALd | NUMBER
aThe NUMERIC and DECIMAL datatypes can specify only fixed-point numbers. For these datatypes, s defaults to 0. bThe FLOAT datatype is a floating-point number with a binary precision b. The default precision for this datatype is 126 binary, or 38 decimal. cThe DOUBLE PRECISION datatype is a floating-point number with binary precision 126. dThe REAL datatype is a floating-point number with a binary precision of 63, or 18 decimal.
Table 2-7 SQL/DS and DB2 Datatypes Converted to Oracle Datatypes
SQL/DS or DB2 Datatype | Oracle Datatype
CHARACTER(n) | CHAR(n)
VARCHAR(n) | VARCHAR(n)
LONG VARCHAR(n) | LONG
DECIMAL(p,s)a | NUMBER(p,s)
INTEGER SMALLINT | NUMBER(38)
FLOAT(b)b | NUMBER
aThe DECIMAL datatype can specify only fixed-point numbers. For this datatype, s defaults to 0. bThe FLOAT datatype is a floating-point number with a binary precision b. The default precision for this datatype is 126 binary, or 38 decimal.

Do not define columns with the following SQL/DS and DB2 datatypes, because they have no corresponding Oracle datatype:

  • GRAPHIC
  • LONG VARGRAPHIC
  • VARGRAPHIC
  • TIME

Note that data of type TIME can also be expressed as Oracle DATE data.

User-Defined Types

User-defined datatypes use Oracle built-in datatypes and other user-defined datatypes as the building blocks of types that model the structure and behavior of data in applications.

The sections that follow describe the various categories of user-defined types.

See Also:
  • Oracle9i Database Concepts for information about Oracle built-in datatypes
  • CREATE TYPE and the CREATE TYPE BODY for information about creating user-defined types
  • Oracle9i Application Developer's Guide - Fundamentals for information about using user-defined types

Object Types

Object types are abstractions of the real-world entities, such as purchase orders, that application programs deal with. An object type is a schema object with three kinds of components:

  • A name, which identifies the object type uniquely within that schema
  • Attributes, which are built-in types or other user-defined types. Attributes model the structure of the real-world entity.
  • Methods, which are functions or procedures written in PL/SQL and stored in the database, or written in a language like C or Java and stored externally. Methods implement operations the application can perform on the real-world entity.

REFs

An object identifier (OID) uniquely identifies an object and enables you to reference the object from other objects or from relational tables. A datatype category called REF represents such references. A REF is a container for an object identifier. REFs are pointers to objects.

When a REF value points to a nonexistent object, the REF is said to be "dangling". A dangling REF is different from a null REF. To determine whether a REF is dangling or not, use the predicate IS [NOT] DANGLING. For example, given object view oc_orders in the sample schema oe, the column customer_ref is of type REF to type customer_typ, which has an attribute cust_email:

SELECT o.customer_ref.cust_email
   FROM oc_orders o
   WHERE o.customer_ref IS NOT DANGLING;

Varrays

An array is an ordered set of data elements. All elements of a given array are of the same datatype. Each element has an index, which is a number corresponding to the element's position in the array.

The number of elements in an array is the size of the array. Oracle arrays are of variable size, which is why they are called varrays. You must specify a maximum size when you declare the array.

When you declare a varray, it does not allocate space. It defines a type, which you can use as:

  • The datatype of a column of a relational table
  • An object type attribute
  • A PL/SQL variable, parameter, or function return type

Oracle normally stores an array object either in line (that is, as part of the row data) or out of line (in a LOB), depending on its size. However, if you specify separate storage characteristics for a varray, then Oracle will store it out of line, regardless of its size.

See Also:

the varray_col_properties of CREATE TABLE

Nested Tables

A nested table type models an unordered set of elements. The elements may be built-in types or user-defined types. You can view a nested table as a single-column table or, if the nested table is an object type, as a multicolumn table, with a column for each attribute of the object type.

A nested table definition does not allocate space. It defines a type, which you can use to declare:

  • Columns of a relational table
  • Object type attributes
  • PL/SQL variables, parameters, and function return values

When a nested table appears as the type of a column in a relational table or as an attribute of the underlying object type of an object table, Oracle stores all of the nested table data in a single table, which it associates with the enclosing relational or object table.

Oracle-Supplied Types

Oracle Corporation provides SQL-based interfaces for defining new types when the built-in or ANSI-supported types are not sufficient. The behavior for these types can be implemented in C/C++, Java, or PL/ SQL. Oracle automatically provides the low-level infrastructure services needed for input-output, heterogeneous client-side access for new datatypes, and optimizations for data transfers between the application and the database.

These interfaces can be used to build user-defined (or object) types, and are also used by Oracle to create some commonly useful datatypes. Several such datatypes are supplied with the server, and they serve both broad horizontal application areas (for example, the "Any" types) and specific vertical ones (for example, the spatial type).

The Oracle-supplied types, along with cross-references to the documentation of their implementation and use, are described in the following sections:

  • "Any" Types
  • XML Types
  • Spatial Type
  • Media Types

"Any" Types

The "Any" types provide highly flexible modeling of procedure parameters and table columns where the actual type is not known. These datatypes let you dynamically encapsulate and access type descriptions, data instances, and sets of data instances of any other SQL type. These types have OCI and PL/SQL interfaces for construction and access.

SYS.ANYTYPE

This type can contain a type description of any named SQL type or unnamed transient type.

SYS.ANYDATA

This type contains an instance of a given type, with data, plus a description of the type. ANYDATA can be used as a table column datatype and lets you store heterogeneous values in a single column. The values can be of SQL built-in types as well as user-defined types.

SYS.ANYDATASET

This type contains a description of a given type plus a set of data instances of that type. ANYDATASET can be used as a procedure parameter datatype where such flexibility is needed. The values of the data instances can be of SQL built-in types as well as user-defined types.

See Also:

Oracle Call Interface Programmer's Guide, PL/SQL User's Guide and Reference, and Oracle9i Application Developer's Guide - Fundamentals for the implementation of these types and guidelines for using them

XML Types

Extensible Markup Language (XML) is a standard format developed by the World Wide Web Consortium (W3C) for representing structured and unstructured data on the Web. Universal Resource Identifiers (URIs) identify resources such as Web pages anywhere on the Web. Oracle provides types to handle XML and URI data, as well as a class of URIs called DBURIRefs to access data stored within the database itself. It also provides a new set of types to store and access both external and internal URIs from within the database.

XMLType

This Oracle-supplied type can be used to store and query XML data in the database. XMLType has member functions you can use to access, extract, and query the XML data using XPath expressions. XPath is another standard developed by the W3C committee to traverse XML documents. Oracle XMLType functions support many W3C XPath expressions. Oracle also provides a set of SQL functions and PL/SQL packages to create XMLType values from existing relational or object-relational data.

XMLType is a system-defined type, so you can use it as an argument of a function or as the datatype of a table or view column. You can also create tables and views of XMLType. When you create an XMLType column in a table, you can choose to store the XML data in a CLOB column or object relationally.

You can also register the schema (using the DBMS_XMLSCHEMA package) and create a table or column conforming to the registered schema. In this case Oracle stores the XML data in underlying object-relational columns by default, but you can specify storage in a CLOB column even for schema-based data.

Queries and DML on XMLType columns operate the same regardless of the storage mechanism.

URI Datatypes

Oracle supplies a family of URI types--URIType, DBURIType, XDBURIType, and HTTPURIType--which are related by an inheritance hierarchy. URIType is an object type and the others are subtypes of URIType. Since URIType is the supertype, you can create columns of this type and store DBURIType or HTTPURIType type instances in this column.

HTTPURIType

You can use HTTPURIType to store URLs to external Web pages or to files. Oracle accesses these files using the HTTP (Hypertext Transfer Protocol) protocol.

XDBURIType

You can use XDBURIType to expose documents in the XML database hierarchy as URIs that can be embedded in any URIType column in a table. The XDBURIType consists of a URL, which comprises the hierarchical name of the XML document to which it refers and an optional fragment representing the XPath syntax. The fragment is separated from the URL part by a pound sign (#). The following lines are examples of XDBURIType:

/home/oe/doc1.xml
/home/oe/doc1.xml#/orders/order_item
DBURIType

DBURIType can be used to store DBURIRefs, which reference data inside the database. Storing DBURIRefs lets you reference data stored inside or outside the database and access the data consistently.

DBURIRefs use an XPath-like representation to reference data inside the database. If you imagine the database as an XML tree, then you would see the tables, rows, and columns as elements in the XML document. For instance, the sample human resources user hr would see the following XML tree:

<HR>
  <EMPLOYEES>
    <ROW>
      <EMPLOYEE_ID>205</EMPLOYEE_ID>
      <LAST_NAME>Higgins</LAST_NAME>
      <SALARY>12000</SALARY>
      .. <!-- other columns -->
    </ROW>
    ... <!-- other rows -->
  </EMPLOYEES>
  <!-- other tables..-->
</HR>
<!-- other user schemas on which you have some privilege on..-->

The DBURIRef is simply an XPath expression over this virtual XML document. So to reference the SALARY value in the EMPLOYEES table for the employee with employee number 205, we can write a DBURIRef as,

/HR/EMPLOYEES/ROW[EMPLOYEE_ID=205]/SALARY

Using this model, you can reference data stored in CLOB columns or other columns and expose them as URLs to the external world.

URIFactory Package

Oracle also provides the URIFactory package, which can create and return instances of the various subtypes of the URITypes. The package analyzes the URL string, identifies the type of URL (HTTP, DBURI, and so on), and creates an instance of the subtype. To create a DBURI instance, the URL must start with the prefix /oradb. For example, URIFactory.getURI('/oradb/HR/EMPLOYEES') would create a DBURIType instance and URIFactory.getUri('/sys/schema') would create an XDBURIType instance.

See Also:
  • Oracle9i Application Developer's Guide - Object-Relational Features for general information on object types and type inheritance
  • Oracle9i XML Developer's Kits Guide - XDK for more information about these supplied types and their implementation
  • Oracle9i Application Developer's Guide - Advanced Queuing for information about using XMLType with Oracle Advanced Queuing

Spatial Type

The object-relational implementation of Oracle Spatial consists of a set of object data types, an index method type, and operators on these types.

MDSYS.SDO_GEOMETRY

The geometric description of a spatial object is stored in a single row, in a single column of object type SDO_GEOMETRY in a user-defined table. Any table that has a column of type SDO_GEOMETRY must have another column, or set of columns, that defines a unique primary key for that table. Tables of this sort are sometimes referred to as geometry tables.

See Also:

Oracle Spatial User's Guide and Reference for information on the implementation of this type and guidelines for using it

Media Types

Oracle interMedia uses object types, similar to Java or C++ classes, to describe multimedia data. An instance of these object types consists of attributes, including metadata and the media data, and methods. The Oracle interMedia types are:

ORDSYS.ORDAudio

The ORDAUDIO object type supports the storage and management of audio data.

ORDSYS.ORDImage

The ORDIMAGE object type supports the storage and management of image data.

ORDSYS.ORDImageSignature

The ORDSYS.ORDImageSignature type supports a compact representation of the color, texture, and shape information of image data.

ORDSYS.ORDVideo

The ORDVIDEO object type supports the storage and management of video data.

ORDSYS.ORDDoc

The ORDDOC object type supports storage and management of any type of media data, including audio, image and video data. Use this type when you want all media to be stored in a single column.

See Also:

Oracle interMedia User's Guide and Reference for information on the implementation of these types and guidelines for using them

Datatype Comparison Rules

This section describes how Oracle compares values of each datatype.

Number Values

A larger value is considered greater than a smaller one. All negative numbers are less than zero and all positive numbers. Thus, -1 is less than 100; -100 is less than -1.

Date Values

A later date is considered greater than an earlier one. For example, the date equivalent of '29-MAR-1997' is less than that of '05-JAN-1998' and '05-JAN-1998 1:35pm' is greater than '05-JAN-1998 10:09am'.

Character String Values

Character values are compared using one of these comparison rules:

  • Blank-padded comparison semantics
  • Nonpadded comparison semantics

The following sections explain these comparison semantics.

Blank-Padded Comparison Semantics

If the two values have different lengths, then Oracle first adds blanks to the end of the shorter one so their lengths are equal. Oracle then compares the values character by character up to the first character that differs. The value with the greater character in the first differing position is considered greater. If two values have no differing characters, then they are considered equal. This rule means that two values are equal if they differ only in the number of trailing blanks. Oracle uses blank-padded comparison semantics only when both values in the comparison are either expressions of datatype CHAR, NCHAR, text literals, or values returned by the USER function.

Nonpadded Comparison Semantics

Oracle compares two values character by character up to the first character that differs. The value with the greater character in that position is considered greater. If two values of different length are identical up to the end of the shorter one, then the longer value is considered greater. If two values of equal length have no differing characters, then the values are considered equal. Oracle uses nonpadded comparison semantics whenever one or both values in the comparison have the datatype VARCHAR2 or NVARCHAR2.

The results of comparing two character values using different comparison semantics may vary. The table that follows shows the results of comparing five pairs of character values using each comparison semantic. Usually, the results of blank-padded and nonpadded comparisons are the same. The last comparison in the table illustrates the differences between the blank-padded and nonpadded comparison semantics.

Blank-Padded | Nonpadded
'ac' > 'ab' | 'ac' > 'ab'
'ab' > 'a ' | 'ab' > 'a '
'ab' > 'a' | 'ab' > 'a'
'ab' = 'ab' | 'ab' = 'ab'
'a ' = 'a' | 'a ' > 'a'

Single Characters

Oracle compares single characters according to their numeric values in the database character set. One character is greater than another if it has a greater numeric value than the other in the character set. Oracle considers blanks to be less than any character, which is true in most character sets.

These are some common character sets:

  • 7-bit ASCII (American Standard Code for Information Interchange)
  • EBCDIC Code (Extended Binary Coded Decimal Interchange Code)
  • ISO 8859/1 (International Standards Organization)
  • JEUC Japan Extended UNIX

Portions of the ASCII and EBCDIC character sets appear in Table 2-8 and Table 2-9. Note that uppercase and lowercase letters are not equivalent. Also, note that the numeric values for the characters of a character set may not match the linguistic sequence for a particular language.

Table 2-8 ASCII Character Set
Symbol | Decimal value | Symbol | Decimal value
blank | 32 | ; | 59
! | 33 | < | 60
" | 34 | = | 61
# | 35 | > | 62
$ | 36 | ? | 63
% | 37 | @ | 64
& | 38 | A-Z | 65-90
' | 39 | [ | 91
( | 40 | \ | 92
) | 41 | ] | 93
* | 42 | ^ | 94
+ | 43 | _ | 95
, | 44 | ` | 96
- | 45 | a-z | 97-122
. | 46 | { | 123
/ | 47 | | | 124
0-9 | 48-57 | } | 125
: | 58 | ~ | 126
Table 2-9 EBCDIC Character Set
Symbol | Decimal value | Symbol | Decimal value
blank | 64 | % | 108
¢ | 74 | _ | 109
. | 75 | > | 110
< | 76 | ? | 111
( | 77 | : | 122
+ | 78 | # | 123
| | 79 | @ | 124
& | 80 | ' | 125
! | 90 | = | 126
$ | 91 | " | 127
* | 92 | a-i | 129-137
) | 93 | j-r | 145-153
; | 94 | s-z | 162-169
ÿ | 95 | A-I | 193-201
- | 96 | J-R | 209-217
/ | 97 | S-Z | 226-233

Object Values

Object values are compared using one of two comparison functions: MAP and ORDER. Both functions compare object type instances, but they are quite different from one another. These functions must be specified as part of the object type.

See Also:

CREATE TYPE and Oracle9i Application Developer's Guide - Fundamentals for a description of MAP and ORDER methods and the values they return

Varrays and Nested Tables

You cannot compare varrays and nested tables in Oracle9i.

Data Conversion

Generally an expression cannot contain values of different datatypes. For example, an expression cannot multiply 5 by 10 and then add 'JAMES'. However, Oracle supports both implicit and explicit conversion of values from one datatype to another.

Implicit and Explicit Data Conversion

Oracle recommends that you specify explicit conversions rather than rely on implicit or automatic conversions, for these reasons:

  • SQL statements are easier to understand when you use explicit datatype conversion functions.
  • Automatic datatype conversion can have a negative impact on performance, especially if the datatype of a column value is converted to that of a constant rather than the other way around.
  • Implicit conversion depends on the context in which it occurs and may not work the same way in every case. For example, implicit conversion from a date value to a VARCHAR2 value may return an unexpected year depending on the value of the NLS_DATE_FORMAT parameter.
  • Algorithms for implicit conversion are subject to change across software releases and among Oracle products. Behavior of explicit conversions is more predictable.

Implicit Data Conversion

Oracle automatically converts a value from one datatype to another when such a conversion makes sense. Table 2-10 is a matrix of Oracle implicit conversions. The table shows all possible conversions, without regard to the direction of the conversion or the context in which it is made. The rules governing these details follow the table.

Table 2-10 Implicit Type Conversion Matrix
 | CHAR | VARCHAR2 | DATE | DATETIME/ INTERVAL | LONG | NUMBER | RAW | ROWID | CLOB | BLOB | NCHAR | NVARCHAR | NCLOB
CHAR | -- | X | X | X | X | X | X | -- | X | -- | X | X | --
VARCHAR2 | X | -- | X | X | X | X | X | X | X | -- | X | X | --
DATE | X | X | -- | -- | -- | -- | -- | -- | -- | -- | X | X | --
DATETIME/ INTERVAL | X | X | -- | -- | X | -- | -- | -- | -- | -- | X | X | --
LONG | X | X | -- | X | -- | -- | X | -- | X | -- | X | X | X
NUMBER | X | X | -- | -- | -- | -- | -- | -- | -- | -- | X | X | --
RAW | X | X | -- | -- | X | -- | -- | -- | -- | X | X | X | --
ROWID | X | X | -- | -- | -- | -- | -- | -- | -- | -- | X | X | --
CLOB | X | X | -- | -- | X | -- | -- | -- | -- | -- | -- | -- | --
BLOB | -- | -- | -- | -- | -- | -- | X | -- | -- | -- | -- | -- | --
NCHAR | X | X | X | X | X | X | X | X | -- | -- | -- | X | X
NVARCHAR2 | X | X | X | X | X | X | X | X | -- | -- | X | -- | X
NCLOB | -- | -- | -- | -- | X | -- | -- | -- | -- | -- | X | X | --

The following rules govern the direction in which Oracle makes implicit datatype conversions:

  • During INSERT and UPDATE operations, Oracle converts the value to the datatype of the affected column.
  • During SELECT FROM operations, Oracle converts the data from the column to the type of the target variable.
  • When comparing a character value with a NUMBER value, Oracle converts the character data to NUMBER.
  • When comparing a character value with a DATE value, Oracle converts the character data to DATE.
  • When you use a SQL function or operator with an argument of a datatype other than the one it accepts, Oracle converts the argument to the accepted datatype.
  • When making assignments, Oracle converts the value on the right side of the equal sign (=) to the datatype of the target of the assignment on the left side.
  • During concatenation operations, Oracle converts from noncharacter datatypes to CHAR or NCHAR.
  • During arithmetic operations on and comparisons between character and noncharacter datatypes, Oracle converts from any character datatype to a number, date, or rowid, as appropriate. In arithmetic operations between CHAR/VARCHAR2 and NCHAR/NVARCHAR2, Oracle converts to a number.
  • Comparisons between CHAR/VARCHAR2 and NCHAR/NVARCHAR2 types may entail different character sets. The default direction of conversion in such cases is from the database character set to the national character set. Table 2-11 shows the direction of implicit conversions between different character types.
  • Most SQL character functions are enabled to accept CLOBs as parameters, and Oracle performs implicit conversions between CLOB and CHAR types. Therefore, functions that are not yet enabled for CLOBs can accept CLOBs through implicit conversion. In such cases, Oracle converts the CLOBs to CHAR or VARCHAR2 before the function is invoked. If the CLOB is larger than 4000 bytes, then Oracle converts only the first 4000 bytes to CHAR.

    Table 2-11 Conversion Direction of Different Character Types
    to CHAR to VARCHAR2 to NCHAR to NVARCHAR2

    from CHAR

    --

    VARCHAR2

    NCHAR

    NVARCHAR2

    from VARCHAR2

    VARCHAR2

    --

    NVARCHAR2

    NVARCHAR2

    from NCHAR

    NCHAR

    NCHAR

    --

    NVARCHAR2

    from NVARCHAR2

    NVARCHAR2

    NVARCHAR2

    NVARCHAR2

    --

Implicit Data Conversion Examples

Text Literal Example

The text literal '10' has datatype CHAR. Oracle implicitly converts it to the NUMBER datatype if it appears in a numeric expression as in the following statement:

SELECT salary + '10'
   FROM employees;
Character and Number Values Example

When a condition compares a character value and a NUMBER value, Oracle implicitly converts the character value to a NUMBER value, rather than converting the NUMBER value to a character value. In the following statement, Oracle implicitly converts '200' to 200:

SELECT last_name
    FROM employees
    WHERE employee_id = '200';
Date Example

In the following statement, Oracle implicitly converts '03-MAR-97' to a DATE value using the default date format 'DD-MON-YY':

SELECT last_name
    FROM employees
    WHERE hire_date = '03-MAR-97';
Rowid Example

In the following statement, Oracle implicitly converts the text literal 'AAAFYmAAFAAAAFGAAH' to a rowid value. (Rowids are unique within a database, so to use this example you must know an actual rowid in your database.)

SELECT last_name
    FROM employees
    WHERE ROWID = 'AAAFd1AAFAAAABSAAH';

Explicit Data Conversion

You can also explicitly specify datatype conversions using SQL conversion functions. The following table shows SQL functions that explicitly convert a value from one datatype to another.

Table 2-12 Explicit Type Conversion
 | to CHAR, VARCHAR2, NCHAR, NVARCHAR2 | to NUMBER | to Datetime/ Interval | to RAW | to ROWID | to LONG, LONG RAW | to CLOB, NCLOB, BLOB
from CHAR, VARCHAR2, NCHAR, NVARCHAR2 | TO_CHAR (character) TO_NCHAR (character) | TO_NUMBER | TO_DATE TO_TIMESTAMP TO_TIMESTAMP_TZ TO_YMINTERVAL TO_DSINTERVAL | HEXTORAW | CHARTOROWID | -- | TO_CLOB TO_NCLOB
from NUMBER | TO_CHAR (number) TO_NCHAR (number) | -- | TO_DATE NUMTOYMINTERVAL NUMTODSINTERVAL | -- | -- | -- | --
from Datetime/ Interval | TO_CHAR (date) TO_NCHAR (datetime) | -- | -- | -- | -- | -- | --
from RAW | RAWTOHEX RAWTONHEX | -- | -- | -- | -- | -- | TO_BLOB
from ROWID | ROWIDTOCHAR | -- | -- | -- | -- | -- | --
from LONG / LONG RAW | -- | -- | -- | -- | -- | -- | TO_LOB
from CLOB, NCLOB, BLOB | TO_CHAR TO_NCHAR | -- | -- | -- | -- | -- | TO_CLOB TO_NCLOB
Note:

You cannot specify LONG and LONG RAW values in cases in which Oracle can perform implicit datatype conversion. For example, LONG and LONG RAW values cannot appear in expressions with functions or operators. For information on the limitations on LONG and LONG RAW datatypes, see "LONG Datatype" .
See Also:

"Conversion Functions" of the SQL Reference for details on all of the explicit conversion functions
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Basic Elements of Oracle SQL, 3 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Literals

The terms literal and constant value are synonymous and refer to a fixed data value. For example, 'JACK', 'BLUE ISLAND', and '101' are all character literals; 5001 is a numeric literal. Character literals are enclosed in single quotation marks, which enable Oracle to distinguish them from schema object names.

This section contains these topics:

  • Text Literals
  • Integer Literals
  • Number Literals
  • Interval Literals

Many SQL statements and functions require you to specify character and numeric literal values. You can also specify literals as part of expressions and conditions. You can specify character literals with the 'text' notation, national character literals with the N'text' notation, and numeric literals with the integer or number notation, depending on the context of the literal. The syntactic forms of these notations appear in the sections that follow.

To specify a datetime or interval datatype as a literal, you must take into account any optional precisions included in the datatypes. Examples of specifying datetime and interval datatypes as literals are provided in the relevant sections of "Datatypes" .

Text Literals

Text specifies a text or character literal. You must use this notation to specify values whenever 'text' or char appear in expressions, conditions, SQL functions, and SQL statements in other parts of this reference.

The syntax of text is as follows:

text::=

Text description of sql_elements6.gif follows
Text description of text

where

  • N specifies representation of the literal using the national character set. Text entered using this notation is translated into the national character set by Oracle when used.
  • c is any member of the user's character set, except a single quotation mark (').
  • ' ' are two single quotation marks that begin and end text literals. To represent one single quotation mark within a literal, enter two single quotation marks.

A text literal must be enclosed in single quotation marks. This reference uses the terms text literal and character literal interchangeably.

Text literals have properties of both the CHAR and VARCHAR2 datatypes:

  • Within expressions and conditions, Oracle treats text literals as though they have the datatype CHAR by comparing them using blank-padded comparison semantics.
  • A text literal can have a maximum length of 4000 bytes.

Here are some valid text literals:

'Hello'
'ORACLE.dbs'
'Jackie''s raincoat'
'09-MAR-98'
N'nchar literal'
See Also:
  • "About SQL Expressions" for the syntax description of expr
  • "Blank-Padded Comparison Semantics"

Integer Literals

You must use the integer notation to specify an integer whenever integer appears in expressions, conditions, SQL functions, and SQL statements described in other parts of this reference.

The syntax of integer is as follows:

integer::=

Text description of sql_elements10.gif follows
Text description of integer

where digit is one of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

An integer can store a maximum of 38 digits of precision.

Here are some valid integers:

7
+255
See Also:

"About SQL Expressions" for the syntax description of expr

Number Literals

You must use the number notation to specify values whenever number appears in expressions, conditions, SQL functions, and SQL statements in other parts of this reference.

The syntax of number is as follows:

number::=

Text description of sql_elements8.gif follows
Text description of number

where

  • + or - indicates a positive or negative value. If you omit the sign, then a positive value is the default.
  • digit is one of 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9.
  • e or E indicates that the number is specified in scientific notation. The digits after the E specify the exponent. The exponent can range from -130 to 125.

A number can store a maximum of 38 digits of precision.

If you have established a decimal character other than a period (.) with the initialization parameter NLS_NUMERIC_CHARACTERS, then you must specify numeric literals with 'text' notation. In such cases, Oracle automatically converts the text literal to a numeric value.

For example, if the NLS_NUMERIC_CHARACTERS parameter specifies a decimal character of comma, specify the number 5.123 as follows:

'5,123'
See Also:

ALTER SESSION and Oracle9i Database Reference

Here are some valid representations of number:

25
+6.34
0.5
25e-03
-1
See Also:

"About SQL Expressions" for the syntax description of expr

Interval Literals

An interval literal specifies a period of time. You can specify these differences in terms of years and months, or in terms of days, hours, minutes, and seconds. Oracle supports two types of interval literals, YEAR TO MONTH and DAY TO SECOND. Each type contains a leading field and may contain a trailing field. The leading field defines the basic unit of date or time being measured. The trailing field defines the smallest increment of the basic unit being considered. For example, a YEAR TO MONTH interval considers an interval of years to the nearest month. A DAY TO MINUTE interval considers an interval of days to the nearest minute.

If you have date data in numeric form, then you can use the NUMTOYMINTERVAL or NUMTODSINTERVAL conversion function to convert the numeric data into interval literals.

Interval literals are used primarily with analytic functions.

See Also:
  • "Analytic Functions" and Oracle9i Data Warehousing Guide
  • NUMTODSINTERVAL and NUMTOYMINTERVAL

INTERVAL YEAR TO MONTH

Specify YEAR TO MONTH interval literals using the following syntax:

interval_year_to_month::=

Text description of sql_elements39.gif follows
Text description of interval_year_to_month

where

  • 'integer [-integer]' specifies integer values for the leading and optional trailing field of the literal. If the leading field is YEAR and the trailing field is MONTH, then the range of integer values for the month field is 0 to 11.
  • precision is the maximum number of digits in the leading field. The valid range of the leading field precision is 0 to 9 and its default value is 2.
Restriction on the Leading Field

The leading field must be more significant than the trailing field. For example, INTERVAL '0-1' MONTH TO YEAR is not valid.

The following INTERVAL YEAR TO MONTH literal indicates an interval of 123 years, 2 months:

INTERVAL '123-2' YEAR(3) TO MONTH

Examples of the other forms of the literal follow, including some abbreviated versions:

Form of Interval Literal | Interpretation
INTERVAL '123-2' YEAR(3) TO MONTH | An interval of 123 years, 2 months. You must specify the leading field precision if it is greater than the default of 2 digits.
INTERVAL '123' YEAR(3) | An interval of 123 years 0 months.
INTERVAL '300' MONTH(3) | An interval of 300 months.
INTERVAL '4' YEAR | Maps to INTERVAL '4-0' YEAR TO MONTH and indicates 4 years.
INTERVAL '50' MONTH | Maps to INTERVAL '4-2' YEAR TO MONTH and indicates 50 months or 4 years 2 months.
INTERVAL '123' YEAR | Returns an error, because the default precision is 2, and '123' has 3 digits.

You can add or subtract one INTERVAL YEAR TO MONTH literal to or from another to yield another INTERVAL YEAR TO MONTH literal. For example:

INTERVAL '5-3' YEAR TO MONTH + INTERVAL'20' MONTH =
INTERVAL '6-11' YEAR TO MONTH

INTERVAL DAY TO SECOND

Specify DAY TO SECOND interval literals using the following syntax:

interval_day_to_second::=

Text description of sql_elements64.gif follows
Text description of interval_day_to_second

where

  • integer specifies the number of days. If this value contains more digits than the number specified by the leading precision, then Oracle returns an error.
  • time_expr specifies a time in the format HH[:MI[:SS[.n]]]or MI[:SS[.n]] or SS[.n], where n specifies the fractional part of a second. If n contains more digits than the number specified by fractional_seconds_precision, then n is rounded to the number of digits specified by the fractional_seconds_precision value. You can specify time_expr following an integer and a space only if the leading field is DAY.
  • leading_precision is the number of digits in the leading field. Accepted values are 0 to 9. The default is 2.
  • fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values are 1 to 9. The default is 6.
Restriction on the Leading Field:

The leading field must be more significant than the trailing field. For example, INTERVAL MINUTE TO DAY is not valid. As a result of this restriction, if SECOND is the leading field, the interval literal cannot have any trailing field.

The valid range of values for the trailing field are as follows:

  • HOUR: 0 to 23
  • MINUTE: 0 to 59
  • SECOND: 0 to 59.999999999

Examples of the various forms of INTERVAL DAY TO SECOND literals follow, including some abbreviated versions:

Form of Interval Literal | Interpretation
INTERVAL '4 5:12:10.222' DAY TO SECOND(3) | 4 days, 5 hours, 12 minutes, 10 seconds, and 222 thousandths of a second.
INTERVAL '4 5:12' DAY TO MINUTE | 4 days, 5 hours and 12 minutes.
INTERVAL '400 5' DAY(3) TO HOUR | 400 days 5 hours.
INTERVAL '400' DAY(3) | 400 days.
INTERVAL '11:12:10.2222222' HOUR TO SECOND(7) | 11 hours, 12 minutes, and 10.2222222 seconds.
INTERVAL '11:20' HOUR TO MINUTE | 11 hours and 20 minutes.
INTERVAL '10' HOUR | 10 hours.
INTERVAL '10:22' MINUTE TO SECOND | 10 minutes 22 seconds.
INTERVAL '10' MINUTE | 10 minutes.
INTERVAL '4' DAY | 4 days.
INTERVAL '25' HOUR | 25 hours.
INTERVAL '40' MINUTE | 40 minutes.
INTERVAL '120' HOUR(3) | 120 hours
INTERVAL '30.12345' SECOND(2,4) | 30.1235 seconds. The fractional second '12345' is rounded to '1235' because the precision is 4.

You can add or subtract one DAY TO SECOND interval literal from another DAY TO SECOND literal. For example.

INTERVAL'20' DAY - INTERVAL'240' HOUR = INTERVAL'10-0' DAY TO SECOND
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Basic Elements of Oracle SQL, 4 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Format Models

A format model is a character literal that describes the format of DATE or NUMBER data stored in a character string. When you convert a character string into a date or number, a format model tells Oracle how to interpret the string. In SQL statements, you can use a format model as an argument of the TO_CHAR and TO_DATE functions:

  • To specify the format for Oracle to use to return a value from the database
  • To specify the format for a value you have specified for Oracle to store in the database

    Note:

    A format model does not change the internal representation of the value in the database.

For example,

  • The date format model for the string '17:45:29' is 'HH24:MI:SS'.
  • The date format model for the string '11-Nov-1999' is 'DD-Mon-YYYY'.
  • The number format model for the string '$2,304.25' is '$9,999.99'.

For lists of date and number format model elements, see Table 2-13, " Number Format Elements" and Table 2-15, " Datetime Format Elements" .

The values of some formats are determined by the value of initialization parameters. For such formats, you can specify the characters returned by these format elements implicitly using the initialization parameter NLS_TERRITORY. You can change the default date format for your session with the ALTER SESSION statement.

See Also:
  • Oracle9i Database Reference and Oracle9i Database Globalization Support Guide for information on these parameters
  • ALTER SESSION for information on changing the values of these parameters
Format of Return Values: Examples

You can use a format model to specify the format for Oracle to use to return values from the database to you.

The following statement selects the salaries of the employees in Department 80 and uses the TO_CHAR function to convert these salaries into character values with the format specified by the number format model '$9,990.99':

SELECT last_name employee, TO_CHAR(salary, '$99,990.99')
   FROM employees
   WHERE department_id = 80;

Because of this format model, Oracle returns salaries with leading dollar signs, commas every three digits, and two decimal places.

The following statement selects the date on which each employee from Department 20 was hired and uses the TO_CHAR function to convert these dates to character strings with the format specified by the date format model 'fmMonth DD, YYYY':

SELECT last_name employee,
    TO_CHAR(hire_date,'fmMonth DD, YYYY') hiredate
    FROM employees
    WHERE department_id = 20;

With this format model, Oracle returns the hire dates (as specified by "fm") without blank padding, two digits for the day, and the century included in the year.

See Also:

"Format Model Modifiers" for a description of the fm format element
Supplying the Correct Format Model: Examples

When you insert or update a column value, the datatype of the value that you specify must correspond to the column's datatype. You can use format models to specify the format of a value that you are converting from one datatype to another datatype required for a column.

For example, a value that you insert into a DATE column must be a value of the DATE datatype or a character string in the default date format (Oracle implicitly converts character strings in the default date format to the DATE datatype). If the value is in another format, then you must use the TO_DATE function to convert the value to the DATE datatype. You must also use a format model to specify the format of the character string.

The following statement updates Hunold's hire date using the TO_DATE function with the format mask 'YYYY MM DD' to convert the character string '1998 05 20' to a DATE value:

UPDATE employees
  SET hire_date = TO_DATE('1998 05 20','YYYY MM DD')
  WHERE last_name = 'Hunold';

This remainder of this section describes how to use:

  • Number Format Models
  • Date Format Models
  • Format Model Modifiers

    See Also:

    TO_CHAR (datetime) , TO_CHAR (number) , and TO_DATE

Number Format Models

You can use number format models:

  • In the TO_CHAR function to translate a value of NUMBER datatype to VARCHAR2 datatype
  • In the TO_NUMBER function to translate a value of CHAR or VARCHAR2 datatype to NUMBER datatype

All number format models cause the number to be rounded to the specified number of significant digits. If a value has more significant digits to the left of the decimal place than are specified in the format, then pound signs (#) replace the value. If a positive value is extremely large and cannot be represented in the specified format, then the infinity sign (~) replaces the value. Likewise, if a negative value is extremely small and cannot be represented by the specified format, then the negative infinity sign replaces the value (-~). This event typically occurs when you are using TO_CHAR with a restrictive number format string, causing a rounding operation.

Number Format Elements

A number format model is composed of one or more number format elements. Table 2-13 lists the elements of a number format model. Examples are shown in Table 2-14.

Negative return values automatically contain a leading negative sign and positive values automatically contain a leading space unless the format model contains the MI, S, or PR format element.

Table 2-13 Number Format Elements
Element Example Description

, (comma)

9,999

Returns a comma in the specified position. You can specify multiple commas in a number format model.

Restrictions:

  • A comma element cannot begin a number format model.
  • A comma cannot appear to the right of a decimal character or period in a number format model.

. (period)

99.99

Returns a decimal point, which is a period (.) in the specified position.

Restriction: You can specify only one period in a number format model.

$

$9999

Returns value with a leading dollar sign.

0

0999

9990

Returns leading zeros.

Returns trailing zeros.

9

9999

Returns value with the specified number of digits with a leading space if positive or with a leading minus if negative.

Leading zeros are blank, except for a zero value, which returns a zero for the integer part of the fixed-point number.

B

B9999

Returns blanks for the integer part of a fixed-point number when the integer part is zero (regardless of "0"s in the format model).

C

C999

Returns in the specified position the ISO currency symbol (the current value of the NLS_ISO_CURRENCY parameter).

D

99D99

Returns in the specified position the decimal character, which is the current value of the NLS_NUMERIC_CHARACTER parameter. The default is a period (.).

Restriction: You can specify only one decimal character in a number format model.

EEEE

9.9EEEE

Returns a value using in scientific notation.

FM

FM90.9

Returns a value with no leading or trailing blanks.

G

9G999

Returns in the specified position the group separator (the current value of the NLS_NUMERIC_CHARACTER parameter). You can specify multiple group separators in a number format model.

Restriction: A group separator cannot appear to the right of a decimal character or period in a number format model.

L

L999

Returns in the specified position the local currency symbol (the current value of the NLS_CURRENCY parameter).

MI

9999MI

Returns negative value with a trailing minus sign (-).

Returns positive value with a trailing blank.

Restriction: The MI format element can appear only in the last position of a number format model.

PR

9999PR

Returns negative value in <angle brackets>.

Returns positive value with a leading and trailing blank.

Restriction: The PR format element can appear only in the last position of a number format model.

RN

rn

RN

rn

Returns a value as Roman numerals in uppercase.

Returns a value as Roman numerals in lowercase.

Value can be an integer between 1 and 3999.

S

S9999

9999S

Returns negative value with a leading minus sign (-).

Returns positive value with a leading plus sign (+).

Returns negative value with a trailing minus sign (-).

Returns positive value with a trailing plus sign (+).

Restriction: The S format element can appear only in the first or last position of a number format model.

TM

TM

"Text minimum". Returns (in decimal output) the smallest number of characters possible. This element is case-insensitive.

The default is TM9, which returns the number in fixed notation unless the output exceeds 64 characters. If output exceeds 64 characters, then Oracle automatically returns the number in scientific notation.

Restrictions:

  • You cannot precede this element with any other element.
  • You can follow this element only with 9 or E (only one) or e (only one).

U

U9999

Returns in the specified position the "Euro" (or other) dual currency symbol (the current value of the NLS_DUAL_CURRENCY parameter).

V

999V99

Returns a value multiplied by 10n (and if necessary, round it up), where n is the number of 9's after the "V".

X

XXXX

xxxx

Returns the hexadecimal value of the specified number of digits. If the specified number is not an integer, then Oracle rounds it to an integer.

Restrictions:

  • This element accepts only positive values or 0. Negative values return an error.
  • You can precede this element only with 0 (which returns leading zeroes) or FM. Any other elements return an error. If you specify neither 0 nor FM with X, then the return always has 1 leading blank.

Table 2-14 shows the results of the following query for different values of number and 'fmt':

SELECT TO_CHAR(number, 'fmt')
   FROM DUAL;
Table 2-14 Results of Example Number Conversions
number | 'fmt' | Result
-1234567890 | 9999999999S | '1234567890-'
0 | 99.99 | ' .00'
+0.1 | 99.99 | ' .10'
-0.2 | 99.99 | ' -.20'
0 | 90.99 | ' 0.00'
+0.1 | 90.99 | ' 0.10'
-0.2 | 90.99 | ' -0.20'
0 | 9999 | ' 0'
1 | 9999 | ' 1'
0 | B9999 | ' '
1 | B9999 | ' 1'
0 | B90.99 | ' '
+123.456 | 999.999 | ' 123.456'
-123.456 | 999.999 | '-123.456'
+123.456 | FM999.009 | '123.456'
+123.456 | 9.9EEEE | ' 1.2E+02'
+1E+123 | 9.9EEEE | ' 1.0E+123'
+123.456 | FM9.9EEEE | '1.2E+02'
+123.45 | FM999.009 | '123.45'
+123.0 | FM999.009 | '123.00'
+123.45 | L999.99 | ' $123.45'
+123.45 | FML999.99 | '$123.45'
+1234567890 | 9999999999S | '1234567890+'

Date Format Models

You can use date format models:

  • In the TO_* datetime function to translate a character value that is in a format other than the default date format into a DATE value. (The TO_* datetime functions are TO_CHAR, TO_DATE, TO_TIMESTAMP, TO_TIMESTAMP_TZ, TO_YMINTERVAL, and TO_DSINTERVAL.)
  • In the TO_CHAR function to translate a DATE value that is in a format other than the default date format into a string (for example, to print the date from an application)

The total length of a date format model cannot exceed 22 characters.

The default date format is specified either explicitly with the initialization parameter NLS_DATE_FORMAT or implicitly with the initialization parameter NLS_TERRITORY. You can change the default date format for your session with the ALTER SESSION statement.

See Also:
  • Oracle9i Database Reference for information on the NLS parameters
  • ALTER SESSION

Date Format Elements

A date format model is composed of one or more datetime format elements as listed in Table 2-15 .

  • For input format models, format items cannot appear twice, and format items that represent similar information cannot be combined. For example, you cannot use 'SYYYY' and 'BC' in the same format string.
  • Some of the datetime format elements cannot be used in the TO_* datetime functions, as noted in Table 2-15.
  • The following datetime format elements can be used in interval and timestamp format models, but not in the original DATE format model: FF, TZD, TZH, TZM, and TZR.
Capitalization of Date Format Elements

Capitalization in a spelled-out word, abbreviation, or Roman numeral follows capitalization in the corresponding format element. For example, the date format model 'DAY' produces capitalized words like 'MONDAY'; 'Day' produces 'Monday'; and 'day' produces 'monday'.

Punctuation and Character Literals in Date Format Models

You can also include these characters in a date format model:

  • Punctuation such as hyphens, slashes, commas, periods, and colons
  • Character literals, enclosed in double quotation marks

These characters appear in the return value in the same location as they appear in the format model.

Table 2-15 Datetime Format Elements

Element

Specify in TO_* datetime functions?a

Meaning

-
/
,
.
;
:
"text"

Yes

Punctuation and quoted text is reproduced in the result.

AD
A.D.

Yes

AD indicator with or without periods.

AM
A.M.

Yes

Meridian indicator with or without periods.

BC
B.C.

Yes

BC indicator with or without periods.

CC
SCC

No

Century.

  • If the last 2 digits of a 4-digit year are between 01 and 99 (inclusive), then the century is one greater than the first 2 digits of that year.
  • If the last 2 digits of a 4-digit year are 00, then the century is the same as the first 2 digits of that year.

For example, 2002 returns 21; 2000 returns 20.

D

Yes

Day of week (1-7).

DAY

Yes

Name of day, padded with blanks to length of 9 characters.

DD

Yes

Day of month (1-31).

DDD

Yes

Day of year (1-366).

DY

Yes

Abbreviated name of day.

E

No

Abbreviated era name (Japanese Imperial, ROC Official, and Thai Buddha calendars).

EE

No

Full era name (Japanese Imperial, ROC Official, and Thai Buddha calendars).

FF [1..9]

Yes

Fractional seconds; no radix character is printed (use the X format element to add the radix character). Use the numbers 1 to 9 after FF to specify the number of digits in the fractional second portion of the datetime value returned. If you do not specify a digit, then Oracle uses the precision specified for the datetime datatype or the datatype's default precision.

Examples: 'HH:MI:SS.FF'

SELECT TO_CHAR(SYSTIMESTAMP, 'SS.FF3') from dual;

HH

Yes

Hour of day (1-12).

HH12

No

Hour of day (1-12).

HH24

Yes

Hour of day (0-23).

IW

No

Week of year (1-52 or 1-53) based on the ISO standard.

IYY
IY
I

No

Last 3, 2, or 1 digit(s) of ISO year.

IYYY

No

4-digit year based on the ISO standard.

J

Yes

Julian day; the number of days since January 1, 4712 BC. Number specified with 'J' must be integers.

MI

Yes

Minute (0-59).

MM

Yes

Month (01-12; JAN = 01).

MON

Yes

Abbreviated name of month.

MONTH

Yes

Name of month, padded with blanks to length of 9 characters.

PM
P.M.

No

Meridian indicator with or without periods.

Q

No

Quarter of year (1, 2, 3, 4; JAN-MAR = 1).

RM

Yes

Roman numeral month (I-XII; JAN = I).

RR

Yes

Lets you store 20th century dates in the 21st century using only two digits. See "The RR Date Format Element" for detailed information.

RRRR

Yes

Round year. Accepts either 4-digit or 2-digit input. If 2-digit, provides the same return as RR. If you don't want this functionality, then simply enter the 4-digit year.

SS

Yes

Second (0-59).

SSSSS

Yes

Seconds past midnight (0-86399).

TZD

Yes

Daylight savings information. The TZD value is an abbreviated time zone string with daylight savings information. It must correspond with the region specified in TZR.

Example: PST (for US/Pacific standard time); PDT (for US/Pacific daylight time).

TZH

Yes

Time zone hour. (See TZM format element.)

Example: 'HH:MI:SS.FFTZH:TZM'.

TZM

Yes

Time zone minute. (See TZH format element.)

Example: 'HH:MI:SS.FFTZH:TZM'.

TZR

Yes

Time zone region information. The value must be one of the time zone regions supported in the database.

Example: US/Pacific

WW

No

Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year.

W

No

Week of month (1-5) where week 1 starts on the first day of the month and ends on the seventh.

X

Yes

Local radix character.

Example: 'HH:MI:SSXFF'.

Y,YYY

Yes

Year with comma in this position.

YEAR
SYEAR

No

Year, spelled out; "S" prefixes BC dates with "-".

YYYY
SYYYY

Yes

4-digit year; "S" prefixes BC dates with "-".

YYY
YY
Y

Yes

Last 3, 2, or 1 digit(s) of year.

a The TO_* datetime functions are TO_CHAR, TO_DATE, TO_TIMESTAMP, TO_TIMESTAMP_TZ, TO_YMINTERVAL, and TO_DSINTERVAL.

Oracle returns an error if an alphanumeric character is found in the date string where punctuation character is found in the format string. For example:

TO_CHAR (TO_DATE('0297','MM/YY'), 'MM/YY')

returns an error.

Date Format Elements and Globalization Support

The functionality of some datetime format elements depends on the country and language in which you are using Oracle. For example, these datetime format elements return spelled values:

  • MONTH
  • MON
  • DAY
  • DY
  • BC or AD or B.C. or A.D.
  • AM or PM or A.M or P.M.

The language in which these values are returned is specified either explicitly with the initialization parameter NLS_DATE_LANGUAGE or implicitly with the initialization parameter NLS_LANGUAGE. The values returned by the YEAR and SYEAR datetime format elements are always in English.

The datetime format element D returns the number of the day of the week (1-7). The day of the week that is numbered 1 is specified implicitly by the initialization parameter NLS_TERRITORY.

See Also:

Oracle9i Database Reference and Oracle9i Database Globalization Support Guide for information on Globalization Support initialization parameters

ISO Standard Date Format Elements

Oracle calculates the values returned by the datetime format elements IYYY, IYY, IY, I, and IW according to the ISO standard. For information on the differences between these values and those returned by the datetime format elements YYYY, YYY, YY, Y, and WW, see the discussion of Globalization Support in Oracle9i Database Globalization Support Guide.

The RR Date Format Element

The RR datetime format element is similar to the YY datetime format element, but it provides additional flexibility for storing date values in other centuries. The RR datetime format element lets you store 20th century dates in the 21st century by specifying only the last two digits of the year.

If you use the TO_DATE function with the YY datetime format element, then the year returned always has the same first 2 digits as the current year. If you use the RR datetime format element instead, then the century of the return value varies according to the specified two-digit year and the last two digits of the current year. That is:

  • If the specified two-digit year is 00 to 49, then
    • If the last two digits of the current year are 00 to 49, then the returned year has the same first two digits as the current year.
    • If the last two digits of the current year are 50 to 99, then the first 2 digits of the returned year are 1 greater than the first 2 digits of the current year.
  • If the specified two-digit year is 50 to 99, then
    • If the last two digits of the current year are 00 to 49, then the first 2 digits of the returned year are 1 less than the first 2 digits of the current year.
    • If the last two digits of the current year are 50 to 99, then the returned year has the same first two digits as the current year.

The following examples demonstrate the behavior of the RR datetime format element.

RR Date Format Examples

Assume these queries are issued between 1950 and 1999:

SELECT TO_CHAR(TO_DATE('27-OCT-98', 'DD-MON-RR') ,'YYYY') "Year"
   FROM DUAL;

Year
----
1998

SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "Year"
   FROM DUAL;

Year
----
2017

Now assume these queries are issued between 2000 and 2049:

SELECT TO_CHAR(TO_DATE('27-OCT-98', 'DD-MON-RR') ,'YYYY') "Year"
   FROM DUAL;

Year
----
1998

SELECT TO_CHAR(TO_DATE('27-OCT-17', 'DD-MON-RR') ,'YYYY') "Year"
   FROM DUAL;

Year
----
2017

Note that the queries return the same values regardless of whether they are issued before or after the year 2000. The RR datetime format element lets you write SQL statements that will return the same values from years whose first two digits are different.

Date Format Element Suffixes

Table 2-17 lists suffixes that can be added to datetime format elements:

Table 2-16 Date Format Element Suffixes
Suffix Meaning Example Element Example Value

TH

Ordinal Number

DDTH

4TH

SP

Spelled Number

DDSP

FOUR

SPTH or THSP

Spelled, ordinal number

DDSPTH

FOURTH

Notes:

  • When you add one of these suffixes to a datetime format element, the return value is always in English.
  • Date suffixes are valid only to format output. You cannot use them to insert a date into the database.

Format Model Modifiers

The FM and FX modifiers, used in format models in the TO_CHAR function, control blank padding and exact format checking.

A modifier can appear in a format model more than once. In such a case, each subsequent occurrence toggles the effects of the modifier. Its effects are enabled for the portion of the model following its first occurrence, and then disabled for the portion following its second, and then reenabled for the portion following its third, and so on.

FM

"Fill mode". This modifier suppresses blank padding in the return value of the TO_CHAR function:

  • In a datetime format element of a TO_CHAR function, this modifier suppresses blanks in subsequent character elements (such as MONTH) and suppresses leading zeroes for subsequent number elements (such as MI) in a date format model. Without FM, the result of a character element is always right padded with blanks to a fixed length, and leading zeroes are always returned for a number element. With FM, because there is no blank padding, the length of the return value may vary.
  • In a number format element of a TO_CHAR function, this modifier suppresses blanks added to the left of the number, so that the result is left-justified in the output buffer. Without FM, the result is always right-justified in the buffer, resulting in blank-padding to the left of the number.
FX

"Format exact". This modifier specifies exact matching for the character argument and date format model of a TO_DATE function:

  • Punctuation and quoted text in the character argument must exactly match (except for case) the corresponding parts of the format model.
  • The character argument cannot have extra blanks. Without FX, Oracle ignores extra blanks.
  • Numeric data in the character argument must have the same number of digits as the corresponding element in the format model. Without FX, numbers in the character argument can omit leading zeroes.

    When FX is enabled, you can disable this check for leading zeroes by using the FM modifier as well.

If any portion of the character argument violates any of these conditions, then Oracle returns an error message.

Format Modifier Examples

The following statement uses a date format model to return a character expression:

SELECT TO_CHAR(SYSDATE, 'fmDDTH')||' of '||TO_CHAR
   (SYSDATE, 'fmMonth')||', '||TO_CHAR(SYSDATE, 'YYYY') "Ides"
    FROM DUAL;

Ides
------------------
3RD of April, 1998

The preceding statement also uses the FM modifier. If FM is omitted, then the month is blank-padded to nine characters:

SELECT TO_CHAR(SYSDATE, 'DDTH')||' of '||
   TO_CHAR(SYSDATE, 'Month')||', '||
   TO_CHAR(SYSDATE, 'YYYY') "Ides"
   FROM DUAL;

Ides
-----------------------
03RD of April    , 1998

The following statement places a single quotation mark in the return value by using a date format model that includes two consecutive single quotation marks:

SELECT TO_CHAR(SYSDATE, 'fmDay')||'''s Special' "Menu"
   FROM DUAL;

Menu
-----------------
Tuesday's Special

Two consecutive single quotation marks can be used for the same purpose within a character literal in a format model.

Table 2-18 shows whether the following statement meets the matching conditions for different values of char and 'fmt' using FX (the table named table has a column date_column of datatype DATE):

UPDATE table
  SET date_column = TO_DATE(char, 'fmt');
Table 2-17 Matching Character Data and Format Models with the FX Format Model Modifier
char | 'fmt' | Match or Error?
'15/ JAN /1998' | 'DD-MON-YYYY' | Match
' 15! JAN % /1998' | 'DD-MON-YYYY' | Error
'15/JAN/1998' | 'FXDD-MON-YYYY' | Error
'15-JAN-1998' | 'FXDD-MON-YYYY' | Match
'1-JAN-1998' | 'FXDD-MON-YYYY' | Error
'01-JAN-1998' | 'FXDD-MON-YYYY' | Match
'1-JAN-1998' | 'FXFMDD-MON-YYYY' | Match

String-to-Date Conversion Rules

The following additional formatting rules apply when converting string values to date values (unless you have used the FX or FXFM modifiers in the format model to control exact format checking):

  • You can omit punctuation included in the format string from the date string if all the digits of the numerical format elements, including leading zeros, are specified. In other words, specify 02 and not 2 for two-digit format elements such as MM, DD, and YY.
  • You can omit time fields found at the end of a format string from the date string.
  • If a match fails between a datetime format element and the corresponding characters in the date string, then Oracle attempts alternative format elements, as shown in Table 2-19.

    Table 2-18 Oracle Format Matching
    Original Format Element Additional Format Elements to Try in Place of the Original
    'MM'

    'MON' and 'MONTH'

    'MON

    'MONTH'

    'MONTH'

    'MON'

    'YY'

    'YYYY'

    'RR'

    'RRRR'

XML Format Model

The SYS_XMLGEN function returns an instance of type XMLType containing an XML document. Oracle provides the XMLFormat object, which lets you format the output of the SYS_XMLGEN function.

Table 2-20 lists and describes the attributes of the XMLFormat object. The function that implements this type follows the table.

See Also:
  • SYS_XMLGEN for information on the SYS_XMLGEN function
  • Oracle9i XML API Reference - XDK and Oracle XML DB and Oracle9i XML Developer's Kits Guide - XDK for more information on the implementation of the XMLFormat object and its use
Table 2-19 Attributes of the XMLFormat Object
Attribute | Datatype | Purpose
enclTag | VARCHAR2(100) | The name of the enclosing tag for the result of the SYS_XMLGEN function. If the input to the function is a column name, the default is the column name. Otherwise the default is ROW. When schemaType is set to USE_GIVEN_SCHEMA, this attribute also gives the name of the XMLSchema element.
schemaType | VARCHAR2(100) | The type of schema generation for the output document. Valid values are 'NO_SCHEMA' and 'USE_GIVEN_SCHEMA'. The default is 'NO_SCHEMA'.
schemaName | VARCHAR2(4000) | The name of the target schema Oracle uses if the value of the schemaType is 'USE_GIVEN_SCHEMA'. If you specify schemaName, then Oracle uses the enclosing tag as the element name.
processingIns | VARCHAR2(4000) | User-provided processing instructions, which are appended to the top of the function output before the element.

The function that implements the XMLFormat object follows:

  STATIC FUNCTION createFormat(
     enclTag IN varchar2 := 'ROWSET',
     schemaType IN varchar2 := 'NO_SCHEMA',
     schemaName IN varchar2 := null,
     targetNameSpace IN varchar2 := null,
     dburlPrefix IN varchar2 := null,
     processingIns IN varchar2 := null) RETURN XMLGenFormatType,
  MEMBER PROCEDURE genSchema (spec IN varchar2),
  MEMBER PROCEDURE setSchemaName(schemaName IN varchar2),
  MEMBER PROCEDURE setTargetNameSpace(targetNameSpace IN varchar2),
  MEMBER PROCEDURE setEnclosingElementName(enclTag IN varchar2),
  MEMBER PROCEDURE setDbUrlPrefix(prefix IN varchar2),
  MEMBER PROCEDURE setProcessingIns(pi IN varchar2),
  CONSTRUCTOR FUNCTION XMLGenFormatType (
     enclTag IN varchar2 := 'ROWSET',
     schemaType IN varchar2 := 'NO_SCHEMA',
     schemaName IN varchar2 := null,
     targetNameSpace IN varchar2 := null,
     dbUrlPrefix IN varchar2 := null,
     processingIns IN varchar2 := null) RETURN SELF AS RESULT
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Basic Elements of Oracle SQL, 5 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Nulls

If a column in a row has no value, then the column is said to be null, or to contain null. Nulls can appear in columns of any datatype that are not restricted by NOT NULL or PRIMARY KEY integrity constraints. Use a null when the actual value is not known or when a value would not be meaningful.

Do not use null to represent a value of zero, because they are not equivalent. (Oracle currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.) Any arithmetic expression containing a null always evaluates to null. For example, null added to 10 is null. In fact, all operators (except concatenation) return null when given a null operand.

Nulls in SQL Functions

All scalar functions (except REPLACE, NVL, and CONCAT) return null when given a null argument. You can use the NVL function to return a value when a null occurs. For example, the expression NVL(COMM,0) returns 0 if COMM is null or the value of COMM if it is not null.

Most aggregate functions ignore nulls. For example, consider a query that averages the five values 1000, null, null, null, and 2000. Such a query ignores the nulls and calculates the average to be (1000+2000)/2 = 1500.

Nulls with Comparison Conditions

To test for nulls, use only the comparison conditions IS NULL and IS NOT NULL. If you use any other condition with nulls and the result depends on the value of the null, then the result is UNKNOWN. Because null represents a lack of data, a null cannot be equal or unequal to any value or to another null. However, Oracle considers two nulls to be equal when evaluating a DECODE function.

See Also:

DECODE for syntax and additional information

Oracle also considers two nulls to be equal if they appear in compound keys. That is, Oracle considers identical two compound keys containing nulls if all the non-null components of the keys are equal.

Nulls in Conditions

A condition that evaluates to UNKNOWN acts almost like FALSE. For example, a SELECT statement with a condition in the WHERE clause that evaluates to UNKNOWN returns no rows. However, a condition evaluating to UNKNOWN differs from FALSE in that further operations on an UNKNOWN condition evaluation will evaluate to UNKNOWN. Thus, NOT FALSE evaluates to TRUE, but NOT UNKNOWN evaluates to UNKNOWN.

Table 2-21 shows examples of various evaluations involving nulls in conditions. If the conditions evaluating to UNKNOWN were used in a WHERE clause of a SELECT statement, then no rows would be returned for that query.

Table 2-20 Conditions Containing Nulls
If A is: | Condition | Evaluates to:
10 | a IS NULL | FALSE
10 | a IS NOT NULL | TRUE
NULL | a IS NULL | TRUE
NULL | a IS NOT NULL | FALSE
10 | a = NULL | UNKNOWN
10 | a != NULL | UNKNOWN
NULL | a = NULL | UNKNOWN
NULL | a != NULL | UNKNOWN
NULL | a = 10 | UNKNOWN
NULL | a != 10 | UNKNOWN

For the truth tables showing the results of logical conditions containing nulls, see Table 5-4 , Table 5-5 , and Table 5-6 .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Basic Elements of Oracle SQL, 6 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Pseudocolumns

A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. This section describes these pseudocolumns:

  • CURRVAL and NEXTVAL
  • LEVEL
  • ROWID
  • ROWNUM
  • XMLDATA

CURRVAL and NEXTVAL

A sequence is a schema object that can generate unique sequential values. These values are often used for primary and unique keys. You can refer to sequence values in SQL statements with these pseudocolumns:

  • CURRVAL: returns the current value of a sequence
  • NEXTVAL: increments the sequence and returns the next value

You must qualify CURRVAL and NEXTVAL with the name of the sequence:

sequence.CURRVAL
sequence.NEXTVAL

To refer to the current or next value of a sequence in the schema of another user, you must have been granted either SELECT object privilege on the sequence or SELECT ANY SEQUENCE system privilege, and you must qualify the sequence with the schema containing it:

schema.sequence.CURRVAL
schema.sequence.NEXTVAL

To refer to the value of a sequence on a remote database, you must qualify the sequence with a complete or partial name of a database link:

schema.sequence.CURRVAL@dblink
schema.sequence.NEXTVAL@dblink
See Also:

"Referring to Objects in Remote Databases" for more information on referring to database links

Where to Use Sequence Values

You can use CURRVAL and NEXTVAL in:

  • The SELECT list of a SELECT statement that is not contained in a subquery, materialized view, or view
  • The SELECT list of a subquery in an INSERT statement
  • The VALUES clause of an INSERT statement
  • The SET clause of an UPDATE statement
Restrictions on Sequence Values

You cannot use CURRVAL and NEXTVAL in the following constructs:

  • A subquery in a DELETE, SELECT, or UPDATE statement
  • A query of a view or of a materialized view
  • A SELECT statement with the DISTINCT operator
  • A SELECT statement with a GROUP BY clause or ORDER BY clause
  • A SELECT statement that is combined with another SELECT statement with the UNION, INTERSECT, or MINUS set operator
  • The WHERE clause of a SELECT statement
  • DEFAULT value of a column in a CREATE TABLE or ALTER TABLE statement
  • The condition of a CHECK constraint

Also, within a single SQL statement that uses CURRVAL or NEXTVAL, all referenced LONG columns, updated tables, and locked tables must be located on the same database.

How to Use Sequence Values

When you create a sequence, you can define its initial value and the increment between its values. The first reference to NEXTVAL returns the sequence's initial value. Subsequent references to NEXTVAL increment the sequence value by the defined increment and return the new value. Any reference to CURRVAL always returns the sequence's current value, which is the value returned by the last reference to NEXTVAL. Note that before you use CURRVAL for a sequence in your session, you must first initialize the sequence with NEXTVAL.

Within a single SQL statement containing a reference to NEXTVAL, Oracle increments the sequence only once:

  • For each row returned by the outer query block of a SELECT statement. Such a query block can appear in the following places:
    • A top-level SELECT statement
    • An INSERT ... SELECT statement (either single-table or multi-table). For a multi-table insert, the reference to NEXTVAL must appear in the VALUES clause, and the sequence is updated once for each row returned by the subquery, even though NEXTVAL may be referenced in multiple branches of the multi-table insert.
    • A CREATE TABLE ... AS SELECT statement
    • A CREATE MATERIALIZED VIEW ... AS SELECT statement
  • For each row updated in an UPDATE statement
  • For each INSERT statement containing a VALUES clause
  • For row "merged" (either inserted or updated) in a MERGE statement. The reference to NEXTVAL can appear in the merge_insert_clause or the merge_update_clause.

If any of these locations contains more than one reference to NEXTVAL, then Oracle increments the sequence once and returns the same value for all occurrences of NEXTVAL.

If any of these locations contains references to both CURRVAL and NEXTVAL, then Oracle increments the sequence and returns the same value for both CURRVAL and NEXTVAL.

A sequence can be accessed by many users concurrently with no waiting or locking.

See Also:

CREATE SEQUENCE for information on sequences
Finding the current value of a sequence: Example

This example selects the next value of the employee sequence in the sample schema hr:

SELECT employees_seq.nextval
    FROM DUAL;
Inserting sequence values into a table: Example

This example increments the employee sequence and uses its value for a new employee inserted into the sample table hr.employees:

INSERT INTO employees
   VALUES (employees_seq.nextval, 'John', 'Doe', 'jdoe',
   '555-1212', TO_DATE(SYSDATE), 'PU_CLERK', 2500, null, null,
   30);
Reusing the current value of a sequence: Example

This example adds a new order with the next order number to the master order table. It then adds suborders with this number to the detail order table:

INSERT INTO orders (order_id, order_date, customer_id)
   VALUES (orders_seq.nextval, TO_DATE(SYSDATE), 106);

INSERT INTO order_items (order_id, line_item_id, product_id)
   VALUES (orders_seq.currval, 1, 2359);

INSERT INTO order_items (order_id, line_item_id, product_id)
   VALUES (orders_seq.currval, 2, 3290);

INSERT INTO order_items (order_id, line_item_id, product_id)
   VALUES (orders_seq.currval, 3, 2381);

LEVEL

For each row returned by a hierarchical query, the LEVEL pseudocolumn returns 1 for a root row, 2 for a child of a root, and so on. A root row is the highest row within an inverted tree. A child row is any nonroot row. A parent row is any row that has children. A leaf row is any row without children. Figure 2-1 shows the nodes of an inverted tree with their LEVEL values.

Figure 2-1 Hierarchical Tree

Text description of sql_elements78a.gif follows
Text description of the illustration sql_elements78a.gif

To define a hierarchical relationship in a query, you must use the START WITH and CONNECT BY clauses.

Restriction on LEVEL in WHERE Clauses

In a [NOT] IN condition in a WHERE clause, if the right-hand side of the condition is a subquery, you cannot use LEVEL on the left-hand side of the condition. However, you can specify LEVEL in a subquery of the FROM clause to achieve the same result. For example, the following statement is not valid:

SELECT employee_id, last_name FROM employees
   WHERE (employee_id, LEVEL)
      IN (SELECT employee_id, 2 FROM employees)
   START WITH employee_id = 2
   CONNECT BY PRIOR employee_id = manager_id;

But the following statement is valid because it encapsulates the query containing the LEVEL information in the FROM clause:

SELECT v.employee_id, v.last_name, v.lev
   FROM
      (SELECT employee_id, last_name, LEVEL lev
      FROM employees v
      START WITH employee_id = 100
      CONNECT BY PRIOR employee_id = manager_id) v
   WHERE (v.employee_id, v.lev) IN
      (SELECT employee_id, 2 FROM employees);
See Also:

"Hierarchical Queries" for information on hierarchical queries in general

ROWID

For each row in the database, the ROWID pseudocolumn returns a row's address. Oracle9i rowid values contain information necessary to locate a row:

  • The data object number of the object
  • Which data block in the datafile
  • Which row in the data block (first row is 0)
  • Which datafile (first file is 1). The file number is relative to the tablespace.

Usually, a rowid value uniquely identifies a row in the database. However, rows in different tables that are stored together in the same cluster can have the same rowid.

Values of the ROWID pseudocolumn have the datatype ROWID or UROWID.

See Also:

"ROWID Datatype" and "UROWID Datatype"

Rowid values have several important uses:

  • They are the fastest way to access a single row.
  • They can show you how a table's rows are stored.
  • They are unique identifiers for rows in a table.

You should not use ROWID as a table's primary key. If you delete and reinsert a row with the Import and Export utilities, for example, then its rowid may change. If you delete a row, then Oracle may reassign its rowid to a new row inserted later.

Although you can use the ROWID pseudocolumn in the SELECT and WHERE clause of a query, these pseudocolumn values are not actually stored in the database. You cannot insert, update, or delete a value of the ROWID pseudocolumn.

Example

This statement selects the address of all rows that contain data for employees in department 20:

SELECT ROWID, last_name
   FROM employees
   WHERE department_id = 20;

ROWNUM

For each row returned by a query, the ROWNUM pseudocolumn returns a number indicating the order in which Oracle selects the row from a table or set of joined rows. The first row selected has a ROWNUM of 1, the second has 2, and so on.

You can use ROWNUM to limit the number of rows returned by a query, as in this example:

SELECT * FROM employees WHERE ROWNUM < 10;

If an ORDER BY clause follows ROWNUM in the same query, then the rows will be reordered by the ORDER BY clause. The results can vary depending on the way the rows are accessed. For example, if the ORDER BY clause causes Oracle to use an index to access the data, then Oracle may retrieve the rows in a different order than without the index. Therefore, the following statement will not have the same effect as the preceding example:

SELECT * FROM employees WHERE ROWNUM < 11 ORDER BY last_name;

If you embed the ORDER BY clause in a subquery and place the ROWNUM condition in the top-level query, then you can force the ROWNUM condition to be applied after the ordering of the rows. For example, the following query returns the 10 smallest employee numbers. This is sometimes referred to as a "top-N query":

SELECT * FROM
   (SELECT * FROM employees ORDER BY employee_id)
   WHERE ROWNUM < 11;

In the preceding example, the ROWNUM values are those of the top-level SELECT statement, so they are generated after the rows have already been ordered by employee_id in the subquery.

See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information about top-N queries

Conditions testing for ROWNUM values greater than a positive integer are always false. For example, this query returns no rows:

SELECT * FROM employees
    WHERE ROWNUM > 1;

The first row fetched is assigned a ROWNUM of 1 and makes the condition false. The second row to be fetched is now the first row and is also assigned a ROWNUM of 1 and makes the condition false. All rows subsequently fail to satisfy the condition, so no rows are returned.

You can also use ROWNUM to assign unique values to each row of a table, as in this example:

UPDATE my_table
    SET column1 = ROWNUM;
Note:

Using ROWNUM in a query can affect view optimization. For more information, see Oracle9i Database Concepts.

XMLDATA

Oracle stores XMLType data either in LOB or object-relational columns, based on XMLSchema information and how you specify the storage clause. The XMLDATA pseudocolumn lets you access the underlying LOB or object relational column to specify additional storage clause parameters, constraints, indexes, and so forth.

Example

The following statements illustrate the use of this pseudocolumn. Suppose you create a simple table of XMLType:

CREATE TABLE xml_lob_tab of XMLTYPE;

The default storage is in a CLOB column. To change the storage characteristics of the underlying LOB column, you can use the following statement:

ALTER TABLE xml_lob_tab MODIFY LOB (XMLDATA)
   (STORAGE (BUFFER_POOL DEFAULT) CACHE);

Now suppose you have created an XMLSchema-based table like the xwarehouses table created in "Using XML in SQL Statements" . You could then use the XMLDATA column to set the properties of the underlying columns, as shown in the following statement:

ALTER TABLE xwarehouses ADD (UNIQUE(XMLDATA."WarehouseId"));
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Basic Elements of Oracle SQL, 7 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Comments

You can associate comments with SQL statements and schema objects.

Comments Within SQL Statements

Comments within SQL statements do not affect the statement execution, but they may make your application easier for you to read and maintain. You may want to include a comment in a statement that describes the statement's purpose within your application.

A comment can appear between any keywords, parameters, or punctuation marks in a statement. You can include a comment in a statement using either of these means:

  • Begin the comment with a slash and an asterisk (/*). Proceed with the text of the comment. This text can span multiple lines. End the comment with an asterisk and a slash (*/). The opening and terminating characters need not be separated from the text by a space or a line break.
  • Begin the comment with -- (two hyphens). Proceed with the text of the comment. This text cannot extend to a new line. End the comment with a line break.

A SQL statement can contain multiple comments of both styles. The text of a comment can contain any printable characters in your database character set.

Example

These statements contain many comments:

SELECT last_name, salary + NVL(commission_pct, 0),
   job_id, e.department_id
/* Select all employees whose compensation is
greater than that of Pataballa.*/
  FROM employees e, departments d
       /*The DEPARTMENTS table is used to get the department name.*/
  WHERE e.department_id = d.department_id
    AND salary + NVL(commission_pct,0) >   /* Subquery:       */
   (SELECT salary + NVL(commission_pct,0)
                 /* total compensation is salar + commission_pct */
      FROM employees
      WHERE last_name = 'Pataballa');

SELECT last_name,                    -- select the name
    salary + NVL(commission_pct, 0),-- total compensation
    job_id,                         -- job
    e.department_id                 -- and department
  FROM employees e,                 -- of all employees
       departments d
  WHERE e.department_id = d.department_id
    AND salary + NVL(commission_pct, 0) >  -- whose compensation
                                           -- is greater than
      (SELECT salary + NVL(commission_pct,0)  -- the compensation
    FROM employees
    WHERE last_name = 'Pataballa')        -- of Pataballa.
;

Comments on Schema Objects

You can associate a comment with a table, view, materialized view, or column using the COMMENT command. Comments associated with schema objects are stored in the data dictionary.

See Also:

COMMENT for a description of comments

Hints

You can use comments in a SQL statement to pass instructions, or hints, to the Oracle optimizer. The optimizer uses these hints as suggestions for choosing an execution plan for the statement.

A statement block can have only one comment containing hints, and that comment must follow the SELECT, UPDATE, INSERT, or DELETE keyword. The following syntax shows hints contained in both styles of comments that Oracle supports within a statement block.

{DELETE|INSERT|SELECT|UPDATE} /*+ hint [text] [hint[text]]... */

or

{DELETE|INSERT|SELECT|UPDATE} --+ hint [text] [hint[text]]...

where:

  • DELETE, INSERT, SELECT, or UPDATE is a DELETE, INSERT, SELECT, or UPDATE keyword that begins a statement block. Comments containing hints can appear only after these keywords.
  • + is a plus sign that causes Oracle to interpret the comment as a list of hints. The plus sign must follow immediately after the comment delimiter (no space is permitted).
  • hint is one of the hints discussed in this section. The space between the plus sign and the hint is optional. If the comment contains multiple hints, then separate the hints by at least one space.
  • text is other commenting text that can be interspersed with the hints.

Table 2-22 lists the hints by functional category. An alphabetical listing of the hints, including the syntax and a brief description of each hint, follow the table.

Note:

Oracle treats misspelled hints as regular comments and does not return an error.
See Also:

Oracle9i Database Performance Tuning Guide and Reference and Oracle9i Database Concepts for more information on hints
Table 2-21 Hints by Functional Category
Category | Hint
Optimization Goals and Approaches | ALL_ROWS and FIRST_ROWS CHOOSE RULE
Access Method Hints | AND_EQUAL CLUSTER FULL HASH INDEX and NO_INDEX INDEX_ASC and INDEX_DESC INDEX_COMBINE INDEX_FFS ROWID
Join Order Hints | ORDERED STAR
Join Operation Hints | DRIVING_SITE HASH_SJ, MERGE_SJ, and NL_SJ LEADING USE_HASH and USE_MERGE USE_NL
Parallel Execution Hints | PARALLEL and NOPARALLEL PARALLEL_INDEX PQ_DISTRIBUTE NOPARALLEL_INDEX
Query Transformation Hints | EXPAND_GSET_TO_UNION FACT and NOFACT MERGE NO_EXPAND NO_MERGE REWRITE and NOREWRITE STAR_TRANSFORMATION USE_CONCAT
Other Hints | APPEND and NOAPPEND CACHE and NOCACHE CURSOR_SHARING_EXACT DYNAMIC_SAMPLING NESTED_TABLE_GET_REFS UNNEST and NO_UNNEST ORDERED_PREDICATES PUSH_PRED and NO_PUSH_PRED PUSH_SUBQ and NO_PUSH_SUBQ

all_rows_hint::=

Text description of sql_elements61a.gif follows
Text description of all_rows_hint

The ALL_ROWS hint explicitly chooses the cost-based approach to optimize a statement block with a goal of best throughput (that is, minimum total resource consumption).

and_equal_hint::=

Text description of sql_elements65a.gif follows
Text description of and_equal_hint

The AND_EQUAL hint explicitly chooses an execution plan that uses an access path that merges the scans on several single-column indexes.

append_hint::=

Text description of sql_elements77b.gif follows
Text description of append_hint

The APPEND hint lets you enable direct-path INSERT if your database is running in serial mode. Your database is in serial mode if you are not using Enterprise Edition. Conventional INSERT is the default in serial mode, and direct-path INSERT is the default in parallel mode.

In direct-path INSERT, data is appended to the end of the table, rather than using existing space currently allocated to the table. As a result, direct-path INSERT can be considerably faster than conventional INSERT.

cache_hint::=

Text description of sql_elements60a.gif follows
Text description of cache_hint

The CACHE hint specifies that the blocks retrieved for the table are placed at the most recently used end of the LRU list in the buffer cache when a full table scan is performed. This option is useful for small lookup tables.

choose_hint::=

Text description of sql_elements76.gif follows
Text description of choose_hint

The CHOOSE hint causes the optimizer to choose between the rule-based and cost-based approaches for a SQL statement. The optimizer bases its selection on the presence of statistics for the tables accessed by the statement. If the data dictionary has statistics for at least one of these tables, then the optimizer uses the cost-based approach and optimizes with the goal of best throughput. If the data dictionary does not have statistics for these tables, then it uses the rule-based approach.

cluster_hint::=

Text description of sql_elements63a.gif follows
Text description of cluster_hint

The CLUSTER hint explicitly chooses a cluster scan to access the specified table. It applies only to clustered objects.

cursor_sharing_exact_hint::=

Text description of sql_elements62a.gif follows
Text description of cursor_sharing_exact_hint

Oracle can replace literals in SQL statements with bind variables, if it is safe to do so. This is controlled with the CURSOR_SHARING startup parameter. The CURSOR_SHARING_EXACT hint causes this behavior to be switched off. In other words, Oracle executes the SQL statement without any attempt to replace literals by bind variables.

driving_site_hint::=

Text description of sql_elements64a.gif follows
Text description of driving_site_hint

The DRIVING_SITE hint forces query execution to be done at a different site than that selected by Oracle. This hint can be used with either rule-based or cost-based optimization.

dynamic_sampling_hint::=

Text description of sql_elements74a.gif follows
Text description of dynamic_sampling_hint

The DYNAMIC_SAMPLING hint lets you control dynamic sampling to improve server performance by determining more accurate selectivity and cardinality estimates. You can set the value of DYNAMIC_SAMPLING to a value from 0 to 10. The higher the level, the more effort the compiler puts into dynamic sampling and the more broadly it is applied. Sampling defaults to cursor level unless you specify a table.

expand_gset_to_union_hint::=

Text description of sql_elements67.gif follows
Text description of expand_gset_to_union_hint

The EXPAND_GSET_TO_UNION hint is used for queries containing grouping sets (such as queries with GROUP BY GROUPING SET or GROUP BY ROLLUP). The hint forces a query to be transformed into a corresponding query with UNION ALL of individual groupings.

fact_hint::=

Text description of sql_elements75a.gif follows
Text description of fact_hint

The FACT hint is used in the context of the star transformation to indicate to the transformation that the hinted table should be considered as a fact table.

first_rows_hint::=

Text description of sql_elements77.gif follows
Text description of first_rows_hint

The hints FIRST_ROWS(n) (where n is any positive integer) or FIRST_ROWS instruct Oracle to optimize an individual SQL statement for fast response. FIRST_ROWS(n) affords greater precision, because it instructs Oracle to choose the plan that returns the first n rows most efficiently. The FIRST_ROWS hint, which optimizes for the best plan to return the first single row, is retained for backward compatibility and plan stability.

full_hint::=

Text description of sql_elements78.gif follows
Text description of full_hint

The FULL hint explicitly chooses a full table scan for the specified table.

hash_hint::=

Text description of sql_elements68.gif follows
Text description of hash_hint

The HASH hint explicitly chooses a hash scan to access the specified table. It applies only to tables stored in a cluster.

hash_aj_hint::=

Text description of sql_elements69a.gif follows
Text description of hash_aj_hint

For a specific query, place the HASH_SJ, MERGE_SJ, or NL_SJ hint into the EXISTS subquery. HASH_SJ uses a hash semi-join, MERGE_SJ uses a sort merge semi-join, and NL_SJ uses a nested loop semi-join.

hash_sj_hint::=

Text description of sql_elements70a.gif follows
Text description of hash_sj_hint

For a specific query, place the HASH_SJ, MERGE_SJ, or NL_SJ hint into the EXISTS subquery. HASH_SJ uses a hash semi-join, MERGE_SJ uses a sort merge semi-join, and NL_SJ uses a nested loop semi-join.

index_hint::=

Text description of sql_elements45.gif follows
Text description of index_hint

The INDEX hint explicitly chooses an index scan for the specified table. You can use the INDEX hint for domain, B-tree, bitmap, and bitmap join indexes. However, Oracle recommends using INDEX_COMBINE rather than INDEX for bitmap indexes, because it is a more versatile hint.

index_asc_hint::=

Text description of sql_elements46.gif follows
Text description of index_asc_hint

The INDEX_ASC hint explicitly chooses an index scan for the specified table. If the statement uses an index range scan, then Oracle scans the index entries in ascending order of their indexed values.

index_combine_hint::=

Text description of sql_elements49.gif follows
Text description of index_combine_hint

The INDEX_COMBINE hint explicitly chooses a bitmap access path for the table. If no indexes are given as arguments for the INDEX_COMBINE hint, then the optimizer uses whatever Boolean combination of bitmap indexes has the best cost estimate for the table. If certain indexes are given as arguments, then the optimizer tries to use some Boolean combination of those particular bitmap indexes.

index_desc_hint::=

Text description of sql_elements50a.gif follows
Text description of index_desc_hint

The INDEX_DESC hint explicitly chooses an index scan for the specified table. If the statement uses an index range scan, then Oracle scans the index entries in descending order of their indexed values. In a partitioned index, the results are in descending order within each partition.

index_ffs_hint::=

Text description of sql_elements53.gif follows
Text description of index_ffs_hint

The INDEX_FFS hint causes a fast full index scan to be performed rather than a full table scan.

leading_hint::=

Text description of sql_elements61.gif follows
Text description of leading_hint

The LEADING hint causes Oracle to use the specified table as the first table in the join order.

If you specify two or more LEADING hints on different tables, then all of them are ignored. If you specify the ORDERED hint, then it overrides all LEADING hints.

merge_hint::=

Text description of sql_elements63.gif follows
Text description of merge_hint

The MERGE hint lets you merge a view for each query.

If a view's query contains a GROUP BY clause or DISTINCT operator in the SELECT list, then the optimizer can merge the view's query into the accessing statement only if complex view merging is enabled. Complex merging can also be used to merge an IN subquery into the accessing statement if the subquery is uncorrelated.

Complex merging is not cost-based; that is, the accessing query block must include the MERGE hint. Without this hint, the optimizer uses another approach.

merge_aj_hint::=

Text description of sql_elements17.gif follows
Text description of merge_aj_hint

See HASH_AJ hint.

merge_sj_hint::=

Text description of sql_elements71a.gif follows
Text description of merge_sj_hint

See HASH_SJ hint.

nl_aj_hint::=

Text description of sql_elements31.gif follows
Text description of nl_aj_hint

See HASH_AJ hint.

nl_sj_hint::=

Text description of sql_elements33.gif follows
Text description of nl_sj_hint

See HASH_SJ hint.

noappend_hint::=

Text description of sql_elements35.gif follows
Text description of noappend_hint

The NOAPPEND hint enables conventional INSERT by disabling parallel mode for the duration of the INSERT statement. (Conventional INSERT is the default in serial mode, and direct-path INSERT is the default in parallel mode).

nocache_hint::=

Text description of sql_elementsa.gif follows
Text description of nocache_hint

The NOCACHE hint specifies that the blocks retrieved for the table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed. This is the normal behavior of blocks in the buffer cache.

no_expand_hint::=

Text description of sql_elements74.gif follows
Text description of no_expand_hint

The NO_EXPAND hint prevents the cost-based optimizer from considering OR-expansion for queries having OR conditions or IN-lists in the WHERE clause. Usually, the optimizer considers using OR expansion and uses this method if it decides that the cost is lower than not using it.

no_fact_hint::=

Text description of sql_elements16.gif follows
Text description of no_fact_hint

The NO_FACT hint is used in the context of the star transformation to indicate to the transformation that the hinted table should not be considered as a fact table.

no_index_hint::=

Text description of sql_elements48.gif follows
Text description of no_index_hint

The NO_INDEX hint explicitly disallows a set of indexes for the specified table.

no_merge_hint::=

Text description of sql_elements62.gif follows
Text description of no_merge_hint

The NO_MERGE hint causes Oracle not to merge mergeable views.

noparallel_hint::=

Text description of sql_elements73a.gif follows
Text description of noparallel_hint

The NOPARALLEL hint overrides a PARALLEL specification in the table clause. In general, hints take precedence over table clauses.

Restriction on NOPARALLEL

You cannot parallelize a query involving a nested table.

noparallel_index_hint::=

Text description of sql_elements72.gif follows
Text description of noparallel_index_hint

The NOPARALLEL_INDEX hint overrides a PARALLEL attribute setting on an index to avoid a parallel index scan operation.

no_push_pred_hint::=

Text description of sql_elements5.gif follows
Text description of no_push_pred_hint

The NO_PUSH_PRED hint prevents pushing of a join predicate into the view.

no_push_subq_hint::=

Text description of no_push_subq_hint.gif follows
Text description of no_push_subq_hint

The NO_PUSH_SUBQ hint causes non-merged subqueries to be evaluated as the last step in the execution plan. If the subquery is relatively expensive or does not reduce the number of rows significantly, then it improves performance to evaluate the subquery last.

norewrite_hint::=

Text description of sql_elements47.gif follows
Text description of norewrite_hint

The NOREWRITE hint disables query rewrite for the query block, overriding the setting of the parameter QUERY_REWRITE_ENABLED. Use the NOREWRITE hint on any query block of a request.

Note:

The NOREWRITE hint disables the use of function-based indexes.

no_unnest_hint::=

Text description of sql_elements60.gif follows
Text description of no_unnest_hint

Use of the NO_UNNEST hint turns off unnesting for specific subquery blocks.

ordered_hint::=

Text description of sql_elements52.gif follows
Text description of ordered_hint

The ORDERED hint causes Oracle to join tables in the order in which they appear in the FROM clause.

If you omit the ORDERED hint from a SQL statement performing a join, then the optimizer chooses the order in which to join the tables. You might want to use the ORDERED hint to specify a join order if you know something about the number of rows selected from each table that the optimizer does not. Such information lets you choose an inner and outer table better than the optimizer could.

ordered_predicates_hint::=

Text description of sql_elements70.gif follows
Text description of ordered_predicates_hint

The ORDERED_PREDICATES hint forces the optimizer to preserve the order of predicate evaluation, except for predicates used as index keys. Use this hint in the WHERE clause of SELECT statements.

If you do not use the ORDERED_PREDICATES hint, then Oracle evaluates all predicates in the following order:

  1. Predicates without user-defined functions, type methods, or subqueries are evaluated first, in the order specified in the WHERE clause.
  2. Predicates with user-defined functions and type methods that have user-computed costs are evaluated next, in increasing order of their cost.
  3. Predicates with user-defined functions and type methods without user-computed costs are evaluated next, in the order specified in the WHERE clause.
  4. Predicates not specified in the WHERE clause (for example, predicates transitively generated by the optimizer) are evaluated next.
  5. Predicates with subqueries are evaluated last, in the order specified in the WHERE clause.

    Note:

    Remember, you cannot use the ORDERED_PREDICATES hint to preserve the order of predicate evaluation on index keys.

parallel_hint::=

Text description of sql_elements69.gif follows
Text description of parallel_hint

The PARALLEL hint lets you specify the desired number of concurrent servers that can be used for a parallel operation. The hint applies to the SELECT, INSERT, UPDATE, and DELETE portions of a statement, as well as to the table scan portion.

Note:

The number of servers that can be used is twice the value in the PARALLEL hint, if sorting or grouping operations also take place.

If any parallel restrictions are violated, then the hint is ignored.

Note:

Oracle ignores parallel hints on a temporary table.
See Also:

CREATE TABLE and Oracle9i Database Concepts

parallel_index_hint::=

Text description of sql_elements77a.gif follows
Text description of parallel_index_hint

The PARALLEL_INDEX hint specifies the desired number of concurrent servers that can be used to parallelize index range scans for partitioned indexes.

pq_distribute_hint::=

Text description of sql_elements3.gif follows
Text description of pq_distribute_hint

The PQ_DISTRIBUTE hint improves the performance of parallel join operations. Do this by specifying how rows of joined tables should be distributed among producer and consumer query servers. Using this hint overrides decisions the optimizer would normally make.

Use the EXPLAIN PLAN statement to identify the distribution chosen by the optimizer. The optimizer ignores the distribution hint, if both tables are serial.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for the permitted combinations of distributions for the outer and inner join tables

push_pred_hint::=

Text description of sql_elements72a.gif follows
Text description of push_pred_hint

The PUSH_PRED hint forces pushing of a join predicate into the view.

push_subq_hint::=

Text description of sql_elements9.gif follows
Text description of push_subq_hint

The PUSH_SUBQ hint causes non-merged subqueries to be evaluated at the earliest possible step in the execution plan. Generally, subqueries that are not merged are executed as the last step in the execution plan. If the subquery is relatively inexpensive and reduces the number of rows significantly, then it improves performance to evaluate the subquery earlier.

This hint has no effect if the subquery is applied to a remote table or one that is joined using a merge join.

rewrite_hint::=

Text description of sql_elements57.gif follows
Text description of rewrite_hint

The REWRITE hint forces the cost-based optimizer to rewrite a query in terms of materialized views, when possible, without cost consideration. Use the REWRITE hint with or without a view list. If you use REWRITE with a view list and the list contains an eligible materialized view, then Oracle uses that view regardless of its cost.

Oracle does not consider views outside of the list. If you do not specify a view list, then Oracle searches for an eligible materialized view and always uses it regardless of its cost.

rowid_hint::=

Text description of sql_elements50.gif follows
Text description of rowid_hint

The ROWID hint explicitly chooses a table scan by rowid for the specified table.

rule_hint::=

Text description of sql_elements38.gif follows
Text description of rule_hint

The RULE hint explicitly chooses rule-based optimization for a statement block. It also makes the optimizer ignore other hints specified for the statement block.

star_hint::=

Text description of sql_elements54.gif follows
Text description of star_hint

The STAR hint forces a star query plan to be used, if possible. A star plan has the largest table in the query last in the join order and joins it with a nested loops join on a concatenated index. The STAR hint applies when there are at least three tables, the large table's concatenated index has at least three columns, and there are no conflicting access or join method hints. The optimizer also considers different permutations of the small tables.

star_transformation_hint::=

Text description of sql_elements73.gif follows
Text description of star_transformation_hint

The STAR_TRANSFORMATION hint makes the optimizer use the best plan in which the transformation has been used. Without the hint, the optimizer could make a cost-based decision to use the best plan generated without the transformation, instead of the best plan for the transformed query.

Even if the hint is given, there is no guarantee that the transformation will take place. The optimizer only generates the subqueries if it seems reasonable to do so. If no subqueries are generated, then there is no transformed query, and the best plan for the untransformed query is used, regardless of the hint.

unnest_hint::=

Text description of sql_elements71.gif follows
Text description of unnest_hint

The UNNEST hint tells Oracle to check the subquery block for validity only. If the subquery block is valid, then subquery unnesting is enabled without Oracle's checking the heuristics.

use_concat_hint::=

Text description of sql_elements57a.gif follows
Text description of use_concat_hint

The USE_CONCAT hint forces combined OR conditions in the WHERE clause of a query to be transformed into a compound query using the UNION ALL set operator. Generally, this transformation occurs only if the cost of the query using the concatenations is cheaper than the cost without them.

The USE_CONCAT hint turns off IN-list processing and OR-expands all disjunctions, including IN-lists.

use_hash_hint::=

Text description of sql_elements55.gif follows
Text description of use_hash_hint

The USE_HASH hint causes Oracle to join each specified table with another row source, using a hash join.

use_merge_hint::=

Text description of sql_elements65.gif follows
Text description of use_merge_hint

The USE_MERGE hint causes Oracle to join each specified table with another row source, using a sort-merge join.

use_nl_hint::=

Text description of sql_elements75.gif follows
Text description of use_nl_hint

The USE_NL hint causes Oracle to join each specified table to another row source with a nested loops join, using the specified table as the inner table.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Basic Elements of Oracle SQL, 8 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Database Objects

Oracle recognizes objects that are associated with a particular schema and objects that are not associated with a particular schema, as described in the sections that follow.

Schema Objects

A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types of objects:

Clusters
Constraints
Database links
Database triggers
Dimensions
External procedure libraries
Index-organized tables
Indexes
Indextypes
Java classes, Java resources, Java sources
Materialized views
Materialized view logs
Object tables
Object types
Object views
Operators
Packages
Sequences
Stored functions, stored procedures
Synonyms
Tables
Views

Nonschema Objects

Other types of objects are also stored in the database and can be created and manipulated with SQL but are not contained in a schema:

Contexts
Directories
Parameter files (PFILEs) and server parameter files (SPFILEs)
Profiles
Roles
Rollback segments
Tablespaces
Users

In this reference, each type of object is briefly defined in Chapter 9 through Chapter 18, in the section describing the statement that creates the database object. These statements begin with the keyword CREATE. For example, for the definition of a cluster, see CREATE CLUSTER .

See Also:

Oracle9i Database Concepts for an overview of database objects

You must provide names for most types of database objects when you create them. These names must follow the rules listed in the following sections.

Parts of Schema Objects

Some schema objects are made up of parts that you can or must name, such as:

  • Columns in a table or view
  • Index and table partitions and subpartitions
  • Integrity constraints on a table
  • Packaged procedures, packaged stored functions, and other objects stored within a package

Partitioned Tables and Indexes

Tables and indexes can be partitioned. When partitioned, these schema objects consist of a number of parts called partitions, all of which have the same logical attributes. For example, all partitions in a table share the same column and constraint definitions, and all partitions in an index share the same index columns.

When you partition a table or index using the range method, you specify a maximum value for the partitioning key column(s) for each partition. When you partition a table or index using the list method, you specify actual values for the partitioning key column(s) for each partition. When you partition a table or index using the hash method, you instruct Oracle to distribute the rows of the table into partitions based on a system-defined hash function on the partitioning key column(s). When you partition a table or index using the composite-partitioning method, you specify ranges for the partitions, and Oracle distributes the rows in each partition into one or more hash subpartitions based on a hash function. Each subpartition of a table or index partitioned using the composite method has the same logical attributes.

Partition-Extended and Subpartition-Extended Names

Partition-extended and subpartition-extended names let you perform some partition-level and subpartition-level operations, such as deleting all rows from a partition or subpartition, on only one partition or subpartition. Without extended names, such operations would require that you specify a predicate (WHERE clause). For range- and list-partitioned tables, trying to phrase a partition-level operation with a predicate can be cumbersome, especially when the range partitioning key uses more than one column. For hash partitions and subpartitions, using a predicate is more difficult still, because these partitions and subpartitions are based on a system-defined hash function.

Partition-extended names let you use partitions as if they were tables. An advantage of this method, which is most useful for range-partitioned tables, is that you can build partition-level access control mechanisms by granting (or revoking) privileges on these views to (or from) other users or roles.To use a partition as a table, create a view by selecting data from a single partition, and then use the view as a table.

You can specify partition-extended or subpartition-extended table names for the following DML statements:

  • DELETE
  • INSERT
  • LOCK TABLE
  • SELECT
  • UPDATE

    Note:

    For application portability and ANSI syntax compliance, Oracle strongly recommends that you use views to insulate applications from this Oracle proprietary extension.
Syntax

The basic syntax for using partition-extended and subpartition-extended table names is:

partition_extended_name::=

Text description of sql_elements28.gif follows
Text description of partition_extended_name

Restrictions on Extended Names

Currently, the use of partition-extended and subpartition-extended table names has the following restrictions:

  • No remote tables: A partition-extended or subpartition-extended table name cannot contain a database link (dblink) or a synonym that translates to a table with a dblink. To use remote partitions and subpartitions, create a view at the remote site that uses the extended table name syntax and then refer to the remote view.
  • No synonyms: A partition or subpartition extension must be specified with a base table. You cannot use synonyms, views, or any other objects.
Example

In the following statement, sales is a partitioned table with partition sales_q1_2000. You can create a view of the single partition sales_q1_2000, and then use it as if it were a table. This example deletes rows from the partition.

CREATE VIEW Q1_2000_sales AS
   SELECT * FROM sales PARTITION (SALES_Q1_2000);

DELETE FROM Q1_2000_sales WHERE amount_sold < 0;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Basic Elements of Oracle SQL, 9 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Schema Object Names and Qualifiers

This section provides:

  • Rules for naming schema objects and schema object location qualifiers
  • Guidelines for naming schema objects and qualifiers

Schema Object Naming Rules

Every database object has a name. In a SQL statement, you represent the name of an object with a quoted identifier or a nonquoted identifier.

  • A quoted identifier begins and ends with double quotation marks ("). If you name a schema object using a quoted identifier, then you must use the double quotation marks whenever you refer to that object.
  • A nonquoted identifier is not surrounded by any punctuation.

You can use either quoted or nonquoted identifiers to name any database object, with one exception: database links must be named with nonquoted identifiers. In addition, Oracle Corporation strongly recommends that you not use quotation marks to make usernames and passwords case sensitive.

See Also:

CREATE USER for additional rules for naming users and passwords

The following list of rules applies to both quoted and nonquoted identifiers unless otherwise indicated:

  1. Names must be from 1 to 30 bytes long with these exceptions:
    • Names of databases are limited to 8 bytes.
    • Names of database links can be as long as 128 bytes.
  2. Nonquoted identifiers cannot be Oracle reserved words. Quoted identifiers can be reserved words, although this is not recommended.

    Depending on the Oracle product you plan to use to access a database object, names might be further restricted by other product-specific reserved words.

    Note:

    The reserved word ROWID is an exception to this rule. You cannot use the uppercase word ROWID as a name, even in double quotation marks. However, you can use the word with one or more lower case letters (for example, "Rowid" or "rowid").
    See Also:
    • Appendix C, "Oracle Reserved Words" for a listing of all Oracle reserved words
    • The manual for the specific product, such as PL/SQL User's Guide and Reference, for a list of the product's reserved words
  3. The Oracle SQL language contains other words that have special meanings. These words include datatypes, function names, the dummy system table DUAL, and keywords (the uppercase words in SQL statements, such as DIMENSION, SEGMENT, ALLOCATE, DISABLE, and so forth). These words are not reserved. However, Oracle uses them internally in specific ways. Therefore, if you use these words as names for objects and object parts, then your SQL statements may be more difficult to read and may lead to unpredictable results.

    In particular, do not use words beginning with "SYS_" as schema object names, and do not use the names of SQL built-in functions for the names of schema objects or user-defined functions.

    See Also:
    • "Datatypes" and "SQL Functions"
    • "Selecting from the DUAL Table"
  4. You should use ASCII characters in database names, global database names, and database link names, because ASCII characters provide optimal compatibility across different platforms and operating systems.

    Note:

    Oracle Corporation recommends that user names and passwords be encoded in ASCII or EBCDIC characters only, depending on your platform. Please refer to Oracle9i Database Administrator's Guide for more information about this recommendation.
  5. Nonquoted identifiers must begin with an alphabetic character from your database character set. Quoted identifiers can begin with any character.
  6. Nonquoted identifiers can contain only alphanumeric characters from your database character set and the underscore (_), dollar sign ($), and pound sign (#). Database links can also contain periods (.) and "at" signs (@). Oracle Corporation strongly discourages you from using $ and #.

    Quoted identifiers can contain any characters and punctuations marks as well as spaces. However, neither quoted nor nonquoted identifiers can contain double quotation marks.

  7. Within a namespace, no two objects can have the same name.

    The following schema objects share one namespace:

    • Tables
    • Views
    • Sequences
    • Private synonyms
    • Stand-alone procedures
    • Stand-alone stored functions
    • Packages
    • Materialized views
    • User-defined types

    Each of the following schema objects has its own namespace:

    • Indexes
    • Constraints
    • Clusters
    • Database triggers
    • Private database links
    • Dimensions

    Because tables and views are in the same namespace, a table and a view in the same schema cannot have the same name. However, tables and indexes are in different namespaces. Therefore, a table and an index in the same schema can have the same name.

    Each schema in the database has its own namespaces for the objects it contains. This means, for example, that two tables in different schemas are in different namespaces and can have the same name.

    Each of the following nonschema objects also has its own namespace:

    • User roles
    • Public synonyms
    • Public database links
    • Tablespaces
    • Rollback segments
    • Profiles
    • Parameter files (PFILEs) and server parameter files (SPFILEs)

    Because the objects in these namespaces are not contained in schemas, these namespaces span the entire database.

  8. Nonquoted identifiers are not case sensitive. Oracle interprets them as uppercase. Quoted identifiers are case sensitive.

    By enclosing names in double quotation marks, you can give the following names to different objects in the same namespace:

    employees
"employees"
"Employees"
"EMPLOYEES"

    Note that Oracle interprets the following names the same, so they cannot be used for different objects in the same namespace:

    employees
EMPLOYEES
"EMPLOYEES"
  9. If you name a user or a password with a quoted identifier, then the name cannot contain lowercase letters.
  10. Columns in the same table or view cannot have the same name. However, columns in different tables or views can have the same name.
  11. Procedures or functions contained in the same package can have the same name, if their arguments are not of the same number and datatypes. Creating multiple procedures or functions with the same name in the same package with different arguments is called overloading the procedure or function.

Schema Object Naming Examples

The following examples are valid schema object names:

last_name
horse
hr.hire_date
"EVEN THIS & THAT!"
a_very_long_and_valid_name

All of these examples adhere to the rules listed in "Schema Object Naming Rules" . The following example is not valid, because it exceeds 30 characters:

a_very_very_long_and_valid_name

Although column aliases, table aliases, usernames, and passwords are not objects or parts of objects, they must also follow these naming rules unless otherwise specified in the rules themselves.

Schema Object Naming Guidelines

Here are several helpful guidelines for naming objects and their parts:

  • Use full, descriptive, pronounceable names (or well-known abbreviations).
  • Use consistent naming rules.
  • Use the same name to describe the same entity or attribute across tables.

When naming objects, balance the objective of keeping names short and easy to use with the objective of making names as descriptive as possible. When in doubt, choose the more descriptive name, because the objects in the database may be used by many people over a period of time. Your counterpart ten years from now may have difficulty understanding a table column with a name like pmdd instead of payment_due_date.

Using consistent naming rules helps users understand the part that each table plays in your application. One such rule might be to begin the names of all tables belonging to the FINANCE application with fin_.

Use the same names to describe the same things across tables. For example, the department number columns of the sample employees and departments tables are both named deptno.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Basic Elements of Oracle SQL, 10 of 10

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Syntax for Schema Objects and Parts in SQL Statements

This section tells you how to refer to schema objects and their parts in the context of a SQL statement. This section shows you:

  • The general syntax for referring to an object
  • How Oracle resolves a reference to an object
  • How to refer to objects in schemas other than your own
  • How to refer to objects in remote databases

The following diagram shows the general syntax for referring to an object or a part:

object_part::=

Text description of sql_elements4.gif follows
Text description of object_part

where:

  • object is the name of the object.
  • schema is the schema containing the object. The schema qualifier lets you refer to an object in a schema other than your own. You must be granted privileges to refer to objects in other schemas. If you omit schema, then Oracle assumes that you are referring to an object in your own schema.

    Only schema objects can be qualified with schema. Schema objects are shown with list item 7 . Nonschema objects, also shown with list item 7 , cannot be qualified with schema because they are not schema objects. (An exception is public synonyms, which can optionally be qualified with "PUBLIC". The quotation marks are required.)

  • part is a part of the object. This identifier lets you refer to a part of a schema object, such as a column or a partition of a table. Not all types of objects have parts.
  • dblink applies only when you are using Oracle's distributed functionality. This is the name of the database containing the object. The dblink qualifier lets you refer to an object in a database other than your local database. If you omit dblink, then Oracle assumes that you are referring to an object in your local database. Not all SQL statements allow you to access objects on remote databases.

You can include spaces around the periods separating the components of the reference to the object, but it is conventional to omit them.

How Oracle Resolves Schema Object References

When you refer to an object in a SQL statement, Oracle considers the context of the SQL statement and locates the object in the appropriate namespace. After locating the object, Oracle performs the statement's operation on the object. If the named object cannot be found in the appropriate namespace, then Oracle returns an error.

The following example illustrates how Oracle resolves references to objects within SQL statements. Consider this statement that adds a row of data to a table identified by the name departments:

INSERT INTO departments VALUES (
   280, 'ENTERTAINMENT_CLERK', 206, 1700);

Based on the context of the statement, Oracle determines that departments can be:

  • A table in your own schema
  • A view in your own schema
  • A private synonym for a table or view
  • A public synonym

Oracle always attempts to resolve an object reference within the namespaces in your own schema before considering namespaces outside your schema. In this example, Oracle attempts to resolve the name dept as follows:

  1. First, Oracle attempts to locate the object in the namespace in your own schema containing tables, views, and private synonyms. If the object is a private synonym, then Oracle locates the object for which the synonym stands. This object could be in your own schema, another schema, or on another database. The object could also be another synonym, in which case Oracle locates the object for which this synonym stands.
  2. If the object is in the namespace, then Oracle attempts to perform the statement on the object. In this example, Oracle attempts to add the row of data to dept. If the object is not of the correct type for the statement, then Oracle returns an error. In this example, dept must be a table, view, or a private synonym resolving to a table or view. If dept is a sequence, then Oracle returns an error.
  3. If the object is not in any namespace searched in thus far, then Oracle searches the namespace containing public synonyms. If the object is in that namespace, then Oracle attempts to perform the statement on it. If the object is not of the correct type for the statement, then Oracle returns an error. In this example, if dept is a public synonym for a sequence, then Oracle returns an error.

    Note:

    If a public object type synonym has any dependent tables or user-defined types, then you cannot create an object with the same name as the synonym in the same schema as the dependent objects.

    If the public object type synonym does not have any dependent tables or user-defined types, then you can create an object with the same name in the same schema as the dependent objects. Oracle invalidates any dependent objects and attempts to revalidate them when they are next accessed.

Referring to Objects in Other Schemas

To refer to objects in schemas other than your own, prefix the object name with the schema name:

schema.object

For example, this statement drops the employees table in the sample schema hr:

DROP TABLE hr.employees

Referring to Objects in Remote Databases

To refer to objects in databases other than your local database, follow the object name with the name of the database link to that database. A database link is a schema object that causes Oracle to connect to a remote database to access an object there. This section tells you:

  • How to create database links
  • How to use database links in your SQL statements

Creating Database Links

You create a database link with the statement CREATE DATABASE LINK . The statement lets you specify this information about the database link:

  • The name of the database link
  • The database connect string to access the remote database
  • The username and password to connect to the remote database

Oracle stores this information in the data dictionary.

Database Link Names

When you create a database link, you must specify its name. Database link names are different from names of other types of objects. They can be as long as 128 bytes and can contain periods (.) and the "at" sign (@).

The name that you give to a database link must correspond to the name of the database to which the database link refers and the location of that database in the hierarchy of database names. The following syntax diagram shows the form of the name of a database link:

dblink::=

Text description of sql_elements12.gif follows
Text description of dblink

where:

  • database should specify the name portion of the global name of the remote database to which the database link connects. This global name is stored in the data dictionary of the remote database; you can see this name in the GLOBAL_NAME view.
  • domain should specify the domain portion of the global name of the remote database to which the database link connects. If you omit domain from the name of a database link, then Oracle qualifies the database link name with the domain of your local database as it currently exists in the data dictionary.
  • connect_descriptor lets you further qualify a database link. Using connect descriptors, you can create multiple database links to the same database. For example, you can use connect descriptors to create multiple database links to different instances of the Real Application Clusters that access the same database.

The combination database.domain is sometimes called the "service name".

See Also:

Oracle9i Net Services Administrator's Guide
Username and Password

Oracle uses the username and password to connect to the remote database. The username and password for a database link are optional.

Database Connect String

The database connect string is the specification used by Oracle Net to access the remote database. For information on writing database connect strings, see the Oracle Net documentation for your specific network protocol. The database string for a database link is optional.

Referring to Database Links

Database links are available only if you are using Oracle's distributed functionality. When you issue a SQL statement that contains a database link, you can specify the database link name in one of these forms:

  • complete is the complete database link name as stored in the data dictionary, including the database, domain, and optional connect_descriptor components.
  • partial is the database and optional connect_descriptor components, but not the domain component.

Oracle performs these tasks before connecting to the remote database:

  1. If the database link name specified in the statement is partial, then Oracle expands the name to contain the domain of the local database as found in the global database name stored in the data dictionary. (You can see the current global database name in the GLOBAL_NAME data dictionary view.)
  2. Oracle first searches for a private database link in your own schema with the same name as the database link in the statement. Then, if necessary, it searches for a public database link with the same name.
    • Oracle always determines the username and password from the first matching database link (either private or public). If the first matching database link has an associated username and password, then Oracle uses it. If it does not have an associated username and password, then Oracle uses your current username and password.
    • If the first matching database link has an associated database string, then Oracle uses it. Otherwise Oracle searches for the next matching (public) database link. If no matching database link is found, or if no matching link has an associated database string, then Oracle returns an error.
  3. Oracle uses the database string to access the remote database. After accessing the remote database, if the value of the GLOBAL_NAMES parameter is true, then Oracle verifies that the database.domain portion of the database link name matches the complete global name of the remote database. If this condition is true, then Oracle proceeds with the connection, using the username and password chosen in Step 2. If not, Oracle returns an error.
  4. If the connection using the database string, username, and password is successful, then Oracle attempts to access the specified object on the remote database using the rules for resolving object references and referring to objects in other schemas discussed earlier in this section.

You can disable the requirement that the database.domain portion of the database link name must match the complete global name of the remote database by setting to false the initialization parameter GLOBAL_NAMES or the GLOBAL_NAMES parameter of the ALTER SYSTEM or ALTER SESSION statement.

See Also:

Oracle9i Database Administrator's Guide for more information on remote name resolution

Referencing Object Type Attributes and Methods

To reference object type attributes or methods in a SQL statement, you must fully qualify the reference with a table alias. Consider the following example from the sample schema oe, which contains a type cust_address_typ and a table customers with a cust_address column based on the cust_address_typ:

CREATE TYPE cust_address_typ AS OBJECT
    ( street_address     VARCHAR2(40)
    , postal_code        VARCHAR2(10)
    , city               VARCHAR2(30)
    , state_province     VARCHAR2(10)
    , country_id         CHAR(2)
    );
/

CREATE TABLE customers
  ( customer_id      NUMBER(6)
  , cust_first_name  VARCHAR2(20) CONSTRAINT cust_fname_nn NOT NULL
  , cust_last_name   VARCHAR2(20) CONSTRAINT cust_lname_nn NOT NULL
  , cust_address     cust_address_typ
.
.
.

In a SQL statement, reference to the postal_code attribute must be fully qualified using a table alias, as illustrated in the following example:

SELECT c.cust_address.postal_code FROM customers c;

UPDATE customers c SET c.cust_address.postal_code = 'GU13 BE5'
   WHERE c.cust_address.city = 'Fleet';

To reference an object type's member method that does not accept arguments, you must provide "empty" parentheses. For example, the sample schema oe contains an object table categories_tab, based on catalog_typ, which contains the member function getCatalogName. In order to call this method in a SQL statement, you must provide empty parentheses as shown in this example:

SELECT c.getCatalogName() FROM categories_tab c
   WHERE category_id = 90;
See Also:

Oracle9i Database Concepts for more information on user-defined datatypes
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Operators, 1 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

3
Operators

An operator manipulates individual data items and returns a result.

This chapter contains these sections:

  • About SQL Operators
  • Arithmetic Operators
  • Concatenation Operator
  • Set Operators
  • User-Defined Operators

This chapter discusses nonlogical (non-Boolean) operators. These operators cannot by themselves serve as the condition of a WHERE or HAVING clause in queries or subqueries. For information on logical operators, which serve as conditions, please refer to Chapter 5, "Conditions".

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Operators, 2 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

About SQL Operators

Operators manipulate individual data items called operands or arguments. Operators are represented by special characters or by keywords. For example, the multiplication operator is represented by an asterisk (*).

Note:

If you have installed Oracle Text, you can use the SCORE operator, which is part of that product, in Oracle Text queries. For more information on this operator, please refer to Oracle Text Reference.

Unary and Binary Operators

The two general classes of operators are:

  • unary: A unary operator operates on only one operand. A unary operator typically appears with its operand in this format:
    operator operand
  • binary: A binary operator operates on two operands. A binary operator appears with its operands in this format:
    operand1 operator operand2

Other operators with special formats accept more than two operands. If an operator is given a null operand, the result is always null. The only operator that does not follow this rule is concatenation (||).

Operator Precedence

Precedence is the order in which Oracle evaluates different operators in the same expression. When evaluating an expression containing multiple operators, Oracle evaluates operators with higher precedence before evaluating those with lower precedence. Oracle evaluates operators with equal precedence from left to right within an expression.

Table 3-1 lists the levels of precedence among SQL operators from high to low. Operators listed on the same line have the same precedence.

Table 3-1 SQL Operator Precedence
Operator | Operation
+, - (as unary operators), PRIOR | identity, negation, location in hierarchy
*, / | multiplication, division
+, - (as binary operators), || | addition, subtraction, concatenation
SQL conditions are evaluated after SQL operators | See "Condition Precedence"
Precedence Example

In the following expression, multiplication has a higher precedence than addition, so Oracle first multiplies 2 by 3 and then adds the result to 1.

1+2*3

You can use parentheses in an expression to override operator precedence. Oracle evaluates expressions inside parentheses before evaluating those outside.

SQL also supports set operators (UNION, UNION ALL, INTERSECT, and MINUS), which combine sets of rows returned by queries, rather than individual data items. All set operators have equal precedence.

See Also:
  • "Set Operators"
  • "Hierarchical Queries" for information on the PRIOR operator, which is used only in hierarchical queries
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Operators, 5 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Set Operators

Set operators combine the results of two component queries into a single result. Queries containing set operators are called compound queries. Table 3-4 lists SQL set operators. They are fully described, including restrictions on these operators, in "The UNION [ALL], INTERSECT, MINUS Operators" .

Table 3-4 Set Operators
Operator | Returns
UNION | All rows selected by either query
UNION ALL | All rows selected by either query, including all duplicates
INTERSECT | All distinct rows selected by both queries
MINUS | All distinct rows selected by the first query but not the second
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Operators, 3 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Arithmetic Operators

You can use an arithmetic operator in an expression to negate, add, subtract, multiply, and divide numeric values. The result of the operation is also a numeric value. Some of these operators are also used in date arithmetic. Table 3-2 lists arithmetic operators.

Table 3-2 Arithmetic Operators
Operator Purpose Example

+ -

When these denote a positive or negative expression, they are unary operators.

SELECT * FROM order_items
 WHERE quantity = -1;
SELECT * FROM employees
  WHERE -salary < 0;

When they add or subtract, they are binary operators.

SELECT hire_date
  FROM employees
  WHERE SYSDATE - hire_date
  > 365;

* /

Multiply, divide. These are binary operators.

UPDATE employees
  SET salary = salary * 1.1;

Do not use two consecutive minus signs (--) in arithmetic expressions to indicate double negation or the subtraction of a negative value. The characters -- are used to begin comments within SQL statements. You should separate consecutive minus signs with a space or a parenthesis.

See Also:

"Comments" for more information on comments within SQL statements
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Operators, 6 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

User-Defined Operators

Like built-in operators, user-defined operators take a set of operands as input and return a result. However, you create them with the CREATE OPERATOR statement, and they are identified by names. They reside in the same namespace as tables, views, types, and standalone functions.

Once you have defined a new operator, you can use it in SQL statements like any other built-in operator. For example, you can use user-defined operators in the select list of a SELECT statement, the condition of a WHERE clause, or in ORDER BY clauses and GROUP BY clauses. However, you must have EXECUTE privilege on the operator to do so, because it is a user-defined object.

For example, if you define an operator includes, which takes as input a text column and a keyword and returns 1 if the row contains the specified keyword, you can then write the following SQL query:

SELECT * FROM product_descriptions
   WHERE includes (translated_description, 'Oracle and UNIX') = 1;
See Also:

CREATE OPERATOR and Oracle9i Data Cartridge Developer's Guide for more information on user-defined operators
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Operators, 4 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Concatenation Operator

The concatenation operator manipulates character strings and CLOB data. Table 3-3 describes the concatenation operator.

Table 3-3 Concatenation Operator
Operator Purpose Example

||

Concatenates character strings and CLOB data.

SELECT 'Name is ' || last_name
   FROM employees;

The result of concatenating two character strings is another character string. If both character strings are of datatype CHAR, the result has datatype CHAR and is limited to 2000 characters. If either string is of datatype VARCHAR2, the result has datatype VARCHAR2 and is limited to 4000 characters. If either argument is a CLOB, the result is a temporary CLOB. Trailing blanks in character strings are preserved by concatenation, regardless of the datatypes of the string or CLOB.

On most platforms, the concatenation operator is two solid vertical bars, as shown in Table 3-3. However, some IBM platforms use broken vertical bars for this operator. When moving SQL script files between systems having different character sets, such as between ASCII and EBCDIC, vertical bars might not be translated into the vertical bar required by the target Oracle environment. Oracle provides the CONCAT character function as an alternative to the vertical bar operator for cases when it is difficult or impossible to control translation performed by operating system or network utilities. Use this function in applications that will be moved between environments with differing character sets.

Although Oracle treats zero-length character strings as nulls, concatenating a zero-length character string with another operand always results in the other operand, so null can result only from the concatenation of two null strings. However, this may not continue to be true in future versions of Oracle. To concatenate an expression that might be null, use the NVL function to explicitly convert the expression to a zero-length string.

See Also:
  • "Character Datatypes" for more information on the differences between the CHAR and VARCHAR2 datatypes
  • Oracle9i Application Developer's Guide - Large Objects (LOBs) for more information about CLOBs
  • The functions CONCAT and NVL
Example

This example creates a table with both CHAR and VARCHAR2 columns, inserts values both with and without trailing blanks, and then selects these values and concatenates them. Note that for both CHAR and VARCHAR2 columns, the trailing blanks are preserved.

CREATE TABLE tab1 (col1 VARCHAR2(6), col2 CHAR(6),
        col3 VARCHAR2(6), col4 CHAR(6) );

INSERT INTO tab1 (col1,  col2,     col3,     col4)
        VALUES   ('abc', 'def   ', 'ghi   ', 'jkl');

SELECT col1||col2||col3||col4 "Concatenation"
        FROM tab1;

Concatenation
------------------------
abcdef   ghi   jkl
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Expressions, 1 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

4
Expressions

This chapter describes how to combine values, operators, and functions into expressions.

This chapter includes these sections:

  • About SQL Expressions
  • Simple Expressions
  • Compound Expressions
  • CASE Expressions
  • CURSOR Expressions
  • Datetime Expressions
  • Function Expressions
  • INTERVAL Expressions
  • Object Access Expressions
  • Scalar Subquery Expressions
  • Type Constructor Expressions
  • Variable Expressions
  • Expression Lists
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Expressions, 2 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

About SQL Expressions

An expression is a combination of one or more values, operators, and SQL functions that evaluate to a value. An expression generally assumes the datatype of its components.

This simple expression evaluates to 4 and has datatype NUMBER (the same datatype as its components):

2*2

The following expression is an example of a more complex expression that uses both functions and operators. The expression adds seven days to the current date, removes the time component from the sum, and converts the result to CHAR datatype:

TO_CHAR(TRUNC(SYSDATE+7))

You can use expressions in:

  • The select list of the SELECT statement
  • A condition of the WHERE clause and HAVING clause
  • The CONNECT BY, START WITH, and ORDER BY clauses
  • The VALUES clause of the INSERT statement
  • The SET clause of the UPDATE statement

For example, you could use an expression in place of the quoted string 'smith' in this UPDATE statement SET clause:

SET last_name = 'Smith';

This SET clause has the expression INITCAP(last_name) instead of the quoted string 'Smith':

SET last_name = INITCAP(last_name);

Expressions have several forms, as shown in the following syntax:

expr::=

Text description of expressions13.gif follows
Text description of expr

Oracle does not accept all forms of expressions in all parts of all SQL statements. You must use appropriate expression notation whenever expr appears in conditions, SQL functions, or SQL statements in other parts of this reference. The sections that follow describe and provide examples of the various forms of expressions.

See Also:

The individual SQL statements in Chapter 9 through Chapter 18 for information on restrictions on the expressions in that statement
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Expressions, 3 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Simple Expressions

A simple expression specifies column, pseudocolumn, constant, sequence number, or null.

simple_expression::=

Text description of expressionsa.gif follows
Text description of simple_expression

In addition to the schema of a user, schema can also be "PUBLIC" (double quotation marks required), in which case it must qualify a public synonym for a table, view, or materialized view. Qualifying a public synonym with "PUBLIC" is supported only in data manipulation language (DML) statements, not data definition language (DDL) statements.

The pseudocolumn can be either LEVEL, ROWID, or ROWNUM. You can use a pseudocolumn only with a table, not with a view or materialized view. NCHAR and NVARCHAR2 are not valid pseudocolumn datatypes.

See Also:
  • "Pseudocolumns" for more information on pseudocolumns
  • subquery_factoring_clause for information on query_name

Some valid simple expressions are:

employees.last_name
'this is a text string'
10
N'this is an NCHAR string'
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Expressions, 4 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Compound Expressions

A compound expression specifies a combination of other expressions.

compound_expression::=

Text description of expressions6.gif follows
Text description of compound_expression

Note:

You can use any built-in function as an expression ("Function Expressions" ). However, in a compound expression, some combinations of functions are inappropriate and are rejected. For example, the LENGTH function is inappropriate within an aggregate function.

The PRIOR operator is used in CONNECT BY clauses of hierarchical queries.

See Also:

"Operator Precedence" and "Hierarchical Queries"

Some valid compound expressions are:

('CLARK' || 'SMITH')
LENGTH('MOOSE') * 57
SQRT(144) + 72
my_fun(TO_CHAR(sysdate,'DD-MMM-YY'))
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Expressions, 5 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CASE Expressions

CASE expressions let you use IF ... THEN ... ELSE logic in SQL statements without having to invoke procedures. The syntax is:

case_expression::=

Text description of expressions4.gif follows
Text description of case_expression

simple_case_expression::=

Text description of expressions5.gif follows
Text description of simple_case_expression

searched_case_expression::=

Text description of expressions8.gif follows
Text description of searched_case_expression

else_clause::=

Text description of expressions9.gif follows
Text description of else_clause

In a simple CASE expression, Oracle searches for the first WHEN ... THEN pair for which expr is equal to comparison_expr and returns return_expr. If none of the WHEN ... THEN pairs meet this condition, and an ELSE clause exists, then Oracle returns else_expr. Otherwise, Oracle returns null. You cannot specify the literal NULL for all the return_exprs and the else_expr.

All of the expressions (expr, comparison_expr, and return_expr) must be of the same datatype, which can be CHAR, VARCHAR2, NCHAR, or NVARCHAR2.

In a searched CASE expression, Oracle searches from left to right until it finds an occurrence of condition that is true, and then returns return_expr. If no condition is found to be true, and an ELSE clause exists, Oracle returns else_expr. Otherwise, Oracle returns null.

Note:

The maximum number of arguments in a CASE expression is 255, and each WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices, you can nest CASE expressions. That is return_expr can itself be a CASE expression.
See Also:
  • COALESCE and NULLIF for alternative forms of CASE logic
  • Oracle9i Data Warehousing Guide for examples using various forms of the CASE expression
Simple CASE Example

For each customer in the sample oe.customers table, the following statement lists the credit limit as "Low" if it equals $100, "High" if it equals $5000, and "Medium" if it equals anything else.

SELECT cust_last_name,
   CASE credit_limit WHEN 100 THEN 'Low'
   WHEN 5000 THEN 'High'
   ELSE 'Medium' END
   FROM customers;

CUST_LAST_NAME       CASECR
-------------------- ------
...
Bogart               Medium
Nolte                Medium
Loren                Medium
Gueney               Medium
Searched CASE Example

The following statement finds the average salary of the employees in the sample table oe.employees, using $2000 as the lowest salary possible:

SELECT AVG(CASE WHEN e.salary > 2000 THEN e.salary
   ELSE 2000 END) "Average Salary" from employees e;

Average Salary
--------------
    6461.68224
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Expressions, 6 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CURSOR Expressions

A CURSOR expression returns a nested cursor. This form of expression is equivalent to the PL/SQL REF CURSOR and can be passed as a REF CURSOR argument to a function.

cursor_expression::=

Text description of expressions3.gif follows
Text description of cursor_expression

A nested cursor is implicitly opened when the cursor expression is evaluated. For example, if the cursor expression appears in a SELECT list, a nested cursor will be opened for each row fetched by the query. The nested cursor is closed only when:

  • The nested cursor is explicitly closed by the user
  • The parent cursor is reexecuted
  • The parent cursor is closed
  • The parent cursor is cancelled
  • An error arises during fetch on one of its parent cursors (it is closed as part of the clean-up)
Restrictions on CURSOR Expressions
  • If the enclosing statement is not a SELECT statement, nested cursors can appear only as REF CURSOR arguments of a procedure.
  • If the enclosing statement is a SELECT statement, nested cursors can also appear in the outermost SELECT list of the query specification, or in the outermost SELECT list of another nested cursor.
  • Nested cursors cannot appear in views.
  • You cannot perform BIND and EXECUTE operations on nested cursors.
Examples

The following example shows the use of a CURSOR expression in the select list of a query:

SELECT department_name, CURSOR(SELECT salary, commission_pct
   FROM employees e
   WHERE e.department_id = d.department_id)
   FROM departments d;

The next example shows the use of a CURSOR expression as a function argument. The example begins by creating a function in the sample OE schema that can accept the REF CURSOR argument. (The PL/SQL function body is shown in italics.)

CREATE FUNCTION f(cur SYS_REFCURSOR, mgr_hiredate DATE)
   RETURN NUMBER IS
   emp_hiredate DATE;
 before number :=0;
 after number:=0;
begin
 loop
  fetch cur into emp_hiredate;
  exit when cur%NOTFOUND;
  if emp_hiredate > mgr_hiredate then
    after:=after+1;
  else
    before:=before+1;
  end if;
 end loop;
 close cur;
 if before > after then
  return 1;
 else
  return 0;
 end if;
end;
/

The function accepts a cursor and a date. The function expects the cursor to be a query returning a set of dates. The following query uses the function to find those managers in the sample employees table, most of whose employees were hired before the manager.

SELECT e1.last_name FROM employees e1
   WHERE f(
   CURSOR(SELECT e2.hire_date FROM employees e2
   WHERE e1.employee_id = e2.manager_id),
   e1.hire_date) = 1;

LAST_NAME
-------------------------
De Haan
Mourgos
Cambrault
Zlotkey
Higgens
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Expressions, 7 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Datetime Expressions

A datetime expression yields a value of one of the datetime datatypes.

datetime_expression::=

Text description of expressions11.gif follows
Text description of datetime_expression

A datetime_value_expr can be a datetime column or a compound expression that yields a datetime value. Datetimes and intervals can be combined according to the rules defined in Table 2-5 . The three combinations that yield datetime values are valid in a datetime expression.

If you specify AT LOCAL, Oracle uses the current session time zone.

The settings for AT TIME ZONE are interpreted as follows:

  • The string '(+|-)HH:MM' specifies a time zone as an offset from UTC.
  • DBTIMEZONE: Oracle uses the database time zone established (explicitly or by default) during database creation.
  • SESSIONTIMEZONE: Oracle uses the session time zone established by default or in the most recent ALTER SESSION statement.
  • time_zone_name: Oracle returns the datetime_value_expr in the time zone indicated by time_zone_name. For a listing of valid time zone names, query the V$TIMEZONE_NAMES dynamic performance view.

    See Also:

    Oracle9i Database Reference for information on the dynamic performance views
  • expr: If expr returns a character string with a valid time zone format, Oracle returns the input in that time zone. Otherwise, Oracle returns an error.
Example

The following example converts the datetime value of one time zone to another time zone:

SELECT FROM_TZ(CAST(TO_DATE('1999-12-01 11:00:00',
      'YYYY-MM-DD HH:MI:SS') AS TIMESTAMP), 'America/New_York')
   AT TIME ZONE 'America/Los_Angeles' "West Coast Time"
   FROM DUAL;

West Coast Time
------------------------------------------------
01-DEC-99 08.00.00.000000 AM AMERICA/LOS_ANGELES
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Expressions, 8 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Function Expressions

You can use any built-in SQL function or user-defined function as an expression. Some valid built-in function expressions are:

LENGTH('BLAKE')
ROUND(1234.567*43)
SYSDATE
See Also:

"SQL Functions" and "Aggregate Functions" for information on built-in functions

A user-defined function expression specifies a call to:

  • A function in an Oracle-supplied package (see Oracle9i Supplied PL/SQL Packages and Types Reference)
  • A function in a user-defined package or type or in a standalone user-defined function (see "User-Defined Functions" )
  • A user-defined function or operator (see CREATE OPERATOR , CREATE FUNCTION , and Oracle9i Data Cartridge Developer's Guide)

Some valid user-defined function expressions are:

circle_area(radius)
payroll.tax_rate(empno)
hr.employees.comm_pct(dependents, empno)@remote
DBMS_LOB.getlength(column_name)
my_function(DISTINCT a_column)
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Expressions, 9 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INTERVAL Expressions

An interval expression yields a value of INTERVAL YEAR TO MONTH or INTERVAL DAY TO SECOND.

interval_expression::=

Text description of expressions12.gif follows
Text description of interval_expression

The interval_value_expr can be the value of an INTERVAL column or a compound expression that yields an interval value. Datetimes and intervals can be combined according to the rules defined in Table 2-5 . The six combinations that yield interval values are valid in an interval expression.

For example, the following statement subtracts the value of the order_date column in the sample table orders (a datetime value) from the system timestamp (another datetime value) to yield an interval value expression:

SELECT (SYSTIMESTAMP - order_date) DAY TO SECOND from orders;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Expressions, 10 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Object Access Expressions

An object access expression specifies attribute reference and method invocation.

object_access_expression::=

Text description of expressions10.gif follows
Text description of object_access_expression

The column parameter can be an object or REF column. If you specify expr, it must resolve to an object type.

When a type's member function is invoked in the context of a SQL statement, if the SELF argument is null, Oracle returns null and the function is not invoked.

Examples

The following example creates a table based on the sample oe.order_item_typ object type, and then shows how you would update and select from the object column attributes.

CREATE TABLE short_orders (
   sales_rep VARCHAR2(25), item order_item_typ);

UPDATE short_orders s SET sales_rep = 'Unassigned';

SELECT o.item.line_item_id, o.item.quantity FROM short_orders o;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Expressions, 11 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Scalar Subquery Expressions

A scalar subquery expression is a subquery that returns exactly one column value from one row. The value of the scalar subquery expression is the value of the select list item of the subquery. If the subquery returns 0 rows, then the value of the scalar subquery expression is NULL. If the subquery returns more than one row, then Oracle returns an error.

You can use a scalar subquery expression in most syntax that calls for an expression (expr). However, scalar subqueries are not valid expressions in the following places:

  • As default values for columns
  • As hash expressions for clusters
  • In the RETURNING clause of DML statements
  • As the basis of a function-based index
  • In CHECK constraints
  • In WHEN conditions of CASE expressions
  • In GROUP BY and HAVING clauses
  • In START WITH and CONNECT BY clauses
  • In statements that are unrelated to queries, such as CREATE PROFILE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Expressions, 12 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Type Constructor Expressions

A type constructor expression specifies a call to a type constructor. The argument to the type constructor is any expression.

type_constructor_expression::=

Text description of expressions7.gif follows
Text description of type_constructor_expression

The NEW keyword applies to constructors for object types but not for collection types. It instructs Oracle to construct a new object by invoking an appropriate constructor. The use of the NEW keyword is optional, but it is good practice to specify it.

If type_name is an object type, then the expressions must be an ordered list, where the first argument is a value whose type matches the first attribute of the object type, the second argument is a value whose type matches the second attribute of the object type, and so on. The total number of arguments to the constructor must match the total number of attributes of the object type.

If type_name is a varray or nested table type, then the expression list can contain zero or more arguments. Zero arguments implies construction of an empty collection. Otherwise, each argument corresponds to an element value whose type is the element type of the collection type.

Type constructors can be invoked anywhere functions are invoked. They also have similar restrictions, such as a limit on the maximum number of arguments.

See Also:

Oracle9i Application Developer's Guide - Object-Relational Features for additional information on type constructors
Expression Example

This example uses the cust_address_typ type in the sample oe schema to show the use of an expression in the call to a type constructor (the PL/SQL is shown in italics):

CREATE TYPE address_book_t AS TABLE OF cust_address_typ;
DECLARE
 myaddr cust_address_typ := cust_address_typ(
   '500 Oracle Parkway', 94065, 'Redwood Shores', 'CA','USA');
 alladdr address_book_t := address_book_t();
BEGIN
 INSERT INTO customers VALUES (
    666999, 'Smith', 'Joe', myaddr, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL);
END;
/
Subquery Example

This example uses the warehouse_typ type in the sample schema oe to illustrate the use of a subquery in the call to the type constructor.

CREATE TABLE warehouse_tab OF warehouse_typ;

INSERT INTO warehouse_tab
   VALUES (warehouse_typ(101, 'new_wh', 201));

CREATE TYPE facility_typ AS OBJECT (
   facility_id NUMBER,
   warehouse_ref REF warehouse_typ);

CREATE TABLE buildings (b_id NUMBER, building facility_typ);

INSERT INTO buildings VALUES (10, facility_typ(102,
   (SELECT REF(w) FROM warehouse_tab w
      WHERE warehouse_name = 'new_wh')));

SELECT b.b_id, b.building.facility_id "FAC_ID",
   DEREF(b.building.warehouse_ref) "WH" FROM buildings b;

      B_ID     FAC_ID WH(WAREHOUSE_ID, WAREHOUSE_NAME, LOCATION_ID)
---------- ---------- ---------------------------------------------
        10        102 WAREHOUSE_TYP(101, 'new_wh', 201)
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Expressions, 13 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Variable Expressions

A variable expression specifies a host variable with an optional indicator variable. This form of expression can appear only in embedded SQL statements or SQL statements processed in an Oracle Call Interface (OCI) program.

variable_expression::=

Text description of expressions2.gif follows
Text description of variable_expression

Some valid variable expressions are:

:employee_name INDICATOR :employee_name_indicator_var
:department_location
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Expressions, 14 of 14

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Expression Lists

An expression list is a combination of other expressions.

expression_list::=

Text description of expressions14.gif follows
Text description of expression_list

Expression lists can appear in comparison and membership conditions and in GROUP BY clauses of queries and subqueries.

Comparison and membership conditions appear in the conditions of WHERE clauses. They can contain either one or more comma-delimited expressions, or one or more sets of expressions where each set contains one or more comma-delimited expressions. In the latter case (multiple sets of expressions):

  • Each set is bounded by parentheses
  • Each set must contain the same number of expressions
  • The number of expressions in each set must match the number of expressions before the operator in the comparison condition or before the IN keyword in the membership condition.

A comma-delimited list of expressions can contain no more than 1000 expressions. A comma-delimited list of sets of expressions can contain any number of sets, but each set can contain no more than 1000 expressions.

The following are some valid expression lists in conditions:

(10, 20, 40)
('SCOTT', 'BLAKE', 'TAYLOR')
( ('Guy', 'Himuro', 'GHIMURO'),('Karen', 'Colmenares', 'KCOLMENA') )

In the third example, the number of expressions in each set must equal the number of expressions in the first part of the condition. For example:

SELECT * FROM employees
  WHERE (first_name, last_name, email) IN
  (('Guy', 'Himuro', 'GHIMURO'),('Karen', 'Colmenares', 'KCOLMENA'))
See Also:

"Comparison Conditions" and "Membership Conditions"

In a simple GROUP BY clause, you can use either the upper or lower form of expression list:

SELECT department_id, MIN(salary), MAX(salary)
   FROM employees
   GROUP BY department_id, salary;

SELECT department_id, MIN(salary), MAX(salary)
   FROM employees
   GROUP BY (department_id, salary);

In ROLLUP, CUBE, and GROUPING SETS clauses of GROUP BY clauses, you can combine individual expressions with sets of expressions in the same expression list. The following example shows several valid grouping sets expression lists in one SQL statement:

SELECT
prod_category, prod_subcategory, country_id, cust_city, count(*)
   FROM  products, sales, customers
   WHERE sales.prod_id = products.prod_id
   AND sales.cust_id=customers.cust_id
   AND sales.time_id = '01-oct-00'
   AND customers.cust_year_of_birth BETWEEN 1960 and 1970
GROUP BY GROUPING SETS
  (
   (prod_category, prod_subcategory, country_id, cust_city),
   (prod_category, prod_subcategory, country_id),
   (prod_category, prod_subcategory),
    country_id
  );
See Also:

SELECT

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Conditions, 1 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

5
Conditions

A condition specifies a combination of one or more expressions and logical (Boolean) operators and returns a value of TRUE, FALSE, or unknown

This chapter contains the following sections:

  • About SQL Conditions
  • Comparison Conditions
  • Logical Conditions
  • Membership Conditions
  • Range Conditions
  • Null Conditions
  • EQUALS_PATH
  • EXISTS Conditions
  • LIKE Conditions
  • IS OF type Conditions
  • UNDER_PATH
  • Compound Conditions
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Conditions, 2 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

About SQL Conditions

Conditions can have several forms, as shown in the following syntax.

condition::=

Text description of conditions8.gif follows
Text description of condition

Note:

If you have installed Oracle Text, then you can use the built-in conditions that are part of that product, including CONTAINS, CATSEARCH, and MATCHES. For more information on these Oracle Text elements, please refer to Oracle Text Reference.

The sections that follow describe the various forms of conditions. You must use appropriate condition syntax whenever condition appears in SQL statements.

You can use a condition in the WHERE clause of these statements:

  • DELETE
  • SELECT
  • UPDATE

You can use a condition in any of these clauses of the SELECT statement:

  • WHERE
  • START WITH
  • CONNECT BY
  • HAVING

A condition could be said to be of the "logical" datatype, although Oracle does not formally support such a datatype.

The following simple condition always evaluates to TRUE:

1 = 1

The following more complex condition adds the sal value to the comm value (substituting the value 0 for null) and determines whether the sum is greater than the number constant 2500:

NVL(salary, 0) + NVL(salary + (salary*commission_pct, 0) > 25000)

Logical conditions can combine multiple conditions into a single condition. For example, you can use the AND condition to combine two conditions:

(1 = 1) AND (5 < 7)

Here are some valid conditions:

name = 'SMITH'
employees.department_id = departments.department_id
hire_date > '01-JAN-88'
job_id IN ('SA_MAN', 'SA_REP')
salary BETWEEN 5000 AND 10000
commission_pct IS NULL AND salary = 2100
See Also:

The description of each statement in Chapter 9 through Chapter 18 for the restrictions on the conditions in that statement

Condition Precedence

Precedence is the order in which Oracle evaluates different conditions in the same expression. When evaluating an expression containing multiple conditions, Oracle evaluates conditions with higher precedence before evaluating those with lower precedence. Oracle evaluates conditions with equal precedence from left to right within an expression.

Table 5-1 lists the levels of precedence among SQL condition from high to low. Conditions listed on the same line have the same precedence. As the table indicates, Oracle evaluates operators before conditions.

Table 5-1 SQL Condition Precedence
Type of Condition | Purpose
SQL operators are evaluated before SQL conditions | See "Operator Precedence"
=, !=, <, >, <=, >=, | comparison
IS [NOT] NULL, LIKE, [NOT] BETWEEN, [NOT] IN, EXISTS, IS OF type | comparison
NOT | exponentiation, logical negation
AND | conjunction
OR | disjunction
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Conditions, 3 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Comparison Conditions

Comparison conditions compare one expression with another. The result of such a comparison can be TRUE, FALSE, or UNKNOWN.

Note:

Large objects (LOBs) are not supported in comparison conditions. However, you can use PL/SQL programs for comparisons on CLOB data.

Table 5-2 lists comparison conditions.

Table 5-2 Comparison Conditions
Type of Condition Purpose Example
=

Equality test.

SELECT *
  FROM employees
  WHERE salary = 2500;

!=
^=
<   >
¬=

Inequality test. Some forms of the inequality condition may be unavailable on some platforms.

SELECT *
  FROM employees
  WHERE salary != 2500;

>

<

"Greater than" and "less than" tests.

SELECT * FROM employees
  WHERE salary > 2500;
SELECT * FROM employees
  WHERE salary < 2500;

>=

<=

"Greater than or equal to" and "less than or equal to" tests.

SELECT * FROM employees
  WHERE salary >= 2500;
SELECT * FROM employees
  WHERE salary <= 2500;

ANY
SOME

Compares a value to each value in a list or returned by a query. Must be preceded by =, !=, >, <, <=, >=.

Evaluates to FALSE if the query returns no rows.

SELECT * FROM employees
  WHERE salary = ANY
  (SELECT salary
   FROM employees
  WHERE department_id = 30);

ALL

Compares a value to every value in a list or returned by a query. Must be preceded by =, !=, >, <, <=, >=.

Evaluates to TRUE if the query returns no rows.

SELECT * FROM employees
  WHERE salary >=
  ALL ( 1400, 3000);

Simple Comparison Conditions

A simple comparison condition specifies a comparison with expressions or subquery results.

simple_comparison_condition::=

Text description of conditionsa.gif follows
Text description of simple_comparison_condition

expression_list::=

Text description of conditions12.gif follows
Text description of expression_list

If you use the lower form of this condition (with multiple expressions to the left of the operator), then you must use the lower form of the expression_list, and the values returned by the subquery must match in number and datatype the expressions in expression_list.

See Also:
  • "Expression Lists" for more information about combining expressions
  • SELECT for information about subqueries

Group Comparison Conditions

A group comparison condition specifies a comparison with any or all members in a list or subquery.

group_comparison_condition::=

Text description of conditions2.gif follows
Text description of group_comparison_condition

expression_list::=

Text description of conditions13.gif follows
Text description of expression_list

If you use the upper form of this condition (with a single expression to the left of the operator), then you must use the upper form of expression_list. If you use the lower form of this condition (with multiple expressions to the left of the operator), then you must use the lower form of expression_list, and the expressions in each expression_list must match in number and datatype the expressions to the left of the operator.

See Also:
  • "Expression Lists"
  • SELECT
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Conditions, 4 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Logical Conditions

A logical condition combines the results of two component conditions to produce a single result based on them or to invert the result of a single condition. Table 5-3 lists logical conditions.

Table 5-3 Logical Conditions
Type of Condition Operation Examples
NOT

Returns TRUE if the following condition is FALSE. Returns FALSE if it is TRUE. If it is UNKNOWN, then it remains UNKNOWN.

SELECT *
  FROM employees
  WHERE NOT (job_id IS NULL);
SELECT *
  FROM employees
  WHERE NOT
  (salary BETWEEN 1000 AND 2000);

AND

Returns TRUE if both component conditions are TRUE. Returns FALSE if either is FALSE. Otherwise returns UNKNOWN.

SELECT *
  FROM employees
  WHERE job_id = 'PU_CLERK'
  AND department_id = 30;

OR

Returns TRUE if either component condition is TRUE. Returns FALSE if both are FALSE. Otherwise returns UNKNOWN.

SELECT *
  FROM employees
  WHERE job_id = 'PU_CLERK'
  OR department_id = 10;

Table 5-4 shows the result of applying the NOT condition to an expression.

Table 5-4 NOT Truth Table
-- | TRUE | FALSE | UNKNOWN
NOT | FALSE | TRUE | UNKNOWN

Table 5-5 shows the results of combining the AND condition to two expressions.

Table 5-5 AND Truth Table
AND | TRUE | FALSE | UNKNOWN
TRUE | TRUE | FALSE | UNKNOWN
FALSE | FALSE | FALSE | FALSE
UNKNOWN | UNKNOWN | FALSE | UNKNOWN

For example, in the WHERE clause of the following SELECT statement, the AND logical condition is used to ensure that only those hired before 1984 and earning more than $1000 a month are returned:

SELECT * FROM employees
WHERE hire_date < TO_DATE('01-JAN-1989', 'DD-MON-YYYY')
   AND salary > 2500;

Table 5-6 shows the results of applying OR to two expressions.

Table 5-6 OR Truth Table
OR | TRUE | FALSE | UNKNOWN
TRUE | TRUE | TRUE | TRUE
FALSE | TRUE | FALSE | UNKNOWN
UNKNOWN | TRUE | UNKNOWN | UNKNOWN

For example, the following query returns employees who have a 40% commission rate or a salary greater than $20,000:

SELECT employee_id FROM employees
   WHERE commission_pct = .4 OR salary > 20000;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Conditions, 5 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Membership Conditions

A membership condition tests for membership in a list or subquery.

membership_condition::=

Text description of conditions9.gif follows
Text description of membership_condition

expression_list::=

Text description of conditions11.gif follows
Text description of expression_list

If you use the upper form of this condition (with a single expression to the left of the operator), then you must use the upper form of expression_list. If you use the lower form of this condition (with multiple expressions to the left of the operator), then you must use the lower form of expression_list, and the expressions in each expression_list must match in number and datatype the expressions to the left of the operator.

See Also:

"Expression Lists"

Table 5-7 lists the membership conditions.

Table 5-7 Membership Conditions
Type of Condition Operation Example
IN

"Equal to any member of" test. Equivalent to "= ANY".

SELECT * FROM employees
  WHERE job_id IN
  ('PU_CLERK','SH_CLERK');
SELECT * FROM employees
  WHERE salary IN
  (SELECT salary
   FROM employees
   WHERE department_id =30);

NOT IN

Equivalent to "!=ALL". Evaluates to FALSE if any member of the set is NULL.

SELECT * FROM employees
  WHERE salary NOT IN
  (SELECT salary
   FROM employees
  WHERE department_id = 30);
SELECT * FROM employees
  WHERE job_id NOT IN
  ('PU_CLERK', 'SH_CLERK');

If any item in the list following a NOT IN operation evaluates to null, then all rows evaluate to FALSE or UNKNOWN, and no rows are returned. For example, the following statement returns the string 'TRUE' for each row:

SELECT 'True' FROM employees
   WHERE department_id NOT IN (10, 20);

However, the following statement returns no rows:

SELECT 'True' FROM employees
    WHERE department_id NOT IN (10, 20, NULL);

The preceding example returns no rows because the WHERE clause condition evaluates to:

department_id != 10 AND department_id != 20 AND department_id != null

Because the third condition compares department_id with a null, it results in an UNKNOWN, so the entire expression results in FALSE (for rows with department_id equal to 10 or 20). This behavior can easily be overlooked, especially when the NOT IN operator references a subquery.

Moreover, if a NOT IN condition references a subquery that returns no rows at all, then all rows will be returned, as shown in the following example:

SELECT 'True' FROM employees
   WHERE department_id NOT IN (SELECT 0 FROM dual WHERE 1=2);
Restriction on LEVEL in WHERE Clauses

In a [NOT] IN condition in a WHERE clause, if the right-hand side of the condition is a subquery, you cannot use LEVEL on the left-hand side of the condition. However, you can specify LEVEL in a subquery of the FROM clause to achieve the same result. For example, the following statement is not valid:

SELECT employee_id, last_name FROM employees
   WHERE (employee_id, LEVEL)
      IN (SELECT employee_id, 2 FROM employees)
   START WITH employee_id = 2
   CONNECT BY PRIOR employee_id = manager_id;

But the following statement is valid because it encapsulates the query containing the LEVEL information in the FROM clause:

SELECT v.employee_id, v.last_name, v.lev
   FROM
      (SELECT employee_id, last_name, LEVEL lev
      FROM employees v
      START WITH employee_id = 100
      CONNECT BY PRIOR employee_id = manager_id) v
   WHERE (v.employee_id, v.lev) IN
      (SELECT employee_id, 2 FROM employees);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Conditions, 6 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Range Conditions

A range condition tests for inclusion in a range.

range_condition::=

Text description of conditions3.gif follows
Text description of range_condition

Table 5-8 describes the range conditions.

Table 5-8 Range Conditions
Type of Condition Operation Example
[NOT]
BETWEEN x
AND y

[Not] greater than or equal to x and less than or equal to y.

SELECT * FROM employees
  WHERE salary
  BETWEEN 2000 AND 3000;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Conditions, 7 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Null Conditions

A NULL condition tests for nulls.

null_condition::=

Text description of conditions4.gif follows
Text description of null_condition

Table 5-9 lists the null conditions.

Table 5-9 Null Conditions
Type of Condition Operation Example
IS [NOT]
NULL

Tests for nulls. This is the only condition that you should use to test for nulls.

See Also: "Nulls"

SELECT last_name
  FROM employees
  WHERE commission_pct
  IS NULL;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Conditions, 8 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EQUALS_PATH

The EQUALS_PATH condition determines whether a resource in the Oracle XML database can be found in the database at a specified path.

Use this condition in queries to RESOURCE_VIEW and PATH_VIEW. These public views provide a mechanism for SQL access to data stored in the XML database repository. RESOURCE_VIEW contains one row for each resource in the repository, and PATH_VIEW contains one row for each unique path in the repository.

equals_path::=

Text description of conditions14.gif follows
Text description of equals_path

This condition applies only to the path as specified. It is similar to but more restrictive than UNDER_PATH.

The optional correlation_number argument correlates the EQUALS_PATH condition with its ancillary functions PATH and DEPTH.

See Also:

UNDER_PATH , DEPTH , and PATH

Example

The view RESOURCE_VIEW computes the paths (in the any_path column) that lead to all XML resources (in the res column) in the database repository. The following example queries the RESOURCE_VIEW view to find the paths to the resources in the sample schema oe. The EQUALS_PATH condition causes the query to return only the specified path:

SELECT ANY_PATH FROM RESOURCE_VIEW
   WHERE EQUALS_PATH(res, '/sys/schemas/OE/www.oracle.com')=1;

ANY_PATH
-----------------------------------------------
/sys/schemas/OE/www.oracle.com

Compare this example with that for UNDER_PATH .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Conditions, 9 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXISTS Conditions

An EXISTS condition tests for existence of rows in a subquery.

exists_condition::=

Text description of conditions15a.gif follows
Text description of exists_condition

Table 5-10 shows the EXISTS condition.

Table 5-10 EXISTS Condition
Type of Condition Operation Example
EXISTS

TRUE if a subquery returns at least one row.

SELECT department_id
  FROM departments d
  WHERE EXISTS
  (SELECT * FROM employees e
    WHERE d.department_id
    = e.department_id);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Conditions, 10 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LIKE Conditions

The LIKE conditions specify a test involving pattern matching. Whereas the equality operator (=) exactly matches one character value to another, the LIKE conditions match a portion of one character value to another by searching the first value for the pattern specified by the second. LIKE calculates strings using characters as defined by the input character set. LIKEC uses Unicode complete characters. LIKE2 uses UCS2 codepoints. LIKE4 uses USC4 codepoints.

like_condition::=

Text description of conditions14a.gif follows
Text description of like_condition

In this syntax:

  • char1 is a character expression, such as a character column, called the search value.
  • char2 is a character expression, usually a literal, called the pattern.
  • esc_char is a character expression, usually a literal, called the escape character.

If esc_char is not specified, then there is no default escape character. If any of char1, char2, or esc_char is null, then the result is unknown. Otherwise, the escape character, if specified, must be a character string of length 1.

All of the character expressions (char1, char2, and esc_char) can be of any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. If they differ, then Oracle converts all of them to the datatype of char1.

The pattern can contain the special pattern-matching characters:

  • % matches any string of any length (including length 0)
  • _ matches any single character.

To search for the characters % and _, precede them by the escape character. For example, if the escape character is @, then you can use @% to search for %, and @_ to search for _.

To search for the escape character, repeat it. For example, if @ is the escape character, then you can use @@ to search for @.

In the pattern, the escape character should be followed by one of %, _, or the escape character itself.

Table 5-11 describes the LIKE conditions.

Table 5-11 LIKE Conditions
Type of Condition Operation Example
x [NOT]
LIKE y

[ESCAPE
'z']

TRUE if x does [not] match the pattern y. Within y, the character "%" matches any string of zero or more characters except null. The character "_" matches any single character. Any character can follow ESCAPE except percent (%) and underbar (_). A wildcard character is treated as a literal if preceded by the character designated as the escape character.

SELECT last_name
    FROM employees
    WHERE last_name LIKE '%A\_B%'
ESCAPE '\';

To process the LIKE conditions, Oracle divides the pattern into subpatterns consisting of one or two characters each. The two-character subpatterns begin with the escape character and the other character is %, or _, or the escape character.

Let P1, P2, ..., Pn be these subpatterns. The like condition is true if there is a way to partition the search value into substrings S1, S2, ..., Sn so that for all i between 1 and n:

  • If Pi is _, then Si is a single character.
  • If Pi is %, then Si is any string.
  • If Pi is two characters beginning with an escape character, then Si is the second character of Pi.
  • Otherwise, Pi = Si.

With the LIKE conditions, you can compare a value to a pattern rather than to a constant. The pattern must appear after the LIKE keyword. For example, you can issue the following query to find the salaries of all employees with names beginning with 'R':

SELECT salary
    FROM employees
    WHERE last_name LIKE 'R%';

The following query uses the = operator, rather than the LIKE condition, to find the salaries of all employees with the name 'R%':

SELECT salary
    FROM employees
    WHERE last_name = 'R%';

The following query finds the salaries of all employees with the name 'SM%'. Oracle interprets 'SM%' as a text literal, rather than as a pattern, because it precedes the LIKE keyword:

SELECT salary
    FROM employees
    WHERE 'SM%' LIKE last_name;

Patterns typically use special characters that Oracle matches with different characters in the value:

  • An underscore (_) in the pattern matches exactly one character (as opposed to one byte in a multibyte character set) in the value.
  • A percent sign (%) in the pattern can match zero or more characters (as opposed to bytes in a multibyte character set) in the value. The pattern '%' cannot match a null.

Case Sensitivity

Case is significant in all conditions comparing character expressions including the LIKE condition and the equality (=) operators. You can use the UPPER function to perform a case-insensitive match, as in this condition:

UPPER(last_name) LIKE 'SM%'

Pattern Matching on Indexed Columns

When you use LIKE to search an indexed column for a pattern, Oracle can use the index to improve the statement's performance if the leading character in the pattern is not "%" or "_". In this case, Oracle can scan the index by this leading character. If the first character in the pattern is "%" or "_", then the index cannot improve the query's performance because Oracle cannot scan the index.

General Examples

This condition is true for all last_name values beginning with "Ma":

last_name LIKE 'Ma%'

All of these last_name values make the condition true:

Mallin, Markle, Marlow, Marvins, Marvis, Matos

Case is significant, so last_name values beginning with "MA", "ma", and "mA" make the condition false.

Consider this condition:

last_name LIKE 'SMITH_'

This condition is true for these last_name values:

SMITHE, SMITHY, SMITHS

This condition is false for 'SMITH', since the special character "_" must match exactly one character of the lastname value.

ESCAPE Clause Example

You can include the actual characters "%" or "_" in the pattern by using the ESCAPE clause, which identifies the escape character. If the escape character appears in the pattern before the character "%" or "_" then Oracle interprets this character literally in the pattern, rather than as a special pattern matching character.

To search for employees with the pattern 'A_B' in their name:

SELECT last_name
    FROM employees
    WHERE last_name LIKE '%A\_B%' ESCAPE '\';

The ESCAPE clause identifies the backslash (\) as the escape character. In the pattern, the escape character precedes the underscore (_). This causes Oracle to interpret the underscore literally, rather than as a special pattern matching character.

Patterns Without % Example

If a pattern does not contain the "%" character, then the condition can be true only if both operands have the same length. Consider the definition of this table and the values inserted into it:

CREATE TABLE ducks (f CHAR(6), v VARCHAR2(6));
INSERT INTO ducks VALUES ('DUCK', 'DUCK');
SELECT '*'||f||'*' "char",
   '*'||v||'*' "varchar"
   FROM ducks;

char     varchar
-------- --------
*DUCK  * *DUCK*

Because Oracle blank-pads CHAR values, the value of f is blank-padded to 6 bytes. v is not blank-padded and has length 4.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Conditions, 11 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

IS OF type Conditions

Use the IS OF type condition to test object instances based on their specific type information.

is_of_type_condition::=

Text description of conditions10.gif follows
Text description of is_of_type_condition

You must have EXECUTE privilege on all types referenced by type, and all types must belong to the same type family.

This condition evaluates to null if expr is null. If expr is not null, then the condition evaluates to true (or false if you specify the NOT keyword) under either of these circumstances:

  • The most specific type of expr is the subtype of one of the types specified in the type list and you have not specified ONLY for the type, or
  • The most specific type of expr is explicitly specified in the type list.

The expr frequently takes the form of the VALUE function with a correlation variable.

The following example uses the sample table oe.persons, which is built on a type hierarchy in "Substitutable Table and Column Examples" . The example uses the IS OF type condition to restrict the query to specific subtypes:

SELECT * FROM persons p
   WHERE VALUE(p) IS OF TYPE (employee_t);

NAME                     SSN
----------------------------
Joe                    32456
Tim                     5678

SELECT * FROM persons p
   WHERE VALUE(p) IS OF (ONLY part_time_emp_t);

NAME                     SSN
----------------------------
Tim                     5678
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Conditions, 12 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNDER_PATH

The UNDER_PATH condition determines whether resources specified in a column can be found under a particular path specified by path_string in the Oracle XML database repository. The path information is computed by the RESOURCE_VIEW view, which you query to use this condition.

Use this condition in queries to RESOURCE_VIEW and PATH_VIEW. These public views provide a mechanism for SQL access to data stored in the XML database repository. RESOURCE_VIEW contains one row for each resource in the repository, and PATH_VIEW contains one row for each unique path in the repository.

under_path::=

Text description of conditions15.gif follows
Text description of under_path

The optional levels argument indicates the number of levels down from path_string Oracle should search. Oracle treats values less than 0 as 0.

The optional correlation_integer argument correlates the UNDER_PATH condition with its ancillary functions PATH and DEPTH.

See Also:
  • The related condition EQUALS_PATH
  • The ancillary functions DEPTH and PATH
Example

The view RESOURCE_VIEW computes the paths (in the any_path column) that lead to all XML resources (in the res column) in the database repository. The following example queries the RESOURCE_VIEW view to find the paths to the resources in the sample schema oe. The query returns the path of the XML schema that was created in "XMLType Table Examples" :

SELECT ANY_PATH FROM RESOURCE_VIEW
   WHERE UNDER_PATH(res, '/sys/schemas/OE/www.oracle.com')=1;

ANY_PATH
----------------------------------------------
/sys/schemas/OE/www.oracle.com/xwarehouses.xsd
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Conditions, 13 of 13

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Compound Conditions

A compound condition specifies a combination of other conditions.

compound_condition::=

Text description of conditions7.gif follows
Text description of compound_condition

See Also:

"Logical Conditions" for more information about NOT, AND, and OR conditions
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 1 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

6
Functions

Functions are similar to operators in that they manipulate data items and return a result. Functions differ from operators in the format of their arguments. This format enables them to operate on zero, one, two, or more arguments:

function(argument, argument, ...)

This chapter contains these sections:

  • SQL Functions
  • User-Defined Functions
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 3 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ABS

Syntax

abs::=

Text description of functions4.gif follows
Text description of abs

Purpose

ABS returns the absolute value of n.

Examples

The following example returns the absolute value of -15:

SELECT ABS(-15) "Absolute" FROM DUAL;

  Absolute
----------
        15
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 4 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ACOS

Syntax

acos::=

Text description of functions8.gif follows
Text description of acos

Purpose

ACOS returns the arc cosine of n. The argument n must be in the range of -1 to 1, and the function returns values in the range of 0 to pi, expressed in radians.

Examples

The following example returns the arc cosine of .3:

SELECT ACOS(.3)"Arc_Cosine" FROM DUAL;

Arc_Cosine
----------
1.26610367
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 5 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ADD_MONTHS

Syntax

add_months::=

Text description of functions177b.gif follows
Text description of add_months

Purpose

ADD_MONTHS returns the date d plus n months. The argument n can be any integer. If d is the last day of the month or if the resulting month has fewer days than the day component of d, then the result is the last day of the resulting month. Otherwise, the result has the same day component as d.

Examples

The following example returns the month after the hire_date in the sample table employees:

SELECT TO_CHAR(
     ADD_MONTHS(hire_date,1),
     'DD-MON-YYYY') "Next month"
     FROM employees
     WHERE last_name = 'Baer';

Next Month
-----------
07-JUL-1994
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 6 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ASCII

Syntax

ascii::=

Text description of functions15.gif follows
Text description of ascii

Purpose

ASCII returns the decimal representation in the database character set of the first character of char.

char can be of datatype CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The value returned is of datatype NUMBER. If your database character set is 7-bit ASCII, then this function returns an ASCII value. If your database character set is EBCDIC Code, then this function returns an EBCDIC value. There is no corresponding EBCDIC character function.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example returns the ASCII decimal equivalent of the letter Q:

SELECT ASCII('Q') FROM DUAL;

ASCII('Q')
----------
        81
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 7 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ASCIISTR

Syntax

asciistr::=

Text description of functions79.gif follows
Text description of asciistr

Purpose

ASCIISTR takes as its argument a string in any character set and returns an ASCII string in the database character set. The value returned contains only characters that appear in SQL, plus the forward slash (/). Non-ASCII characters are converted to their Unicode (UTF-16) binary code value.

See Also:

Oracle9i Database Globalization Support Guide for information on Unicode character sets and character semantics

Examples

The following example returns the ASCII string equivalent of the text string "ABÄCDE":

SELECT ASCIISTR('ABÄCDE') FROM DUAL;

ASCIIS
------
ABDCDE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 8 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ASIN

Syntax

asin::=

Text description of functions18.gif follows
Text description of asin

Purpose

ASIN returns the arc sine of n. The argument n must be in the range of -1 to 1, and the function returns values in the range of pi/2 to pi/2 and are expressed in radians.

Examples

The following example returns the arc sine of .3:

SELECT ASIN(.3) "Arc_Sine" FROM DUAL;

 Arc_Sine
----------

.304692654

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 9 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ATAN

Syntax

atan::=

Text description of functions21.gif follows
Text description of atan

Purpose

ATAN returns the arc tangent of n. The argument n can be in an unbounded range, and the function returns values in the range of -pi/2 to pi/2 and are expressed in radians.

Examples

The following example returns the arc tangent of .3:

SELECT ATAN(.3) "Arc_Tangent" FROM DUAL;

Arc_Tangent
----------
.291456794
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 10 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ATAN2

Syntax

atan2::=

Text description of functions24.gif follows
Text description of atan2

Purpose

ATAN2 returns the arc tangent of n and m. The argument n can be in an unbounded range, and the function returns values in the range of -pi to pi, depending on the signs of n and m, and are expressed in radians. ATAN2(n,m) is the same as ATAN2(n/m)

Examples

The following example returns the arc tangent of .3 and .2:

SELECT ATAN2(.3, .2) "Arc_Tangent2" FROM DUAL;

Arc_Tangent2
------------
  .982793723
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 11 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AVG

Syntax

avg::=

Text description of functions27.gif follows
Text description of avg

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

AVG returns average value of expr. You can use it as an aggregate or analytic function.

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example calculates the average salary of all employees in the hr.employees table:

SELECT AVG(salary) "Average" FROM employees;

 Average
--------
    6425

Analytic Example

The following example calculates, for each employee in the employees table, the average salary of the employees reporting to the same manager who were hired in the range just before through just after the employee:

SELECT manager_id, last_name, hire_date, salary,
   AVG(salary) OVER (PARTITION BY manager_id ORDER BY hire_date
   ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) AS c_mavg
   FROM employees;

MANAGER_ID LAST_NAME                 HIRE_DATE     SALARY     C_MAVG
---------- ------------------------- --------- ---------- ----------
       100 Kochhar                   21-SEP-89      17000      17000
       100 De Haan                   13-JAN-93      17000      15000
       100 Raphaely                  07-DEC-94      11000 11966.6667
       100 Kaufling                  01-MAY-95       7900 10633.3333
       100 Hartstein                 17-FEB-96      13000 9633.33333
       100 Weiss                     18-JUL-96       8000 11666.6667
       100 Russell                   01-OCT-96      14000 11833.3333
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 12 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BFILENAME

Syntax

bfilename::=

Text description of functions30.gif follows
Text description of bfilename

Purpose

BFILENAME returns a BFILE locator that is associated with a physical LOB binary file on the server's file system.

  • 'directory' is a database object that serves as an alias for a full path name on the server's file system where the files are actually located
  • 'filename' is the name of the file in the server's file system

You must create the directory object and associate a BFILE value with a physical file before you can use them as arguments to BFILENAME in a SQL or PL/SQL statement, DBMS_LOB package, or OCI operation.

You can use this function in two ways:

  • In a DML statement to initialize a BFILE column
  • In a programmatic interface to access BFILE data by assigning a value to the BFILE locator.

The directory argument is case sensitive. That is, you must ensure that you specify the directory object name exactly as it exists in the data dictionary. For example, if an "Admin" directory object was created using mixed case and a quoted identifier in the CREATE DIRECTORY statement, then when using the BFILENAME function you must refer to the directory object as 'Admin'. You must specify the filename argument according to the case and punctuation conventions for your operating system.

See Also:
  • Oracle9i Application Developer's Guide - Large Objects (LOBs) and Oracle Call Interface Programmer's Guide for more information on LOBs and for examples of retrieving BFILE data
  • CREATE DIRECTORY

Examples

The following example inserts a row into the sample table pm.print_media. The example uses the BFILENAME function to identify a binary file on the server's file system:

CREATE DIRECTORY media_dir AS '/demo/schema/product_media';

INSERT INTO print_media (product_id, ad_id, ad_graphic)
   VALUES (3000, 31001,
      bfilename('MEDIA_DIR', 'modem_comp_ad.gif'));
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 13 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BIN_TO_NUM

Syntax

bin_to_num::=

Text description of functions41.gif follows
Text description of bin_to_num

Purpose

BIN_TO_NUM converts a bit vector to its equivalent number. Each argument to this function represents a bit in the bit vector. Each expr must evaluate to 0 or 1. This function returns Oracle NUMBER.

BIN_TO_NUM is useful in data warehousing applications for selecting groups of interest from a materialized view using grouping sets.

See Also:
  • group_by_clause for information on GROUPING SETS syntax
  • Oracle9i Data Warehousing Guide for information on data aggregation in general

Examples

The following example converts a binary value to a number:

SELECT BIN_TO_NUM(1,0,1,0) FROM DUAL;

BIN_TO_NUM(1,0,1,0)
-------------------
                 10
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 14 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BITAND

Syntax

bitand::=

Text description of functions174.gif follows
Text description of bitand

Purpose

BITAND computes an AND operation on the bits of argument1 and argument2, both of which must resolve to nonnegative integers, and returns an integer. This function is commonly used with the DECODE function, as illustrated in the example that follows.

Note:

This function does not determine the datatype of the value returned. Therefore, in SQL*Plus, you must specify BITAND in a wrapper, such as TO_NUMBER, which returns a datatype.

Examples

The following represents each order_status in the sample table oe.orders by individual bits. (The example specifies options that can total only 7, so rows with order_status greater than 7 are eliminated.)

SELECT order_id, customer_id,
  DECODE(BITAND(order_status, 1), 1, 'Warehouse', 'PostOffice')
      Location,
  DECODE(BITAND(order_status, 2), 2, 'Ground', 'Air') Method,
  DECODE(BITAND(order_status, 4), 4, 'Insured', 'Certified') Receipt
  FROM orders
  WHERE order_status < 8;

  ORDER_ID CUSTOMER_ID LOCATION   MET RECEIPT
---------- ----------- ---------- --- ---------
      2458         101 Postoffice Air Certified
      2397         102 Warehouse  Air Certified
      2454         103 Warehouse  Air Certified
      2354         104 Postoffice Air Certified
      2358         105 Postoffice G   Certified
      2381         106 Warehouse  G   Certified
      2440         107 Warehouse  G   Certified
      2357         108 Warehouse  Air Insured
      2394         109 Warehouse  Air Insured
      2435         144 Postoffice G   Insured
      2455         145 Warehouse  G   Insured
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 15 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CAST

Syntax

cast::=

Text description of functions184a.gif follows
Text description of cast

Purpose

CAST converts one built-in datatype or collection-typed value into another built-in datatype or collection-typed value.

CAST lets you convert built-in datatypes or collection-typed values of one type into another built-in datatype or collection type. You can cast an unnamed operand (such as a date or the result set of a subquery) or a named collection (such as a varray or a nested table) into a type-compatible datatype or named collection. The type_name must be the name of a built-in datatype or collection type and the operand must be a built-in datatype or must evaluate to a collection value.

For the operand, expr can be either a built-in datatype or a collection type, and subquery must return a single value of collection type or built-in type. MULTISET informs Oracle to take the result set of the subquery and return a collection value. Table 6-1 shows which built-in datatypes can be cast into which other built-in datatypes. (CAST does not support LONG, LONG RAW, any of the LOB datatypes, or the Oracle-supplied types.)

Table 6-1 Casting Built-In Datatypes
 | from CHAR, VARCHAR2 | from NUMBER | from DATETIME / INTERVALb | from RAW | from ROWID, UROWID | from NCHAR, NVARCHAR2
to CHAR, VARCHAR2 | X | X | X | X | X | --
to NUMBER | X | X | -- | -- | -- | --
to DATE, TIMESTAMP, INTERVAL | X | -- | X | -- | -- | --
to RAW | X | -- | -- | X | -- | --
to ROWID, UROWID | X | -- | -- | -- | Xa | --
to NCHAR, NVARCHAR2 | -- | X | X | X | X | X
a You cannot cast a UROWID to a ROWID if the UROWID contains the value of a ROWID of an index-organized table. b Datetime/Interval includes DATE, TIMESTAMP, TIMESTAMP WITH TIMEZONE, INTERVAL DAY TO SECOND, and INTERVAL YEAR TO MONTH,

If you want to cast a named collection type into another named collection type, then the elements of both collections must be of the same type.

If the result set of subquery can evaluate to multiple rows, then you must specify the MULTISET keyword. The rows resulting from the subquery form the elements of the collection value into which they are cast. Without the MULTISET keyword, the subquery is treated as a scalar subquery.

Built-In Datatype Examples

The following examples use the CAST function with scalar datatypes:

SELECT CAST('22-OCT-1997' AS TIMESTAMP WITH LOCAL TIME ZONE)
   FROM dual;

SELECT product_id,
   CAST(ad_sourcetext AS VARCHAR2(30))
   FROM print_media;

Collection Examples

The CAST examples that follow build on the cust_address_typ found in the sample order entry schema, oe.

CREATE TYPE address_book_t AS TABLE OF cust_address_typ;
/
CREATE TYPE address_array_t AS VARRAY(3) OF cust_address_typ;
/
CREATE TABLE cust_address (
   custno            NUMBER,
   street_address    VARCHAR2(40),
   postal_code       VARCHAR2(10),
   city              VARCHAR2(30),
   state_province    VARCHAR2(10),
   country_id        CHAR(2));

CREATE TABLE cust_short (custno NUMBER, name VARCHAR2(31));

CREATE TABLE states (state_id NUMBER, addresses address_array_t);

This example casts a subquery:

SELECT s.custno, s.name,
   CAST(MULTISET(SELECT ca.street_address,
                        ca.postal_code,
                        ca.city,
                        ca.state_province,
                        ca.country_id
                 FROM cust_address ca
                 WHERE s.custno = ca.custno)
   AS address_book_t)
FROM cust_short s;

CAST converts a varray type column into a nested table:

SELECT CAST(s.addresses AS address_book_t)
   FROM states s
   WHERE s.state_id = 111;

The following objects create the basis of the example that follows:

CREATE TABLE projects
   (employee_id NUMBER, project_name VARCHAR2(10));

CREATE TABLE emps_short
   (employee_id NUMBER, last_name VARCHAR2(10));

CREATE TYPE project_table_typ AS TABLE OF VARCHAR2(10);
   /

The following example of a MULTISET expression uses these objects:

SELECT e.last_name,
   CAST(MULTISET(SELECT p.project_name
   FROM projects p
   WHERE p.employee_id = e.employee_id
   ORDER BY p.project_name)
   AS project_table_typ)
FROM emps_short e;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Functions, 16 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CEIL

Syntax

ceil::=

Text description of functions33.gif follows
Text description of ceil

Purpose

CEIL returns smallest integer greater than or equal to n.

Examples

The following example returns the smallest integer greater than or equal to 15.7:

SELECT CEIL(15.7) "Ceiling" FROM DUAL;

   Ceiling
----------
        16
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 17 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CHARTOROWID

Syntax

chartorowid::=

Text description of functions39.gif follows
Text description of chartorowid

Purpose

CHARTOROWID converts a value from CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to ROWID datatype.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example converts a character rowid representation to a rowid. (The function will return a different rowid on different databases).

SELECT last_name FROM employees
   WHERE ROWID = CHARTOROWID('AAAFd1AAFAAAABSAA/');

LAST_NAME
-------------------------
Greene
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 18 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CHR

Syntax

chr::=

Text description of functions42.gif follows
Text description of chr

Purpose

CHR returns the character having the binary equivalent to n in either the database character set or the national character set.

If USING NCHAR_CS is not specified, then this function returns the character having the binary equivalent to n as a VARCHAR2 value in the database character set.

If USING NCHAR_CS is specified, then this function returns the character having the binary equivalent to n as a NVARCHAR2 value in the national character set.

For single-byte character sets, if n > 256, then Oracle returns the binary equivalent of n mod 256. For multibyte character sets, n must resolve to one entire codepoint. Invalid codepoints are not validated, and the result of specifying invalid codepoints is indeterminate.

Note:

Use of the CHR function (either with or without the optional USING NCHAR_CS clause) results in code that is not portable between ASCII- and EBCDIC-based machine architectures.
See Also:

NCHR

Examples

The following example is run on an ASCII-based machine with the database character set defined as WE8ISO8859P1:

SELECT CHR(67)||CHR(65)||CHR(84) "Dog" FROM DUAL;

Dog
---
CAT

To produce the same results on an EBCDIC-based machine with the WE8EBCDIC1047 character set, the preceding example would have to be modified as follows:

SELECT CHR(195)||CHR(193)||CHR(227) "Dog"
   FROM DUAL;

Dog
---
CAT

For multibyte character sets, this sort of concatenation gives different results. For example, given a multibyte character whose hexadecimal value is a1a2 (a1 representing the first byte and a2 the second byte), you must specify for n the decimal equivalent of 'a1a2', or 41378. That is, you must specify:

SELECT CHR(41378) FROM DUAL;

You cannot specify the decimal equivalent of a1 concatenated with the decimal equivalent of a2, as in the following example:

SELECT CHR(161)||CHR(162) FROM DUAL;

However, you can concatenate whole multibyte codepoints, as in the following example, which concatenates the multibyte characters whose hexadecimal values are a1a2 and a1a3:

SELECT CHR(41378)||CHR(41379) FROM DUAL;

The following example uses the UTF8 character set:

SELECT CHR (50052 USING NCHAR_CS) FROM DUAL;

CH
--
Ä
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 19 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COALESCE

Syntax

coalesce::=

Text description of functions103.gif follows
Text description of coalesce

Purpose

COALESCE returns the first non-null expr in the expression list. At least one expr must not be the literal NULL. If all occurrences of expr evaluate to null, then the function returns null.

This function is a generalization of the NVL function.

You can also use COALESCE as a variety of the CASE expression. For example,

COALESCE (expr1, expr2)

is equivalent to:

CASE WHEN expr1 IS NOT NULL THEN expr1 ELSE expr2 END

Similarly,

COALESCE (expr1, expr2, ..., exprn), for n>=3

is equivalent to:

CASE WHEN expr1 IS NOT NULL THEN expr1
   ELSE COALESCE (expr2, ..., exprn) END
See Also:

NVL and "CASE Expressions"

Examples

The following example uses the sample oe.product_information table to organize a "clearance sale" of products. It gives a 10% discount to all products with a list price. If there is no list price, then the sale price is the minimum price. If there is no minimum price, then the sale price is "5":

SELECT product_id, list_price, min_price,
   COALESCE(0.9*list_price, min_price, 5) "Sale"
   FROM product_information
   WHERE supplier_id = 102050;

PRODUCT_ID LIST_PRICE  MIN_PRICE       Sale
---------- ---------- ---------- ----------
      2382        850        731        765
      3355                                5
      1770                    73         73
      2378        305        247      274.5
      1769         48                  43.2
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 20 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COMPOSE

Syntax

compose::=

Text description of functions75.gif follows
Text description of compose

Purpose

COMPOSE takes as its argument a string in any datatype, and returns a Unicode string in its fully normalized form in the same character set as the input. string can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. For example, an "o" codepoint qualified by an umlaut codepoint will be returned as the o-umlaut codepoint.

See Also:

Oracle9i Database Concepts for information on Unicode character sets and character semantics

Examples

The following example returns the o-umlaut codepoint:

SELECT COMPOSE ( 'o' || UNISTR('\0308') ) FROM DUAL;

CO
--
ö
See Also:

UNISTR

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 21 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CONCAT

Syntax

concat::=

Text description of functions36.gif follows
Text description of concat

Purpose

CONCAT returns char1 concatenated with char2. Both char1 and char2 can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is in the same character set as char1. Its datatype depends on the datatypes of the arguments.

In concatenations of two different datatypes, Oracle returns the datatype that results in a lossless conversion. Therefore, if one of the arguments is a LOB, then the returned value is a LOB. If one of the arguments is a national datatype, then the returned value is a national datatype. For example:

  • CONCAT(CLOB, NCLOB) returns NCLOB
  • CONCAT(NCLOB, NCHAR) returns NCLOB
  • CONCAT(NCLOB, CHAR) returns NCLOB
  • CONCAT(NCHAR, CLOB) returns NCLOB

This function is equivalent to the concatenation operator (||).

See Also:

"Concatenation Operator" for information on the CONCAT operator

Examples

This example uses nesting to concatenate three character strings:

SELECT CONCAT(CONCAT(last_name, '''s job category is '),
      job_id) "Job"
   FROM employees
   WHERE employee_id = 152;

Job
------------------------------------------------------
Hall's job category is SA_REP
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 22 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CONVERT

Syntax

convert::=

Text description of functions48.gif follows
Text description of convert

Purpose

CONVERT converts a character string from one character set to another. The datatype of the returned value is VARCHAR2.

  • The char argument is the value to be converted. It can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.
  • The dest_char_set argument is the name of the character set to which char is converted.
  • The source_char_set argument is the name of the character set in which char is stored in the database. The default value is the database character set.

Both the destination and source character set arguments can be either literals or columns containing the name of the character set.

For complete correspondence in character conversion, it is essential that the destination character set contains a representation of all the characters defined in the source character set. Where a character does not exist in the destination character set, a replacement character appears. Replacement characters can be defined as part of a character set definition.

Examples

The following example illustrates character set conversion by converting a Latin-1 string to ASCII. The result is the same as importing the same string from a WE8ISO8859P1 database to a US7ASCII database.

SELECT CONVERT('Ä Ê Í Õ Ø A B C D E ', 'US7ASCII', 'WE8ISO8859P1')
   FROM DUAL;

CONVERT('ÄÊÍÕØABCDE'
---------------------
A E I ? ? A B C D E ?

Common character sets include:

  • US7ASCII: US 7-bit ASCII character set
  • WE8DEC: West European 8-bit character set
  • WE8HP: HP West European Laserjet 8-bit character set
  • F7DEC: DEC French 7-bit character set
  • WE8EBCDIC500: IBM West European EBCDIC Code Page 500
  • WE8PC850: IBM PC Code Page 850
  • WE8ISO8859P1: ISO 8859-1 West European 8-bit character set
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 23 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CORR

Syntax

corr::=

Text description of functions45.gif follows
Text description of corr

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

CORR returns the coefficient of correlation of a set of number pairs. You can use it as an aggregate or analytic function.

Both expr1 and expr2 are number expressions. Oracle applies the function to the set of (expr1, expr2) after eliminating the pairs for which either expr1 or expr2 is null. Then Oracle makes the following computation:

COVAR_POP(expr1, expr2) / (STDDEV_POP(expr1) * STDDEV_POP(expr2))

The function returns a value of type NUMBER. If the function is applied to an empty set, then it returns null.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example calculates the coefficient of correlation between the list prices and minimum prices of products by weight class in the sample view oe.products:

SELECT weight_class, CORR(list_price, min_price)
   FROM product_information
   GROUP BY weight_class;

WEIGHT_CLASS CORR(LIST_PRICE,MIN_PRICE)
------------ --------------------------
           1                  .99914795
           2                 .999022941
           3                 .998484472
           4                 .999359909
           5                 .999536087

Analytic Example

The following example returns the cumulative coefficient of correlation of monthly sales revenues and monthly units sold from the sample tables sh.sales and sh.times for year 1998:

SELECT t.calendar_month_number,
   CORR (SUM(s.amount_sold), SUM(s.quantity_sold))
   OVER (ORDER BY t.calendar_month_number) as CUM_CORR
   FROM sales s, times t
      WHERE s.time_id = t.time_id AND calendar_year = 1998
      GROUP BY t.calendar_month_number
      ORDER BY t.calendar_month_number;

CALENDAR_MONTH_NUMBER   CUM_CORR
--------------------- ----------
                    1
                    2          1
                    3 .994309382
                    4 .852040875
                    5 .846652204
                    6 .871250628
                    7 .910029803
                    8 .917556399
                    9 .920154356
                   10  .86720251
                   11 .844864765
                   12 .903542662

Correlation functions require more than one row on which to operate, so the first row in the preceding example has no value calculated for it.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 24 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COS

Syntax

cos::=

Text description of functions51.gif follows
Text description of cos

Purpose

COS returns the cosine of n (an angle expressed in radians).

Examples

The following example returns the cosine of 180 degrees:

SELECT COS(180 * 3.14159265359/180)
   "Cosine of 180 degrees" FROM DUAL;

Cosine of 180 degrees
---------------------
                   -1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 25 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COSH

Syntax

cosh::=

Text description of functions73.gif follows
Text description of cosh

Purpose

COSH returns the hyperbolic cosine of n.

Examples

The following example returns the hyperbolic cosine of zero:

SELECT COSH(0) "Hyperbolic cosine of 0" FROM DUAL;

Hyperbolic cosine of 0
----------------------
                     1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 26 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COUNT

Syntax

count::=

Text description of functions54.gif follows
Text description of count

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

COUNT returns the number of rows in the query. You can use it as an aggregate or analytic function.

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

If you specify expr, then COUNT returns the number of rows where expr is not null. You can count either all rows, or only distinct values of expr.

If you specify the asterisk (*), then this function returns all rows, including duplicates and nulls. COUNT never returns null.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Examples

The following examples use COUNT as an aggregate function:

SELECT COUNT(*) "Total" FROM employees;

     Total
----------
       107

SELECT COUNT(*) "Allstars" FROM employees
   WHERE commission_pct > 0;

 Allstars
---------
       35

SELECT COUNT(commission_pct) "Count" FROM employees;

     Count
----------
        35

SELECT COUNT(DISTINCT manager_id) "Managers" FROM employees;

  Managers
----------
        18

Analytic Example

The following example calculates, for each employee in the employees table, the moving count of employees earning salaries in the range $50 less than through $150 greater than the employee's salary.

SELECT last_name, salary,
   COUNT(*) OVER (ORDER BY salary RANGE BETWEEN 50 PRECEDING
      AND 150 FOLLOWING) AS mov_count FROM employees;

LAST_NAME                     SALARY  MOV_COUNT
------------------------- ---------- ----------
Olson                           2100          3
Markle                          2200          2
Philtanker                      2200          2
Landry                          2400          8
Gee                             2400          8
Colmenares                      2500         10
Patel                           2500         10
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 27 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COVAR_POP

Syntax

covar_pop::=

Text description of functions57.gif follows
Text description of covar_pop

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

COVAR_POP returns the population covariance of a set of number pairs. You can use it as an aggregate or analytic function.

Both expr1 and expr2 are number expressions. Oracle applies the function to the set of (expr1, expr2) pairs after eliminating all pairs for which either expr1 or expr2 is null. Then Oracle makes the following computation:

(SUM(expr1 * expr2) - SUM(expr2) * SUM(expr1) / n) / n

where n is the number of (expr1, expr2) pairs where neither expr1 nor expr2 is null.

The function returns a value of type NUMBER. If the function is applied to an empty set, then it returns null.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example calculates the population covariance for the sales revenue amount and the units sold for each year from the sample table sh.sales:

SELECT t.calendar_month_number,
   COVAR_POP(s.amount_sold, s.quantity_sold) AS covar_pop,
   COVAR_SAMP(s.amount_sold, s.quantity_sold) AS covar_samp
   FROM sales s, times t
   WHERE s.time_id = t.time_id
   AND t.calendar_year = 1998
   GROUP BY t.calendar_month_number;

CALENDAR_MONTH_NUMBER  COVAR_POP COVAR_SAMP
--------------------- ---------- ----------
                    1 5437.68586 5437.88704
                    2 5923.72544 5923.99139
                    3 6040.11777 6040.38623
                    4 5946.67897 5946.92754
                    5 5986.22483  5986.4463
                    6 5726.79371 5727.05703
                    7 5491.65269  5491.9239
                    8 5672.40362 5672.66882
                    9 5741.53626 5741.80025
                   10  5050.5683 5050.78195
                   11 5256.50553 5256.69145
                   12  5411.2053 5411.37709

Analytic Example

The following example calculates cumulative sample covariance of the list price and minimum price of the products in the sample schema oe:

SELECT product_id, supplier_id,
   COVAR_POP(list_price, min_price)
      OVER (ORDER BY product_id, supplier_id)
         AS CUM_COVP,
   COVAR_SAMP(list_price, min_price)
      OVER (ORDER BY product_id, supplier_id)
        AS CUM_COVS
   FROM product_information p
   WHERE category_id = 29
   ORDER BY product_id, supplier_id;

PRODUCT_ID SUPPLIER_ID   CUM_COVP   CUM_COVS
---------- ----------- ---------- ----------
      1774      103088          0
      1775      103087    1473.25     2946.5
      1794      103096 1702.77778 2554.16667
      1825      103093    1926.25 2568.33333
      2004      103086     1591.4    1989.25
      2005      103086     1512.5       1815
      2416      103088 1475.97959 1721.97619
.
.

.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 28 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COVAR_SAMP

Syntax

covar_samp::=

Text description of functions180a.gif follows
Text description of covar_samp

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

COVAR_SAMP returns the sample covariance of a set of number pairs. You can use it as an aggregate or analytic function.

Both expr1 and expr2 are number expressions. Oracle applies the function to the set of (expr1, expr2) pairs after eliminating all pairs for which either expr1 or expr2 is null. Then Oracle makes the following computation:

(SUM(expr1 * expr2) - SUM(expr1) * SUM(expr2) / n) / (n-1)

where n is the number of (expr1, expr2) pairs where neither expr1 nor expr2 is null.

The function returns a value of type NUMBER. If the function is applied to an empty set, then it returns null.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example calculates the population covariance for the sales revenue amount and the units sold for each year from the sample table sh.sales:

SELECT t.calendar_month_number,
   COVAR_POP(s.amount_sold, s.quantity_sold) AS covar_pop,
   COVAR_SAMP(s.amount_sold, s.quantity_sold) AS covar_samp
   FROM sales s, times t
   WHERE s.time_id = t.time_id
   AND t.calendar_year = 1998
   GROUP BY t.calendar_month_number;

CALENDAR_MONTH_NUMBER  COVAR_POP COVAR_SAMP
--------------------- ---------- ----------
                    1 5437.68586 5437.88704
                    2 5923.72544 5923.99139
                    3 6040.11777 6040.38623
                    4 5946.67897 5946.92754
                    5 5986.22483  5986.4463
                    6 5726.79371 5727.05703
                    7 5491.65269  5491.9239
                    8 5672.40362 5672.66882
                    9 5741.53626 5741.80025
                   10  5050.5683 5050.78195
                   11 5256.50553 5256.69145
                   12  5411.2053 5411.37709

Analytic Example

The following example calculates cumulative sample covariance of the list price and minimum price of the products in the sample schema oe:

SELECT product_id, supplier_id,
   COVAR_POP(list_price, min_price)
      OVER (ORDER BY product_id, supplier_id)
         AS CUM_COVP,
   COVAR_SAMP(list_price, min_price)
      OVER (ORDER BY product_id, supplier_id)
        AS CUM_COVS
   FROM product_information p
   WHERE category_id = 29
   ORDER BY product_id, supplier_id;

PRODUCT_ID SUPPLIER_ID   CUM_COVP   CUM_COVS
---------- ----------- ---------- ----------
      1774      103088          0
      1775      103087    1473.25     2946.5
      1794      103096 1702.77778 2554.16667
      1825      103093    1926.25 2568.33333
      2004      103086     1591.4    1989.25
      2005      103086     1512.5       1815
      2416      103088 1475.97959 1721.97619
.
.

.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 29 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CUME_DIST

Aggregate Syntax

cume_dist_aggregate::=

Text description of functions91.gif follows
Text description of cume_dist_aggregate

Analytic Syntax

cume_dist_analytic::=

Text description of functions67.gif follows
Text description of cume_dist_analytic

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

CUME_DIST calculates the cumulative distribution of a value in a group of values. The range of values returned by CUME_DIST is >0 to <=1. Tie values always evaluate to the same cumulative distribution value.

  • As an aggregate function, CUME_DIST calculates, for a hypothetical row R identified by the arguments of the function and a corresponding sort specification, the relative position of row R among the rows in the aggregation group. Oracle makes this calculation as if the hypothetical row R were inserted into the group of rows to be aggregated over. The arguments of the function identify a single hypothetical row within each aggregate group. Therefore, they must all evaluate to constant expressions within each aggregate group. The constant argument expressions and the expressions in the ORDER BY clause of the aggregate match by position. Therefore, the number of arguments must be the same and their types must be compatible.
  • As an analytic function, CUME_DIST computes the relative position of a specified value in a group of values. For a row R, assuming ascending ordering, the CUME_DIST of R is the number of rows with values lower than or equal to the value of R, divided by the number of rows being evaluated (the entire query result set or a partition).

Aggregate Example

The following example calculates the cumulative distribution of a hypothetical employee with a salary of $15,500 and commission rate of 5% among the employees in the sample table oe.employees:

SELECT CUME_DIST(15500, .05) WITHIN GROUP
   (ORDER BY salary, commission_pct) "Cume-Dist of 15500"
   FROM employees;

Cume-Dist of 15500
------------------
        .972222222

Analytic Example

The following example calculates the salary percentile for each employee in the purchasing area. For example, 40% of clerks have salaries less than or equal to Himuro.

SELECT job_id, last_name, salary, CUME_DIST()
   OVER (PARTITION BY job_id ORDER BY salary) AS cume_dist
   FROM employees
   WHERE job_id LIKE 'PU%';

JOB_ID     LAST_NAME                     SALARY  CUME_DIST
---------- ------------------------- ---------- ----------
PU_CLERK   Colmenares                      2500         .2
PU_CLERK   Himuro                          2600         .4
PU_CLERK   Tobias                          2800         .6
PU_CLERK   Baida                           2900         .8
PU_CLERK   Khoo                            3100          1
PU_MAN     Raphaely                       11000          1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 30 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CURRENT_DATE

Syntax

current_date::=

Text description of functions44.gif follows
Text description of current_date

Purpose

CURRENT_DATE returns the current date in the session time zone, in a value in the Gregorian calendar of datatype DATE.

Examples

The following example illustrates that CURRENT_DATE is sensitive to the session time zone:

ALTER SESSION SET TIME_ZONE = '-5:0';
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
SELECT SESSIONTIMEZONE, CURRENT_DATE FROM DUAL;

SESSIONTIMEZONE CURRENT_DATE
--------------- --------------------
-05:00          29-MAY-2000 13:14:03

ALTER SESSION SET TIME_ZONE = '-8:0';
SELECT SESSIONTIMEZONE, CURRENT_DATE FROM DUAL;

SESSIONTIMEZONE CURRENT_DATE
--------------- --------------------
-08:00          29-MAY-2000 10:14:33
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 31 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CURRENT_TIMESTAMP

Syntax

current_timestamp::=

Text description of functions47.gif follows
Text description of current_timestamp

Purpose

CURRENT_TIMESTAMP returns the current date and time in the session time zone, in a value of datatype TIMESTAMP WITH TIME ZONE. The time zone displacement reflects the current local time of the SQL session. If you omit precision, then the default is 6. The difference between this function and LOCALTIMESTAMP is that CURRENT_TIMESTAMP returns a TIMESTAMP WITH TIME ZONE value while LOCALTIMESTAMP returns a TIMESTAMP value.

In the optional argument, precision specifies the fractional second precision of the time value returned.

Examples

The following example illustrates that CURRENT_TIMESTAMP is sensitive to the session time zone:

ALTER SESSION SET TIME_ZONE = '-5:0';
ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
SELECT SESSIONTIMEZONE, CURRENT_TIMESTAMP FROM DUAL;

SESSIONTIMEZONE CURRENT_TIMESTAMP
--------------- ---------------------------------------------------
-05:00          04-APR-00 01.17.56.917550 PM -05:00

ALTER SESSION SET TIME_ZONE = '-8:0';
SELECT SESSIONTIMEZONE, CURRENT_TIMESTAMP FROM DUAL;

SESSIONTIMEZONE CURRENT_TIMESTAMP
--------------- ----------------------------------------------------
-08:00          04-APR-00 10.18.21.366065 AM -08:00

If you use the CURRENT_TIMESTAMP with a format mask, take care that the format mask matches the value returned by the function. For example, consider the following table:

CREATE TABLE current_test (col1 TIMESTAMP WITH TIME ZONE);

The following statement fails because the mask does not include the TIME ZONE portion of the type returned by the function:

INSERT INTO current_test VALUES
  (TO_TIMESTAMP_TZ(CURRENT_TIMESTAMP, 'DD-MON-RR HH.MI.SSXFF PM'));

The following statement uses the correct format mask to match the return type of CURRENT_TIMESTAMP:

INSERT INTO current_test VALUES (TO_TIMESTAMP_TZ
    (CURRENT_TIMESTAMP, 'DD-MON-RR HH.MI.SSXFF PM TZH:TZM'));
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 32 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBTIMEZONE

Syntax

dbtimezone::=

Text description of functions50.gif follows
Text description of dbtimezone

Purpose

DBTIMEZONE returns the value of the database time zone. The return type is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time zone region name, depending on how the user specified the database time zone value in the most recent CREATE DATABASE or ALTER DATABASE statement.

Examples

The following example assumes that the database time zone is set to UTC time zone:

SELECT DBTIMEZONE FROM DUAL;

DBTIME
------
-08:00
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 33 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DECODE

Syntax

decode::=

Text description of functions157.gif follows
Text description of decode

Purpose

DECODE compares expr to each search value one by one. If expr is equal to a search, then Oracle returns the corresponding result. If no match is found, then Oracle returns default. If default is omitted, then Oracle returns null.

If expr and search contain character data, then Oracle compares them using nonpadded comparison semantics. expr, search, and result can be any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The string returned is of VARCHAR2 datatype and is in the same character set as the first result parameter.

The search, result, and default values can be derived from expressions. Oracle evaluates each search value only before comparing it to expr, rather than evaluating all search values before comparing any of them with expr. Consequently, Oracle never evaluates a search if a previous search is equal to expr.

Oracle automatically converts expr and each search value to the datatype of the first search value before comparing. Oracle automatically converts the return value to the same datatype as the first result. If the first result has the datatype CHAR or if the first result is null, then Oracle converts the return value to the datatype VARCHAR2.

In a DECODE function, Oracle considers two nulls to be equivalent. If expr is null, then Oracle returns the result of the first search that is also null.

The maximum number of components in the DECODE function, including expr, searches, results, and default, is 255.

See Also:
  • "Datatype Comparison Rules" for information on comparison semantics
  • "Data Conversion" for information on datatype conversion in general
  • "Implicit and Explicit Data Conversion" for information on the drawbacks of implicit conversion

Examples

This example decodes the value warehouse_id. If warehouse_id is 1, then the function returns 'Southlake'; if warehouse_id is 2, then it returns 'San Francisco'; and so forth. If warehouse_id is not 1, 2, 3, or 4, then the function returns 'Non-domestic'.

SELECT product_id,
       DECODE (warehouse_id, 1, 'Southlake',
                             2, 'San Francisco',
                             3, 'New Jersey',
                             4, 'Seattle',
                                'Non-domestic')
       "Location of inventory" FROM inventories
       WHERE product_id < 1775;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 34 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DECOMPOSE

Syntax

decompose::=

Text description of functions186.gif follows
Text description of decompose

Purpose

DECOMPOSE is valid only for Unicode characters. DECOMPOSE takes as its argument a string in any datatype and returns a Unicode string after decomposition in the same character set as the input. For example, an o-umlaut codepoint will be returned as the "o" codepoint followed by an umlaut codepoint.

  • string can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB.
  • CANONICAL causes canonical decomposition, which allows recomposition (for example, with the COMPOSE function) to the original string. This is the default.
  • COMPATIBILITY causes decomposition in compatibility mode. In this mode, recomposition is not possible. This mode is useful, for example, when decomposing half-width and full-width katakana characters, where recomposition might not be desirable without external formatting or style information.

    See Also:

    Oracle9i Database Concepts for information on Unicode character sets and character semantics

Examples

The following example decomposes the string "Châteaux" into its component codepoints:

SELECT DECOMPOSE ('Châteaux') FROM DUAL;

DECOMPOSE
---------
Cha^teaux
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 35 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DENSE_RANK

Aggregate Syntax

dense_rank_aggregate::=

Text description of functions73b.gif follows
Text description of dense_rank_aggregate

Analytic Syntax

dense_rank_analytic::=

Text description of functions175.gif follows
Text description of dense_rank_analytic

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

DENSE_RANK computes the rank of a row in an ordered group of rows. The ranks are consecutive integers beginning with 1. The largest rank value is the number of unique values returned by the query. Rank values are not skipped in the event of ties. Rows with equal values for the ranking criteria receive the same rank.

  • As an aggregate function, DENSE_RANK calculates the dense rank of a hypothetical row identified by the arguments of the function with respect to a given sort specification. The arguments of the function must all evaluate to constant expressions within each aggregate group, because they identify a single row within each group. The constant argument expressions and the expressions in the order_by_clause of the aggregate match by position. Therefore, the number of arguments must be the same and types must be compatible.
  • As an analytic function, DENSE_RANK computes the rank of each row returned from a query with respect to the other rows, based on the values of the value_exprs in the order_by_clause.

Aggregate Example

The following example computes the ranking of a hypothetical employee with the salary $15,500 and a commission of 5% in the sample table oe.employees:

SELECT DENSE_RANK(15500, .05) WITHIN GROUP
   (ORDER BY salary DESC, commission_pct) "Dense Rank"
   FROM employees;

         Dense Rank
-------------------
                  3

Analytic Example

The following statement selects the department name, employee name, and salary of all employees who work in the HUMAN RESOURCES or PURCHASING department, and then computes a rank for each unique salary in each of the two departments. The salaries that are equal receive the same rank. Compare this example with the example for RANK .

SELECT d.department_name, e.last_name, e.salary, DENSE_RANK()
   OVER (PARTITION BY e.department_id ORDER BY e.salary) as drank
   FROM employees e, departments d
   WHERE e.department_id = d.department_id
   AND d.department_id IN ('30', '40');

DEPARTMENT_NAME         LAST_NAME              SALARY      DRANK
----------------------- ------------------ ---------- ----------
Purchasing              Colmenares               2500          1
Purchasing              Himuro                   2600          2
Purchasing              Tobias                   2800          3
Purchasing              Baida                    2900          4
Purchasing              Khoo                     3100          5
Purchasing              Raphaely                11000          6
Human Resources         Marvis                   6500
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 36 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DEPTH

Syntax

depth::=

Text description of functions171b.gif follows
Text description of depth

Purpose

DEPTH is an ancillary function used only with the UNDER_PATH and EQUALS_PATH conditions. It returns the number of levels in the path specified by the UNDER_PATH condition with the same correlation variable.

The correlation_integer can be any integer. Use it to correlate this ancillary function with its primary condition if the statement contains multiple primary conditions. Values less than 1 are treated as 1.

See Also:
  • EQUALS_PATH , UNDER_PATH
  • the related function PATH

Examples

The EQUALS_PATH and UNDER_PATH conditions can take two ancillary functions, one of which is DEPTH. The following example shows the use of both ancillary functions. The example assumes the existence of the XMLSchema warehouses.xsd (created in "Using XML in SQL Statements" ).

SELECT PATH(1), DEPTH(2)
   FROM RESOURCE_VIEW
   WHERE UNDER_PATH(res, '/sys/schemas/OE', 1)=1
     AND UNDER_PATH(res, '/sys/schemas/OE', 2)=1;

PATH(1)                          DEPTH(2)
-------------------------------- --------
/www.oracle.com                         1

/www.oracle.com/xwarehouses.xsd         2
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 37 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DEREF

Syntax

deref::=

Text description of functions92.gif follows
Text description of deref

Purpose

DEREF returns the object reference of argument expr, where expr must return a REF to an object. If you do not use this function in a query, then Oracle returns the object ID of the REF instead, as shown in the example that follows.

See Also:

MAKE_REF

Examples

The sample schema oe contains an object type cust_address_typ (its creation is duplicated in the example that follows). The following example creates a table of cust_address_typ_new, and another table with one column that is a REF to cust_address_typ:

CREATE TYPE cust_address_typ_new AS OBJECT
    ( street_address     VARCHAR2(40)
    , postal_code        VARCHAR2(10)
    , city               VARCHAR2(30)
    , state_province     VARCHAR2(10)
    , country_id         CHAR(2)
    );
/
CREATE TABLE address_table OF cust_address_typ_new;

CREATE TABLE customer_addresses (
   add_id NUMBER,
   address REF cust_address_typ_new
   SCOPE IS address_table);

INSERT INTO address_table VALUES
   ('1 First', 'G45 EU8', 'Paris', 'CA', 'US');

INSERT INTO customer_addresses
  SELECT 999, REF(a) FROM address_table a;

SELECT address FROM customer_addresses;

ADDRESS
--------------------------------------------------------------------------------
000022020876B2245DBE325C5FE03400400B40DCB176B2245DBE305C5FE03400400B40DCB1

SELECT DEREF(address) FROM customer_addresses;

DEREF(ADDRESS)(STREET_ADDRESS, POSTAL_CODE, CITY, STATE_PROVINCE, COUNTRY_ID)
--------------------------------------------------------------------------------
CUST_ADDRESS_TYP('1 First', 'G45 EU8', 'Paris', 'CA', 'US')
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 38 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DUMP

Syntax

dump::=

Text description of functions98.gif follows
Text description of dump

Purpose

DUMP returns a VARCHAR2 value containing the datatype code, length in bytes, and internal representation of expr. The returned result is always in the database character set. For the datatype corresponding to each code, see Table 2-1 .

The argument return_fmt specifies the format of the return value and can have any of the following values:

  • 8 returns result in octal notation.
  • 10 returns result in decimal notation.
  • 16 returns result in hexadecimal notation.
  • 17 returns result as single characters.

By default, the return value contains no character set information. To retrieve the character set name of expr, specify any of the preceding format values, plus 1000. For example, a return_fmt of 1008 returns the result in octal, plus provides the character set name of expr.

The arguments start_position and length combine to determine which portion of the internal representation to return. The default is to return the entire internal representation in decimal notation.

If expr is null, then this function returns a null.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following examples show how to extract dump information from a string expression and a column:

SELECT DUMP('abc', 1016)
   FROM DUAL;

DUMP('ABC',1016)
------------------------------------------
Typ=96 Len=3 CharacterSet=WE8DEC: 61,62,63

SELECT DUMP(last_name, 8, 3, 2) "OCTAL"
   FROM employees
   WHERE last_name = 'Hunold';

OCTAL
-------------------------------------------------------------------
Typ=1 Len=6: 156,157

SELECT DUMP(last_name, 10, 3, 2) "ASCII"
   FROM employees
   WHERE last_name = 'Hunold';

ASCII
--------------------------------------------------------------------
Typ=1 Len=6: 110,111
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 39 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EMPTY_BLOB, EMPTY_CLOB

Syntax

empty_LOB::=

Text description of functions101.gif follows
Text description of empty_LOB

Purpose

EMPTY_BLOB and EMPTY_CLOB return an empty LOB locator that can be used to initialize a LOB variable or, in an INSERT or UPDATE statement, to initialize a LOB column or attribute to EMPTY. EMPTY means that the LOB is initialized, but not populated with data.

Restriction on LOB Locators

You cannot use the locator returned from this function as a parameter to the DBMS_LOB package or the OCI.

Examples

The following example initializes the ad_photo column of the sample pm.print_media table to EMPTY:

UPDATE print_media SET ad_photo = EMPTY_BLOB();
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 40 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXISTSNODE

Syntax

existsnode::=

Text description of existsnode.gif follows
Text description of existsnode

Purpose

EXISTSNODE determines whether traversal of the document using the path results in any nodes. It takes as arguments the XMLType instance containing an XML document and a VARCHAR2 XPath string designating a path. The optional namespace_string must resolve to a VARCHAR2 value that specifies a default mapping or namespace mapping for prefixes, which Oracle uses when evaluating the XPath expression(s).

The return value is NUMBER:

  • 0 if no nodes remain after applying the XPath traversal on the document
  • 1 if any nodes remain

Examples

The following example tests for the existence of the /Warehouse/Dock node in the XML path of the warehouse_spec column of the sample table oe.warehouses:

SELECT warehouse_id, warehouse_name
   FROM warehouses
   WHERE EXISTSNODE(warehouse_spec, '/Warehouse/Docks') = 1;

WAREHOUSE_ID WAREHOUSE_NAME
------------ -----------------------------------
           1 Southlake, Texas
           2 San Francisco
           4 Seattle, Washington
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 41 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXP

Syntax

exp::=

Text description of functions148.gif follows
Text description of exp

Purpose

EXP returns e raised to the nth power, where e = 2.71828183 ...

Examples

The following example returns e to the 4th power:

SELECT EXP(4) "e to the 4th power" FROM DUAL;

e to the 4th power
------------------
          54.59815
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 42 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXTRACT (datetime)

Syntax

extract_datetime::=

Text description of functions110.gif follows
Text description of extract_datetime

Purpose

EXTRACT extracts and returns the value of a specified datetime field from a datetime or interval value expression. When you extract a TIMEZONE_REGION or TIMEZONE_ABBR (abbreviation), the value returned is a string containing the appropriate time zone name or abbreviation. When you extract any of the other values, the value returned is in the Gregorian calendar. When extracting from a datetime with a time zone value, the value returned is in UTC. For a listing of time zone names and their corresponding abbreviations, query the V$TIMEZONE_NAMES dynamic performance view.

Some combinations of datetime field and datetime or interval value expression result in ambiguity. In these cases, Oracle returns 'UNKNOWN' (see the examples that follow for additional information).

Note:

The field you are extracting must be a field of the datetime_value_expr or interval_value_expr. For example, you can extract only YEAR, MONTH, and DAY from a DATE value. Likewise, you can extract TIMEZONE_HOUR and TIMEZONE_MINUTE only from the TIMESTAMP WITH TIME ZONE datatype.
See Also:
  • "Datetime/Interval Arithmetic" for a description of datetime_value_expr and interval_value_expr
  • Oracle9i Database Reference for information on the dynamic performance views

Examples

The following example returns the year 1998.

SELECT EXTRACT(YEAR FROM DATE '1998-03-07') FROM DUAL;

EXTRACT(YEARFROMDATE'1998-03-07')
---------------------------------
                             1998

The following example selects from the sample table hr.employees all employees who were hired after 1998:

SELECT last_name, employee_id, hire_date
   FROM employees
   WHERE EXTRACT(YEAR FROM
   TO_DATE(hire_date, 'DD-MON-RR')) > 1998
   ORDER BY hire_date;

LAST_NAME                 EMPLOYEE_ID HIRE_DATE
------------------------- ----------- ---------
Landry                            127 14-JAN-99
Lorentz                           107 07-FEB-99
Cabrio                            187 07-FEB-99
.
.
.

The following example results in ambiguity, so Oracle returns 'UNKNOWN':

SELECT EXTRACT(TIMEZONE_REGION
      FROM TIMESTAMP '1999-01-01 10:00:00 -08:00')
   FROM DUAL;

EXTRACT(TIMEZONE_REGIONFROMTIMESTAMP'1999-01-0110:00:00-08:00')
----------------------------------------------------------------
UNKNOWN

The ambiguity arises because the time zone numerical offset is provided in the expression, and that numerical offset may map to more than one time zone region.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 43 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXTRACT (XML)

Syntax

extract_xml::=

Text description of functions145.gif follows
Text description of extract_xml

Purpose

EXTRACT (XML) is similar to the EXISTSNODE function. It applies a VARCHAR2 XPath string and returns an XMLType instance containing an XML fragment. The optional namespace_string must resolve to a VARCHAR2 value that specifies a default mapping or namespace mapping for prefixes, which Oracle uses when evaluating the XPath expression(s).

Examples

The following example extracts the value of the /Warehouse/Dock node of the XML path of the warehouse_spec column in the sample table oe.warehouses:

SELECT warehouse_name, EXTRACT(warehouse_spec, '/Warehouse/Docks')
   "Number of Docks"
   FROM warehouses
   WHERE warehouse_spec IS NOT NULL;

WAREHOUSE_NAME       Number of Docks
-------------------- --------------------
Southlake, Texas          <Docks>2</Docks>
San Francisco             <Docks>1</Docks>
New Jersey                <Docks/>
Seattle, Washington       <Docks>3</Docks>

Compare this example with the example for EXTRACTVALUE , which returns the scalar value of the XML fragment.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 44 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXTRACTVALUE

Syntax

extractvalue::=

Text description of functions7.gif follows
Text description of extractvalue

The EXTRACTVALUE function takes as arguments an XMLType instance and an XPath expression and returns a scalar value of the resultant node. The result must be a single node and be either a text node, attribute, or element. If the result is an element, the element must have a single text node as its child, and it is this value that the function returns. If the specified XPath points to a node with more than one child, or if the node pointed to has a non-text node child, Oracle returns an error. The optional namespace_string must resolve to a VARCHAR2 value that specifies a default mapping or namespace mapping for prefixes, which Oracle uses when evaluating the XPath expression(s).

For documents based on XML schemas, if Oracle can infer the type of the return value, then a scalar value of the appropriate type is returned. Otherwise, the result is of type VARCHAR2. For documents that are not based on XML schemas, the return type is always VARCHAR2.

Examples

The following example takes as input the same arguments as the example for EXTRACT (XML) . Instead of returning an XML fragment, as does the EXTRACT function, it returns the scalar value of the XML fragment:

SELECT warehouse_name,
   EXTRACTVALUE(e.warehouse_spec, '/Warehouse/Docks')
   "Docks"
   FROM warehouses e
   WHERE warehouse_spec IS NOT NULL;

WAREHOUSE_NAME       Docks
-------------------- ------------
Southlake, Texas     2
San Francisco        1
New Jersey
Seattle, Washington  3
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 45 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FIRST

Syntax

first::=

Text description of functions97.gif follows
Text description of first

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions of the ORDER BY clause and OVER clause

Purpose

FIRST and LAST are very similar functions. Both are aggregate and analytic functions that operate on a set of values from a set of rows that rank as the FIRST or LAST with respect to a given sorting specification. If only one row ranks as FIRST or LAST, the aggregate operates on the set with only one element.

When you need a value from the first or last row of a sorted group, but the needed value is not the sort key, the FIRST and LAST functions eliminate the need for self joins or views and enable better performance.

  • The aggregate_function is any one of the MIN, MAX, SUM, AVG, COUNT, VARIANCE, or STDDEV functions. It operates on values from the rows that rank either FIRST or LAST. If only one row ranks as FIRST or LAST, the aggregate operates on a singleton (nonaggregate) set.
  • DENSE_RANK FIRST or DENSE_RANK LAST indicates that Oracle will aggregate over only those rows with the minimum (FIRST) or the maximum (LAST) dense rank ("olympic rank").

You can use the FIRST and LAST functions as analytic functions by specifying the OVER clause. The query_partitioning_clause is the only part of the OVER clause valid with these functions.

Aggregate Example

The following example returns, within each department of the sample table hr.employees, the minimum salary among the employees who make the lowest commission and the maximum salary among the employees who make the highest commission:

SELECT department_id,
MIN(salary) KEEP (DENSE_RANK FIRST ORDER BY commission_pct) "Worst",
MAX(salary) KEEP (DENSE_RANK LAST ORDER BY commission_pct) "Best"
   FROM employees
   GROUP BY department_id;

DEPARTMENT_ID      Worst       Best
------------- ---------- ----------
           10       4400       4400
           20       6000      13000
           30       2500      11000
           40       6500       6500
           50       2100       8200
           60       4200       9000
           70      10000      10000
           80       6100      14000
           90      17000      24000
          100       6900      12000
          110       8300      12000
                    7000       7000

Analytic Example

The next example makes the same calculation as the previous example but returns the result for each employee within the department:

SELECT last_name, department_id, salary,
   MIN(salary) KEEP (DENSE_RANK FIRST ORDER BY commission_pct)
      OVER (PARTITION BY department_id) "Worst",
   MAX(salary) KEEP (DENSE_RANK LAST ORDER BY commission_pct)
      OVER (PARTITION BY department_id) "Best"
    FROM employees
    ORDER BY department_id, salary;

LAST_NAME           DEPARTMENT_ID     SALARY      Worst       Best
------------------- ------------- ---------- ---------- ----------
Whalen                         10       4400       4400       4400
Fay                            20       6000       6000      13000
Hartstein                      20      13000       6000      13000
.
.
.
Gietz                         110       8300       8300      12000
Higgins                       110      12000       8300      12000
Grant                                   7000       7000       7000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 46 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FIRST_VALUE

Syntax

first_value::=

Text description of functions95.gif follows
Text description of first_value

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

FIRST_VALUE is an analytic function. It returns the first value in an ordered set of values.

You cannot use FIRST_VALUE or any other analytic function for expr. That is, you can use other built-in function expressions for expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

The following example selects, for each employee in Department 90, the name of the employee with the lowest salary.

SELECT departmeent_id, last_name, salary, FIRST_VALUE(last_name)
  OVER (ORDER BY salary ASC ROWS UNBOUNDED PRECEDING) AS lowest_sal
  FROM (SELECT * FROM employees WHERE department_id = 90
    ORDER BY employee_id);

DEPARTMENT_ID LAST_NAME         SALARY LOWEST_SAL
------------- ------------- ---------- -------------------------
           90 Kochhar            17000 Kochhar
           90 De Haan            17000 Kochhar
           90 King               24000 Kochhar

The example illustrates the nondeterministic nature of the FIRST_VALUE function. Kochhar and DeHaan have the same salary, so are in adjacent rows. Kochhar appears first because the rows returned by the subquery are ordered by employee_id. However, if the rows returned by the subquery are ordered by employee_id in descending order, as in the next example, then the function returns a different value:

SELECT department_id, last_name, salary, FIRST_VALUE(last_name)
  OVER (ORDER BY salary ASC ROWS UNBOUNDED PRECEDING) as fv
    FROM (SELECT * FROM employees WHERE department_id = 90
      ORDER by employee_id DESC);

DEPARTMENT_ID LAST_NAME         SALARY FV
------------- ------------- ---------- -------------------------
           90 De Haan            17000 De Haan
           90 Kochhar            17000 De Haan
           90 King               24000 De Haan

The following example shows how to make the FIRST_VALUE function deterministic by ordering on a unique key.

SELECT department_id, last_name, salary, hire_date,
   FIRST_VALUE(last_name) OVER
   (ORDER BY salary ASC, hire_date ROWS UNBOUNDED PRECEDING) AS fv
   FROM (SELECT * FROM employees
   WHERE department_id = 90 ORDER BY employee_id DESC);

DEPARTMENT_ID LAST_NAME         SALARY HIRE_DATE FV
------------- ------------- ---------- --------- ---------------
           90 Kochhar            17000 21-SEP-89 Kochhar
           90 De Haan            17000 13-JAN-93 Kochhar
           90 King               24000 17-JUN-87 Kochhar
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 47 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FLOOR

Syntax

floor::=

Text description of functions104.gif follows
Text description of floor

Purpose

FLOOR returns largest integer equal to or less than n.

Examples

The following example returns the largest integer equal to or less than 15.7:

SELECT FLOOR(15.7) "Floor" FROM DUAL;

     Floor
----------
        15
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 48 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FROM_TZ

Syntax

from_tz::=

Text description of functions53.gif follows
Text description of from_tz

Purpose

FROM_TZ converts a timestamp value at a time zone to a TIMESTAMP WITH TIME ZONE value. time_zone_value is a character string in the format 'TZH:TZM' or a character expression that returns a string in TZR with optional TZD format.

Examples

The following example returns a timestamp value to TIMESTAMP WITH TIME ZONE:

SELECT FROM_TZ(TIMESTAMP '2000-03-28 08:00:00', '3:00')
   FROM DUAL;

FROM_TZ(TIMESTAMP'2000-03-2808:00:00','3:00')
---------------------------------------------------------------
28-MAR-00 08.00.00 AM +03:00
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 49 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GREATEST

Syntax

greatest::=

Text description of functions107.gif follows
Text description of greatest

Purpose

GREATEST returns the greatest of the list of exprs. All exprs after the first are implicitly converted to the datatype of the first expr before the comparison. Oracle compares the exprs using nonpadded comparison semantics. Character comparison is based on the value of the character in the database character set. One character is greater than another if it has a higher character set value. If the value returned by this function is character data, then its datatype is always VARCHAR2.

See Also:

"Datatype Comparison Rules"

Examples

The following statement selects the string with the greatest value:

SELECT GREATEST ('HARRY', 'HARRIOT', 'HAROLD')
   "Greatest" FROM DUAL;

Greatest
--------
HARRY
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 50 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GROUP_ID

Syntax

group_id::=

Text description of functions38.gif follows
Text description of group_id

Purpose

GROUP_ID distinguishes duplicate groups resulting from a GROUP BY specification. It is therefore useful in filtering out duplicate groupings from the query result. It returns an Oracle NUMBER to uniquely identify duplicate groups. This function is applicable only in a SELECT statement that contains a GROUP BY clause.

If n duplicates exist for a particular grouping, then GROUP_ID returns numbers in the range 0 to n-1.

Examples

The following example assigns the value "1" to the duplicate co.country_region grouping from a query on the sample tables sh.countries and sh.sales:

SELECT co.country_region, co.country_subregion,
   SUM(s.amount_sold) "Revenue",
   GROUP_ID() g
FROM sales s, customers c, countries co
WHERE s.cust_id = c.cust_id AND
   c.country_id = co.country_id AND
   s.time_id = '1-JAN-00' AND
   co.country_region IN ('Americas', 'Europe')
GROUP BY co.country_region,
   ROLLUP (co.country_region, co.country_subregion);

COUNTRY_REGION       COUNTRY_SUBREGION       Revenue          G
-------------------- -------------------- ---------- ----------
Americas             Northern America         220844          0
Americas             Southern America          10872          0
Europe               Eastern Europe            12751          0
Europe               Western Europe           558686          0
Americas                                      231716          0
Europe                                        571437          0
Americas                                      231716          1
Europe                                        571437          1

You could add the following HAVING clause to the end of the statement to ensure that only rows with GROUP_ID < 1 are returned:

HAVING GROUP_ID() < 1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 51 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GROUPING

Syntax

grouping::=

Text description of functions113.gif follows
Text description of grouping

Purpose

GROUPING distinguishes superaggregate rows from regular grouped rows. GROUP BY extensions such as ROLLUP and CUBE produce superaggregate rows where the set of all values is represented by null. Using the GROUPING function, you can distinguish a null representing the set of all values in a superaggregate row from a null in a regular row.

The expr in the GROUPING function must match one of the expressions in the GROUP BY clause. The function returns a value of 1 if the value of expr in the row is a null representing the set of all values. Otherwise, it returns zero. The datatype of the value returned by the GROUPING function is Oracle NUMBER.

See Also:

group_by_clause of the SELECT statement for a discussion of these terms

Examples

In the following example, which uses the sample tables hr.departments and hr.employees, if the GROUPING function returns 1 (indicating a superaggregate row rather than a regular row from the table), then the string "All Jobs" appears in the "JOB" column instead of the null that would otherwise appear:

SELECT DECODE(GROUPING(department_name), 1, 'All Departments',
   department_name) AS department,
   DECODE(GROUPING(job_id), 1, 'All Jobs', job_id) AS job,
   COUNT(*) "Total Empl", AVG(salary) * 12 "Average Sal"
   FROM employees e, departments d
   WHERE d.department_id = e.department_id
   GROUP BY ROLLUP (department_name, job_id);

DEPARTMENT                     JOB        Total Empl Average Sal
------------------------------ ---------- ---------- -----------
Accounting                     AC_ACCOUNT          1       99600
Accounting                     AC_MGR              1      144000
Accounting                     All Jobs            2      121800
Administration                 AD_ASST             1       52800
Administration                 All Jobs            1       52800
Executive                      AD_PRES             1      288000
Executive                      AD_VP               2      204000
Executive                      All Jobs            3      232000
Finance                        FI_ACCOUNT          5       95040
Finance                        FI_MGR              1      144000
Finance                        All Jobs            6      103200
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 52 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GROUPING_ID

Syntax

grouping_id::=

Text description of functions35.gif follows
Text description of grouping_id

Purpose

GROUPING_ID returns a number corresponding to the GROUPING bit vector associated with a row. GROUPING_ID is applicable only in a SELECT statement that contains a GROUP BY extension, such as ROLLUP or CUBE, and a GROUPING function. In queries with many GROUP BY expressions, determining the GROUP BY level of a particular row requires many GROUPING functions, which leads to cumbersome SQL. GROUPING_ID is useful in these cases.

GROUPING_ID is functionally equivalent to taking the results of multiple GROUPING functions and concatenating them into a bit vector (a string of ones and zeros). By using GROUPING_ID you can avoid the need for multiple GROUPING functions and make row filtering conditions easier to express. Row filtering is easier with GROUPING_ID because the desired rows can be identified with a single condition of GROUPING_ID = n. The function is especially useful when storing multiple levels of aggregation in a single table.

Examples

The following example shows how to extract grouping IDs from a query of the sample table sh.sales:

SELECT channel_id, promo_id, sum(amount_sold) s_sales,
   GROUPING(channel_id) gc,
   GROUPING(promo_id) gp,
   GROUPING_ID(channel_id, promo_id) gcp,
   GROUPING_ID(promo_id, channel_id) gpc
   FROM sales
   WHERE promo_id > 496
   GROUP BY CUBE(channel_id, promo_id);

C   PROMO_ID    S_SALES         GC         GP        GCP        GPC
- ---------- ---------- ---------- ---------- ---------- ----------
C        497   26094.35          0          0          0          0
C        498    22272.4          0          0          0          0
C        499    19616.8          0          0          0          0
C       9999   87781668          0          0          0          0
C            87849651.6          0          1          1          2
I        497    50325.8          0          0          0          0
I        498    52215.4          0          0          0          0
I        499   58445.85          0          0          0          0
I       9999  169497409          0          0          0          0
I             169658396          0          1          1          2
P        497   31141.75          0          0          0          0
P        498    46942.8          0          0          0          0
P        499      24156          0          0          0          0
P       9999   70890248          0          0          0          0
P            70992488.6          0          1          1          2
S        497  110629.75          0          0          0          0
S        498   82937.25          0          0          0          0
S        499   80999.15          0          0          0          0
S       9999  267205791          0          0          0          0
S             267480357          0          1          1          2
T        497     8319.6          0          0          0          0
T        498    5347.65          0          0          0          0
T        499      19781          0          0          0          0
T       9999   28095689          0          0          0          0
T            28129137.3          0          1          1          2
         497  226511.25          1          0          2          1
         498   209715.5          1          0          2          1
         499   202998.8          1          0          2          1
        9999  623470805          1          0          2          1
              624110031          1          1          3          3
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 53 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HEXTORAW

Syntax

hextoraw::=

Text description of functions116.gif follows
Text description of hextoraw

Purpose

HEXTORAW converts char containing hexadecimal digits in the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 character set to a raw value.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example creates a simple table with a raw column, and inserts a hexadecimal value that has been converted to RAW:

CREATE TABLE test (raw_col RAW(10));

INSERT INTO test VALUES (HEXTORAW('7D'));
See Also:

"RAW and LONG RAW Datatypes" and RAWTOHEX

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 54 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INITCAP

Syntax

initcap::=

Text description of functions119.gif follows
Text description of initcap

Purpose

INITCAP returns char, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric.

char can be of any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The return value is the same datatype as char.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example capitalizes each word in the string:

SELECT INITCAP('the soap') "Capitals" FROM DUAL;

Capitals
---------
The Soap
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 55 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INSTR

Syntax

instr::=

Text description of functions122.gif follows
Text description of instr

Purpose

The "in string" functions search string for substring. The function returns an integer indicating the position of the character in string that is the first character of this occurrence. INSTR calculates strings using characters as defined by the input character set. INSTRB uses bytes instead of characters. INSTRC uses Unicode complete characters. INSTR2 uses UCS2 codepoints. INSTR4 uses UCS4 codepoints.

  • position is an nonzero integer indicating the character of string where Oracle begins the search. If position is negative, then Oracle counts and searches backward from the end of string.
  • occurrence is an integer indicating which occurrence of string Oracle should search for. The value of occurrence must be positive.

Both string and substring can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The value returned is of NUMBER datatype.

The default values of both position and occurrence are 1, meaning Oracle begins searching at the first character of string for the first occurrence of substring. The return value is relative to the beginning of string, regardless of the value of position, and is expressed in characters. If the search is unsuccessful (if substring does not appear occurrence times after the position character of string), then the return value is 0.

Examples

The following example searches the string "CORPORATE FLOOR", beginning with the third character, for the string "OR". It returns the position in CORPORATE FLOOR at which the second occurrence of "OR" begins:

SELECT INSTR('CORPORATE FLOOR','OR', 3, 2)
  "Instring" FROM DUAL;

  Instring
----------
        14

In the next example, Oracle counts backward from the last character to the third character from the end, which is the first "O" in "FLOOR". Oracle then searches backward for the second occurrence of OR, and finds that this second occurrence begins with the second character in the search string :

SELECT INSTR('CORPORATE FLOOR','OR', -3, 2)
"Reversed Instring"
     FROM DUAL;

Reversed Instring
-----------------
               2

This example assumes a double-byte database character set.

SELECT INSTRB('CORPORATE FLOOR','OR',5,2) "Instring in bytes"
   FROM DUAL;

Instring in bytes
-----------------
               27
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 56 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LAG

Syntax

lag::=

Text description of functions125.gif follows
Text description of lag

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

LAG is an analytic function. It provides access to more than one row of a table at the same time without a self join. Given a series of rows returned from a query and a position of the cursor, LAG provides access to a row at a given physical offset prior to that position.

If you do not specify offset, then its default is 1. The optional default value is returned if the offset goes beyond the scope of the window. If you do not specify default, then its default value is null.

You cannot use LAG or any other analytic function for value_expr. That is, you can use other built-in function expressions for value_expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

The following example provides, for each salesperson in the employees table, the salary of the employee hired just before:

SELECT last_name, hire_date, salary,
   LAG(salary, 1, 0) OVER (ORDER BY hire_date) AS prev_sal
   FROM employees
   WHERE job_id = 'PU_CLERK';

LAST_NAME                 HIRE_DATE     SALARY   PREV_SAL
------------------------- --------- ---------- ----------
Khoo                      18-MAY-95       3100          0
Tobias                    24-JUL-97       2800       3100
Baida                     24-DEC-97       2900       2800
Himuro                    15-NOV-98       2600       2900
Colmenares                10-AUG-99       2500       2600
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 63 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LN

Syntax

ln::=

Text description of functions152.gif follows
Text description of ln

Purpose

LN returns the natural logarithm of n, where n is greater than 0.

Examples

The following example returns the natural logarithm of 95:

SELECT LN(95) "Natural log of 95" FROM DUAL;

Natural log of 95
-----------------

4.55387689

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 57 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LAST

Syntax

last::=

Text description of functions94.gif follows
Text description of last

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions of the query_partitioning_clause

Purpose

FIRST and LAST are very similar functions. Both are aggregate and analytic functions that operate on a set of values from a set of rows that rank as the FIRST or LAST with respect to a given sorting specification. If only one row ranks as FIRST or LAST, the aggregate operates on the set with only one element.

When you need a value from the first or last row of a sorted group, but the needed value is not the sort key, the FIRST and LAST functions eliminate the need for self joins or views and enable better performance.

  • The aggregate_function is any one of the MIN, MAX, SUM, AVG, COUNT, VARIANCE, or STDDEV functions. It operates on values from the rows that rank either FIRST or LAST. If only one row ranks as FIRST or LAST, the aggregate operates on a singleton (nonaggregate) set.
  • DENSE_RANK FIRST or DENSE_RANK LAST indicates that Oracle will aggregate over only those rows with the minimum (FIRST) or the maximum (LAST) dense rank ("olympic rank").

You can use the FIRST and LAST functions as analytic functions by specifying the OVER clause. The query_partitioning_clause is the only part of the OVER clause valid with these functions.

Aggregate Example

The following example returns, within each department of the sample table hr.employees, the minimum salary among the employees who make the lowest commission and the maximum salary among the employees who make the highest commission:

SELECT department_id,
MIN(salary) KEEP (DENSE_RANK FIRST ORDER BY commission_pct) "Worst",
MAX(salary) KEEP (DENSE_RANK LAST ORDER BY commission_pct) "Best"
   FROM employees
   GROUP BY department_id;

DEPARTMENT_ID      Worst       Best
------------- ---------- ----------
           10       4400       4400
           20       6000      13000
           30       2500      11000
           40       6500       6500
           50       2100       8200
           60       4200       9000
           70      10000      10000
           80       6100      14000
           90      17000      24000
          100       6900      12000
          110       8300      12000
                    7000       7000

Analytic Example

The next example makes the same calculation as the previous example but returns the result for each employee within the department:

SELECT last_name, department_id, salary,
   MIN(salary) KEEP (DENSE_RANK FIRST ORDER BY commission_pct)
      OVER (PARTITION BY department_id) "Worst",
   MAX(salary) KEEP (DENSE_RANK LAST ORDER BY commission_pct)
      OVER (PARTITION BY department_id) "Best"
    FROM employees
    ORDER BY department_id, salary;

LAST_NAME           DEPARTMENT_ID     SALARY      Worst       Best
------------------- ------------- ---------- ---------- ----------
Whalen                         10       4400       4400       4400
Fay                            20       6000       6000      13000
Hartstein                      20      13000       6000      13000
.
.
.
Gietz                         110       8300       8300      12000
Higgins                       110      12000       8300      12000
Grant                                   7000       7000       7000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Functions, 58 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LAST_DAY

Syntax

last_day::=

Text description of functions140.gif follows
Text description of last_day

Purpose

LAST_DAY returns the date of the last day of the month that contains date.

Examples

The following statement determines how many days are left in the current month.

SELECT SYSDATE,
   LAST_DAY(SYSDATE) "Last",
   LAST_DAY(SYSDATE) - SYSDATE "Days Left"
   FROM DUAL;

SYSDATE   Last       Days Left
--------- --------- ----------
30-MAY-01 31-MAY-01          1

The following example adds 5 months to the hire date of each employee to give an evaluation date:

SELECT last_name, hire_date, TO_CHAR(
   ADD_MONTHS(LAST_DAY(hire_date), 5)) "Eval Date"
   FROM employees;

LAST_NAME                 HIRE_DATE Eval Date
------------------------- --------- ---------
King                      17-JUN-87 30-NOV-87
Kochhar                   21-SEP-89 28-FEB-90
De Haan                   13-JAN-93 30-JUN-93
Hunold                    03-JAN-90 30-JUN-90
Ernst                     21-MAY-91 31-OCT-91
Austin                    25-JUN-97 30-NOV-97
Pataballa                 05-FEB-98 31-JUL-98
Lorentz                   07-FEB-99 31-JUL-99
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 59 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LAST_VALUE

Syntax

last_value::=

Text description of functions128.gif follows
Text description of last_value

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

LAST_VALUE is an analytic function. It returns the last value in an ordered set of values.

You cannot use LAST_VALUE or any other analytic function for expr. That is, you can use other built-in function expressions for expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

The following example returns, for each row, the hire date of the employee earning the highest salary.

SELECT last_name, salary, hire_date, LAST_VALUE(hire_date) OVER
   (ORDER BY salary
   ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS lv
FROM (SELECT * FROM employees WHERE department_id = 90
   ORDER BY hire_date);

LAST_NAME                     SALARY HIRE_DATE LV
------------------------- ---------- --------- ---------
Kochhar                        17000 21-SEP-89 17-JUN-87
De Haan                        17000 13-JAN-93 17-JUN-87
King                           24000 17-JUN-87 17-JUN-87

This example illustrates the nondeterministic nature of the LAST_VALUE function. Kochhar and De Haan have the same salary, so they are in adjacent rows. Kochhar appears first because the rows in the subquery are ordered by hire_date. However, if the rows are ordered by hire_date in descending order, as in the next example, then the function returns a different value:

SELECT last_name, salary, hire_date, LAST_VALUE(hire_date) OVER
   (ORDER BY salary
   ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS lv
FROM (SELECT * FROM employees WHERE department_id = 90
   ORDER BY hire_date DESC);

LAST_NAME                     SALARY HIRE_DATE LV
------------------------- ---------- --------- ---------
De Haan                        17000 13-JAN-93 17-JUN-87
Kochhar                        17000 21-SEP-89 17-JUN-87
King                           24000 17-JUN-87 17-JUN-87

The following two examples show how to make the LAST_VALUE function deterministic by ordering on a unique key. By ordering within the function by both salary and hire_date, you can ensure the same result regardless of the ordering in the subquery.

SELECT last_name, salary, hire_date, LAST_VALUE(hire_date) OVER
(ORDER BY salary, hire_date
  ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS lv
FROM (SELECT * FROM employees WHERE department_id = 90
   ORDER BY hire_date);

LAST_NAME                     SALARY HIRE_DATE LV
------------------------- ---------- --------- ---------
Kochhar                        17000 21-SEP-89 17-JUN-87
De Haan                        17000 13-JAN-93 17-JUN-87
King                           24000 17-JUN-87 17-JUN-87

SELECT last_name, salary, hire_date, LAST_VALUE(hire_date) OVER
   (ORDER BY salary, hire_date
   ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS lv
FROM (SELECT * FROM employees WHERE department_id = 90
   ORDER BY hire_date DESC);

LAST_NAME                     SALARY HIRE_DATE LV
------------------------- ---------- --------- ---------
Kochhar                        17000 21-SEP-89 17-JUN-87
De Haan                        17000 13-JAN-93 17-JUN-87
King                           24000 17-JUN-87 17-JUN-87
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 60 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LEAD

Syntax

lead::=

Text description of functions131.gif follows
Text description of lead

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

LEAD is an analytic function. It provides access to more than one row of a table at the same time without a self join. Given a series of rows returned from a query and a position of the cursor, LEAD provides access to a row at a given physical offset beyond that position.

If you do not specify offset, then its default is 1. The optional default value is returned if the offset goes beyond the scope of the table. If you do not specify default, then its default value is null.

You cannot use LEAD or any other analytic function for value_expr. That is, you can use other built-in function expressions for value_expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

The following example provides, for each employee in the employees table, the hire date of the employee hired just after:

SELECT last_name, hire_date,
   LEAD(hire_date, 1) OVER (ORDER BY hire_date) AS "NextHired"
   FROM employees WHERE department_id = 30;

LAST_NAME                 HIRE_DATE NextHired
------------------------- --------- ---------
Raphaely                  07-DEC-94 18-MAY-95
Khoo                      18-MAY-95 24-JUL-97
Tobias                    24-JUL-97 24-DEC-97
Baida                     24-DEC-97 15-NOV-98
Himuro                    15-NOV-98 10-AUG-99
Colmenares                10-AUG-99
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 61 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LEAST

Syntax

least::=

Text description of functions137.gif follows
Text description of least

Purpose

LEAST returns the least of the list of exprs. All exprs after the first are implicitly converted to the datatype of the first expr before the comparison. Oracle compares the exprs using nonpadded comparison semantics. If the value returned by this function is character data, then its datatype is always VARCHAR2.

Examples

The following statement is an example of using the LEAST function:

SELECT LEAST('HARRY','HARRIOT','HAROLD') "LEAST"
     FROM DUAL;

LEAST
------
HAROLD
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 62 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LENGTH

Syntax

length::=

Text description of functions143.gif follows
Text description of length

Purpose

The "length" functions return the length of char. LENGTH calculates length using characters as defined by the input character set. LENGTHB uses bytes instead of characters. LENGTHC uses Unicode complete characters. LENGTH2 uses UCS2 codepoints. LENGTH4 uses UCS4 codepoints.

char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is of datatype NUMBER. If char has datatype CHAR, then the length includes all trailing blanks. If char is null, then this function returns null.

Examples

The following example uses the LENGTH function using a single-byte database character set.

SELECT LENGTH('CANDIDE') "Length in characters"
   FROM DUAL;

Length in characters
--------------------
                   7

This example assumes a double-byte database character set.

SELECT LENGTHB ('CANDIDE') "Length in bytes"
   FROM DUAL;

Length in bytes
---------------
             14
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 64 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOCALTIMESTAMP

Syntax

localtimestamp::=

Text description of functions56.gif follows
Text description of localtimestamp

Purpose

LOCALTIMESTAMP returns the current date and time in the session time zone in a value of datatype TIMESTAMP. The difference between this function and CURRENT_TIMESTAMP is that LOCALTIMESTAMP returns a TIMESTAMP value while CURRENT_TIMESTAMP returns a TIMESTAMP WITH TIME ZONE value.

See Also:

CURRENT_TIMESTAMP

Examples

This example illustrates the difference between LOCALTIMESTAMP and CURRENT_TIMESTAMP:

ALTER SESSION SET TIME_ZONE = '-5:00';
SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL;

CURRENT_TIMESTAMP                    LOCALTIMESTAMP
-------------------------------------------------------------------
04-APR-00 01.27.18.999220 PM -05:00  04-APR-00 01.27.19 PM

ALTER SESSION SET TIME_ZONE = '-8:00';
SELECT CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM DUAL;

CURRENT_TIMESTAMP                    LOCALTIMESTAMP
-----------------------------------  ------------------------------
04-APR-00 10.27.45.132474 AM -08:00  04-APR-00 10.27.451 AM

If you use the LOCALTIMESTAMP with a format mask, take care that the format mask matches the value returned by the function. For example, consider the following table:

CREATE TABLE local_test (col1 TIMESTAMP WITH LOCAL TIME ZONE);

The following statement fails because the mask does not include the TIME ZONE portion of the return type of the function:

INSERT INTO local_test VALUES
   (TO_TIMESTAMP(LOCALTIMESTAMP, 'DD-MON-RR HH.MI.SSXFF'));

The following statement uses the correct format mask to match the return type of LOCALTIMESTAMP:

INSERT INTO local_test VALUES
   (TO_TIMESTAMP(LOCALTIMESTAMP, 'DD-MON-RR HH.MI.SSXFF PM'));
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 65 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG

Syntax

log::=

Text description of functions155.gif follows
Text description of log

Purpose

LOG returns the logarithm, base m, of n. The base m can be any positive number other than 0 or 1 and n can be any positive number.

Examples

The following example returns the log of 100:

SELECT LOG(10,100) "Log base 10 of 100" FROM DUAL;

Log base 10 of 100
------------------
                 2
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 66 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOWER

Syntax

lower::=

Text description of functions185.gif follows
Text description of lower

Purpose

LOWER returns char, with all letters lowercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char.

Examples

The following example returns a string in lowercase:

SELECT LOWER('MR. SCOTT MCMILLAN') "Lowercase"
   FROM DUAL;

Lowercase
--------------------
mr. scott mcmillan
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 67 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LPAD

Syntax

lpad::=

Text description of functions146.gif follows
Text description of lpad

Purpose

LPAD returns char1, left-padded to length n with the sequence of characters in char2; char2 defaults to a single blank. If char1 is longer than n, then this function returns the portion of char1 that fits in n.

Both char1 and char2 can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char1.

The argument n is the total length of the return value as it is displayed on your terminal screen. In most character sets, this is also the number of characters in the return value. However, in some multibyte character sets, the display length of a character string can differ from the number of characters in the string.

Examples

The following example left-pads a string with the characters "*" and ".":

SELECT LPAD('Page 1',15,'*.') "LPAD example"
   FROM DUAL;

LPAD example
---------------
*.*.*.*.*Page 1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 68 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LTRIM

Syntax

ltrim::=

Text description of functions164.gif follows
Text description of ltrim

Purpose

LTRIM removes characters from the left of char, with all the leftmost characters that appear in set removed; set defaults to a single blank. If char is a character literal, then you must enclose it in single quotes. Oracle begins scanning char from its first character and removes all characters that appear in set until reaching a character not in set and then returns the result.

Both char and set can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char.

Examples

The following example trims all of the left-most x's and y's from a string:

SELECT LTRIM('xyxXxyLAST WORD','xy') "LTRIM example"
   FROM DUAL;

LTRIM example
------------
XxyLAST WORD
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 69 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAKE_REF

Syntax

make_ref::=

Text description of functions167.gif follows
Text description of make_ref

Purpose

MAKE_REF creates a REF to a row of an object view or a row in an object table whose object identifier is primary key based.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for more information about object views
  • DEREF

Examples

The sample schema oe contains an object view oc_inventories based on inventory_typ. The object identifier is product_id. The following example creates a REF to the row in the oc_inventories object view with a product_id of 3003:

SELECT MAKE_REF (oc_inventories, 3003) FROM DUAL;

MAKE_REF(OC_INVENTORIES,3003)
------------------------------------------------------------------
00004A038A0046857C14617141109EE03408002082543600000014260100010001
00290090606002A00078401FE0000000B03C21F040000000000000000000000000
0000000000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 70 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX

Syntax

max::=

Text description of functions149.gif follows
Text description of max

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

MAX returns maximum value of expr. You can use it as an aggregate or analytic function.

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example determines the highest salary in the hr.employees table:

SELECT MAX(salary) "Maximum" FROM employees;

   Maximum
----------
      24000

Analytic Example

The following example calculates, for each employee, the highest salary of the employees reporting to the same manager as the employee.

SELECT manager_id, last_name, salary,
   MAX(salary) OVER (PARTITION BY manager_id) AS mgr_max
   FROM employees;

MANAGER_ID LAST_NAME                     SALARY    MGR_MAX
---------- ------------------------- ---------- ----------
       100 Kochhar                        17000      17000
       100 De Haan                        17000      17000
       100 Raphaely                       11000      17000
       100 Kaufling                        7900      17000
       100 Fripp                           8200      17000
       100 Weiss                           8000      17000
...

If you enclose this query in the parent query with a predicate, then you can determine the employee who makes the highest salary in each department:

SELECT manager_id, last_name, salary
   FROM (SELECT manager_id, last_name, salary,
      MAX(salary) OVER (PARTITION BY manager_id) AS rmax_sal
      FROM employees) WHERE salary = rmax_sal;

MANAGER_ID LAST_NAME                     SALARY
---------- ------------------------- ----------
       100 Kochhar                        17000
       100 De Haan                        17000
       101 Greenberg                      12000
       101 Higgens                        12000
       102 Hunold                          9000
       103 Ernst                           6000
       108 Faviet                          9000
       114 Khoo                            3100
       120 Nayer                           3200
       120 Taylor                          3200
       121 Sarchand                        4200
       122 Chung                           3800
       123 Bell                            4000
       124 Rajs                            3500
       145 Tucker                         10000
       146 King                           10000
       147 Vishney                        10500
       148 Ozer                           11500
       149 Abel                           11000
       201 Goyal                           6000
       205 Gietz                           8300
           King                           24000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 71 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MIN

Syntax

min::=

Text description of functions158.gif follows
Text description of min

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

MIN returns minimum value of expr. You can use it as an aggregate or analytic function.

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following statement returns the earliest hire date in the hr.employees table:

SELECT MIN(hire_date) "Earliest" FROM employees;

Earliest
---------
17-JUN-87

Analytic Example

The following example determines, for each employee, the employees who were hired on or before the same date as the employee. It then determines the subset of employees reporting to the same manager as the employee, and returns the lowest salary in that subset.

SELECT manager_id, last_name, hire_date, salary,
   MIN(salary) OVER(PARTITION BY manager_id ORDER BY hire_date
   RANGE UNBOUNDED PRECEDING) as p_cmin
   FROM employees;

MANAGER_ID LAST_NAME                 HIRE_DATE     SALARY     P_CMIN
---------- ------------------------- --------- ---------- ----------
       100 Kochhar                   21-SEP-89      17000      17000
       100 De Haan                   13-JAN-93      17000      17000
       100 Raphaely                  07-DEC-94      11000      11000
       100 Kaufling                  01-MAY-95       7900       7900
       100 Hartstein                 17-FEB-96      13000       7900
       100 Weiss                     18-JUL-96       8000       7900
       100 Russell                   01-OCT-96      14000       7900
       100 Partners                  05-JAN-97      13500       7900
       100 Errazuriz                 10-MAR-97      12000       7900
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 72 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MOD

Syntax

mod::=

Text description of functions170.gif follows
Text description of mod

Purpose

MOD returns the remainder of m divided by n. Returns m if n is 0.

Examples

The following example returns the remainder of 11 divided by 4:

SELECT MOD(11,4) "Modulus" FROM DUAL;

   Modulus
----------
         3

This function behaves differently from the classical mathematical modulus function when m is negative. The classical modulus can be expressed using the MOD function with this formula:

m - n * FLOOR(m/n)

The following table illustrates the difference between the MOD function and the classical modulus:

m | n | MOD(m,n) | Classical Modulus
11 | 4 | 3 | 3
11 | -4 | 3 | -1
-11 | 4 | -3 | 1
-11 | -4 | -3 | -3
See Also:

FLOOR

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 73 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MONTHS_BETWEEN

Syntax

months_between::=

Text description of functions179.gif follows
Text description of months_between

Purpose

MONTHS_BETWEEN returns number of months between dates date1 and date2. If date1 is later than date2, then the result is positive. If date1 is earlier than date2, then the result is negative. If date1 and date2 are either the same days of the month or both last days of months, then the result is always an integer. Otherwise Oracle calculates the fractional portion of the result based on a 31-day month and considers the difference in time components date1 and date2.

Examples

The following example calculates the months between two dates:

SELECT MONTHS_BETWEEN
   (TO_DATE('02-02-1995','MM-DD-YYYY'),
    TO_DATE('01-01-1995','MM-DD-YYYY') ) "Months"
    FROM DUAL;

    Months
----------
1.03225806
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 74 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NCHR

Syntax

nchr::=

Text description of functions130.gif follows
Text description of nchr

Purpose

NCHR returns the character having the binary equivalent to number in the national character set. This function is equivalent to using the CHR function with the USING NCHAR_CS clause.

See Also:

CHR

Examples

The following examples return the nchar character 187:

SELECT NCHR(187) FROM DUAL;

NC
--
>

SELECT CHR(187 USING NCHAR_CS) FROM DUAL;

CH
--
>
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 75 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NEW_TIME

Syntax

new_time::=

Text description of functions182.gif follows
Text description of new_time

Purpose

NEW_TIME returns the date and time in time zone zone2 when date and time in time zone zone1 are date. Before using this function, you must set the NLS_DATE_FORMAT parameter to display 24-hour time.

Note:

This function takes as input only a limited number of time zones. You can have access to a much greater number of time zones by combining the FROM_TZ function and the datetime expression. See FROM_TZ and the example for "Datetime Expressions" .

The arguments zone1 and zone2 can be any of these text strings:

  • AST, ADT: Atlantic Standard or Daylight Time
  • BST, BDT: Bering Standard or Daylight Time
  • CST, CDT: Central Standard or Daylight Time
  • EST, EDT: Eastern Standard or Daylight Time
  • GMT: Greenwich Mean Time
  • HST, HDT: Alaska-Hawaii Standard Time or Daylight Time.
  • MST, MDT: Mountain Standard or Daylight Time
  • NST: Newfoundland Standard Time
  • PST, PDT: Pacific Standard or Daylight Time
  • YST, YDT: Yukon Standard or Daylight Time

Examples

The following example returns an Atlantic Standard time, given the Pacific Standard time equivalent:

ALTER SESSION SET NLS_DATE_FORMAT =
   'DD-MON-YYYY HH24:MI:SS';

SELECT NEW_TIME(TO_DATE(
   '11-10-99 01:23:45', 'MM-DD-YY HH24:MI:SS'),
   'AST', 'PST') "New Date and Time" FROM DUAL;

New Date and Time
--------------------
09-NOV-1999 21:23:45
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 76 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NEXT_DAY

Syntax

next_day::=

Text description of functionsa.gif follows
Text description of next_day

Purpose

NEXT_DAY returns the date of the first weekday named by char that is later than the date date. The argument char must be a day of the week in the date language of your session, either the full name or the abbreviation. The minimum number of letters required is the number of letters in the abbreviated version. Any characters immediately following the valid abbreviation are ignored. The return value has the same hours, minutes, and seconds component as the argument date.

Examples

This example returns the date of the next Tuesday after February 2, 2001:

SELECT NEXT_DAY('02-FEB-2001','TUESDAY') "NEXT DAY"
     FROM DUAL;

NEXT DAY
-----------
06-FEB-2001
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 77 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_CHARSET_DECL_LEN

Syntax

nls_charset_decl_len::=

Text description of functions5.gif follows
Text description of nls_charset_decl_len

Purpose

NLS_CHARSET_DECL_LEN returns the declaration width (in number of characters) of an NCHAR column. The byte_count argument is the width of the column. The char_set_id argument is the character set ID of the column.

Examples

The following example returns the number of characters that are in a 200-byte column when you are using a multibyte character set:

SELECT NLS_CHARSET_DECL_LEN
  (200, nls_charset_id('ja16eucfixed'))
   FROM DUAL;

NLS_CHARSET_DECL_LEN(200,NLS_CHARSET_ID('JA16EUCFIXED'))
--------------------------------------------------------
                                                     100
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 78 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_CHARSET_ID

Syntax

nls_charset_id::=

Text description of functions9.gif follows
Text description of nls_charset_id

Purpose

NLS_CHARSET_ID returns the character set ID number corresponding to character set name text. The text argument is a run-time VARCHAR2 value. The text value 'CHAR_CS' returns the database character set ID number of the server. The text value 'NCHAR_CS' returns the national character set ID number of the server.

Invalid character set names return null.

Examples

The following example returns the character set ID of a character set:

SELECT NLS_CHARSET_ID('ja16euc')
  FROM DUAL;

NLS_CHARSET_ID('JA16EUC')
-------------------------
                      830
See Also:

Oracle9i Database Globalization Support Guide for a list of character set names
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 79 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_CHARSET_NAME

Syntax

nls_charset_name::=

Text description of functions13.gif follows
Text description of nls_charset_name

Purpose

NLS_CHARSET_NAME returns the name of the character set corresponding to ID number number. The character set name is returned as a VARCHAR2 value in the database character set.

If number is not recognized as a valid character set ID, then this function returns null.

Examples

The following example returns the chartacter set corresponding to character set ID number 2:

SELECT NLS_CHARSET_NAME(2)
  FROM DUAL;

NLS_CH
------
WE8DEC
See Also:

Oracle9i Database Globalization Support Guide for a list of character set IDs
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 80 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_INITCAP

Syntax

nls_initcap::=

Text description of functions16.gif follows
Text description of nls_initcap

Purpose

NLS_INITCAP returns char, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric.

Both char and 'nlsparam' can be any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The string returned is of VARCHAR2 datatype and is in the same character set as char.

The value of 'nlsparam' can have this form:

'NLS_SORT = sort'

where sort is either a linguistic sort sequence or BINARY. The linguistic sort sequence handles special linguistic requirements for case conversions. These requirements can result in a return value of a different length than the char. If you omit 'nlsparam', then this function uses the default sort sequence for your session.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following examples show how the linguistic sort sequence results in a different return value from the function:

SELECT NLS_INITCAP
   ('ijsland') "InitCap" FROM DUAL;

InitCap
-------
Ijsland

SELECT NLS_INITCAP
   ('ijsland', 'NLS_SORT = XDutch') "InitCap"
   FROM DUAL;

InitCap
-------
IJsland
See Also:

Oracle9i Database Globalization Support Guide for information on sort sequences
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 81 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_LOWER

Syntax

nls_lower::=

Text description of functions19.gif follows
Text description of nls_lower

Purpose

NLS_LOWER returns char, with all letters lowercase.

Both char and 'nlsparam' can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char.

The 'nlsparam' can have the same form and serve the same purpose as in the NLS_INITCAP function.

Examples

The following statement returns the character string 'citta'' using the XGerman linguistic sort sequence:

SELECT NLS_LOWER
   ('CITTA''', 'NLS_SORT = XGerman') "Lowercase"
   FROM DUAL;

Lowerc
------
citta'
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 83 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_UPPER

Syntax

nls_upper::=

Text description of functions25.gif follows
Text description of nls_upper

Purpose

NLS_UPPER returns char, with all letters uppercase.

Both char and 'nlsparam' can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char.

The 'nlsparam' can have the same form and serve the same purpose as in the NLS_INITCAP function.

Examples

The following example returns a string with all the letters converted to uppercase:

SELECT NLS_UPPER ('große') "Uppercase"
     FROM DUAL;

Upper
-----
GROßE

SELECT NLS_UPPER ('große', 'NLS_SORT = XGerman') "Uppercase"
   FROM DUAL;

Upperc
------
GROSSE
See Also:

NLS_INITCAP

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 82 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLSSORT

Syntax

nlssort::=

Text description of functions22.gif follows
Text description of nlssort

Purpose

NLSSORT returns the string of bytes used to sort char.

Both char and 'nlsparam' can be any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The string returned is of RAW datatype.

The value of 'nlsparams' can have the form

'NLS_SORT = sort'

where sort is a linguistic sort sequence or BINARY. If you omit 'nlsparams', then this function uses the default sort sequence for your session. If you specify BINARY, then this function returns char.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

This function can be used to specify comparisons based on a linguistic sort sequence rather than on the binary value of a string. The following example creates a test table containing two values and shows how the values returned can be ordered by the NLSSORT function:

CREATE TABLE test (name VARCHAR2(15));
INSERT INTO test VALUES ('Gaardiner');
INSERT INTO test VALUES ('Gaberd');

SELECT * FROM test ORDER BY name;

NAME
---------------
Gaardiner
Gaberd

SELECT * FROM test
   ORDER BY NLSSORT(name, 'NLS_SORT = XDanish');

NAME
---------------
Gaberd
Gaardiner
See Also:

Oracle9i Database Globalization Support Guide for information on sort sequences
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 84 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NTILE

Syntax

ntile::=

Text description of functions173.gif follows
Text description of ntile

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

NTILE is an analytic function. It divides an ordered dataset into a number of buckets indicated by expr and assigns the appropriate bucket number to each row. The buckets are numbered 1 through expr, and expr must resolve to a positive constant for each partition.

The number of rows in the buckets can differ by at most 1. The remainder values (the remainder of number of rows divided by buckets) are distributed one for each bucket, starting with bucket 1.

If expr is greater than the number of rows, then a number of buckets equal to the number of rows will be filled, and the remaining buckets will be empty.

You cannot use NTILE or any other analytic function for expr. That is, you can use other built-in function expressions for expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

The following example divides into 4 buckets the values in the salary column of the oe.employees table from Department 100. The salary column has 6 values in this department, so the two extra values (the remainder of 6 / 4) are allocated to buckets 1 and 2, which therefore have one more value than buckets 3 or 4.

SELECT last_name, salary, NTILE(4) OVER (ORDER BY salary DESC)
   AS quartile FROM employees
   WHERE department_id = 100;

LAST_NAME                     SALARY   QUARTILE
------------------------- ---------- ----------
Greenberg                      12000          1
Faviet                          9000          1
Chen                            8200          2
Urman                           7800          2
Sciarra                         7700          3
Popp                            6900          4
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 85 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NULLIF

Syntax

nullif::=

Text description of functions134.gif follows
Text description of nullif

Purpose

NULLIF compares expr1 and expr2. If they are equal, then the function returns null. If they are not equal, then the function returns expr1. You cannot specify the literal NULL for expr1.

The NULLIF function is logically equivalent to the following CASE expression:

CASE WHEN expr1 = expr 2 THEN NULL ELSE expr1 END
See Also:

"CASE Expressions"

Examples

The following example selects those employees from the sample schema hr who have changed jobs since they were hired, as indicated by a job_id in the job_history table different from the current job_id in the employees table:

SELECT e.last_name, NULLIF(e.job_id, j.job_id) "Old Job ID"
   FROM employees e, job_history j
   WHERE e.employee_id = j.employee_id
   ORDER BY last_name;

LAST_NAME                 Old Job ID
------------------------- ----------
De Haan                   AD_VP
Hartstein                 MK_MAN
Kaufling                  ST_MAN
Kochhar                   AD_VP
Kochhar                   AD_VP
Raphaely                  PU_MAN
Taylor                    SA_REP
Taylor
Whalen                    AD_ASST
Whalen
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 86 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NUMTODSINTERVAL

Syntax

numtodsinterval::=

Text description of functions129.gif follows
Text description of numtodsinterval

Purpose

NUMTODSINTERVAL converts n to an INTERVAL DAY TO SECOND literal. n can be a number or an expression resolving to a number. char_expr can be of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype. The value for char_expr specifies the unit of n and must resolve to one of the following string values:

  • 'DAY'
  • 'HOUR'
  • 'MINUTE'
  • 'SECOND'

char_expr is case insensitive. Leading and trailing values within the parentheses are ignored. By default, precision of the return is 9.

Examples

The following example calculates, for each employee, the number of employees hired by the same manager within the last 100 days from his/her hire date:

SELECT manager_id, last_name, hire_date,
   COUNT(*) OVER (PARTITION BY manager_id ORDER BY hire_date
   RANGE NUMTODSINTERVAL(100, 'day') PRECEDING) AS t_count
   FROM employees;

MANAGER_ID LAST_NAME                 HIRE_DATE    T_COUNT
---------- ------------------------- --------- ----------
       100 Kochhar                   21-SEP-89          1
       100 De Haan                   13-JAN-93          1
       100 Raphaely                  07-DEC-94          1
       100 Kaufling                  01-MAY-95          1
       100 Hartstein                 17-FEB-96          1
.
.
.
       149 Grant                     24-MAY-99          1
       149 Johnson                   04-JAN-00          1
       201 Goyal                     17-AUG-97          1
       205 Gietz                     07-JUN-94          1
           King                      17-JUN-87          1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 87 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NUMTOYMINTERVAL

Syntax

numtoyminterval::=

Text description of functions176.gif follows
Text description of numtoyminterval

Purpose

NUMTOYMINTERVAL converts number n to an INTERVAL YEAR TO MONTH literal. n can be a number or an expression resolving to a number. char_expr can be of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype. The value for char_expr specifies the unit of n, and must resolve to one of the following string values:

  • 'YEAR'
  • 'MONTH'

char_expr is case insensitive. Leading and trailing values within the parentheses are ignored. By default, precision of the return is 9.

Examples

The following example calculates, for each employee, the total salary of employees hired in the past one year from his/her hire date.

SELECT last_name, hire_date, salary, SUM(salary)
 OVER (ORDER BY hire_date
 RANGE NUMTOYMINTERVAL(1,'year') PRECEDING) AS t_sal
 FROM employees;

LAST_NAME                 HIRE_DATE     SALARY      T_SAL
------------------------- --------- ---------- ----------
King                      17-JUN-87      24000      24000
Whalen                    17-SEP-87       4400      28400
Kochhar                   21-SEP-89      17000      17000
.
.
.
Markle                    08-MAR-00       2200     112400
Ande                      24-MAR-00       6400     106500
Banda                     21-APR-00       6200     109400
Kumar                     21-APR-00       6100     109400
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 88 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NVL

Syntax

nvl::=

Text description of functions180.gif follows
Text description of nvl

Purpose

NVL lets you replace a null (blank) with a string in the results of a query. If expr1 is null, then NVL returns expr2. If expr1 is not null, then NVL returns expr1. The arguments expr1 and expr2 can have any datatype. If their datatypes are different, then Oracle converts expr2 to the datatype of expr1 before comparing them.

The datatype of the return value is always the same as the datatype of expr1, unless expr1 is character data, in which case the return value's datatype is VARCHAR2 and is in the character set of expr1.

Examples

The following example returns a list of employee names and commissions, substituting "Not Applicable" if the employee receives no commission:

SELECT last_name, NVL(TO_CHAR(commission_pct), 'Not Applicable')
   "COMMISSION" FROM employees
   WHERE last_name LIKE 'B%'
   ORDER BY last_name;

LAST_NAME                 COMMISSION
------------------------- ----------------------------------------
Baer                      Not Applicable
Baida                     Not Applicable
Banda                     .1
Bates                     .15
Bell                      Not Applicable
Bernstein                 .25
Bissot                    Not Applicable
Bloom                     .2
Bull                      Not Applicable
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 89 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NVL2

Syntax

nvl2::=

Text description of functions28.gif follows
Text description of nvl2

Purpose

NVL2 lets you determine the value returned by a query based on whether a specified expression is null or not null. If expr1 is not null, then NVL2 returns expr2. If expr1 is null, then NVL2 returns expr3. The argument expr1 can have any datatype. The arguments expr2 and expr3 can have any datatypes except LONG.

If the datatypes of expr2 and expr3 are different, then Oracle converts expr3 to the datatype of expr2 before comparing them unless expr3 is a null constant. In that case, a datatype conversion is not necessary.

The datatype of the return value is always the same as the datatype of expr2, unless expr2 is character data, in which case the return value's datatype is VARCHAR2.

Examples

The following example shows whether the income of some employees is made up of salary plus commission, or just salary, depending on whether the commission_pct column of employees is null or not.

SELECT last_name, salary, NVL2(commission_pct,
   salary + (salary * commission_pct), salary) income
   FROM employees WHERE last_name like 'B%'
   ORDER BY last_name;

LAST_NAME                     SALARY     INCOME
------------------------- ---------- ----------
Baer                           10000      10000
Baida                           2900       2900
Banda                           6200       6882
Bates                           7300       8468
Bell                            4000       4000
Bernstein                       9500      11970
Bissot                          3300       3300
Bloom                          10000      12100
Bull                            4100       4100
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 90 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PATH

Syntax

path::=

Text description of functions172b.gif follows
Text description of path

Purpose

PATH is an ancillary function used only with the UNDER_PATH and EQUALS_PATH conditions. It returns the relative path that leads to the resource specified in the parent condition.

The correlation number can be any number and is used to correlate this ancillary function with its primary condition. Values less than 1 are treated as 1.

See Also:
  • EQUALS_PATH UNDER_PATH
  • the related function DEPTH

Examples

The EQUALS_PATH and UNDER_PATH conditions can take two ancillary functions, one of which is PATH. The following example shows the use of both ancillary functions. The example assumes the existence of the XMLSchema warehouses.xsd (created in "Using XML in SQL Statements" ).

SELECT PATH(1), DEPTH(2)
   FROM RESOURCE_VIEW
   WHERE UNDER_PATH(res, '/sys/schemas/OE', 1)=1
     AND UNDER_PATH(res, '/sys/schemas/OE', 2)=1;

PATH(1)                          DEPTH(2)
-------------------------------- --------
/www.oracle.com                         1

/www.oracle.com/xwarehouses.xsd         2
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 91 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PERCENT_RANK

Aggregate Syntax

percent_rank_aggregate::=

Text description of functions85.gif follows
Text description of percent_rank_aggregate

Analytic Syntax

percent_rank_analytic::=

Text description of functions31.gif follows
Text description of percent_rank_analytic

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

PERCENT_RANK is similar to the CUME_DIST (cumulative distribution) function. The range of values returned by PERCENT_RANK is 0 to 1, inclusive. The first row in any set has a PERCENT_RANK of 0.

  • As an aggregate function, PERCENT_RANK calculates, for a hypothetical row R identified by the arguments of the function and a corresponding sort specification, the rank of row R minus 1 divided by the number of rows in the aggregate group. This calculation is made as if the hypothetical row R were inserted into the group of rows over which Oracle is to aggregate. The arguments of the function identify a single hypothetical row within each aggregate group. Therefore, they must all evaluate to constant expressions within each aggregate group. The constant argument expressions and the expressions in the ORDER BY clause of the aggregate match by position. Therefore the number of arguments must be the same and their types must be compatible.
  • As an analytic function, for a row R, PERCENT_RANK calculates the rank of R minus 1, divided by 1 less than the number of rows being evaluated (the entire query result set or a partition).

Aggregate Example

The following example calculates the percent rank of a hypothetical employee in the sample table hr.employees with a salary of $15,500 and a commission of 5%:

SELECT PERCENT_RANK(15000, .05) WITHIN GROUP
   (ORDER BY salary, commission_pct) "Percent-Rank"
   FROM employees;

Percent-Rank
------------
  .971962617

Analytic Example

The following example calculates, for each employee, the percent rank of the
employee's salary within the department: SELECT department_id, last_name,
salary,
   PERCENT_RANK()
      OVER (PARTITION BY department_id ORDER BY salary DESC) AS pr
   FROM employees
   ORDER BY pr, salary;

DEPARTMENT_ID LAST_NAME                     SALARY         PR
------------- ------------------------- ---------- ----------
           10 Whalen                          4400          0
           40 Marvis                          6500          0
.
.
.
           80 Vishney                        10500 .176470588
           50 Everett                         3900 .181818182
           30 Khoo                            3100         .2
.
.
.
           80 Johnson                         6200 .941176471
           50 Markle                          2200 .954545455
           50 Philtanker                      2200 .954545455
           50 Olson                           2100          1
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 92 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PERCENTILE_CONT

Syntax

percentile_cont::=

Text description of functions26.gif follows
Text description of percentile_cont

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions of the OVER clause

Purpose

PERCENTILE_CONT is an inverse distribution function that assumes a continuous distribution model. It takes a percentile value and a sort specification, and returns an interpolated value that would fall into that percentile value with respect to the sort specification. Nulls are ignored in the calculation.

The first expr must evaluate to a numeric value between 0 and 1, because it is a percentile value. This expr must be constant within each aggregation group. The ORDER BY clause takes a single expression that must be a numeric or datetime value, as these are the types over which Oracle can perform interpolation.

The result of PERCENTILE_CONT is computed by linear interpolation between values after ordering them. Using the percentile value (P) and the number of rows (N) in the aggregation group, we compute the row number we are interested in after ordering the rows with respect to the sort specification. This row number (RN) is computed according to the formula RN = (1+ (P*(N-1)). The final result of the aggregate function is computed by linear interpolation between the values from rows at row numbers CRN = CEILING(RN) and FRN = FLOOR(RN).

The final result will be:

  if (CRN = FRN = RN) then
    (value of expression from row at RN)
  else
    (CRN - RN) * (value of expression for row at FRN) +
    (RN - FRN) * (value of expression for row at CRN)

You can use the PERCENTILE_CONT function as an analytic function. You can specify only the query_partitioning_clause in its OVER clause. It returns, for each row, the value that would fall into the specified percentile among a set of values within each partition.

Aggregate Example

The following example computes the median salary in each department:

SELECT department_id,
   PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY salary DESC)
      "Median cont",
   PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY salary DESC)
      "Median disc"
   FROM employees GROUP BY department_id;

DEPARTMENT_ID Median-cont Median-disc
------------- ----------- -----------
           10        4400        4400
           20        9500       13000
           30        2850        2900
           40        6500        6500
           50        3100        3100
           60        4800        4800
           70       10000       10000
           80        8800        8800
           90       17000       17000
          100        8000        8200
          110       10150       12000

PERCENTILE_CONT and PERCENTILE_DISC may return different results. PERCENTILE_CONT returns a computed result after doing linear interpolation. PERCENTILE_DISC simply returns a value from the set of values that are aggregated over. When the percentile value is 0.5, as in this example, PERCENTILE_CONT returns the average of the two middle values for groups with even number of elements, whereas PERCENTILE_DISC returns the value of the first one among the two middle values. For aggregate groups with an odd number of elements, both functions return the value of the middle element.

Analytic Example

In the following example, the median for Department 60 is 4800, which has a corresponding percentile (Percent_Rank) of 0.5. None of the salaries in Department 30 have a percentile of 0.5, so the median value must be interpolated between 2900 (percentile 0.4) and 2800 (percentile 0.6), which evaluates to 2850.

SELECT last_name, salary, department_id,
   PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY salary DESC)
      OVER (PARTITION BY department_id) "Percentile_Cont",
   PERCENT_RANK()
      OVER (PARTITION BY department_id ORDER BY salary DESC)
"Percent_Rank"
FROM employees WHERE department_id IN (30, 60);

LAST_NAME         SALARY DEPARTMENT_ID Percentile_Cont Percent_Rank
------------- ---------- ------------- --------------- ------------
Raphaely           11000            30            2850            0
Khoo                3100            30            2850           .2
Baida               2900            30            2850           .4
Tobias              2800            30            2850           .6
Himuro              2600            30            2850           .8
Colmenares          2500            30            2850            1
Hunold              9000            60            4800            0
Ernst               6000            60            4800          .25
Austin              4800            60            4800           .5
Pataballa           4800            60            4800           .5
Lorentz             4200            60            4800            1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Functions, 93 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PERCENTILE_DISC

Syntax

percentile_disc::=

Text description of functions29.gif follows
Text description of percentile_disc

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions of the OVER clause

Purpose

PERCENTILE_DISC is an inverse distribution function that assumes a discrete distribution model. It takes a percentile value and a sort specification and returns an element from the set. Nulls are ignored in the calculation.

The first expr must evaluate to a numeric value between 0 and 1, because it is a percentile value. This expression must be constant within each aggregate group. The ORDER BY clause takes a single expression that can be of any type that can be sorted.

For a given percentile value P, PERCENTILE_DISC function sorts the values of the expression in the ORDER BY clause, and returns the one with the smallest CUME_DIST value (with respect to the same sort specification) that is greater than or equal to P.

Aggregate Example

See aggregate example for PERCENTILE_CONT .

Analytic Example

The following example calculates the median discrete percentile of the salary of each employee in the sample table hr.employees:

SELECT last_name, salary, department_id,
   PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY salary DESC)
      OVER (PARTITION BY department_id) "Percentile_Disc",
   CUME_DIST() OVER (PARTITION BY department_id
      ORDER BY salary DESC) "Cume_Dist"
FROM employees where department_id in (30, 60);

LAST_NAME         SALARY DEPARTMENT_ID Percentile_Disc  Cume_Dist
------------- ---------- ------------- --------------- ----------
Raphaely           11000            30            2900 .166666667
Khoo                3100            30            2900 .333333333
Baida               2900            30            2900         .5
Tobias              2800            30            2900 .666666667
Himuro              2600            30            2900 .833333333
Colmenares          2500            30            2900          1
Hunold              9000            60            4800         .2
Ernst               6000            60            4800         .4
Austin              4800            60            4800         .8
Pataballa           4800            60            4800         .8
Lorentz             4200            60            4800          1

The median value for Department 30 is 2900, which is the value whose corresponding percentile (Cume_Dist) is the smallest value greater than or equal to 0.5. The median value for Department 60 is 4800, which is the value whose corresponding percentile is the smallest value greater than or equal to 0.5.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 94 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

POWER

Syntax

power::=

Text description of functions34.gif follows
Text description of power

Purpose

POWER returns m raised to the nth power. The base m and the exponent n can be any numbers, but if m is negative, then n must be an integer.

Examples

The following example returns 3 squared:

SELECT POWER(3,2) "Raised" FROM DUAL;

    Raised
----------
         9
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 95 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RANK

Aggregate Syntax

rank_aggregate::=

Text description of functions87.gif follows
Text description of rank_aggregate

Analytic Syntax

rank_analytic::=

Text description of functions37.gif follows
Text description of rank_analytic

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

RANK calculates the rank of a value in a group of values. Rows with equal values for the ranking criteria receive the same rank. Oracle then adds the number of tied rows to the tied rank to calculate the next rank. Therefore, the ranks may not be consecutive numbers.

  • As an aggregate function, RANK calculates the rank of a hypothetical row identified by the arguments of the function with respect to a given sort specification. The arguments of the function must all evaluate to constant expressions within each aggregate group, because they identify a single row within each group. The constant argument expressions and the expressions in the ORDER BY clause of the aggregate match by position. Therefore, the number of arguments must be the same and their types must be compatible.
  • As an analytic function, RANK computes the rank of each row returned from a query with respect to the other rows returned by the query, based on the values of the value_exprs in the order_by_clause.

Aggregate Example

The following example calculates the rank of a hypothetical employee in the sample table hr.employees with a salary of $15,500 and a commission of 5%:

SELECT RANK(15500, .05) WITHIN GROUP
   (ORDER BY salary, commission_pct) "Rank"
   FROM employees;

      Rank
----------
       105

Similarly, the following query returns the rank for a $15,500 salary among the employee salaries:

SELECT RANK(15500) WITHIN GROUP
   (ORDER BY salary DESC) "Rank of 15500"
   FROM employees;

Rank of 15500
--------------
             4

Analytic Example

The following statement ranks the employees in the sample hr schema within each department based on their salary and commission. Identical salary values receive the same rank and cause nonconsecutive ranks. Compare this example with the example for DENSE_RANK .

SELECT department_id, last_name, salary, commission_pct,
   RANK() OVER (PARTITION BY department_id
   ORDER BY salary DESC, commission_pct) "Rank"
   FROM employees;

DEPARTMENT_ID LAST_NAME           SALARY COMMISSION_PCT       Rank
------------- --------------- ---------- -------------- ----------
           10 Whalen                4400                         1
           20 Hartstein            13000                         1
           20 Fay                   6000                         2
           30 Raphaely             11000                         1
           30 Khoo                  3100                         2
           30 Baida                 2900                         3
           30 Tobias                2800                         4
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 96 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RATIO_TO_REPORT

Syntax

ratio_to_report::=

Text description of functions156.gif follows
Text description of ratio_to_report

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

RATIO_TO_REPORT is an analytic function. It computes the ratio of a value to the sum of a set of values. If expr evaluates to null, then the ratio-to-report value also evaluates to null.

The set of values is determined by the query_partition_clause. If you omit that clause, then the ratio-to-report is computed over all rows returned by the query.

You cannot use RATIO_TO_REPORT or any other analytic function for expr. That is, you can use other built-in function expressions for expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

The following example calculates the ratio-to-report value of each purchasing clerk's salary to the total of all purchasing clerks' salaries:

SELECT last_name, salary, RATIO_TO_REPORT(salary) OVER () AS rr
   FROM employees
   WHERE job_id = 'PU_CLERK';

LAST_NAME                     SALARY         RR
------------------------- ---------- ----------
Khoo                            3100 .223021583
Baida                           2900 .208633094
Tobias                          2800 .201438849
Himuro                          2600  .18705036
Colmenares                      2500 .179856115
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 97 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RAWTOHEX

Syntax

rawtohex::=

Text description of functions40.gif follows
Text description of rawtohex

Purpose

RAWTOHEX converts raw to a character value containing its hexadecimal equivalent. The raw argument can be either RAW or BLOB datatype.

Examples

The following hypothetical example returns the hexadecimal equivalent of a RAW column value:

SELECT RAWTOHEX(raw_column) "Graphics"
   FROM graphics;

Graphics
--------
7D
See Also:

"RAW and LONG RAW Datatypes" and HEXTORAW

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 98 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RAWTONHEX

Syntax

rawtonhex::=

Text description of functions118.gif follows
Text description of rawtonhex

Purpose

RAWTONHEX converts raw to an NVARCHAR2 character value containing its hexadecimal equivalent.

Examples

The following hypothetical example returns the hexadecimal equivalent of a RAW column value:

SELECT RAWTONHEX(raw_column),
   DUMP ( RAWTONHEX (raw_column) ) "DUMP"
   FROM graphics;

RAWTONHEX(RA)           DUMP
----------------------- ------------------------------
7D                      Typ=1 Len=4: 0,55,0,68
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 99 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REF

Syntax

ref::=

Text description of functions179a.gif follows
Text description of ref

Purpose

REF takes as its argument a correlation variable (table alias) associated with a row of an object table or an object view. A REF value is returned for the object instance that is bound to the variable or row.

Examples

The sample schema oe contains a type called cust_address_typ, described as follows:

 Attribute                                 Type
 ----------------------------- ----------------
 STREET_ADDRESS                    VARCHAR2(40)
 POSTAL_CODE                       VARCHAR2(10)
 CITY                              VARCHAR2(30)
 STATE_PROVINCE                    VARCHAR2(10)
 COUNTRY_ID                             CHAR(2)

The following example creates a table based on the sample type oe.cust_address_typ, inserts a row into the table, and retrieves a REF value for the object instance of the type in the addresses table:

CREATE TABLE addresses OF cust_address_typ;

INSERT INTO addresses VALUES (
   '123 First Street', '4GF H1J', 'Our Town', 'Ourcounty', 'US');

SELECT REF(e) FROM addresses e;

REF(E)
-----------------------------------------------------------------------------------
00002802097CD1261E51925B60E0340800208254367CD1261E51905B60E034080020825436010101820000
See Also:

Oracle9i Database Concepts
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 100 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REFTOHEX

Syntax

reftohex::=

Text description of functions49.gif follows
Text description of reftohex

Purpose

REFTOHEX converts argument expr to a character value containing its hexadecimal equivalent. expr must return a REF.

Examples

The sample schema oe contains a warehouse_typ. The following example builds on that type to illustrate how to convert the REF value of a column to a character value containing its hexadecimal equivalent:

CREATE TABLE warehouse_table OF warehouse_typ
   (PRIMARY KEY (warehouse_id));

CREATE TABLE location_table
   (location_number NUMBER, building REF warehouse_typ
   SCOPE IS warehouse_table);

INSERT INTO warehouse_table VALUES (1, 'Downtown', 99);

INSERT INTO location_table SELECT 10, REF(w) FROM warehouse_table w;

SELECT REFTOHEX(building) FROM location_table;

REFTOHEX(BUILDING)
--------------------------------------------------------------------------
0000220208859B5E9255C31760E034080020825436859B5E9255C21760E034080020825436
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 101 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REGR_ (Linear Regression) Functions

The linear regression functions are:

  • REGR_SLOPE
  • REGR_INTERCEPT
  • REGR_COUNT
  • REGR_R2
  • REGR_AVGX
  • REGR_AVGY
  • REGR_SXX
  • REGR_SYY
  • REGR_SXY

Syntax

linear_regr::=

Text description of functions178a.gif follows
Text description of linear_regr

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

The linear regression functions fit an ordinary-least-squares regression line to a set of number pairs. You can use them as both aggregate and analytic functions.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Oracle applies the function to the set of (expr1, expr2) pairs after eliminating all pairs for which either expr1 or expr2 is null. Oracle computes all the regression functions simultaneously during a single pass through the data.

expr1 is interpreted as a value of the dependent variable (a "y value"), and expr2 is interpreted as a value of the independent variable (an "x value"). Both expressions must be numbers.

  • REGR_SLOPE returns the slope of the line. The return value is a number and can be null. After the elimination of null (expr1, expr2) pairs, it makes the following computation:
    COVAR_POP(expr1, expr2) / VAR_POP(expr2)
  • REGR_INTERCEPT returns the y-intercept of the regression line. The return value is a number and can be null. After the elimination of null (expr1, expr2) pairs, it makes the following computation:
    AVG(expr1) - REGR_SLOPE(expr1, expr2) * AVG(expr2)
  • REGR_COUNT returns an integer that is the number of non-null number pairs used to fit the regression line.
  • REGR_R2 returns the coefficient of determination (also called "R-squared" or "goodness of fit") for the regression. The return value is a number and can be null. VAR_POP(expr1) and VAR_POP(expr2) are evaluated after the elimination of null pairs. The return values are:
                         NULL if VAR_POP(expr2)  = 0

                        1 if VAR_POP(expr1)  = 0 and
                             VAR_POP(expr2) != 0

POWER(CORR(expr1,expr),2) if VAR_POP(expr1)  > 0 and
                             VAR_POP(expr2  != 0

All of the remaining regression functions return a number and can be null:

  • REGR_AVGX evaluates the average of the independent variable (expr2) of the regression line. It makes the following computation after the elimination of null (expr1, expr2) pairs:
    AVG(expr2)
  • REGR_AVGY evaluates the average of the dependent variable (expr1) of the regression line. It makes the following computation after the elimination of null (expr1, expr2) pairs:
    AVG(expr1)

REGR_SXY, REGR_SXX, REGR_SYY are auxiliary functions that are used to compute various diagnostic statistics.

  • REGR_SXX makes the following computation after the elimination of null (expr1, expr2) pairs:
    REGR_COUNT(expr1, expr2) * VAR_POP(expr2)
  • REGR_SYY makes the following computation after the elimination of null (expr1, expr2) pairs:
    REGR_COUNT(expr1, expr2) * VAR_POP(expr1)
  • REGR_SXY makes the following computation after the elimination of null (expr1, expr2) pairs:
    REGR_COUNT(expr1, expr2) * COVAR_POP(expr1, expr2)

The following examples are based on the sample tables sh.sales and sh.products.

General Linear Regression Example

The following example provides a comparison of the various linear regression functions:

SELECT
s.channel_id,
REGR_SLOPE(s.quantity_sold, p.prod_list_price)  SLOPE ,
REGR_INTERCEPT(s.quantity_sold, p.prod_list_price)  INTCPT ,
REGR_R2(s.quantity_sold, p.prod_list_price)  RSQR ,
REGR_COUNT(s.quantity_sold, p.prod_list_price)  COUNT ,
REGR_AVGX(s.quantity_sold, p.prod_list_price)  AVGLISTP ,
REGR_AVGY(s.quantity_sold, p.prod_list_price)  AVGQSOLD
FROM  sales s, products p
WHERE s.prod_id=p.prod_id AND
p.prod_category='Men'  AND
s.time_id=to_DATE('10-OCT-2000')
GROUP BY s.channel_id
;

C      SLOPE     INTCPT       RSQR      COUNT   AVGLISTP   AVGQSOLD
- ---------- ---------- ---------- ---------- ---------- ----------
C -.03529838 16.4548382 .217277422         17 87.8764706 13.3529412
I  -.0108044 13.3082392 .028398018         43  116.77907 12.0465116
P -.01729665 11.3634927 .026191191         33 80.5818182 9.96969697
S -.01277499  13.488506 .000473089         71  52.571831 12.8169014
T -.01026734 5.01019929 .064283727         21       75.2 4.23809524

REGR_SLOPE and REGR_INTERCEPT Examples

The following example determines the slope and intercept of the regression line for the amount of sales and sale profits for each fiscal year:

SELECT t.fiscal_year,
   REGR_SLOPE(s.amount_sold, s.quantity_sold) "Slope",
   REGR_INTERCEPT(s.amount_sold, s.quantity_sold) "Intercept"
   FROM sales s, times t
   WHERE s.time_id = t.time_id
   GROUP BY t.fiscal_year;

FISCAL_YEAR      Slope  Intercept
----------- ---------- ----------
       1998 49.3934247 71.6015479
       1999 49.3443482 70.1502601
       2000 49.2262135 75.0287476

The following example determines the cumulative slope and cumulative intercept of the regression line for the amount of and quantity of sales for two products (270 and 260) for weekend transactions (day_number_in_week = 6 or 7) during the last three weeks (fiscal_week_number of 50, 51, or 52) of 1998:

SELECT t.fiscal_month_number "Month", t.day_number_in_month "Day",
   REGR_SLOPE(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_month_desc, t.day_number_in_month) AS CUM_SLOPE,
   REGR_INTERCEPT(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_month_desc, t.day_number_in_month) AS CUM_ICPT
   FROM sales s, times t
   WHERE s.time_id = t.time_id
      AND s.prod_id IN (270, 260)
      AND t.fiscal_year=1998
      AND t.fiscal_week_number IN (50, 51, 52)
      AND t.day_number_in_week IN (6,7)
   ORDER BY t.fiscal_month_desc, t.day_number_in_month;

     Month        Day  CUM_SLOPE   CUM_ICPT
---------- ---------- ---------- ----------
        12         12        -68       1872
        12         12        -68       1872
        12         13 -20.244898 1254.36735
        12         13 -20.244898 1254.36735
        12         19 -18.826087       1287
        12         20 62.4561404  125.28655
        12         20 62.4561404  125.28655
        12         20 62.4561404  125.28655
        12         20 62.4561404  125.28655
        12         26 67.2658228 58.9712313
        12         26 67.2658228 58.9712313
        12         27 37.5245541 284.958221
        12         27 37.5245541 284.958221
        12         27 37.5245541 284.958221

REGR_COUNT Examples

The following example returns the number of customers in the customers table (out of a total of 319) who have account managers.

SELECT REGR_COUNT(customer_id, account_mgr_id) FROM customers;

REGR_COUNT(CUSTOMER_ID,ACCOUNT_MGR_ID)
--------------------------------------
                                   231

The following example computes the cumulative number of transactions for each day in April of 1998:

SELECT UNIQUE t.day_number_in_month,
   REGR_COUNT(s.amount_sold, s.quantity_sold)
      OVER (PARTITION BY t.fiscal_month_number
   ORDER BY t.day_number_in_month) "Regr_Count"
FROM sales s, times t
WHERE s.time_id = t.time_id
AND t.fiscal_year = 1998 AND t.fiscal_month_number = 4;

DAY_NUMBER_IN_MONTH Regr_Count
------------------- ----------
                  1        825
                  2       1650
                  3       2475
                  4       3300
.
.
.
                 26      21450
                 30      22200

REGR_R2 Examples

The following example computes the coefficient of determination of the regression line for amount of sales greater than 5000 and quantity sold:

SELECT REGR_R2(amount_sold, quantity_sold) FROM sales
   WHERE amount_sold > 5000;

REGR_R2(AMOUNT_SOLD,QUANTITY_SOLD)
----------------------------------
                        .024087453

The following example computes the cumulative coefficient of determination of the regression line for monthly sales amounts and quantities for each month during 1998:

SELECT t.fiscal_month_number,
      REGR_R2(SUM(s.amount_sold), SUM(s.quantity_sold))
      OVER (ORDER BY t.fiscal_month_number) "Regr_R2"
   FROM sales s, times t
   WHERE s.time_id = t.time_id
   AND t.fiscal_year = 1998
   GROUP BY t.fiscal_month_number
   ORDER BY t.fiscal_month_number;

FISCAL_MONTH_NUMBER    Regr_R2
------------------- ----------
                  1
                  2          1
                  3 .927372984
                  4 .807019972
                  5 .932745567
                  6  .94682861
                  7 .965342011
                  8 .955768075
                  9 .959542618
                 10 .938618575
                 11 .880931415
                 12 .882769189

REGR_AVGY and REGR_AVGX Examples

The following example calculates the regression average for the amount and quantity of sales for each year:

SELECT t.fiscal_year,
   REGR_AVGY(s.amount_sold, s.quantity_sold) "Regr_AvgY",
   REGR_AVGX(s.amount_sold, s.quantity_sold) "Regr_AvgX"
FROM sales s, times t
WHERE s.time_id = t.time_id
GROUP BY t.fiscal_year;

FISCAL_YEAR  Regr_AvgY  Regr_AvgX
----------- ---------- ----------
       1998 716.602044 13.0584283
       1999 714.910831 13.0665536
       2000 717.331304 13.0479781

The following example calculates the cumulative averages for the amount and quantity of sales profits for product 260 during the last two weeks of December 1998:

SELECT t.day_number_in_month,
   REGR_AVGY(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_month_desc, t.day_number_in_month)
      "Regr_AvgY",
   REGR_AVGX(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_month_desc, t.day_number_in_month)
      "Regr_AvgX"
   FROM sales s, times t
   WHERE s.time_id = t.time_id
      AND s.prod_id = 260
      AND t.fiscal_month_desc = '1998-12'
      AND t.fiscal_week_number IN (51, 52)
   ORDER BY t.day_number_in_month;

DAY_NUMBER_IN_MONTH  Regr_AvgY  Regr_AvgX
------------------- ---------- ----------
                 14        882       24.5
                 14        882       24.5
                 15        801      22.25
                 15        801      22.25
                 16      777.6       21.6
                 18 642.857143 17.8571429
                 18 642.857143 17.8571429
                 20      589.5     16.375
                 21        544 15.1111111
                 22 592.363636 16.4545455
                 22 592.363636 16.4545455
                 24 553.846154 15.3846154
                 24 553.846154 15.3846154
                 26        522       14.5
                 27      578.4 16.0666667

REGR_SXY, REGR_SXX, and REGR_SYY Examples

The following example computes the REGR_SXY, REGR_SXX, and REGR_SYY values for the regression analysis of amount and quantity of sales for each year in the sample sh.sales table:

SELECT t.fiscal_year,
   REGR_SXY(s.amount_sold, s.quantity_sold) "Regr_sxy",
   REGR_SYY(s.amount_sold, s.quantity_sold) "Regr_syy",
   REGR_SXX(s.amount_sold, s.quantity_sold) "Regr_sxx"
FROM sales s, times t
WHERE s.time_id = t.time_id
GROUP BY t.fiscal_year;

FISCAL_YEAR   Regr_sxy   Regr_syy   Regr_sxx
----------- ---------- ---------- ----------
       1998 1620591607 2.3328E+11 32809865.2
       1999 1955866724 2.7695E+11 39637097.2
       2000 2127877398 3.0630E+11 43226509.7

The following example computes the cumulative REGR_SXY, REGR_SXX, and REGR_SYY statistics for amount and quantity of weekend sales for products 270 and 260 for each year-month value in 1998:

SELECT t.day_number_in_month,
   REGR_SXY(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_year, t.fiscal_month_desc) "Regr_sxy",
   REGR_SYY(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_year, t.fiscal_month_desc) "Regr_syy",
   REGR_SXX(s.amount_sold, s.quantity_sold)
      OVER (ORDER BY t.fiscal_year, t.fiscal_month_desc) "Regr_sxx"
FROM sales s, times t
WHERE s.time_id = t.time_id
   AND prod_id IN (270, 260)
   AND t.fiscal_month_desc = '1998-02'
   AND t.day_number_in_week IN (6,7)
ORDER BY t.day_number_in_month;

DAY_NUMBER_IN_MONTH   Regr_sxy   Regr_syy   Regr_sxx
------------------- ---------- ---------- ----------
                  1  130973783 1.8916E+10 2577797.94
          .
          .
          .
                 30  130973783 1.8916E+10 2577797.94
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 102 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REPLACE

Syntax

replace::=

Text description of functions52.gif follows
Text description of replace

Purpose

REPLACE returns char with every occurrence of search_string replaced with replacement_string. If replacement_string is omitted or null, then all occurrences of search_string are removed. If search_string is null, then char is returned.

Both search_string and replacement_string, as well as char, can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char.

This function provides functionality related to that provided by the TRANSLATE function. TRANSLATE provides single-character, one-to-one substitution. REPLACE lets you substitute one string for another as well as to remove character strings.

See Also:

TRANSLATE

Examples

The following example replaces occurrences of "J" with "BL":

SELECT REPLACE('JACK and JUE','J','BL') "Changes"
     FROM DUAL;

Changes
--------------
BLACK and BLUE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 176 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROUND and TRUNC Date Functions

Table 6-4 lists the format models you can use with the ROUND and TRUNC date functions and the units to which they round and truncate dates. The default model, 'DD', returns the date rounded or truncated to the day with a time of midnight.

Table 6-4 Date Format Models for the ROUND and TRUNC Date Functions
Format Model Rounding or Truncating Unit
CC
SCC

One greater than the first two digits of a four-digit year

SYYYY
YYYY
YEAR
SYEAR
YYY
YY
Y

Year (rounds up on July 1)

IYYY
IY
IY
I

ISO Year

Q

Quarter (rounds up on the sixteenth day of the second month of the quarter)

MONTH
MON
MM
RM

Month (rounds up on the sixteenth day)

WW

Same day of the week as the first day of the year

IW

Same day of the week as the first day of the ISO year

W

Same day of the week as the first day of the month

DDD
DD
J

Day

DAY
DY
D

Starting day of the week

HH
HH12
HH24

Hour

MI

Minute

The starting day of the week used by the format models DAY, DY, and D is specified implicitly by the initialization parameter NLS_TERRITORY.

See Also:

Oracle9i Database Reference and Oracle9i Database Globalization Support Guide for information on this parameter
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 104 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROUND (date)

Syntax

round_date::=

Text description of functions61.gif follows
Text description of round_date

Purpose

ROUND returns date rounded to the unit specified by the format model fmt. If you omit fmt, then date is rounded to the nearest day.

See Also:

"ROUND and TRUNC Date Functions" for the permitted format models to use in fmt

Examples

The following example rounds a date to the first day of the following year:

SELECT ROUND (TO_DATE ('27-OCT-00'),'YEAR')
   "New Year" FROM DUAL;

New Year
---------
01-JAN-01
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 103 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROUND (number)

Syntax

round_number::=

Text description of functions55.gif follows
Text description of round_number

Purpose

ROUND returns number rounded to integer places right of the decimal point. If integer is omitted, then number is rounded to 0 places. integer can be negative to round off digits left of the decimal point. integer must be an integer.

Examples

The following example rounds a number to one decimal point:

SELECT ROUND(15.193,1) "Round" FROM DUAL;

     Round
----------
      15.2

The following example rounds a number one digit to the left of the decimal point:

SELECT ROUND(15.193,-1) "Round" FROM DUAL;

     Round
----------
        20
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 105 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROW_NUMBER

Syntax

row_number::=

Text description of functions58.gif follows
Text description of row_number

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

ROW_NUMBER is an analytic function. It assigns a unique number to each row to which it is applied (either each row in the partition or each row returned by the query), in the ordered sequence of rows specified in the order_by_clause, beginning with 1.

You cannot use ROW_NUMBER or any other analytic function for expr. That is, you can use other built-in function expressions for expr, but you cannot nest analytic functions.

See Also:

"About SQL Expressions" for information on valid forms of expr

Examples

For each department in the sample table oe.employees, the following example assigns numbers to each row in order of employee's hire date:

SELECT department_id, last_name, employee_id, ROW_NUMBER()
   OVER (PARTITION BY department_id ORDER BY employee_id) AS emp_id
   FROM employees;

DEPARTMENT_ID LAST_NAME                 EMPLOYEE_ID     EMP_ID
------------- ------------------------- ----------- ----------
           10 Whalen                            200          1
           20 Hartstein                         201          1
           20 Fay                               202          2
           30 Raphaely                          114          1
           30 Khoo                              115          2
           30 Baida                             116          3
           30 Tobias                            117          4
           30 Himuro                            118          5
           30 Colmenares                        119          6
           40 Mavris                            203          1
.
.
.
          100 Popp                              113          6
          110 Higgins                           205          1
          110 Gietz                             206          2

ROW_NUMBER is a nondeterministic function. However, employee_id is a unique key, so the results of this application of the function are deterministic.

See Also:

FIRST_VALUE and LAST_VALUE for examples of nondeterministic behavior
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 106 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROWIDTOCHAR

Syntax

rowidtochar::=

Text description of functions63.gif follows
Text description of rowidtochar

Purpose

ROWIDTOCHAR converts a rowid value to VARCHAR2 datatype. The result of this conversion is always 18 characters long.

Examples

The following example converts a rowid value in the employees table to a character value. (Results vary for each build of the sample database.)

SELECT ROWID FROM employees
   WHERE ROWIDTOCHAR(ROWID) LIKE '%SAAb%';

ROWID
------------------
AAAFfIAAFAAAABSAAb
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 107 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROWIDTONCHAR

Syntax

rowidtonchar::=

Text description of functions121.gif follows
Text description of rowidtonchar

Purpose

ROWIDTONCHAR converts a rowid value to NVARCHAR2 datatype. The result of this conversion is always 18 characters long.

Examples

SELECT LENGTHB( ROWIDTONCHAR(ROWID) ), ROWIDTONCHAR(ROWID)
   FROM employees;

LENGTHB(ROWIDTONCHAR(ROWID)) ROWIDTONCHAR(ROWID
---------------------------- ------------------
                          36 AAAFfIAAFAAAABSAAA
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 108 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RPAD

Syntax

rpad::=

Text description of functions68.gif follows
Text description of rpad

Purpose

RPAD returns char1, right-padded to length n with char2, replicated as many times as necessary; char2 defaults to a single blank. If char1 is longer than n, then this function returns the portion of char1 that fits in n.

Both char1 and char2 can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char1.

The argument n is the total length of the return value as it is displayed on your terminal screen. In most character sets, this is also the number of characters in the return value. However, in some multibyte character sets, the display length of a character string can differ from the number of characters in the string.

Examples

The following example right-pads a name with the letters "ab" until it is 12 characters long:

SELECT RPAD('MORRISON',12,'ab') "RPAD example"
     FROM DUAL;

RPAD example
-----------------
MORRISONabab
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 109 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RTRIM

Syntax

rtrim::=

Text description of functions71.gif follows
Text description of rtrim

Purpose

RTRIM returns char, with all the rightmost characters that appear in set removed; set defaults to a single blank. If char is a character literal, then you must enclose it in single quotes. RTRIM works similarly to LTRIM.

Both char and set can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as char.

Examples

The following example trims the letters "xy" from the right side of a string:

SELECT RTRIM('BROWNINGyxXxy','xy') "RTRIM example"
     FROM DUAL;

RTRIM examp
-----------
BROWNINGyxX
See Also:

LTRIM

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 110 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSIONTIMEZONE

Syntax

sessiontimezone::=

Text description of functions23.gif follows
Text description of sessiontimezone

Purpose

SESSIONTIMEZONE returns the value of the current session's time zone. The return type is a time zone offset (a character type in the format '[+|]TZH:TZM') or a time zone region name, depending on how the user specified the session time zone value in the most recent ALTER SESSION statement.

Note:

You can set the default client session time zone using the ORA_SDTZ environment variable. Please refer to Oracle9i Database Globalization Support Guide for more information on this variable.

Examples

The following example returns the current session's time zone:

SELECT SESSIONTIMEZONE FROM DUAL;

SESSION
-------
-08:00
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 111 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SIGN

Syntax

sign::=

Text description of functions74.gif follows
Text description of sign

Purpose

SIGN returns -1 if n<0, then . If n=0, then the function returns 0. If n>0, then SIGN returns 1.

Examples

The following example indicates that the function's argument (-15) is <0:

SELECT SIGN(-15) "Sign" FROM DUAL;

      Sign
----------
        -1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 112 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SIN

Syntax

sin::=

Text description of functions76.gif follows
Text description of sin

Purpose

SIN returns the sine of n (an angle expressed in radians).

Examples

The following example returns the sin of 30 degrees:

SELECT SIN(30 * 3.14159265359/180)
 "Sine of 30 degrees" FROM DUAL;

Sine of 30 degrees
------------------
                .5
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 113 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SINH

Syntax

sinh::=

Text description of functions78.gif follows
Text description of sinh

Purpose

SINH returns the hyperbolic sine of n.

Examples

The following example returns the hyperbolic sine of 1:

SELECT SINH(1) "Hyperbolic sine of 1" FROM DUAL;

Hyperbolic sine of 1
--------------------
          1.17520119
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 114 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SOUNDEX

Syntax

soundex::=

Text description of functions80.gif follows
Text description of soundex

Purpose

SOUNDEX returns a character string containing the phonetic representation of char. This function lets you compare words that are spelled differently, but sound alike in English.

The phonetic representation is defined in The Art of Computer Programming, Volume 3: Sorting and Searching, by Donald E. Knuth, as follows:

  • Retain the first letter of the string and remove all other occurrences of the following letters: a, e, h, i, o, u, w, y.
  • Assign numbers to the remaining letters (after the first) as follows:
    b, f, p, v = 1
c, g, j, k, q, s, x, z = 2
d, t = 3
l = 4
m, n = 5
r = 6
  • If two or more letters with the same number were adjacent in the original name (before step 1), or adjacent except for any intervening h and w, then omit all but the first.
  • Return the first four bytes padded with 0.

char can be of any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The return value is the same datatype as char.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example returns the employees whose last names are a phonetic representation of "Smyth":

SELECT last_name, first_name
     FROM hr.employees
     WHERE SOUNDEX(last_name)
         = SOUNDEX('SMYTHE');

LAST_NAME  FIRST_NAME
---------- ----------
Smith      Lindsey
Smith      William
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 2 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SQL Functions

SQL functions are built into Oracle and are available for use in various appropriate SQL statements. Do not confuse SQL functions with user functions written in PL/SQL.

If you call a SQL function with an argument of a datatype other than the datatype expected by the SQL function, then Oracle implicitly converts the argument to the expected datatype before performing the SQL function. If you call a SQL function with a null argument, then the SQL function automatically returns null. The only SQL functions that do not necessarily follow this behavior are CONCAT, NVL, and REPLACE.

In the syntax diagrams for SQL functions, arguments are indicated by their datatypes. When the parameter "function" appears in SQL syntax, replace it with one of the functions described in this section. Functions are grouped by the datatypes of their arguments and their return values.

Note:

When you apply SQL functions to LOB columns, Oracle creates temporary LOBs during SQL and PL/SQL processing. You should ensure that temporary tablespace quota is sufficient for storing these temporary LOBs for your application.
See Also:
  • "User-Defined Functions" for information on user functions
  • Oracle Text Reference for information on functions used with Oracle Text
  • "Data Conversion" for implicit conversion of datatypes

The syntax showing the categories of functions follows:

function::=

Text description of functions2.gif follows
Text description of function

single_row_function::=

Text description of functions6.gif follows
Text description of single_row_function

The sections that follow list the built-in SQL functions in each of the groups illustrated in the preceding diagrams except user-defined functions. All of the built-in SQL functions are then described in alphabetical order. User-defined functions are described at the end of this chapter.

Single-Row Functions

Single-row functions return a single result row for every row of a queried table or view. These functions can appear in select lists, WHERE clauses, START WITH and CONNECT BY clauses, and HAVING clauses.

Number Functions

Number functions accept numeric input and return numeric values. Most of these functions return values that are accurate to 38 decimal digits. The transcendental functions COS, COSH, EXP, LN, LOG, SIN, SINH, SQRT, TAN, and TANH are accurate to 36 decimal digits. The transcendental functions ACOS, ASIN, ATAN, and ATAN2 are accurate to 30 decimal digits. The number functions are:

ABS
ACOS
ASIN
ATAN
ATAN2
BITAND
CEIL
COS
COSH
EXP
FLOOR
LN
LOG
MOD
POWER
ROUND (number)
SIGN
SIN
SINH
SQRT
TAN
TANH
TRUNC (number)
WIDTH_BUCKET

Character Functions Returning Character Values

Character functions that return character values return values of the same datatype as the input argument.

  • Functions that return CHAR values are limited in length to 2000 bytes.
  • Functions that return VARCHAR2 values are limited in length to 4000 bytes.

    For both of these types of functions, if the length of the return value exceeds the limit, then Oracle truncates it and returns the result without an error message.

  • Functions that return CLOB values are limited to 4 GB.

    For CLOB functions, if the length of the return values exceeds the limit, then Oracle raises an error and returns no data.

The character functions that return character values are:

CHR
CONCAT
INITCAP
LOWER
LPAD
LTRIM
NLS_INITCAP
NLS_LOWER
NLSSORT
NLS_UPPER
REPLACE
RPAD
RTRIM
SOUNDEX
SUBSTR
TRANSLATE
TREAT
TRIM
UPPER

Character Functions Returning Number Values

Character functions that return number values can take as their argument any character datatype.

The character functions that return number values are:

ASCII
INSTR
LENGTH

Datetime Functions

Datetime functions operate on values of the DATE datatype. All datetime functions return a datetime or interval value of DATE datatype, except the MONTHS_BETWEEN function, which returns a number. The datetime functions are:

ADD_MONTHS
CURRENT_DATE
CURRENT_TIMESTAMP
DBTIMEZONE
EXTRACT (datetime)
FROM_TZ
LAST_DAY
LOCALTIMESTAMP
MONTHS_BETWEEN
NEW_TIME
NEXT_DAY
NUMTODSINTERVAL
NUMTOYMINTERVAL
ROUND (date)
SESSIONTIMEZONE
SYS_EXTRACT_UTC
SYSDATE
SYSTIMESTAMP
TO_DSINTERVAL
TO_TIMESTAMP
TO_TIMESTAMP_TZ
TO_YMINTERVAL
TRUNC (date)
TZ_OFFSET

Conversion Functions

Conversion functions convert a value from one datatype to another. Generally, the form of the function names follows the convention datatype TO datatype. The first datatype is the input datatype. The second datatype is the output datatype. The SQL conversion functions are:

ASCIISTR
BIN_TO_NUM
CAST
CHARTOROWID
COMPOSE
CONVERT
DECOMPOSE
HEXTORAW
NUMTODSINTERVAL
NUMTOYMINTERVAL
RAWTOHEX
RAWTONHEX
ROWIDTOCHAR
ROWIDTONCHAR
TO_CHAR (character)
TO_CHAR (datetime)
TO_CHAR (number)
TO_CLOB
TO_DATE
TO_DSINTERVAL
TO_LOB
TO_MULTI_BYTE
TO_NCHAR (character)
TO_NCHAR (datetime)
TO_NCHAR (number)
TO_NCLOB
TO_NUMBER
TO_SINGLE_BYTE
TO_YMINTERVAL
TRANSLATE ... USING
UNISTR

Miscellaneous Single-Row Functions

The following single-row functions do not fall into any of the other single-row function categories:

BFILENAME
COALESCE
DECODE
DEPTH
DUMP
EMPTY_BLOB, EMPTY_CLOB
EXISTSNODE
EXTRACT (XML)
EXTRACTVALUE
GREATEST
LEAST
NLS_CHARSET_DECL_LEN
NLS_CHARSET_ID
NLS_CHARSET_NAME
NULLIF
NVL
NVL2
PATH
SYS_CONNECT_BY_PATH
SYS_CONTEXT
SYS_DBURIGEN
SYS_EXTRACT_UTC
SYS_GUID
SYS_TYPEID
SYS_XMLAGG
SYS_XMLGEN
UID
UPDATEXML
USER
USERENV
VSIZE
XMLAGG
XMLCOLATTVAL
XMLCONCAT
XMLFOREST
XMLSEQUENCE
XMLTRANSFORM

Aggregate Functions

Aggregate functions return a single result row based on groups of rows, rather than on single rows. Aggregate functions can appear in select lists and in ORDER BY and HAVING clauses. They are commonly used with the GROUP BY clause in a SELECT statement, where Oracle divides the rows of a queried table or view into groups. In a query containing a GROUP BY clause, the elements of the select list can be aggregate functions, GROUP BY expressions, constants, or expressions involving one of these. Oracle applies the aggregate functions to each group of rows and returns a single result row for each group.

If you omit the GROUP BY clause, then Oracle applies aggregate functions in the select list to all the rows in the queried table or view. You use aggregate functions in the HAVING clause to eliminate groups from the output based on the results of the aggregate functions, rather than on the values of the individual rows of the queried table or view.

See Also:

"Using the GROUP BY Clause: Examples" and the "HAVING Clause" for more information on the GROUP BY clause and HAVING clauses in queries and subqueries

Many (but not all) aggregate functions that take a single argument accept these clauses:

  • DISTINCT causes an aggregate function to consider only distinct values of the argument expression.
  • ALL causes an aggregate function to consider all values, including all duplicates.

For example, the DISTINCT average of 1, 1, 1, and 3 is 2. The ALL average is 1.5. If you specify neither, then the default is ALL.

All aggregate functions except COUNT(*) and GROUPING ignore nulls. You can use the NVL function in the argument to an aggregate function to substitute a value for a null. COUNT never returns null, but returns either a number or zero. For all the remaining aggregate functions, if the data set contains no rows, or contains only rows with nulls as arguments to the aggregate function, then the function returns null.

You can nest aggregate functions. For example, the following example calculates the average of the maximum salaries of all the departments in the sample schema hr:

SELECT AVG(MAX(salary)) FROM employees GROUP BY department_id;

AVG(MAX(SALARY))
----------------
           10925

This calculation evaluates the inner aggregate (MAX(salary)) for each group defined by the GROUP BY clause (department_id), and aggregates the results again.

The aggregate functions are:

AVG
CORR
COUNT
COVAR_POP
COVAR_SAMP
CUME_DIST
DENSE_RANK
FIRST
GROUP_ID
GROUPING
GROUPING_ID
LAST
MAX
MIN
PERCENTILE_CONT
PERCENTILE_DISC
PERCENT_RANK
RANK
REGR_ (Linear Regression) Functions
STDDEV
STDDEV_POP
STDDEV_SAMP
SUM
VAR_POP
VAR_SAMP
VARIANCE

Analytic Functions

Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic clause. For each row, a "sliding" window of rows is defined. The window determines the range of rows used to perform the calculations for the "current row". Window sizes can be based on either a physical number of rows or a logical interval such as time.

Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause. All joins and all WHERE, GROUP BY, and HAVING clauses are completed before the analytic functions are processed. Therefore, analytic functions can appear only in the select list or ORDER BY clause.

Analytic functions are commonly used to compute cumulative, moving, centered, and reporting aggregates.

analytic_function::=

Text description of functions10.gif follows
Text description of analytic_function

analytic_clause::=

Text description of functions14.gif follows
Text description of analytic_clause

query_partition_clause::=

Text description of functions17.gif follows
Text description of query_partition_clause

order_by_clause::=

Text description of functions20.gif follows
Text description of order_by_clause

windowing_clause::=

Text description of functions177.gif follows
Text description of windowing_clause

The semantics of this syntax are discussed in the sections that follow.

analytic_function

Specify the name of an analytic function (see the listing of analytic functions following this discussion of semantics).

arguments

Analytic functions take 0 to 3 arguments.

analytic_clause

Use OVER analytic_clause to indicate that the function operates on a query result set. That is, it is computed after the FROM, WHERE, GROUP BY, and HAVING clauses. You can specify analytic functions with this clause in the select list or ORDER BY clause. To filter the results of a query based on an analytic function, nest these functions within the parent query, and then filter the results of the nested subquery.

Notes:
  • You cannot specify any analytic function in any part of the analytic_clause. That is, you cannot nest analytic functions. However, you can specify an analytic function in a subquery and compute another analytic function over it.
  • You can specify OVER analytic_clause with user-defined analytic functions as well as built-in analytic functions. See CREATE FUNCTION .
query_partition_clause

Use the PARTITION BY clause to partition the query result set into groups based on one or more value_expr. If you omit this clause, then the function treats all rows of the query result set as a single group.

You can specify multiple analytic functions in the same query, each with the same or different PARTITION BY keys.

Note:

If the objects being queried have the parallel attribute, and if you specify an analytic function with the query_partition_clause, then the function computations are parallelized as well.

Valid values of value_expr are constants, columns, nonanalytic functions, function expressions, or expressions involving any of these.

order_by_clause

Use the order_by_clause to specify how data is ordered within a partition. For all analytic functions except PERCENTILE_CONT and PERCENTILE_DISC (which take only a single key), you can order the values in a partition on multiple keys, each defined by a value_expr and each qualified by an ordering sequence.

Within each function, you can specify multiple ordering expressions. Doing so is especially useful when using functions that rank values, because the second expression can resolve ties between identical values for the first expression.

Note:

Whenever the order_by_clause results in identical values for multiple rows, the function returns the same result for each of those rows. Please refer to the analytic example for SUM for an illustration of this behavior.
Restriction on the ORDER BY Clause

When used in an analytic function, the order_by_clause must take an expression (expr). The SIBLINGS keyword is not valid (it is relevant only in hierarchical queries). Position (position) and column aliases (c_alias) are invalid. Otherwise this order_by_clause is the same as that used to order the overall query or subquery.

ASC | DESC

Specify the ordering sequence (ascending or descending). ASC is the default.

NULLS FIRST | NULLS LAST

Specify whether returned rows containing nulls should appear first or last in the ordering sequence.

NULLS LAST is the default for ascending order, and NULLS FIRST is the default for descending order.

Note:

Analytic functions always operate on rows in the order specified in the order_by_clause of the function. However, the order_by_clause of the function does not guarantee the order of the result. Use the order_by_clause of the query to guarantee the final result ordering.
See Also:

order_by_clause of SELECT for more information on this clause
windowing_clause

Some analytic functions allow the windowing_clause. In the listing of analytic functions at the end of this section, the functions that allow the windowing_clause are followed by an asterisk (*).

ROWS | RANGE

These keywords define for each row a "window" (a physical or logical set of rows) used for calculating the function result. The function is then applied to all the rows in the window. The window "slides" through the query result set or partition from top to bottom.

  • ROWS specifies the window in physical units (rows).
  • RANGE specifies the window as a logical offset.

You cannot specify this clause unless you have specified the order_by_clause.

Note:

The value returned by an analytic function with a logical offset is always deterministic. However, the value returned by an analytic function with a physical offset may produce nondeterministic results unless the ordering expression results in a unique ordering. You may have to specify multiple columns in the order_by_clause to achieve this unique ordering.
BETWEEN ... AND

Use the BETWEEN ... AND clause to specify a start point and end point for the window. The first expression (before AND) defines the start point and the second expression (after AND) defines the end point.

If you omit BETWEEN and specify only one end point, then Oracle considers it the start point, and the end point defaults to the current row.

UNBOUNDED PRECEDING

Specify UNBOUNDED PRECEDING to indicate that the window starts at the first row of the partition. This is the start point specification and cannot be used as an end point specification.

UNBOUNDED FOLLOWING

Specify UNBOUNDED FOLLOWING to indicate that the window ends at the last row of the partition. This is the end point specification and cannot be used as a start point specification.

CURRENT ROW

As a start point, CURRENT ROW specifies that the window begins at the current row or value (depending on whether you have specified ROW or RANGE, respectively). In this case the end point cannot be value_expr PRECEDING.

As an end point, CURRENT ROW specifies that the window ends at the current row or value (depending on whether you have specified ROW or RANGE, respectively). In this case the start point cannot be value_expr FOLLOWING.

value_expr PRECEDING or value_expr FOLLOWING

For RANGE or ROW:

  • If value_expr FOLLOWING is the start point, then the end point must be value_expr FOLLOWING.
  • If value_expr PRECEDING is the end point, then the start point must be value_expr PRECEDING.

If you are defining a logical window defined by an interval of time in numeric format, then you may need to use conversion functions.

See Also:

NUMTOYMINTERVAL and NUMTODSINTERVAL for information on converting numeric times into intervals

If you specified ROWS:

  • value_expr is a physical offset. It must be a constant or expression and must evaluate to a positive numeric value.
  • If value_expr is part of the start point, then it must evaluate to a row before the end point.

If you specified RANGE:

  • value_expr is a logical offset. It must be a constant or expression that evaluates to a positive numeric value or an interval literal.

    See Also:

    "Literals" for information on interval literals
  • You can specify only one expression in the order_by_clause
  • If value_expr evaluates to a numeric value, then the ORDER BY expr must be a NUMBER or DATE datatype.
  • If value_expr evaluates to an interval value, then the ORDER BY expr must be a DATE datatype.

If you omit the windowing_clause entirely, then the default is RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.

Analytic functions are commonly used in data warehousing environments. The analytic functions follow. Functions followed by an asterisk (*) allow the full syntax, including the windowing_clause.

AVG *
CORR *
COVAR_POP *
COVAR_SAMP *
COUNT *
CUME_DIST
DENSE_RANK
FIRST
FIRST_VALUE *
LAG
LAST
LAST_VALUE *
LEAD
MAX *
MIN *
NTILE
PERCENT_RANK
PERCENTILE_CONT
PERCENTILE_DISC
RANK
RATIO_TO_REPORT
REGR_ (Linear Regression) Functions *
ROW_NUMBER
STDDEV *
STDDEV_POP *
STDDEV_SAMP *
SUM *
VAR_POP *
VAR_SAMP *
VARIANCE *
See Also:

Oracle9i Data Warehousing Guide for more information on these functions, and for scenarios illustrating their use

Object Reference Functions

Object reference functions manipulate REFs, which are references to objects of specified object types. The object reference functions are:

DEREF
MAKE_REF
REF
REFTOHEX
VALUE
See Also:

Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for more information about REFs

Press "Next" to go to the first SQL function.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 115 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SQRT

Syntax

sqrt::=

Text description of functions82.gif follows
Text description of sqrt

Purpose

SQRT returns the square root of n. The value n cannot be negative. SQRT returns a real number.

Examples

The following example returns the square root of 26:

SELECT SQRT(26) "Square root" FROM DUAL;

Square root
-----------
5.09901951
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 116 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STDDEV

Syntax

stddev::=

Text description of functions65.gif follows
Text description of stddev

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

STDDEV returns sample standard deviation of expr, a set of numbers. You can use it as both an aggregate and analytic function. It differs from STDDEV_SAMP in that STDDEV returns zero when it has only 1 row of input data, whereas STDDEV_SAMP returns a null.

Oracle calculates the standard deviation as the square root of the variance defined for the VARIANCE aggregate function.

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

See Also:
  • "Aggregate Functions" , VARIANCE , and STDDEV_SAMP
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Examples

The following example returns the standard deviation of the salaries in the sample hr.employees table:

SELECT STDDEV(salary) "Deviation"
   FROM employees;

 Deviation
----------
3909.36575

Analytic Examples

The query in the following example returns the cumulative standard deviation of the salaries in Department 80 in the sample table hr.employees, ordered by hire_date:

SELECT last_name, salary,
   STDDEV(salary) OVER (ORDER BY hire_date) "StdDev"
   FROM employees
   WHERE department_id = 30;

LAST_NAME                     SALARY     StdDev
------------------------- ---------- ----------
Raphaely                       11000          0
Khoo                            3100 5586.14357
Tobias                          2800  4650.0896
Baida                           2900 4035.26125
Himuro                          2600  3649.2465
Colmenares                      2500 3362.58829
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 117 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STDDEV_POP

Syntax

stddev_pop::=

Text description of functions159.gif follows
Text description of stddev_pop

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

STDDEV_POP computes the population standard deviation and returns the square root of the population variance. You can use it as both an aggregate and analytic function.

The expr is a number expression, and the function returns a value of type NUMBER. This function is the same as the square root of the VAR_POP function. When VAR_POP returns null, this function returns null.

See Also:
  • "Aggregate Functions" and VAR_POP
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example returns the population and sample standard deviations of the amount of sales in the sample table sh.sales:

SELECT STDDEV_POP(amount_sold) "Pop",
   STDDEV_SAMP(amount_sold) "Samp"
   FROM sales;

       Pop       Samp
---------- ----------
896.355151 896.355592

Analytic Example

The following example returns the population standard deviations of salaries in the sample hr.employees table by department:

SELECT department_id, last_name, salary,
   STDDEV_POP(salary) OVER (PARTITION BY department_id) AS pop_std
   FROM employees;

DEPARTMENT_ID LAST_NAME                     SALARY    POP_STD
------------- ------------------------- ---------- ----------
           10 Whalen                          4400          0
           20 Hartstein                      13000       3500
           20 Goyal                           6000       3500
.
.
.
          100 Sciarra                         7700 1644.18166
          100 Urman                           7800 1644.18166
          100 Popp                            6900 1644.18166
          110 Higgens                        12000       1850
          110 Gietz                           8300       1850
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 118 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STDDEV_SAMP

Syntax

stddev_samp::=

Text description of functions162.gif follows
Text description of stddev_samp

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

STDDEV_SAMP computes the cumulative sample standard deviation and returns the square root of the sample variance. You can use it as both an aggregate and analytic function.

The expr is a number expression, and the function returns a value of type NUMBER. This function is same as the square root of the VAR_SAMP function. When VAR_SAMP returns null, this function returns null.

See Also:
  • "Aggregate Functions" and VAR_SAMP
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example returns the population and sample standard deviations of the amount of sales in the sample table sh.sales:

SELECT STDDEV_POP(amount_sold) "Pop",
   STDDEV_SAMP(amount_sold) "Samp"
   FROM sales;

       Pop       Samp
---------- ----------
896.355151 896.355592

Analytic Example

The following example returns the sample standard deviation of salaries in the employees table by department:

SELECT department_id, last_name, hire_date, salary,
   STDDEV_SAMP(salary) OVER (PARTITION BY department_id
      ORDER BY hire_date
      ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cum_sdev
   FROM employees;

DEPARTMENT_ID LAST_NAME       HIRE_DATE     SALARY   CUM_SDEV
------------- --------------- --------- ---------- ----------
           10 Whalen          17-SEP-87       4400
           20 Hartstein       17-FEB-96      13000
           20 Goyal           17-AUG-97       6000 4949.74747
           30 Raphaely        07-DEC-94      11000
           30 Khoo            18-MAY-95       3100 5586.14357
           30 Tobias          24-JUL-97       2800  4650.0896
           30 Baida           24-DEC-97       2900 4035.26125
.
.
.
          100 Chen            28-SEP-97       8200 2003.33056
          100 Sciarra         30-SEP-97       7700 1925.91969
          100 Urman           07-MAR-98       7800 1785.49713
          100 Popp            07-DEC-99       6900 1801.11077
          110 Higgens         07-JUN-94      12000
          110 Gietz           07-JUN-94       8300 2616.29509
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 119 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SUBSTR

Syntax

substr::=

Text description of functions84.gif follows
Text description of substr

Purpose

The "substring" functions return a portion of string, beginning at character position, substring_length characters long. SUBSTR calculates lengths using characters as defined by the input character set. SUBSTRB uses bytes instead of characters. SUBSTRC uses Unicode complete characters. SUBSTR2 uses UCS2 codepoints. SUBSTR4 uses UCS4 codepoints.

  • If position is 0, then it is treated as 1.
  • If position is positive, then Oracle counts from the beginning of string to find the first character.
  • If position is negative, then Oracle counts backward from the end of string.
  • If substring_length is omitted, then Oracle returns all characters to the end of string. If substring_length is less than 1, then a null is returned.

string can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as string. Floating-point numbers passed as arguments to SUBSTR are automatically converted to integers.

Examples

The following example returns several specified substrings of "ABCDEFG":

SELECT SUBSTR('ABCDEFG',3,4) "Substring"
     FROM DUAL;

Substring
---------
CDEF

SELECT SUBSTR('ABCDEFG',-5,4) "Substring"
     FROM DUAL;

Substring
---------
CDEF

Assume a double-byte database character set:

SELECT SUBSTRB('ABCDEFG',5,4.2) "Substring with bytes"
     FROM DUAL;

Substring with bytes
--------------------
CD
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 120 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SUM

Syntax

sum::=

Text description of functions165.gif follows
Text description of sum

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

SUM returns the sum of values of expr. You can use it as an aggregate or analytic function.

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example calculates the sum of all salaries in the sample hr.employees table:

SELECT SUM(salary) "Total"
     FROM employees;

     Total
----------
    691400

Analytic Example

The following example calculates, for each manager in the sample table hr.employees, a cumulative total of salaries of employees who answer to that manager that are equal to or less than the current salary. You can see that Raphaely and Cambrault have the same cumulative total. This is because Raphaely and Cambrault have the identical salaries, so Oracle adds together their salary values and applies the same cumulative total to both rows.

SELECT manager_id, last_name, salary,
   SUM(salary) OVER (PARTITION BY manager_id ORDER BY salary
   RANGE UNBOUNDED PRECEDING) l_csum
   FROM employees;

MANAGER_ID LAST_NAME           SALARY     L_CSUM
---------- --------------- ---------- ----------
       100 Mourgos               5800       5800
       100 Vollman               6500      12300
       100 Kaufling              7900      20200
       100 Weiss                 8000      28200
       100 Fripp                 8200      36400
       100 Zlotkey              10500      46900
       100 Raphaely             11000      68900
       100 Cambrault            11000      68900
       100 Errazuriz            12000      80900
.
.
.
       149 Taylor                8600      30200
       149 Hutton                8800      39000
       149 Abel                 11000      50000
       201 Fay                   6000       6000
       205 Gietz                 8300       8300
           King                 24000      24000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 121 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_CONNECT_BY_PATH

Syntax

sys_connect_by_path::=

Text description of functions163.gif follows
Text description of sys_connect_by_path

Purpose

SYS_CONNECT_BY_PATH is valid only in hierarchical queries. It returns the path of a column value from root to node, with column values separated by char for each row returned by CONNECT BY condition.

Both column and char can be any of the datatypes CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The string returned is of VARCHAR2 datatype and is in the same character set as column.

See Also:

"Hierarchical Queries" for more information about hierarchical queries and CONNECT BY conditions

Examples

The following example returns the path of employee names from employee Kochhar to all employees of Kochhar (and their employees):

SELECT LPAD(' ', 2*level-1)||SYS_CONNECT_BY_PATH(last_name, '/') "Path"
   FROM employees
   START WITH last_name = 'Kochhar'
   CONNECT BY PRIOR employee_id = manager_id;

Path
---------------------------------------------------------------
 /Kochhar
   /Kochhar/Greenberg
     /Kochhar/Greenberg/Faviet
     /Kochhar/Greenberg/Chen
     /Kochhar/Greenberg/Sciarra
     /Kochhar/Greenberg/Urman
     /Kochhar/Greenberg/Popp
   /Kochhar/Whalen
   /Kochhar/Mavris
   /Kochhar/Baer
   /Kochhar/Higgins
     /Kochhar/Higgins/Gietz
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 122 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_CONTEXT

Syntax

sys_context::=

Text description of functions183.gif follows
Text description of sys_context

Purpose

SYS_CONTEXT returns the value of parameter associated with the context namespace. You can use this function in both SQL and PL/SQL statements.

For namespace and parameter, you can specify either a string (constant) or an expression that resolves to a string designating a namespace or an attribute. The context namespace must already have been created, and the associated parameter and its value must also have been set using the DBMS_SESSION.set_context procedure. The namespace must be a valid SQL identifier. The parameter name can be any string. It is not case sensitive, but it cannot exceed 30 bytes in length.

The datatype of the return value is VARCHAR2. The default maximum size of the return value is 256 bytes. You can override this default by specifying the optional length parameter. The valid range of values is 1 to 4000 bytes. (If you specify an invalid value, then Oracle ignores it and uses the default.)

Oracle9i provides a built-in namespace called USERENV, which describes the current session. The predefined parameters of namespace USERENV are listed Table 6-2 , along with the lengths of their return strings.

Restriction on SYS_CONTEXT

You cannot specify this function in a parallel query.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for information on using the application context feature in your application development
  • CREATE CONTEXT for information on creating user-defined context namespaces
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_SESSION.set_context procedure

Examples

The following statement returns the name of the user who logged onto the database:

CONNECT OE/OE
SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER')
   FROM DUAL;

SYS_CONTEXT ('USERENV', 'SESSION_USER')
------------------------------------------------------
OE

The following hypothetical example returns the group number that was set as the value for the attribute group_no in the PL/SQL package that was associated with the context hr_apps when hr_apps was created:

SELECT SYS_CONTEXT ('hr_apps', 'group_no') "User Group"
   FROM DUAL;
Table 6-2 Predefined Parameters of Namespace USERENV
Parameter Return Value Return Length (bytes)

AUDITED_CURSORID

Returns the cursor ID of the SQL that triggered the audit.

NA

AUTHENTICATION_DATA

Data being used to authenticate the login user. For X.503 certificate authenticated sessions, this field returns the context of the certificate in HEX2 format.

Note: You can change the return value of the AUTHENTICATION_DATA attribute using the length parameter of the syntax. Values of up to 4000 are accepted. This is the only attribute of USERENV for which Oracle implements such a change.

256

AUTHENTICATION_TYPE

How the user was authenticated:

  • DATABASE: user name/password authentication
  • OS: operating system external user authentication
  • NETWORK: network protocol or ANO authentication
  • PROXY: OCI proxy connection authentication

30

BG_JOB_ID

Job ID of the current session if it was established by an Oracle background process. Null if the session was not established by a background process.

64

CLIENT_IDENTIFIER

Returns the client session identifier in the global context--that is, the globally accessed application context or (in the OCI context) the OCI_ATTR_CLIENT_IDENTIFIER attribute. If no globally relevant identifier has been set, returns null.

NA

CLIENT_INFO

Returns up to 64 bytes of user session information that can be stored by an application using the DBMS_APPLICATION_INFO package.

64

CURRENT_SCHEMA

Name of the default schema being used in the current schema. This value can be changed during the session with an ALTER SESSION SET CURRENT_SCHEMA statement.

30

CURRENT_SCHEMAID

Identifier of the default schema being used in the current session.

30

CURRENT_SQL

Returns the current SQL that triggered the fine-grained auditing event. You can specify this attribute only inside the event handler for the Fine-Grained Auditing feature.

64

CURRENT_USER

The name of the user whose privilege the current session is under.

30

CURRENT_USERID

User ID of the user whose privilege the current session is under.

30

DB_DOMAIN

Domain of the database as specified in the DB_DOMAIN initialization parameter.

256

DB_NAME

Name of the database as specified in the DB_NAME initialization parameter.

30

ENTRY_ID

The available auditing entry identifier. You cannot use this attribute in distributed SQL statements. To use this keyword in USERENV, the initialization parameter AUDIT_TRAIL must be set to TRUE.

30

EXTERNAL_NAME

External name of the database user. For SSL authenticated sessions using v.503 certificates, this field returns the distinguished name (DN) stored in the user certificate.

256

FG_JOB_ID

Job ID of the current session if it was established by a client foreground process. Null if the session was not established by a foreground process.

30

GLOBAL_CONTEXT_MEMORY

Returns the number being used in the System Global Area by the globally accessed context.

NA

HOST

Name of the host machine from which the client has connected.

54

INSTANCE

The instance identification number of the current instance.

30

IP_ADDRESS

IP address of the machine from which the client is connected.

30

ISDBA

Returns TRUE if the user has been authenticated as having DBA privileges either through the operating system or through a password file.

30

LANG

The ISO abbreviation for the language name, a shorter form than the existing 'LANGUAGE' parameter.

62

LANGUAGE

The language and territory currently used by your session, along with the database character set, in this form:

language_territory.characterset

52

NETWORK_PROTOCOL

Network protocol being used for communication, as specified in the 'PROTOCOL=protocol' portion of the connect string.

256

NLS_CALENDAR

The current calendar of the current session.

62

NLS_CURRENCY

The currency of the current session.

62

NLS_DATE_FORMAT

The date format for the session.

62

NLS_DATE_LANGUAGE

The language used for expressing dates.

62

NLS_SORT

BINARY or the linguistic sort basis.

62

NLS_TERRITORY

The territory of the current session.

62

OS_USER

Operating system user name of the client process that initiated the database session.

30

PROXY_USER

Name of the database user who opened the current session on behalf of SESSION_USER.

30

PROXY_USERID

Identifier of the database user who opened the current session on behalf of SESSION_USER.

30

SESSION_USER

Database user name by which the current user is authenticated. This value remains the same throughout the duration of the session.

30

SESSION_USERID

Identifier of the database user name by which the current user is authenticated.

30

SESSIONID

The auditing session identifier. You cannot use this attribute in distributed SQL statements.

30

TERMINAL

The operating system identifier for the client of the current session. In distributed SQL statements, this attribute returns the identifier for your local session. In a distributed environment, this is supported only for remote SELECT statements, not for remote INSERT, UPDATE, or DELETE operations. (The return length of this parameter may vary by operating system.)

10
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 123 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_DBURIGEN

Syntax

sys_dburigen::=

Text description of functions133.gif follows
Text description of sys_dburigen

Purpose

SYS_DBURIGen takes as its argument one or more columns or attributes, and optionally a rowid, and generates a URL of datatype DBURIType to a particular column or row object. You can then use the URL to retrieve an XML document from the database.

All columns or attributes referenced must reside in the same table. They must perform the function of a primary key. That is, they need not actually match the primary keys of the table, but they must reference a unique value. If you specify multiple columns, then all but the final column identify the row in the database, and the last column specified identifies the column within the row.

By default the URL points to a formatted XML document. If you want the URL to point only to the text of the document, then specify the optional 'text()'. (In this XML context, the lowercase 'text' is a keyword, not a syntactic placeholder.)

If the table or view containing the columns or attributes does not have a schema specified in the context of the query, then Oracle interprets the table or view name as a public synonym.

See Also:

Oracle9i XML API Reference - XDK and Oracle XML DB and Oracle9i XML Developer's Kits Guide - XDK for information on the URIType datatype and XML documents in the database

Examples

The following example uses the SYS_DBURIGen function to generate a URL of datatype DBURIType to the email column of the row in the sample table hr.employees where the employee_id = 206:

SELECT SYS_DBURIGEN(employee_id, email)
   FROM employees
   WHERE employee_id = 206;

SYS_DBURIGEN(EMPLOYEE_ID,EMAIL)(URL, SPARE)
--------------------------------------------------------------------
DBURITYPE('/PUBLIC/EMPLOYEES/ROW[EMPLOYEE_ID=''206'']/EMAIL', NULL)
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 124 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_EXTRACT_UTC

Syntax

sys_extract_utc::=

Text description of functions59.gif follows
Text description of sys_extract_utc

Purpose

SYS_EXTRACT_UTC extracts the UTC (Coordinated Universal Time--formerly Greenwich Mean Time) from a datetime with time zone displacement.

Examples

The following example extracts the UTC from a specified datetime:

SELECT SYS_EXTRACT_UTC(TIMESTAMP '2000-03-28 11:30:00.00 -08:00')
   FROM DUAL;

SYS_EXTRACT_UTC(TIMESTAMP'2000-03-2811:30:00.00-08:00')
-----------------------------------------------------------------
28-MAR-00 07.30.00 PM
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 125 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_GUID

Syntax

sys_guid::=

Text description of functions88.gif follows
Text description of sys_guid

Purpose

SYS_GUID generates and returns a globally unique identifier (RAW value) made up of 16 bytes. On most platforms, the generated identifier consists of a host identifier and a process or thread identifier of the process or thread invoking the function, and a nonrepeating value (sequence of bytes) for that process or thread.

Examples

The following example adds a column to the sample table hr.locations, inserts unique identifiers into each row, and returns the 32-character hexadecimal representation of the 16-byte RAW value of the global unique identifier:

ALTER TABLE locations ADD (uid_col RAW(32));

UPDATE locations SET uid_col = SYS_GUID();

SELECT location_id, uid_col FROM locations;

LOCATION_ID UID_COL
----------- ----------------------------------------
       1000 7CD5B7769DF75CEFE034080020825436
       1100 7CD5B7769DF85CEFE034080020825436
       1200 7CD5B7769DF95CEFE034080020825436
       1300 7CD5B7769DFA5CEFE034080020825436
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 126 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_TYPEID

Syntax

sys_typeid::=

Text description of functions160.gif follows
Text description of sys_typeid

Purpose

SYS_TYPEID returns the typeid of the most specific type of the operand. This value is used primarily to identify the type-discriminant column underlying a substitutable column. For example, you can use the value returned by SYS_TYPEID to build an index on the type-discriminant column.

Notes:
  • Use this function only on object type operands.
  • All final root object types--that is, final types not belonging to a type hierarchy--have a null typeid. Oracle assigns to all types belonging to a type hierarchy a unique non-null typeid.
See Also:

Oracle9i Application Developer's Guide - Object-Relational Features for more information on typeids

Examples

The following examples use the tables persons and books, which are created in "Substitutable Table and Column Examples" . Both tables in turn use the person_t type, which is created in "Type Hierarchy Example" . The first query returns the most specific types of the object instances stored in the persons table.

SELECT name, SYS_TYPEID(VALUE(p)) "Type_id" FROM persons p;

NAME                      Type_id
------------------------- --------------------------------
Bob                       01
Joe                       02
Tim                       03

The next query returns the most specific types of authors stored in the table books:

SELECT b.title, b.author.name, SYS_TYPEID(author)
   "Type_ID" FROM books b;

TITLE                     AUTHOR.NAME          Type_ID
------------------------- -------------------- -------------------
An Autobiography          Bob                  01
Business Rules            Joe                  02
Mixing School and Work    Tim                  03

You can use the SYS_TYPEID function to create an index on the type-discriminant column of a table. For an example, see "Indexing on Substitutable Columns: Examples" .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 127 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_XMLAGG

Syntax

SYS_XMLAgg::=

Text description of functions136.gif follows
Text description of SYS_XMLAgg

Purpose

SYS_XMLAgg aggregates all of the XML documents or fragments represented by expr and produces a single XML document. It adds a new enclosing element with a default name ROWSET. If you want to format the XML document differently, then specify fmt, which is an instance of the XMLFormat object.

See Also:
  • "XML Format Model" for using the attributes of the XMLFormat type to format SYS_XMLAgg results
  • SYS_XMLGEN
  • Oracle9i XML API Reference - XDK and Oracle XML DB and Oracle9i XML Developer's Kits Guide - XDK for information on XML types and their use

Examples

The following example uses the SYS_XMLGen function to generate an XML document for each row of the sample table employees where the employee's last name begins with the letter R, and then aggregates all of the rows into a single XML document in the default enclosing element ROWSET:

SELECT SYS_XMLAGG(SYS_XMLGEN(last_name))
   FROM employees
   WHERE last_name LIKE 'R%';

SYS_XMLAGG(SYS_XMLGEN(LAST_NAME))
--------------------------------------------------------------------
<ROWSET>
  <LAST_NAME>Raphaely</LAST_NAME>
  <LAST_NAME>Rogers</LAST_NAME>
  <LAST_NAME>Rajs</LAST_NAME>
  <LAST_NAME>Russell</LAST_NAME>
</ROWSET>
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 128 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_XMLGEN

Syntax

SYS_XMLGen::=

Text description of functions139.gif follows
Text description of SYS_XMLGen

Purpose

SYS_XMLGen takes an expression that evaluates to a particular row and column of the database, and returns an instance of type XMLType containing an XML document. The expr can be a scalar value, a user-defined type, or an XMLType instance.

  • If expr is a scalar value, then the function returns an XML element containing the scalar value.
  • If expr is a type, then the function maps the user-defined type attributes to XML elements.
  • If expr is an XMLType instance, then the function encloses the document in an XML element whose default tag name is ROW.

By default the elements of the XML document match the elements of expr. For example, if expr resolves to a column name, then the enclosing XML element will be the same column name. If you want to format the XML document differently, then specify fmt, which is an instance of the XMLFormat object.

See Also:
  • "XML Format Model" for a description of the XMLFormat type and how to use its attributes to format SYS_XMLGen results
  • Oracle9i XML API Reference - XDK and Oracle XML DB and Oracle9i XML Developer's Kits Guide - XDK for information on XML types and their use

Examples

The following example retrieves the employee email ID from the sample table oe.employees where the employee_id value is 205, and generates an instance of an XMLType containing an XML document with an EMAIL element.

SELECT SYS_XMLGEN(email)
   FROM employees
   WHERE employee_id = 205;

SYS_XMLGEN(EMAIL)
-------------------------------------------------------------------
<EMAIL>SHIGGINS</EMAIL>
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Functions, 129 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYSDATE

Syntax

sysdate::=

Text description of functions185a.gif follows
Text description of sysdate

Purpose

SYSDATE returns the current date and time. The datatype of the returned value is DATE. The function requires no arguments. In distributed SQL statements, this function returns the date and time on your local database. You cannot use this function in the condition of a CHECK constraint.

Examples

The following example returns the current date and time:

SELECT TO_CHAR
    (SYSDATE, 'MM-DD-YYYY HH24:MI:SS')"NOW"
     FROM DUAL;

NOW
-------------------
04-13-2001 09:45:51
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 130 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYSTIMESTAMP

Syntax

systimestamp::=

Text description of functions181a.gif follows
Text description of systimestamp

Purpose

SYSTIMESTAMP returns the system date, including fractional seconds and time zone of the system on which the database resides. The return type is TIMESTAMP WITH TIME ZONE.

Examples

The following example returns the system date.

SELECT SYSTIMESTAMP FROM DUAL;

SYSTIMESTAMP
------------------------------------------------------------------
28-MAR-00 12.38.55.538741 PM -08:00

The following example shows how to explicitly specify fractional seconds:

SELECT TO_CHAR(SYSTIMESTAMP, 'SSSS.FF') FROM DUAL;

TO_CHAR(SYSTIM
--------------
5050.105900
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 131 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TAN

Syntax

tan::=

Text description of functions180b.gif follows
Text description of tan

Purpose

TAN returns the tangent of n (an angle expressed in radians).

Examples

The following example returns the tangent of 135 degrees:

SELECT TAN(135 * 3.14159265359/180)
   "Tangent of 135 degrees"  FROM DUAL;

Tangent of 135 degrees
----------------------
                   - 1
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 132 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TANH

Syntax

tanh::=

Text description of functions182a.gif follows
Text description of tanh

Purpose

TANH returns the hyperbolic tangent of n.

Examples

The following example returns the hyperbolic tangent of .5:

SELECT TANH(.5) "Hyperbolic tangent of .5"
   FROM DUAL;

Hyperbolic tangent of .5
------------------------
              .462117157
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 133 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_CHAR (character)

Syntax

to_char_char::=

Text description of functions183b.gif follows
Text description of to_char_char

Purpose

TO_CHAR (character) converts NCHAR, NVARCHAR2, CLOB, or NCLOB data to the database character set.

Examples

The following example interprets a simple string as character data:

SELECT TO_CHAR('01110') FROM DUAL;

TO_CH
-----
01110

Compare this example with the first example for TO_CHAR (number) .

The following example converts some CLOB data from the pm.print_media table to the database character set:

SELECT TO_CHAR(ad_sourcetext) FROM print_media
      WHERE product_id = 2268;

TO_CHAR(AD_SOURCETEXT)
--------------------------------------------------------------------
******************************
TIGER2 2268...Standard Hayes Compatible Modem
Product ID: 2268
The #1 selling modem in the universe! Tiger2's modem includes call
management and Internet voicing. Make real-time full duplex phone
calls at the same time you're online.
**********************************
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 134 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_CHAR (datetime)

Syntax

to_char_date::=

Text description of functions99.gif follows
Text description of to_char_date

Purpose

TO_CHAR (datetime) converts date of DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, or TIMESTAMP WITH LOCAL TIME ZONE datatype to a value of VARCHAR2 datatype in the format specified by the date format fmt. If you omit fmt, then date is converted to a VARCHAR2 value as follows:

  • DATE is converted to a value in the default date format.
  • TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE are converted to values in the default timestamp format.
  • TIMESTAMP WITH TIME ZONE is converted to a value in the default timestamp with time zone format.

The 'nlsparams' specifies the language in which month and day names and abbreviations are returned. This argument can have this form:

'NLS_DATE_LANGUAGE = language'

If you omit 'nlsparams', then this function uses the default date language for your session.

See Also:

"Format Models" for information on date formats

Examples

The following example uses this table:

CREATE TABLE date_tab (
   ts_col      TIMESTAMP,
   tsltz_col   TIMESTAMP WITH LOCAL TIME ZONE,
   tstz_col    TIMESTAMP WITH TIME ZONE);

The example shows the results of applying TO_CHAR to different TIMESTAMP datatypes. The result for a TIMESTAMP WITH LOCAL TIME ZONE column is sensitive to session time zone, whereas the results for the TIMESTAMP and TIMESTAMP WITH TIME ZONE columns are not sensitive to session time zone:

ALTER SESSION SET TIME_ZONE = '-8:00';
INSERT INTO date_tab VALUES (
   TIMESTAMP'1999-12-01 10:00:00',
   TIMESTAMP'1999-12-01 10:00:00',
   TIMESTAMP'1999-12-01 10:00:00');
INSERT INTO date_tab VALUES (
   TIMESTAMP'1999-12-02 10:00:00 -8:00',
   TIMESTAMP'1999-12-02 10:00:00 -8:00',
   TIMESTAMP'1999-12-02 10:00:00 -8:00');

SELECT TO_CHAR(ts_col, 'DD-MON-YYYY HH24:MI:SSxFF'),
   TO_CHAR(tstz_col, 'DD-MON-YYYY HH24:MI:SSxFF TZH:TZM')
   FROM date_tab;

TO_CHAR(TS_COL,'DD-MON-YYYYHH2 TO_CHAR(TSTZ_COL,'DD-MON-YYYYHH24:MI:
------------------------------ -------------------------------------
01-DEC-1999 10:00:00           01-DEC-1999 10:00:00.000000 -08:00
02-DEC-1999 10:00:00           02-DEC-1999 10:00:00.000000 -08:00

SELECT SESSIONTIMEZONE,
   TO_CHAR(tsltz_col, 'DD-MON-YYYY HH24:MI:SSxFF')
   FROM date_tab;

SESSIONTIMEZONE  TO_CHAR(TSLTZ_COL,'DD-MON-YYYY
---------------  ------------------------------
-08:00           01-DEC-1999 10:00:00.000000
-08:00           02-DEC-1999 10:00:00.000000

ALTER SESSION SET TIME_ZONE = '-5:00';
SELECT TO_CHAR(ts_col, 'DD-MON-YYYY HH24:MI:SSxFF'),
   TO_CHAR(tstz_col, 'DD-MON-YYYY HH24:MI:SSxFF TZH:TZM')
   FROM date_tab;

TO_CHAR(TS_COL,'DD-MON-YYYYHH2 TO_CHAR(TSTZ_COL,'DD-MON-YYYYHH24:MI:
------------------------------ -------------------------------------
01-DEC-1999 10:00:00.000000    01-DEC-1999 10:00:00.000000 -08:00
02-DEC-1999 10:00:00.000000    02-DEC-1999 10:00:00.000000 -08:00

SELECT SESSIONTIMEZONE,
   TO_CHAR(tsltz_col, 'DD-MON-YYYY HH24:MI:SSxFF')
   FROM date_tab;

SESSIONTIMEZONE           TO_CHAR(TSLTZ_COL,'DD-MON-YYYY
------------------------- ------------------------------
-05:00                    01-DEC-1999 13:00:00.000000
-05:00                    02-DEC-1999 13:00:00.000000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 135 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_CHAR (number)

Syntax

to_char_number::=

Text description of functions102.gif follows
Text description of to_char_number

Purpose

TO_CHAR (number) converts n of NUMBER datatype to a value of VARCHAR2 datatype, using the optional number format fmt. If you omit fmt, then n is converted to a VARCHAR2 value exactly long enough to hold its significant digits.

The 'nlsparam' specifies these characters that are returned by number format elements:

  • Decimal character
  • Group separator
  • Local currency symbol
  • International currency symbol

This argument can have this form:

'NLS_NUMERIC_CHARACTERS = ''dg''
   NLS_CURRENCY = ''text''
   NLS_ISO_CURRENCY = territory '

The characters d and g represent the decimal character and group separator, respectively. They must be different single-byte characters. Within the quoted string, you must use two single quotation marks around the parameter values. Ten characters are available for the currency symbol.

If you omit 'nlsparam' or any one of the parameters, then this function uses the default parameter values for your session.

See Also:

"Format Models" for information on number formats

Examples

The following statement uses implicit conversion to interpret a string and a number into a number:

SELECT TO_CHAR('01110' + 1) FROM dual;

TO_C
----
1111

Compare this example with the first example for TO_CHAR (character) .

In the next example, the output is blank padded to the left of the currency symbol.

SELECT TO_CHAR(-10000,'L99G999D99MI') "Amount"
     FROM DUAL;

Amount
--------------
  $10,000.00-

SELECT TO_CHAR(-10000,'L99G999D99MI',
   'NLS_NUMERIC_CHARACTERS = '',.''
   NLS_CURRENCY = ''AusDollars'' ') "Amount"
     FROM DUAL;

Amount
-------------------
AusDollars10.000,00-
Note:

In the optional number format fmt, L designates local currency symbol and MI designates a trailing minus sign. See Table 2-13 for a complete listing of number format elements.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Functions, 136 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_CLOB

Syntax

to_clob::=

Text description of functions124.gif follows
Text description of to_clob

Purpose

TO_CLOB converts NCLOB values in a LOB column or other character strings to CLOB values. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. Oracle executes this function by converting the underlying LOB data from the national character set to the database character set.

Examples

The following statement converts NCLOB data from the sample pm.print_media table to CLOB and inserts it into a CLOB column, replacing existing data in that column.

UPDATE PRINT_MEDIA
   SET AD_FINALTEXT = TO_CLOB (AD_FLTEXTN);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 137 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_DATE

Syntax

to_date::=

Text description of functions105.gif follows
Text description of to_date

Purpose

TO_DATE converts char of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to a value of DATE datatype. The fmt is a date format specifying the format of char. If you omit fmt, then char must be in the default date format. If fmt is 'J', for Julian, then char must be an integer.

Note:

This function does not convert data to any of the other datetime datatypes. For information on other datetime conversions, please refer to TO_TIMESTAMP , TO_TIMESTAMP_TZ , TO_DSINTERVAL , and "TO_YMINTERVAL" .

The default date format is determined implicitly by the NLS_TERRITORY initialization parameter, or can be set explicitly by the NLS_DATE_FORMAT parameter.

The 'nlsparam' has the same purpose in this function as in the TO_CHAR function for date conversion.

Do not use the TO_DATE function with a DATE value for the char argument. The first two digits of the returned DATE value can differ from the original char, depending on fmt or the default date format.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.
See Also:

"Date Format Models"

Examples

The following example converts a character string into a date:

SELECT TO_DATE(
    'January 15, 1989, 11:00 A.M.',
    'Month dd, YYYY, HH:MI A.M.',
     'NLS_DATE_LANGUAGE = American')
     FROM DUAL;

TO_DATE('
---------
15-JAN-89

The value returned reflects the default date format if the NLS_TERRITORY parameter is set to 'AMERICA'. Different NLS_TERRITORY values result in different default date formats:

ALTER SESSION SET NLS_TERRITORY = 'KOREAN';

SELECT TO_DATE(
    'January 15, 1989, 11:00 A.M.',
    'Month dd, YYYY, HH:MI A.M.',
     'NLS_DATE_LANGUAGE = American')
     FROM DUAL;

TO_DATE(
--------
89/01/15
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 138 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_DSINTERVAL

Syntax

to_dsinterval::=

Text description of functions66.gif follows
Text description of to_dsinterval

Purpose

TO_DSINTERVAL converts a character string of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to an INTERVAL DAY TO SECOND type.

  • char is the character string to be converted.
  • The only valid nlsparam you can specify in this function is NLS_NUMERIC_CHARACTERS. This argument can have the form:
    NLS_NUMERIC_CHARACTERS = "dg"

    where d and g represent the decimal character and group separator respectively.

Examples

The following example selects from the employees table the employees who had worked for the company for at least 100 days on January 1, 1990:

SELECT employee_id, last_name FROM employees
   WHERE hire_date + TO_DSINTERVAL('100 10:00:00')
   <= DATE '1990-01-01';

EMPLOYEE_ID LAST_NAME
----------- ---------------
        100 King
        101 Kochhar
        200 Whalen
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 139 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_LOB

Syntax

to_LOB::=

Text description of functions184b.gif follows
Text description of to_LOB

Purpose

TO_LOB converts LONG or LONG RAW values in the column long_column to LOB values. You can apply this function only to a LONG or LONG RAW column, and only in the SELECT list of a subquery in an INSERT statement.

Before using this function, you must create a LOB column to receive the converted LONG values. To convert LONGs, create a CLOB column. To convert LONG RAWs, create a BLOB column.

Note:

You cannot use the TO_LOB function to convert a LONG column to a LOB column in the subquery of a CREATE TABLE ...AS SELECT statement if you are creating an index-organized table. Instead, create the index-organized table without the LONG column, and then use the TO_LOB function in an INSERT ... AS SELECT statement.
See Also:
  • the modify_col_properties clause of ALTER TABLE for an alternative method of converting LONG columns to LOB
  • INSERT for information on the subquery of an INSERT statement

Examples

The sample table pm.print_media has a column press_release of type LONG. This example re-creates part of the table, with LOB data in the press_release column:

CREATE TABLE new_print_media (
   product_id       NUMBER(6),
   ad_id            NUMBER(6),
   press_release    CLOB);

INSERT INTO new_print_media
   (SELECT p.product_id, p.ad_id, TO_LOB(p.press_release)
      FROM print_media p);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 140 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_MULTI_BYTE

Syntax

to_multi_byte::=

Text description of functions183a.gif follows
Text description of to_multi_byte

Purpose

TO_MULTI_BYTE returns char with all of its single-byte characters converted to their corresponding multibyte characters. char can be of datatype CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The value returned is in the same datatype as char.

Any single-byte characters in char that have no multibyte equivalents appear in the output string as single-byte characters. This function is useful only if your database character set contains both single-byte and multibyte characters.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example illustrates converting from a single byte 'A' to a multibyte 'A' in UTF8:

SELECT dump(TO_MULTI_BYTE( 'A')) FROM DUAL;

DUMP(TO_MULTI_BYTE('A'))
------------------------
Typ=1 Len=3: 239,188,161
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 141 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_NCHAR (character)

Syntax

to_nchar_char::=

Text description of functions112.gif follows
Text description of to_nchar_char

Purpose

TO_NCHAR (character) converts a character string, CLOB, or NCLOB from the database character set to the national character set. This function is equivalent to the TRANSLATE ... USING function with a USING clause in the national character set.

See Also:

"Data Conversion" and TRANSLATE ... USING

Examples

The following example converts NCLOB data from the pm.print_media table to the national character set:

SELECT TO_NCHAR(ad_fltextn) FROM print_media
   WHERE product_id = 3106;

TO_NCHAR(AD_FLTEXTN)
------------------------------------------------------------------------
TIGER2  Tastaturen...weltweit fuehrend in Computer-Ergonomie.
TIGER2 3106 Tastatur
Product Nummer: 3106
Nur 39 EURO!
Die Tastatur KB 101/CH-DE ist eine Standard PC/AT Tastatur mit 102
Tasten. Tasta
turbelegung: Schweizerdeutsch.
. NEU: Kommt mit ergonomischer Schaumstoffunterlage.
. Extraflache und ergonimisch-geknickte Versionen verfugbar auf Anfrage.
. Lieferbar in Elfenbein, Rot oder Schwarz.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 142 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_NCHAR (datetime)

Syntax

to_nchar_date::=

Text description of functions109.gif follows
Text description of to_nchar_date

Purpose

TO_NCHAR (datetime) converts a character string of DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE, INTERVAL MONTH TO YEAR, or INTERVAL DAY TO SECOND datatype from the database character set to the national character set.

Examples

SELECT TO_NCHAR(order_date) FROM orders
   WHERE order_status > 9;

TO_NCHAR(ORDER_DATE)
----------------------------
14-SEP-99 08.53.40.223345 AM
13-SEP-99 09.19.00.654279 AM
27-JUN-00 08.53.32.335522 PM
26-JUN-00 09.19.43.190089 PM
06-DEC-99 01.22.34.225609 PM
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 143 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_NCHAR (number)

Syntax

to_nchar_number::=

Text description of functions106.gif follows
Text description of to_nchar_number

Purpose

TO_NCHAR (number) converts a number to a string in the NVARCHAR2 character set. The optional fmt and 'nlsparam' corresponding to n can be of DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE, INTERVAL MONTH TO YEAR, or INTERVAL DAY TO SECOND datatype.

Examples

SELECT TO_NCHAR(customer_id) "NCHAR_Customer_ID"  FROM orders
   WHERE order_status > 9;

NCHAR_Customer_ID
-----------------
102
103
148
149
148
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 144 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_NCLOB

Syntax

to_nclob::=

Text description of functions127.gif follows
Text description of to_nclob

Purpose

TO_NCLOB converts CLOB values in a LOB column or other character strings to NCLOB values. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. Oracle implements this function by converting the character set of the LOB column from the database character set to the national character set.

Examples

The following example inserts some character data into an NCLOB column of the pm.print_media table by first converting the data with the TO_NCLOB function:

INSERT INTO print_media (product_id, ad_id, ad_fltextn)
   VALUES (3502, 31001,
      TO_NCLOB('Placeholder for new product description'));
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 145 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_NUMBER

Syntax

to_number::=

Text description of functions114.gif follows
Text description of to_number

Purpose

TO_NUMBER converts char, a value of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype containing a number in the format specified by the optional format model fmt, to a value of NUMBER datatype.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example converts character string data into a number:

UPDATE employees SET salary = salary +
   TO_NUMBER('100.00', '9G999D99')
   WHERE last_name = 'Perkins';

The 'nlsparam' string in this function has the same purpose as it does in the TO_CHAR function for number conversions.

See Also:

TO_CHAR (number)

SELECT TO_NUMBER('-AusDollars100','L9G999D99',
   ' NLS_NUMERIC_CHARACTERS = '',.''
     NLS_CURRENCY            = ''AusDollars''
   ') "Amount"
     FROM DUAL;

    Amount
----------
      -100
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 146 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_SINGLE_BYTE

Syntax

to_single_byte::=

Text description of functions117.gif follows
Text description of to_single_byte

Purpose

TO_SINGLE_BYTE returns char with all of its multibyte characters converted to their corresponding single-byte characters. char can be of datatype CHAR, VARCHAR2, NCHAR, or NVARCHAR2. The value returned is in the same datatype as char.

Any multibyte characters in char that have no single-byte equivalents appear in the output as multibyte characters. This function is useful only if your database character set contains both single-byte and multibyte characters.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example illustrates going from a multibyte 'A' in UTF8 to a single byte ASCII 'A':

SELECT TO_SINGLE_BYTE( CHR(15711393)) FROM DUAL;

T
-
A
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 147 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_TIMESTAMP

Syntax

to_timestamp::=

Text description of functions69.gif follows
Text description of to_timestamp

Purpose

TO_TIMESTAMP converts char of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to a value of TIMESTAMP datatype.

The optional fmt specifies the format of char. If you omit fmt, then char must be in the default format of the TIMESTAMP datatype. The optional 'nlsparam' has the same purpose in this function as in the TO_CHAR function for date conversion.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.
Examples

The following example converts a character string to a timestamp:

SELECT TO_TIMESTAMP ('1999-12-01 11:00:00', 'YYYY-MM-DD HH:MI:SS')
   FROM DUAL;

TO_TIMESTAMP('1999-12-0111:00:00','YYYY-MM-DDHH:MI:SS')
-----------------------------------------------------------
01-DEC-99 11.00.00.000000000 AM
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 148 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_TIMESTAMP_TZ

Syntax

to_timestamp_tz::=

Text description of functions72.gif follows
Text description of to_timestamp_tz

Purpose

TO_TIMESTAMP_TZ converts char of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to a value of TIMESTAMP WITH TIME ZONE datatype.

Note:

This function does not convert character strings to TIMESTAMP WITH LOCAL TIME ZONE. To do this, use a CAST function, as shown in CAST .

The optional fmt specifies the format of char. If you omit fmt, then char must be in the default format of the TIMESTAMP WITH TIME ZONE datatype. The optional 'nlsparam' has the same purpose in this function as in the TO_CHAR function for date conversion.

Examples

The following example converts a character string to a value of TIMESTAMP WITH TIME ZONE:

SELECT TO_TIMESTAMP_TZ('1999-12-01 11:00:00 -8:00',
   'YYYY-MM-DD HH:MI:SS TZH:TZM') FROM DUAL;

TO_TIMESTAMP_TZ('1999-12-0111:00:00-08:00','YYYY-MM-DDHH:MI:SSTZH:TZM')
--------------------------------------------------------------------
01-DEC-99 11.00.00.000000000 AM -08:00

The following example casts a null column in a UNION operation as TIMESTAMP WITH LOCAL TIME ZONE using the sample tables oe.order_items and oe.orders:

SELECT order_id, line_item_id,
   CAST(NULL AS TIMESTAMP WITH LOCAL TIME ZONE) order_date
   FROM order_items
UNION
SELECT order_id, to_number(null), order_date
   FROM orders;

  ORDER_ID LINE_ITEM_ID ORDER_DATE
---------- ------------ -----------------------------------
      2354            1
      2354            2
      2354            3
      2354            4
      2354            5
      2354            6
      2354            7
      2354            8
      2354            9
      2354           10
      2354           11
      2354           12
      2354           13
      2354              14-JUL-00 05.18.23.234567 PM
      2355            1
      2355            2
...
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 149 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TO_YMINTERVAL

Syntax

to_yminterval::=

Text description of functions64.gif follows
Text description of to_yminterval

Purpose

TO_YMINTERVAL converts a character string of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to an INTERVAL YEAR TO MONTH type, where char is the character string to be converted.

Examples

The following example calculates for each employee in the sample hr.employees table a date one year two months after the hire date:

SELECT hire_date, hire_date + TO_YMINTERVAL('01-02') "14 months"
   FROM employees;

HIRE_DATE 14 months
--------- ---------
17-JUN-87 17-AUG-88
21-SEP-89 21-NOV-90
13-JAN-93 13-MAR-94
03-JAN-90 03-MAR-91
21-MAY-91 21-JUL-92
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 150 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRANSLATE

Syntax

translate::=

Text description of functions120.gif follows
Text description of translate

Purpose

TRANSLATE returns char with all occurrences of each character in from_string replaced by its corresponding character in to_string. Characters in char that are not in from_string are not replaced. The argument from_string can contain more characters than to_string. In this case, the extra characters at the end of from_string have no corresponding characters in to_string. If these extra characters appear in char, then they are removed from the return value.

You cannot use an empty string for to_string to remove all characters in from_string from the return value. Oracle interprets the empty string as null, and if this function has a null argument, then it returns null.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following statement translates a license number. All letters 'ABC...Z' are translated to 'X' and all digits '012 . . . 9' are translated to '9':

SELECT TRANSLATE('2KRW229',
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'9999999999XXXXXXXXXXXXXXXXXXXXXXXXXX') "License"
     FROM DUAL;

License
--------
9XXX999

The following statement returns a license number with the characters removed and the digits remaining:

SELECT TRANSLATE('2KRW229',
   '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
   "Translate example"
     FROM DUAL;

Translate example
-----------------
2229
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 151 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRANSLATE ... USING

Syntax

translate_using::=

Text description of functions123.gif follows
Text description of translate_using

Purpose

TRANSLATE ... USING converts text into the character set specified for conversions between the database character set and the national character set.

Note:

The TRANSLATE ... USING function is supported primarily for ANSI compatibility. Oracle Corporation recommends that you use the TO_CHAR and TO_NCHAR functions, as appropriate, for converting data to the database or national character set. TO_CHAR and TO_NCHAR can take as arguments a greater variety of datatypes than TRANSLATE ... USING, which accepts only character data.

The text argument is the expression to be converted.

  • Specifying the USING CHAR_CS argument converts text into the database character set. The output datatype is VARCHAR2.
  • Specifying the USING NCHAR_CS argument converts text into the national character set. The output datatype is NVARCHAR2.

This function is similar to the Oracle CONVERT function, but must be used instead of CONVERT if either the input or the output datatype is being used as NCHAR or NVARCHAR2. If the input contains UCS2 codepoints or backslash characters (\), then use the UNISTR function.

See Also:

CONVERT and UNISTR

Examples

The following statements use data from the sample table oe.product_descriptions to show the use of the TRANSLATE ... USING function:

CREATE TABLE translate_tab (char_col  VARCHAR2(100),
                            nchar_col NVARCHAR2(50));
INSERT INTO translate_tab
   SELECT NULL, translated_name
      FROM product_descriptions
      WHERE product_id = 3501;

SELECT * FROM translate_tab;

CHAR_COL                  NCHAR_COL
------------------------- -------------------------
...
                          C per a SPNIX4.0 - Sys
                          C pro SPNIX4.0 - Sys
                          C for SPNIX4.0 - Sys
                          C til SPNIX4.0 - Sys
...

UPDATE translate_tab
   SET char_col = TRANSLATE (nchar_col USING CHAR_CS);

SELECT * FROM translate_tab;

CHAR_COL                  NCHAR_COL
------------------------- -------------------------
...
C per a SPNIX4.0 - Sys    C per a SPNIX4.0 - Sys
C pro SPNIX4.0 - Sys      C pro SPNIX4.0 - Sys
C for SPNIX4.0 - Sys      C for SPNIX4.0 - Sys
C til SPNIX4.0 - Sys      C til SPNIX4.0 - Sys
...
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


Functions, 152 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TREAT

Syntax

treat::=

Text description of functions100.gif follows
Text description of treat

Purpose

TREAT changes the declared type of an expression.

You must have the EXECUTE object privilege on type to use this function.

  • If the declared type of expr is source_type, then type must be some supertype or subtype of source_type. If the most specific type of expr is type (or some subtype of type), then TREAT returns expr. If the most specific type of expr is not type (or some subtype of type), then TREAT returns NULL.
  • If the declared type of expr is REF source_type, then type must be some subtype or supertype of source_type. If the most specific type of DEREF(expr) is type (or a subtype of type), then TREAT returns expr. If the most specific type of DEREF(expr) is not type (or a subtype of type), then TREAT returns NULL.

    Note:

    This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following statement uses the table oe.persons, which is created in "Substitutable Table and Column Examples" . That table is based on the person_t type, which is created in "Type Hierarchy Example" . The example retrieves the salary attribute of all people in the persons table, the value being null for instances of people that are not employees.

SELECT name, TREAT(VALUE(p) AS employee_t).salary salary
   FROM persons p;

NAME                          SALARY
------------------------- ----------
Bob
Joe                           100000
Tim                             1000

You can use the TREAT function to create an index on the subtype attributes of a substitutable column. For an example, see "Indexing on Substitutable Columns: Examples" .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


Functions, 153 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRIM

Syntax

trim::=

Text description of functions126.gif follows
Text description of trim

Purpose

TRIM enables you to trim leading or trailing characters (or both) from a character string. If trim_character or trim_source is a character literal, then you must enclose it in single quotes.

  • If you specify LEADING, then Oracle removes any leading characters equal to trim_character.
  • If you specify TRAILING, then Oracle removes any trailing characters equal to trim_character.
  • If you specify BOTH or none of the three, then Oracle removes leading and trailing characters equal to trim_character.
  • If you do not specify trim_character, then the default value is a blank space.
  • If you specify only trim_source, then Oracle removes leading and trailing blank spaces.
  • The function returns a value with datatype VARCHAR2. The maximum length of the value is the length of trim_source.
  • If either trim_source or trim_character is null, then the TRIM function returns null.

Both trim_character and trim_source can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The string returned is of VARCHAR2 datatype and is in the same character set as trim_source.

Examples

This example trims leading and trailing zeroes from a number:

SELECT TRIM (0 FROM 0009872348900) "TRIM Example"
   FROM DUAL;

TRIM Example
------------
    98723489
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 155 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRUNC (date)

Syntax

trunc_date::=

Text description of functions135.gif follows
Text description of trunc_date

Purpose

The TRUNC (date) function returns date with the time portion of the day truncated to the unit specified by the format model fmt. If you omit fmt, then date is truncated to the nearest day.

See Also:

"ROUND and TRUNC Date Functions" for the permitted format models to use in fmt

Examples

The following example truncates a date:

SELECT TRUNC(TO_DATE('27-OCT-92','DD-MON-YY'), 'YEAR')
  "New Year" FROM DUAL;

New Year
---------
01-JAN-92
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 154 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRUNC (number)

Syntax

trunc_number::=

Text description of functions132.gif follows
Text description of trunc_number

Purpose

The TRUNC (number) function returns n truncated to m decimal places. If m is omitted, then n is truncated to 0 places. m can be negative to truncate (make zero) m digits left of the decimal point.

Examples

The following example truncate numbers:

SELECT TRUNC(15.79,1) "Truncate" FROM DUAL;

  Truncate
----------
      15.7

SELECT TRUNC(15.79,-1) "Truncate" FROM DUAL;

  Truncate
----------
        10
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 156 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TZ_OFFSET

Syntax

tz_offset::=

Text description of functions32.gif follows
Text description of tz_offset

Purpose

TZ_OFFSET returns the time zone offset corresponding to the value entered based on the date the statement is executed. You can enter a valid time zone name, a time zone offset from UTC (which simply returns itself), or the keyword SESSIONTIMEZONE or DBTIMEZONE. For a listing of valid values, query the TZNAME column of the V$TIMEZONE_NAMES dynamic performance view.

See Also:

Oracle9i Database Reference for information on the dynamic performance views

Examples

The following example returns the time zone offset of the US/Eastern time zone from UTC:

SELECT TZ_OFFSET('US/Eastern') FROM DUAL;

TZ_OFFS
-------
-04:00
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 157 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UID

Syntax

uid::=

Text description of functions138.gif follows
Text description of uid

Purpose

UID returns an integer that uniquely identifies the session user (the user who logged on).

Examples

The following example returns the UID of the current user:

SELECT UID FROM DUAL;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Functions, 158 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNISTR

Syntax

unistr::=

Text description of functions81.gif follows
Text description of unistr

Purpose

UNISTR takes as its argument a string and returns it in the national character set.The national character set of the database can be either AL16UTF16 or UTF8. UNISTR provides support for Unicode string literals by letting you specify the Unicode encoding value of characters in the string. This is useful, for example, for inserting data into NCHAR columns.

The Unicode encoding value has the form '\xxxx' where 'xxxx' is the hexadecimal value of a character in UCS-2 encoding format. To include the backslash in the string itself, precede it with another backslash (\\).

For portability and data preservation, Oracle Corporation recommends that in the UNISTR string argument you specify only ASCII characters and the Unicode encoding values.

See Also:

Oracle9i Database Globalization Support Guide for information on Unicode and and national character sets

Examples

The following example passes both ASCII characters and Unicode encoding values to the UNISTR function, which returns the string in the national character set:

SELECT UNISTR('abc\00e5\00f1\00f6') FROM DUAL;

UNISTR
------
abcåñö
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Functions, 159 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UPDATEXML

Syntax

updatexml::=

Text description of functions11.gif follows
Text description of updatexml

Purpose

UPDATEXML takes as arguments an XMLType instance and an XPath-value pair, and returns an XMLType instance with the updated value. If XPath_string is an XML element, then the corresponding value_expr must be an XMLType instance. If XPath_string is an attribute or text node, then the value_expr can be any scalar datatype. The datatypes of the target of each XPath_string and its corresponding value_expr must match. The optional namespace_string must resolve to a VARCHAR2 value that specifies a default mapping or namespace mapping for prefixes, which Oracle uses when evaluating the XPath expression(s).

If you update an XML element to null, Oracle removes the attributes and children of the element, and the element becomes empty. If you update the text node of an element to null, Oracle removes the text value of the element, and the element itself remains but is empty.

In most cases, this function materializes an XML document in memory and updates the value. However, UPDATEXML is optimized for UPDATE statements on object-relational columns so that the function updates the value directly in the column. This optimization requires the following conditions:

  • The XMLType_instance must be the same as the column in the UPDATE ... SET clause.
  • The XPath_string must resolve to scalar content.

Examples

The following example updates to 4 the number of docks in the San Francisco warehouse in the sample schema OE, which has a warehouse_spec column of type XMLType:

SELECT warehouse_name,
   EXTRACT(warehouse_spec, '/Warehouse/Docks')
   "Number of Docks"
   FROM warehouses
   WHERE warehouse_name = 'San Francisco';

WAREHOUSE_NAME       Number of Docks
-------------------- --------------------
San Francisco        <Docks>1</Docks>

UPDATE warehouses SET warehouse_spec =
   UPDATEXML(warehouse_spec,
   '/Warehouse/Docks/text()',4)
   WHERE warehouse_name = 'San Francisco';

1 row updated.

SELECT warehouse_name,
   EXTRACT(warehouse_spec, '/Warehouse/Docks')
   "Number of Docks"
   FROM warehouses
   WHERE warehouse_name = 'San Francisco';

WAREHOUSE_NAME       Number of Docks
-------------------- --------------------
San Francisco        <Docks>4</Docks>
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 160 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UPPER

Syntax

upper::=

Text description of functions141.gif follows
Text description of upper

Purpose

UPPER returns char, with all letters uppercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char.

Examples

The following example returns a string in uppercase:

SELECT UPPER('Large') "Uppercase"
   FROM DUAL;

Upper
-----
LARGE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 161 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER

Syntax

user::=

Text description of functions144.gif follows
Text description of user

Purpose

USER returns the name of the session user (the user who logged on) with the datatype VARCHAR2. Oracle compares values of this function with blank-padded comparison semantics.

In a distributed SQL statement, the UID and USER functions identify the user on your local database. You cannot use these functions in the condition of a CHECK constraint.

Examples

The following example returns the current user and the user's UID:

SELECT USER, UID FROM DUAL;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 162 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USERENV

Syntax

userenv::=

Text description of functions147.gif follows
Text description of userenv

Purpose

Note:

USERENV is a legacy function that is retained for backward compatibility. Oracle Corporation recommends that you use the SYS_CONTEXT function with the built-in USERENV namespace for current functionality. See SYS_CONTEXT for more information.

USERENV returns information about the current session. This information can be useful for writing an application-specific audit trail table or for determining the language-specific characters currently used by your session. You cannot use USERENV in the condition of a CHECK constraint. Table 6-3 describes the values for the parameter argument.

All calls to USERENV return VARCHAR2 data except for calls with the SESSIONID, ENTRYID, and COMMITSCN parameters, which return NUMBER.

Table 6-3 Parameters of the USERENV Function
Parameter Return Value

CLIENT_INFO

CLIENT_INFO returns up to 64 bytes of user session information that can be stored by an application using the DBMS_APPLICATION_INFO package.

Caution: Some commercial applications may be using this context value. Check the applicable documentation for those applications to determine what restrictions they may impose on use of this context area.

See Also:

  • Oracle9i Database Concepts for more on application context
  • CREATE CONTEXT and SYS_CONTEXT

ENTRYID

ENTRYID returns available auditing entry identifier. You cannot use this attribute in distributed SQL statements. To use this keyword in USERENV, the initialization parameter AUDIT_TRAIL must be set to TRUE.

ISDBA

ISDBA returns 'TRUE' if the user has been authenticated as having DBA privileges either through the operating system or through a password file.

LANG

LANG returns the ISO abbreviation for the language name, a shorter form than the existing 'LANGUAGE' parameter.

LANGUAGE

LANGUAGE returns the language and territory currently used by your session along with the database character set in this form:

language_territory.characterset

SESSIONID

SESSIONID returns your auditing session identifier. You cannot use this attribute in distributed SQL statements.

TERMINAL

TERMINAL returns the operating system identifier for your current session's terminal. In distributed SQL statements, this attribute returns the identifier for your local session. In a distributed environment, this is supported only for remote SELECT statements, not for remote INSERT, UPDATE, or DELETE operations.

Examples

The following example returns the LANGUAGE parameter of the current session:

SELECT USERENV('LANGUAGE') "Language" FROM DUAL;

Language
-----------------------------------
AMERICAN_AMERICA.WE8DEC
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 163 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

VALUE

Syntax

value::=

Text description of functions150.gif follows
Text description of value

Purpose

VALUE takes as its argument a correlation variable (table alias) associated with a row of an object table and returns object instances stored in the object table. The type of the object instances is the same type as the object table.

Examples

The following example uses the sample table oe.persons, which is created in
"Substitutable Table and Column Examples": SELECT VALUE(p) FROM
persons p;

VALUE(P)(NAME, SSN)
-------------------------------------------------------------
PERSON_T('Bob', 1234)
EMPLOYEE_T('Joe', 32456, 12, 100000)
PART_TIME_EMP_T('Tim', 5678, 13, 1000, 20)
See Also:

"IS OF type Conditions" for information on using IS OF type conditions with the VALUE function
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


Functions, 164 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

VAR_POP

Syntax

var_pop::=

Text description of functions86.gif follows
Text description of var_pop

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

VAR_POP returns the population variance of a set of numbers after discarding the nulls in this set. You can use it as both an aggregate and analytic function.

The expr is a number expression, and the function returns a value of type NUMBER. If the function is applied to an empty set, then it returns null. The function makes the following calculation:

(SUM(expr2) - SUM(expr)2 / COUNT(expr)) / COUNT(expr)
See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example returns the population variance of the salaries in the employees table:

SELECT VAR_POP(salary) FROM employees;

VAR_POP(SALARY)
---------------
     15140307.5

Analytic Example

The following example calculates the cumulative population and sample variances of the monthly sales in 1998:

SELECT t.calendar_month_desc,
   VAR_POP(SUM(s.amount_sold))
      OVER (ORDER BY t.calendar_month_desc) "Var_Pop",
   VAR_SAMP(SUM(s.amount_sold))
      OVER (ORDER BY t.calendar_month_desc) "Var_Samp"
  FROM sales s, times t
  WHERE s.time_id = t.time_id AND t.calendar_year = 1998
  GROUP BY t.calendar_month_desc;

CALENDAR    Var_Pop   Var_Samp
-------- ---------- ----------
1998-01           0
1998-02  6.1321E+11 1.2264E+12
1998-03  4.7058E+11 7.0587E+11
1998-04  4.6929E+11 6.2572E+11
1998-05  1.5524E+12 1.9405E+12
1998-06  2.3711E+12 2.8453E+12
1998-07  3.7464E+12 4.3708E+12
1998-08  3.7852E+12 4.3260E+12
1998-09  3.5753E+12 4.0222E+12
1998-10  3.4343E+12 3.8159E+12
1998-11  3.4245E+12 3.7669E+12
1998-12  4.8937E+12 5.3386E+12
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 165 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

VAR_SAMP

Syntax

var_samp::=

Text description of functions168.gif follows
Text description of var_samp

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

VAR_SAMP returns the sample variance of a set of numbers after discarding the nulls in this set. You can use it as both an aggregate and analytic function.

The expr is a number expression, and the function returns a value of type NUMBER. If the function is applied to an empty set, then it returns null. The function makes the following calculation:

(SUM(expr2) - SUM(expr)2 / COUNT(expr)) / (COUNT(expr) - 1)

This function is similar to VARIANCE, except that given an input set of one element, VARIANCE returns 0 and VAR_SAMP returns null.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example returns the sample variance of the salaries in the sample employees table.

SELECT VAR_SAMP(salary) FROM employees;

VAR_SAMP(SALARY)
----------------
      15283140.5

Analytic Example

The following example calculates the cumulative population and sample variances of the monthly sales in 1998:

SELECT t.calendar_month_desc,
   VAR_POP(SUM(s.amount_sold))
      OVER (ORDER BY t.calendar_month_desc) "Var_Pop",
   VAR_SAMP(SUM(s.amount_sold))
      OVER (ORDER BY t.calendar_month_desc) "Var_Samp"
  FROM sales s, times t
  WHERE s.time_id = t.time_id AND t.calendar_year = 1998
  GROUP BY t.calendar_month_desc;

CALENDAR    Var_Pop   Var_Samp
-------- ---------- ----------
1998-01           0
1998-02  6.1321E+11 1.2264E+12
1998-03  4.7058E+11 7.0587E+11
1998-04  4.6929E+11 6.2572E+11
1998-05  1.5524E+12 1.9405E+12
1998-06  2.3711E+12 2.8453E+12
1998-07  3.7464E+12 4.3708E+12
1998-08  3.7852E+12 4.3260E+12
1998-09  3.5753E+12 4.0222E+12
1998-10  3.4343E+12 3.8159E+12
1998-11  3.4245E+12 3.7669E+12
1998-12  4.8937E+12 5.3386E+12
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Functions, 166 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

VARIANCE

Syntax

variance::=

Text description of functions171.gif follows
Text description of variance

See Also:

"Analytic Functions" for information on syntax, semantics, and restrictions

Purpose

VARIANCE returns variance of expr. You can use it as an aggregate or analytic function.

Oracle calculates the variance of expr as follows:

  • 0 if the number of rows in expr = 1
  • VAR_SAMP if the number of rows in expr > 1

If you specify DISTINCT, then you can specify only the query_partition_clause of the analytic_clause. The order_by_clause and windowing_clause are not allowed.

See Also:
  • "Aggregate Functions"
  • "About SQL Expressions" for information on valid forms of expr

Aggregate Example

The following example calculates the variance of all salaries in the sample employees table:

SELECT VARIANCE(salary) "Variance"
   FROM employees;

  Variance
----------
15283140.5

Analytic Example

The query returns the cumulative variance of salary values in Department 30 ordered by hire date.

SELECT last_name, salary, VARIANCE(salary)
      OVER (ORDER BY hire_date) "Variance"
   FROM employees
   WHERE department_id = 30;

LAST_NAME           SALARY   Variance
--------------- ---------- ----------
Raphaely             11000          0
Khoo                  3100   31205000
Tobias                2800 21623333.3
Baida                 2900 16283333.3
Himuro                2600   13317000
Colmenares            2500   11307000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


Functions, 167 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

VSIZE

Syntax

vsize::=

Text description of functions153.gif follows
Text description of vsize

Purpose

VSIZE returns the number of bytes in the internal representation of expr. If expr is null, then this function returns null.

Note:

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion. Please refer to "Datatype Comparison Rules" for more information.

Examples

The following example returns the number of bytes in the last_name of the employee in department 10:

SELECT last_name, VSIZE (last_name) "BYTES"
  FROM employees
  WHERE department_id = 10;

LAST_NAME            BYTES
--------------- ----------
Whalen                   6
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 168 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

WIDTH_BUCKET

Syntax

width_bucket::=

Text description of functions83.gif follows
Text description of width_bucket

Purpose

WIDTH_BUCKET lets you construct equiwidth histograms, in which the histogram range is divided into intervals that have identical size. (Compare this function with NTILE, which creates equiheight histograms.) Ideally each bucket is a "closed-open" interval of the real number line. For example, a bucket can be assigned to scores between 10.00 and 19.999... to indicate that 10 is included in the interval and 20 is excluded. This is sometimes denoted [10, 20).

For a given expression, WIDTH_BUCKET returns the bucket number into which the value of this expression would fall after being evaluated.

  • expr is the expression for which the histogram is being created. This expression must evaluate to a number or a datetime value. If expr evaluates to null, then the expression returns null.
  • min_value and max_value are expressions that resolve to the end points of the acceptable range for expr. Both of these expressions must also evaluate to number or datetime values, and neither can evaluate to null.
  • num_buckets is an expression that resolves to a constant indicating the number of buckets. This expression must evaluate to a positive integer.

Oracle also creates (when needed) an underflow bucket numbered 0 and an overflow bucket numbered num_buckets+1. These buckets handle values less than min_value and more than max_value and are helpful in checking the reasonableness of endpoints.

Examples

The following example creates a ten-bucket histogram on the credit_limit column for customers in Switzerland in the sample table oe.customers and returns the bucket number ("Credit Group") for each customer. Customers with credit limits greater than the maximum value are assigned to the overflow bucket, 11:

SELECT customer_id, cust_last_name, credit_limit,
   WIDTH_BUCKET(credit_limit, 100, 5000, 10) "Credit Group"
   FROM customers WHERE nls_territory = 'SWITZERLAND'
   ORDER BY "Credit Group";

CUSTOMER_ID CUST_LAST_NAME       CREDIT_LIMIT Credit Group
----------- -------------------- ------------ ------------
        825 Dreyfuss                      500            1
        826 Barkin                        500            1
        853 Palin                         400            1
        827 Siegel                        500            1
        843 Oates                         700            2
        844 Julius                        700            2
        835 Eastwood                     1200            3
        840 Elliott                      1400            3
        842 Stern                        1400            3
        841 Boyer                        1400            3
        837 Stanton                      1200            3
        836 Berenger                     1200            3
        848 Olmos                        1800            4
        849 Kaurusmdki                   1800            4
        828 Minnelli                     2300            5
        829 Hunter                       2300            5
        852 Tanner                       2300            5
        851 Brown                        2300            5
        850 Finney                       2300            5
        830 Dutt                         3500            7
        831 Bel Geddes                   3500            7
        832 Spacek                       3500            7
        838 Nicholson                    3500            7
        839 Johnson                      3500            7
        833 Moranis                      3500            7
        834 Idle                         3500            7
        845 Fawcett                      5000           11
        846 Brando                       5000           11
        847 Streep                       5000           11
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Functions, 169 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLAGG

Syntax

XMLAgg::=

Text description of functions166.gif follows
Text description of XMLAgg

Purpose

XMLAgg is an aggregate function. It takes a collection of XML fragments and returns an aggregated XML document. Any arguments that return null are dropped from the result.

XMLAgg is similar to SYS_XMLAgg except that XMLAgg returns a collection of nodes, but it does not accept formatting using the XMLFormat object. Also, XMLAgg does not enclose the output in an element tag as does SYS_XMLAgg.

Note:

Within the order_by_clause, Oracle does not interpret number literals as column positions, as it does in other uses of this clause, but simply as number literals.
See Also:

XMLELEMENT and SYS_XMLAGG

Examples

The following example produces a Department element containing Employee elements with employee job ID and last name as the contents of the elements:

SELECT XMLELEMENT("Department",
   XMLAGG(XMLELEMENT("Employee",
   e.job_id||' '||e.last_name)
   ORDER BY last_name))
   as "Dept_list"
   FROM employees e
   WHERE e.department_id = 30;

Dept_list
-------------------------------------------------------------
<Department>
  <Employee>PU_CLERK Baida</Employee>
  <Employee>PU_CLERK Colmenares</Employee>
  <Employee>PU_CLERK Himuro</Employee>
  <Employee>PU_CLERK Khoo</Employee>
  <Employee>PU_MAN Raphaely</Employee>
  <Employee>PU_CLERK Tobias</Employee>
</Department>

The result is a single row, because XMLAgg aggregates the rows. You can use the GROUP BY clause to group the returned set of rows into multiple groups:

SELECT XMLELEMENT("Department",
      XMLAGG(XMLELEMENT("Employee", e.job_id||' '||e.last_name)))
   AS "Dept_list"
   FROM employees e
   GROUP BY e.department_id;

Dept_list
---------------------------------------------------------
<Department>
  <Employee>AD_ASST Whalen</Employee>
</Department>

<Department>
  <Employee>MK_MAN Hartstein</Employee>
  <Employee>MK_REP Fay</Employee>
</Department>

<Department>
  <Employee>PU_MAN Raphaely</Employee>
  <Employee>PU_CLERK Khoo</Employee>
  <Employee>PU_CLERK Tobias</Employee>
  <Employee>PU_CLERK Baida</Employee>
  <Employee>PU_CLERK Colmenares</Employee>
  <Employee>PU_CLERK Himuro</Employee>
</Department>
...
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 170 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLCOLATTVAL

Syntax

XMLColAttVal::=

Text description of functions172.gif follows
Text description of XMLColAttVal

Purpose

XMLColAttVal creates an XML fragment and then expands the resulting XML so that each XML fragment has the name "column" with the attribute "name". You can use the AS c_alias clause to change the value of the name attribute to something other than the column name.

You must specify a value for value_expr. If value_expr is null, then no element is returned.

Restriction on XMLColAttVal

You cannot specify an object type column for value_expr.

Examples

The following example creates an Emp element for a subset of employees, with nested employee_id, last_name, and salary elements as the contents of Emp. Each nested element is named column and has a name attribute with the column name as the attribute value:

SELECT XMLELEMENT("Emp",
   XMLCOLATTVAL(e.employee_id, e.last_name, e.salary)) "Emp Element"
   FROM employees e
   WHERE employee_id = 204;

Emp Element
--------------------------------------------------------------------
<Emp>
  <column name="EMPLOYEE_ID">204</column>
  <column name="LAST_NAME">Baer</column>
  <column name="SALARY">10000</column>
</Emp>
See Also:

the example for XMLFOREST to compare the output of these two functions
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 171 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLCONCAT

Syntax

XMLConcat::=

Text description of functions173b.gif follows
Text description of XMLConcat

Purpose

XMLConcat takes as input a series of XMLType instances, concatenates the series of elements for each row, and returns the concatenated series. XMLConcat is the inverse of XMLSequence.

Null expressions are dropped from the result. If all the value expressions are null, then the function returns null.

See Also:

XMLSEQUENCE

Examples

The following example creates XML elements for the first and last names of a subset of employees, and then concatenates and returns those elements:

SELECT XMLCONCAT(XMLELEMENT("First", e.first_name),
   XMLELEMENT("Last", e.last_name)) AS "Result"
   FROM employees e
   WHERE e.employee_id > 202;

Result
----------------------------------------------------------------
<First>Susan</First>
<Last>Mavris</Last>

<First>Hermann</First>
<Last>Baer</Last>

<First>Shelley</First>
<Last>Higgins</Last>

<First>William</First>
<Last>Gietz</Last>

4 rows selected.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 172 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLELEMENT

Syntax

XMLElement::=

Text description of functions186a.gif follows
Text description of XMLElement

XML_attributes_clause::=

Text description of functions181.gif follows
Text description of XML_attributes_clause

Purpose

XMLElement takes an element name for identifier, an optional collection of attributes for the element, and arguments that make up the element's content. It returns an instance of type XMLType. XMLElement is similar to SYS_XMLGen except that XMLElement can include attributes in the XML returned, but it does not accept formatting using the XMLFormat object.

The XMLElement function is typically nested to produce an XML document with a nested structure, as in the example in the following section.

You must specify a value for identifier, which Oracle uses as the enclosing tag. The identifier does not have to be a column name or column reference. It cannot be an expression or null.

In the XML_attributes_clause, if the value_expr is null, then no attribute is created for that value expression. The type of value_expr cannot be an object type or collection.

The objects that make up the element content follow the XMLATTRIBUTES keyword.

  • If value_expr is a scalar expression, then you can omit the AS clause, and Oracle uses the column name as the element name.
  • If value_expr is an object type or collection, then the AS clause is mandatory, and Oracle uses the specified c_alias as the enclosing tag.
  • If value_expr is null, then no element is created for that value expression.

    See Also:

    SYS_XMLGEN

Examples

The following example produces an Emp element for a series of employees, with nested elements that provide the employee's name and hire date:

SELECT XMLELEMENT("Emp", XMLELEMENT("Name",
   e.job_id||' '||e.last_name),
   XMLELEMENT("Hiredate", e.hire_date)) as "Result"
   FROM employees e WHERE employee_id > 200;

Result
-------------------------------------------------------------------
<Emp>
  <Name>MK_MAN Hartstein</Name>
  <Hiredate>17-FEB-96</Hiredate>
</Emp>

<Emp>
  <Name>MK_REP Fay</Name>
  <Hiredate>17-AUG-97</Hiredate>
</Emp>

<Emp>
  <Name>HR_REP Mavris</Name>
  <Hiredate>07-JUN-94</Hiredate>
</Emp>

<Emp>
  <Name>PR_REP Baer</Name>
  <Hiredate>07-JUN-94</Hiredate>
</Emp>

<Emp>
  <Name>AC_MGR Higgins</Name>
  <Hiredate>07-JUN-94</Hiredate>
</Emp>

<Emp>
  <Name>AC_ACCOUNT Gietz</Name>
  <Hiredate>07-JUN-94</Hiredate>
</Emp>

6 rows selected.

The following similar example uses the XMLElement function with the XML_attributes_clause to create nested XML elements with attribute values for the top-level element:

SELECT XMLELEMENT("Emp",
      XMLATTRIBUTES(e.employee_id AS "ID", e.last_name),
      XMLELEMENT("Dept", e.department_id),
      XMLELEMENT("Salary", e.salary)) AS "Emp Element"
   FROM employees e
   WHERE e.employee_id = 206;

Emp Element
---------------------------------------------------------------
<Emp ID="206" LAST_NAME="Gietz">
  <Dept>110</Dept>
  <Salary>8300</Salary>
</Emp>

Notice that the AS identifier clause was not specified for the last_name column. As a result, the XML returned uses the column name last_name as the default.

Finally, the next example uses a subquery within the XML_attributes_clause to retrieve information from another table into the attributes of an element:

SELECT XMLELEMENT("Emp", XMLATTRIBUTES(e.employee_id, e.last_name),
   XMLELEMENT("Dept", XMLATTRIBUTES(e.department_id,
   (SELECT d.department_name FROM departments d
   WHERE d.department_id = e.department_id) as "Dept_name")),
   XMLELEMENT("salary", e.salary),
   XMLELEMENT("Hiredate", e.hire_date)) AS "Emp Element"
   FROM employees e
   WHERE employee_id = 205;

Emp Element
-------------------------------------------------------------------
<Emp EMPLOYEE_ID="205" LAST_NAME="Higgins">
  <Dept DEPARTMENT_ID="110" Dept_name="Accounting"/>
  <salary>12000</salary>
  <Hiredate>07-JUN-94</Hiredate>
</Emp>
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Functions, 173 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLFOREST

Syntax

XMLForest::=

Text description of functions176b.gif follows
Text description of XMLForest

Purpose

XMLForest converts each of its argument parameters to XML, and then returns an XML fragment that is the concatenation of these converted arguments.

  • If value_expr is a scalar expression, then you can omit the AS clause, and Oracle uses the column name as the element name.
  • If value_expr is an object type or collection, then the AS clause is mandatory, and Oracle uses the specified c_alias as the enclosing tag.
  • If value_expr is null, then no element is created for that value_expr.

Examples

The following example creates an Emp element for a subset of employees, with nested employee_id, last_name, and salary elements as the contents of Emp:

SELECT XMLELEMENT("Emp",
   XMLFOREST(e.employee_id, e.last_name, e.salary))
   "Emp Element"
   FROM employees e WHERE employee_id = 204;

Emp Element
----------------------------------------------------------------
<Emp>
  <EMPLOYEE_ID>204</EMPLOYEE_ID>
  <LAST_NAME>Baer</LAST_NAME>
  <SALARY>10000</SALARY>
</Emp>
See Also:

the example for XMLCOLATTVAL to compare the output of these two functions
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Functions, 174 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLSEQUENCE

Syntax

XMLSequence::=

Text description of functions184.gif follows
Text description of XMLSequence

Purpose

XMLSequence has two forms:

  • The first form takes as input an XMLType instance and returns a varray of the top-level nodes in the XMLType.
  • The second form takes as input a REFCURSOR instance, with an optional instance of the XMLFormat object, and returns as an XMLSequence type an XML document for each row of the cursor.

Because XMLSequence returns a collection of XMLType, you can use this function in a TABLE clause to unnest the collection values into multiple rows, which can in turn be further processed in the SQL query.

See Also:

Oracle9i XML API Reference - XDK and Oracle XML DB for more information on this function

Examples

The following example shows how XMLSequence divides up an XML document with multiple elements into VARRAY single-element documents. In this example, the TABLE keyword instructs Oracle to consider the collection a table value that can be used in the FROM clause of the subquery:

SELECT EXTRACT(warehouse_spec, '/Warehouse') as "Warehouse"
   FROM warehouses WHERE warehouse_name = 'San Francisco';

Warehouse
------------------------------------------------------------
<Warehouse>
  <Building>Rented</Building>
  <Area>50000</Area>
  <Docks>1</Docks>
  <DockType>Side load</DockType>
  <WaterAccess>Y</WaterAccess>
  <RailAccess>N</RailAccess>
  <Parking>Lot</Parking>
  <VClearance>12 ft</VClearance>
</Warehouse>

1 row selected.

SELECT VALUE(p)
   FROM warehouses w,
   TABLE(XMLSEQUENCE(EXTRACT(warehouse_spec, '/Warehouse/*'))) p
   WHERE w.warehouse_name = 'San Francisco';

VALUE(P)
----------------------------------------------------------------
<Building>Rented</Building>
<Area>50000</Area>
<Docks>1</Docks>
<DockType>Side load</DockType>
<WaterAccess>Y</WaterAccess>
<RailAccess>N</RailAccess>
<Parking>Lot</Parking>
<VClearance>12 ft</VClearance>

8 rows selected.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Functions, 175 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

XMLTRANSFORM

Syntax

XMLTransform::=

Text description of functions3.gif follows
Text description of XMLTransform

Purpose

XMLTransform takes as arguments an XMLType instance and an XSL style sheet, which is itself a form of XMLType instance. It applies the style sheet to the instance and returns an XMLType.

This function is useful for organizing data according to a style sheet as you are retrieving it from the database.

See Also:

Oracle9i XML API Reference - XDK and Oracle XML DB for more information on this function
Examples

The XMLTransform function requires the existence of an XSL style sheet. Here is an example of a very simple style sheet that alphabetizes elements within a node:

CREATE TABLE xsl_tab (col1 XMLTYPE);

INSERT INTO xsl_tab VALUES (
   XMLTYPE.createxml(
   '<?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
      <xsl:output encoding="utf-8"/>
      <!-- alphabetizes an xml tree -->
      <xsl:template match="*">
        <xsl:copy>
          <xsl:apply-templates select="*|text()">
            <xsl:sort select="name(.)" data-type="text" order="ascending"/>
          </xsl:apply-templates>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="text()">
        <xsl:value-of select="normalize-space(.)"/>
      </xsl:template>
    </xsl:stylesheet>  '));

1 row created.

The next example uses the xsl_tab XSL style sheet to alphabetize the elements in one warehouse_spec of the sample table oe.warehouses:

SELECT XMLTRANSFORM(w.warehouse_spec, x.col1).GetClobVal()
   FROM warehouses w, xsl_tab x
   WHERE w.warehouse_name = 'San Francisco';

XMLTRANSFORM(W.WAREHOUSE_SPEC,X.COL1).GETCLOBVAL()
--------------------------------------------------------------------------------
<Warehouse>
  <Area>50000</Area>
  <Building>Rented</Building>
  <DockType>Side load</DockType>
  <Docks>1</Docks>
  <Parking>Lot</Parking>
  <RailAccess>N</RailAccess>
  <VClearance>12 ft</VClearance>
  <WaterAccess>Y</WaterAccess>
</Warehouse>
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Functions, 177 of 177

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

User-Defined Functions

You can write user-defined functions in PL/SQL or Java to provide functionality that is not available in SQL or SQL built-in functions. User-defined functions can appear in a SQL statement anywhere SQL functions can appear, that is, wherever an expression can occur.

For example, user-defined functions can be used in the following:

  • The select list of a SELECT statement
  • The condition of a WHERE clause
  • CONNECT BY, START WITH, ORDER BY, and GROUP BY clauses
  • The VALUES clause of an INSERT statement
  • The SET clause of an UPDATE statement
Note:

Oracle SQL does not support calling of functions with boolean parameters or returns. Therefore, if your user-defined functions will be called from SQL statements, you must design them to return numbers (0 or 1) or character strings ('TRUE' or 'FALSE').

user_defined_function::=

Text description of functions151.gif follows
Text description of user_defined_function

The optional expression list must match attributes of the function, package, or operator.

Restriction on User-defined Functions

The DISTINCT and ALL keywords are valid only with a user-defined aggregate function.

See Also:
  • CREATE FUNCTION for information on creating functions, including restrictions on user-defined functions
  • Oracle9i Application Developer's Guide - Fundamentals for a complete description on the creation and use of user functions

Prerequisites

User-defined functions must be created as top-level functions or declared with a package specification before they can be named within a SQL statement.

To use a user function in a SQL expression, you must own or have EXECUTE privilege on the user function. To query a view defined with a user function, you must have SELECT privileges on the view. No separate EXECUTE privileges are needed to select from the view.

See Also:
  • CREATE FUNCTION for information on creating top-level functions
  • CREATE PACKAGE for information on specifying packaged functions

Name Precedence

Within a SQL statement, the names of database columns take precedence over the names of functions with no parameters. For example, if the Human Resources manager creates the following two objects in the hr schema:

CREATE TABLE new_emps (new_sal NUMBER, ...);
CREATE FUNCTION new_sal RETURN NUMBER IS BEGIN ... END;

then in the following two statements, the reference to new_sal refers to the column new_emps.new_sal:

SELECT new_sal FROM new_emps;
SELECT new_emps.new_sal FROM new_emps;

To access the function new_sal, you would enter:

SELECT hr.new_sal FROM new_emps;

Here are some sample calls to user functions that are allowed in SQL expressions:

circle_area (radius)
payroll.tax_rate (empno)
hr.employees.tax_rate (dependent, empno)@remote
Example

To call the tax_rate user function from schema hr, execute it against the ss_no and sal columns in tax_table, and place the results in the variable income_tax, specify the following:

SELECT hr.tax_rate (ss_no, sal)
    INTO income_tax
    FROM tax_table
    WHERE ss_no = tax_id;

Naming Conventions

If only one of the optional schema or package names is given, then the first identifier can be either a schema name or a package name. For example, to determine whether PAYROLL in the reference PAYROLL.TAX_RATE is a schema or package name, Oracle proceeds as follows:

  1. Check for the PAYROLL package in the current schema.
  2. If a PAYROLL package is not found, then look for a schema name PAYROLL that contains a top-level TAX_RATE function. If no such function is found, then return an error.
  3. If the PAYROLL package is found in the current schema, then look for a TAX_RATE function in the PAYROLL package. If no such function is found, then return an error.

You can also refer to a stored top-level function using any synonym that you have defined for it.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


Common SQL DDL Clauses , 1 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

7
Common SQL DDL Clauses

This chapter describes some SQL data definition clauses that appear in multiple SQL statements.

This chapter contains these sections:

  • allocate_extent_clause
  • constraints
  • deallocate_unused_clause
  • file_specification
  • logging_clause
  • parallel_clause
  • physical_attributes_clause
  • storage_clause
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Common SQL DDL Clauses , 2 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

allocate_extent_clause

Purpose

Use the allocate_extent_clause clause to explicitly allocate a new extent for a database object.

Explicitly allocating an extent with this clause does not change the values of the NEXT and PCTINCREASE storage parameters, so does not affect the size of the next extent to be allocated implicitly by Oracle.

See Also:

storage_clause for information about the NEXT and PCTINCREASE storage parameters

You can allocate an extent in the following SQL statements:

  • ALTER CLUSTER (see ALTER CLUSTER )
  • ALTER INDEX: to allocate an extent to the index, an index partition, or an index subpartition (see ALTER INDEX )
  • ALTER MATERIALIZED VIEW: to allocate an extent to the materialized view, one of its partitions or subpartitions, or the overflow segment of an index-organized materialized view (see ALTER MATERIALIZED VIEW )
  • ALTER MATERIALIZED VIEW LOG (see ALTER MATERIALIZED VIEW LOG )
  • ALTER TABLE: to allocate an extent to the table, a table partition, a table subpartition, the mapping table of an index-organized table, the overflow segment of an index-organized table, or a LOB storage segment (see ALTER TABLE )

Syntax

allocate_extent_clause::=

Text description of clauses17.gif follows
Text description of allocate_extent_clause

Semantics

This section describes the parameters of the allocate_extent_clause. For additional information, refer to the SQL statement in which you set or reset these parameters for a particular database object.

Note:

You cannot specify the allocate_extent_clause and the deallocate_unused_clause in the same statement.

SIZE

Specify the size of the extent in bytes. Use K or M to specify the extent size in kilobytes or megabytes.

For a table, index, materialized view, or materialized view log, if you omit SIZE, then Oracle determines the size based on the values of the storage parameters of the object. However, for a cluster, Oracle does not evaluate the cluster's storage parameters, so you must specify SIZE if you do not want Oracle to use a default value.

DATAFILE 'filename'

Specify one of the datafiles in the tablespace of the table, cluster, index, materialized view, or materialized view log to contain the new extent. If you omit DATAFILE, then Oracle chooses the datafile.

INSTANCE integer

Use this parameter only if you are using Oracle with Real Application Clusters.

Specifying INSTANCE integer makes the new extent available to the freelist group associated with the specified instance. If the instance number exceeds the maximum number of freelist groups, then Oracle divides the specified number by the maximum number and uses the remainder to identify the freelist group to be used. An instance is identified by the value of its initialization parameter INSTANCE_NUMBER.

If you omit this parameter, then the space is allocated to the table, cluster, index, materialized view, or materialized view log but is not drawn from any particular freelist group. Instead, Oracle uses the master freelist and allocates space as needed.

Note:

If you are using automatic segment-space management, then the INSTANCE parameter of the allocate_extent_clause may not reserve the newly allocated space for the specified instance, because automatic segment-space management does not maintain rigid affinity between extents and instances.
See Also:

Oracle9i Real Application Clusters Administration for more information on setting the INSTANCE parameter of allocate_extent_clause
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Common SQL DDL Clauses , 3 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

constraints

Purpose

Use one of the constraints to define an integrity constraint--a rule that restricts the values in a database. Oracle lets you create six types of constraints and lets you declare them in two ways.

The six types of integrity constraint are described briefly here and more fully in "Semantics" :

  • A NOT NULL constraint prohibits a database value from being null.
  • A unique constraint prohibits multiple rows from having the same value in the same column or combination of columns but allows some values to be null.
  • A primary key constraint combines a NOT NULL constraint and a unique constraint in a single declaration. That is, it prohibits multiple rows from having the same value in the same column or combination of columns and prohibits values from being null.
  • A foreign key constraint requires values in one table to match values in another table.
  • A check constraint requires a value in the database to comply with a specified condition.
  • A REF column by definition references an object in another object type or in a relational table. A REF constraint lets you further describe the relationship between the REF column and the object it references.

You can define constraints syntactically in two ways:

  • As part of the definition of an individual column or attribute. This is called inline specification.
  • As part of the table definition. This is called out-of-line specification.

NOT NULL constraints must be declared inline. All other constraints can be declared either inline or out of line.

Constraint clauses can appear in the following statements:

  • CREATE TABLE (see CREATE TABLE )
  • ALTER TABLE (see ALTER TABLE )
  • CREATE VIEW (see CREATE VIEW )
  • ALTER VIEW (see ALTER VIEW )
View Constraints

Oracle does not enforce view constraints. However, you can enforce constraints on views through constraints on base tables.

You can specify only unique, primary key, and foreign key constraints on views, and they are supported only in DISABLE NOVALIDATE mode. You cannot define view constraints on attributes of an object column.

See Also:
  • "View Constraints" for additional information on view constraints
  • "DISABLE Clause" for information on DISABLE NOVALIDATE mode

Prerequisites

You must have the privileges necessary to issue the statement in which you are defining the constraint.

To create a foreign key constraint, in addition, the parent table or view must be in your own schema, or you must have the REFERENCES privilege on the columns of the referenced key in the parent table or view.

Syntax

constraints::=

Text description of clausesa.gif follows
Text description of constraints

(inline_constraint::= , out_of_line_constraint::= , inline_ref_constraint::= , out_of_line_ref_constraint::= )

inline_constraint::=

Text description of clauses2.gif follows
Text description of inline_constraint

(references_clause::= )

out_of_line_constraint::=

Text description of clauses24a.gif follows
Text description of out_of_line_constraint

(references_clause::= , constraint_state::= )

inline_ref_constraint::=

Text description of clauses4.gif follows
Text description of inline_ref_constraint

(references_clause::= , constraint_state::= )

out_of_line_ref_constraint::=

Text description of clauses5.gif follows
Text description of out_of_line_ref_constraint

(references_clause::= , constraint_state::= )

references_clause::=

Text description of clauses6.gif follows
Text description of references_clause

constraint_state::=

Text description of clauses7.gif follows
Text description of constraint_state

(using_index_clause::= , exceptions_clause::= )

using_index_clause::=

Text description of clauses8.gif follows
Text description of using_index_clause

(create_index_statement: create_index::= , storage_clauses , logging_clause , global_partitioned_index::= )

global_partitioned_index::=

Text description of clauses9.gif follows
Text description of global_partitioned_index

index_partitioning_clause::=

Text description of index_partitioning_clause.gif follows
Text description of index_partitioning_clause

segment_attributes_clause::=

Text description of clauses11.gif follows
Text description of segment_attributes_clause

(physical_attributes_clause::= , logging_clause )

physical_attributes_clause::=

Text description of clauses24.gif follows
Text description of physical_attributes_clause

(storage_clause )

exceptions_clause::=

Text description of clauses12.gif follows
Text description of exceptions_clause

Semantics

This section describes the semantics of the constraints. For additional information, refer to the SQL statement in which you define or redefine a constraint for a table or view.

Note:

Oracle does not support constraints on columns or attributes whose type is a user-defined object, nested table, VARRAY, REF, or LOB, with two exceptions:

  • NOT NULL constraints are supported for a column or attribute whose type is user-defined object, VARRAY, REF, or LOB.
  • NOT NULL, foreign key, and REF constraints are supported on a column of type REF.
CONSTRAINT constraint_name

Specify a name for the constraint. If you omit this identifier, then Oracle generates a name with the form SYS_C n. Oracle stores the name and the definition of the integrity constraint in the USER_, ALL_, and DBA_CONSTRAINTS data dictionary views (in the CONSTRAINT_NAME and SEARCH_CONDITION columns, respectively).

See Also:

Oracle9i Database Reference for information on the data dictionary views

NOT NULL Constraints

A NOT NULL constraint prohibits a column from containing nulls. The NULL keyword does not actually define an integrity constraint, but you can specify it to explicitly permit a column to contain nulls. You must define NOT NULL and NULL using inline specification. If you specify neither NOT NULL nor NULL, then the default is NULL.

NOT NULL constraints are the only constraints you can specify inline on XMLType and VARRAY columns.

To satisfy a NOT NULL constraint, every row in the table must contain a value for the column.

Note:

Oracle does not index table rows in which all key columns are null except in the case of bitmap indexes. Therefore, if you want an index on all rows of a table, then you must either specify NOT NULL constraints for at least one of the index key columns or create a bitmap index.
Restrictions on NOT NULL Constraints
  • You cannot specify NULL or NOT NULL in a view constraint.
  • You cannot specify NULL or NOT NULL for an attribute of an object. Instead, use a CHECK constraint with the IS [NOT] NULL condition.

    See Also:

    "Attribute-Level Constraints Example" and "NOT NULL Example"

Unique Constraints

A unique constraint designates a column as a unique key. A composite unique key designates a combination of columns as the unique key. When you define a unique constraint inline, you need only the UNIQUE keyword. When you define a unique constraint out of line, you must also specify one or more columns. You must define a composite unique key out of line.

To satisfy a unique constraint, no two rows in the table can have the same value for the unique key. However, the unique key made up of a single column can contain nulls. To satisfy a composite unique key, no two rows in the table or view can have the same combination of values in the key columns. Any row that contains nulls in all key columns automatically satisfies the constraint. However, two rows that contain nulls for one or more key columns and the same combination of values for the other key columns violate the constraint.

Note:

When you specify a unique constraint on one or more columns, Oracle implicitly creates an index on the unique key. If you are defining uniqueness for purposes of query performance, then Oracle Corporation recommends that you instead create the unique index explicitly using a CREATE UNIQUE INDEX statement. See CREATE INDEX for more information.
Restrictions on Unique Constraints
  • A table or view can have only one unique key.
  • None of the columns in the unique key can have datatype LOB, LONG, LONG RAW, VARRAY, NESTED TABLE, OBJECT, BFILE, or REF, or TIMESTAMP WITH TIME ZONE. However, the unique key can contain a column of TIMESTAMP WITH LOCAL TIME ZONE.
  • A composite unique key cannot have more than 32 columns.
  • You cannot designate the same column or combination of columns as both a primary key and a unique key.
  • You cannot specify a unique key when creating a subtable or a subview in an inheritance hierarchy. The unique key can be specified only for the top-level (root) table or view.

    See Also:

    "Unique Key Example" and Composite Unique Key Example

Primary Key Constraints

A primary key constraint designates a column as the primary key of a table or view. A composite primary key designates a combination of columns as the primary key. When you define a primary key constraint inline, you need only the PRIMARY KEY keywords. When you define a primary key constraint out of line, you must also specify one or more columns. You must define a composite primary key out of line.

A primary key constraint combines a NOT NULL and unique constraint in one declaration. Therefore, to satisfy a primary key constraint:

  • No primary key value can appear in more than one row in the table.
  • No column that is part of the primary key can contain a null.
Restrictions on Primary Key Constraints
  • A table or view can have only one primary key.
  • None of the columns in the primary key can have datatype LOB, LONG, LONG RAW, VARRAY, NESTED TABLE, OBJECT, BFILE, or REF, or TIMESTAMP WITH TIME ZONE. However, the primary key can contain a column of TIMESTAMP WITH LOCAL TIME ZONE.
  • The size of the primary key cannot exceed approximately one database block.
  • A composite primary key cannot have more than 32 columns.
  • You cannot designate the same column or combination of columns as both a primary key and a unique key.
  • You cannot specify a primary key when creating a subtable or a subview in an inheritance hierarchy. The primary key can be specified only for the top-level (root) table or view.

    See Also:

    "Primary Key Example" and "Composite Primary Key Example"

Foreign Key Constraints

A foreign key constraint (also called a referential integrity constraint) designates a column as the foreign key and establishes a relationship between that foreign key and a specified primary or unique key, called the referenced key. A composite foreign key designates a combination of columns as the foreign key.

The table or view containing the foreign key is called the child object, and the table or view containing the referenced key is called the parent object. The foreign key and the referenced key can be in the same table or view. In this case, the parent and child tables are the same. If you identify only the parent table or view and omit the column name, then the foreign key automatically references the primary key of the parent table or view. The corresponding column or columns of the foreign key and the referenced key must match in order and datatype.

You can define a foreign key constraint on a single key column either inline or out of line. You must specify a composite foreign key and a foreign key on an attribute out of line.

To satisfy a composite foreign key constraint, the composite foreign key must refer to a composite unique key or a composite primary key in the parent table or view, or the value of at least one of the columns of the foreign key must be null.

You can designate the same column or combination of columns as both a foreign key and a primary or unique key. You can also designate the same column or combination of columns as both a foreign key and a cluster key.

You can define multiple foreign keys in a table or view. Also, a single column can be part of more than one foreign key.

Restrictions on Foreign Key Constraints
  • None of the columns in the foreign key can have datatype LOB, LONG, LONG RAW, VARRAY, NESTED TABLE, OBJECT, BFILE, or REF, or TIMESTAMP WITH TIME ZONE. However, the primary key can contain a column of TIMESTAMP WITH LOCAL TIME ZONE.
  • The referenced unique or primary key constraint on the parent table or view must already be defined.
  • A composite foreign key cannot have more than 32 columns.
  • The child and parent tables must be on the same database. To enable referential integrity constraints across nodes of a distributed database, you must use database triggers. See CREATE TRIGGER .
  • If either the child or parent object is a view, then the constraint is subject to all restrictions on view constraints. See "View Constraints" .
  • You cannot define a foreign key constraint in a CREATE TABLE statement that contains an AS subquery clause. Instead, you must create the table without the constraint and then add it later with an ALTER TABLE statement.

    See Also:

    Oracle9i Application Developer's Guide - Fundamentals and "Foreign Key Constraint Example" and "Composite Foreign Key Constraint Example"

references_clause

Foreign key constraints use the references_clause syntax. When you specify a foreign key constraint inline, you need only the references_clause. When you specify a foreign key constraint out of line, you must also specify the FOREIGN KEY keywords and one or more columns.

ON DELETE Clause

The ON DELETE clause lets you determine how Oracle automatically maintains referential integrity if you remove a referenced primary or unique key value. If you omit this clause, then Oracle does not allow you to delete referenced key values in the parent table that have dependent rows in the child table.

  • Specify CASCADE if you want Oracle to remove dependent foreign key values.
  • Specify SET NULL if you want Oracle to convert dependent foreign key values to NULL.
Restriction on ON DELETE

You cannot specify this clause for a view constraint.

See Also:

"ON DELETE Example"

Check Constraints

A check constraint lets you specify a condition that each row in the table must satisfy. To satisfy the constraint, each row in the table must make the condition either TRUE or unknown (due to a null). When Oracle evaluates a check constraint condition for a particular row, any column names in the condition refer to the column values in that row.

The syntax for inline and out-of-line specification of check constraints is the same. However, inline specification can refer only to the column (or the attributes of the column if it is an object column) currently being defined, whereas out-of-line specification can refer to multiple columns or attributes.

Note:

Oracle does not verify that conditions of check constraints are not mutually exclusive. Therefore, if you create multiple check constraints for a column, design them carefully so their purposes do not conflict. Do not assume any particular order of evaluation of the conditions.
See Also:
  • Chapter 5, "Conditions" for additional information and syntax
  • "Check Constraint Examples" and "Attribute-Level Constraints Example"
Restrictions on Check Constraints
  • You cannot specify a check constraint for a view. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
  • The condition of a check constraint can refer to any column in the table, but it cannot refer to columns of other tables.
  • Conditions of check constraints cannot contain the following constructs:
    • Subqueries and scalar subquery expressions
    • Calls to the functions that are not deterministic (CURRENT_DATE, CURRENT_TIMESTAMP, DBTIMEZONE, LOCALTIMESTAMP, SESSIONTIMEZONE, SYSDATE, SYSTIMESTAMP, UID, USER, and USERENV)
    • Calls to user-defined functions
    • Dereferencing of REF columns (for example, using the DEREF function)
    • Nested table columns or attributes
    • The pseudocolumns CURRVAL, NEXTVAL, LEVEL, or ROWNUM
    • Date constants that are not fully specified

REF Constraints

REF constraints let you describe the relationship between a column of type REF and the object it references.

ref_constraint

REF constraints use the ref_constraint syntax. You define a REF constraint either inline or out of line. Out-of-line specification requires you to specify the REF column or attribute you are further describing.

  • For ref_column, specify the name of a REF column of an object or relational table.
  • For ref_attribute, specify an embedded REF attribute within an object column of a relational table.

Both inline and out-of-line specification let you define a scope constraint, a rowid constraint, or a referential integrity constraint on a REF column.

If the REF column's scope table or referenced table has a primary-key-based object identifier, then it is a user-defined REF column.

See Also:

Oracle9i Database Concepts for more information on REFs, "Foreign Key Constraints" , and "REF Constraint Examples"

SCOPE REF Constraints

In a table with a REF column, each REF value in the column can conceivably reference a row in a different object table. The SCOPE clause restricts the scope of references to a single table, scope_table. The values in the REF column or attribute point to objects in scope_table, in which object instances (of the same type as the REF column) are stored.

Specify the SCOPE clause to restrict the scope of references in the REF column to a single table. For you to specify this clause, scope_table must be in your own schema or you must have SELECT privileges on scope_table or SELECT ANY TABLE system privileges. You can specify only one scope table for each REF column.

Restrictions on Scope Constraints
  • You cannot add a scope constraint to an existing column unless the table is empty.
  • You cannot specify a scope constraint for the REF elements of a VARRAY column.
  • You must specify this clause if you specify AS subquery and the subquery returns user-defined REFs.
  • You cannot subsequently drop a scope constraint from a REF column.
Rowid REF Constraints

Specify WITH ROWID to store the rowid along with the REF value in ref_column or ref_attribute. Storing the rowid with the REF value can improve the performance of dereferencing operations, but will also use more space. Default storage of REF values is without rowids.

See Also:

the function DEREF for an example of dereferencing
Restrictions on Rowid Constraints
  • You cannot define a rowid constraint for the REF elements of a VARRAY column.
  • You cannot subsequently drop a rowid constraint from a REF column.
  • If the REF column or attribute is scoped, then this clause is ignored and the rowid is not stored with the REF value.
Referential Integrity Constraints on REF Columns

The references_clause of the ref_constraint syntax lets you define a foreign key constraint on the REF column.This clause also implicitly restricts the scope of the REF column or attribute to the referenced table. However, whereas a foreign key constraint on a non-REF column references an actual column in the parent table, a foreign key constraint on a REF column references the implicit object identifier (OID) column of the parent table.

If you do not specify CONSTRAINT, then Oracle generates a system name for the constraint of the form SYS_C n.

If you add a referential integrity constraint to an existing REF column that is already scoped, then the referenced table must be the same as the scope table of the REF column. If you later drop the referential integrity constraint, then the REF column will remain scoped to the referenced table.

As is the case for foreign key constraints on other types of columns, you can use the references_clause alone for inline declaration. For out-of-line declaration you must also specify the FOREIGN KEY keywords plus one or more REF columns or attributes.

See Also:

Oracle9i Application Developer's Guide - Object-Relational Features for more information on object identifiers
Restrictions on Foreign Key Constraints of REF Columns
  • Oracle implicitly adds a scope constraint when you add a referential integrity constraint to an existing unscoped REF column. Therefore, all the restrictions that apply for scope constraints also apply in this case.
  • You cannot specify a column after the object name in the references_clause.

Specifying Constraint State

As part of constraint definition, you can specify how and when Oracle should enforce the constraint.

constraint_state

You can use the constraint_state with both inline and out-of-line specification. You can specify the clauses of constraint_state in any order, but you can specify each clause only once.

DEFERRABLE Clause

The DEFERRABLE and NOT DEFERRABLE parameters indicate whether or not, in subsequent transactions, constraint checking can be deferred until the end of the transaction using the SET CONSTRAINT(S) statement. If you omit this clause, then the default is NOT DEFERRABLE.

  • Specify NOT DEFERRABLE to indicate that in subsequent transactions you cannot use the SET CONSTRAINT[S] clause to defer checking of this constraint until the transaction is committed. The checking of a NOT DEFERRABLE constraint can never be deferred to the end of the transaction.

    Note:

    If you declare a new constraint NOT DEFERRABLE, then it must be valid at the time the CREATE TABLE statement is committed or the CREATE statement will fail.
  • Specify DEFERRABLE to indicate that in subsequent transactions you can use the SET CONSTRAINT[S] clause to defer checking of this constraint until after the transaction is committed. This setting in effect lets you disable the constraint temporarily while making changes to the database that might violate the constraint until all the changes are complete.

You cannot alter a constraint's deferrability. That is, whether you specify either of these parameters, or make the constraint NOT DEFERRABLE implicitly by specifying neither of them, you cannot specify this clause in an ALTER TABLE statement. You must drop the constraint and re-create it.

See Also:
  • SET CONSTRAINT[S] for information on setting constraint checking for a transaction
  • Oracle9i Database Administrator's Guide and Oracle9i Database Concepts for more information about deferred constraints
  • "DEFERRABLE Constraint Examples"
Restriction on [NOT] DEFERRABLE

You cannot specify either of these parameters for a view constraint.

INITIALLY Clause

The INITIALLY clause establishes the default checking behavior for constraints that are DEFERRABLE. The INITIALLY setting can be overridden by a SET CONSTRAINT(S) statement in a subsequent transaction.

  • Specify INITIALLY IMMEDIATE to indicate that Oracle should check this constraint at the end of each subsequent SQL statement. If you do not specify INITIALLY at all, then the default is INITIALLY IMMEDIATE.

    Note:

    If you declare a new constraint INITIALLY IMMEDIATE, then it must be valid at the time the CREATE TABLE statement is committed or the create statement will fail.
  • Specify INITIALLY DEFERRED to indicate that Oracle should check this constraint at the end of subsequent transactions.

This clause is not valid if you have declared the constraint to be NOT DEFERRABLE, because a NOT DEFERRABLE constraint is automatically INITIALLY IMMEDIATE and cannot ever be INITIALLY DEFERRED.

VALIDATE | NOVALIDATE

The behavior of VALIDATE and NOVALIDATE always depends on whether the constraint is enabled or disabled, either explicitly or by default. Therefore they are described in the context of "ENABLE Clause" and "DISABLE Clause" .

ENABLE Clause

Specify ENABLE if you want the constraint to be applied to the data in the table.

Note:

If you enable a unique or primary key constraint, and if no index exists on the key, Oracle creates a unique index. This index is dropped if the constraint is subsequently disabled, and Oracle rebuilds the index every time the constraint is enabled.

To avoid rebuilding the index and eliminate redundant indexes, create new primary key and unique constraints initially disabled. Then create (or use existing) nonunique indexes to enforce the constraint. Oracle does not drop a nonunique index when the constraint is disabled, so subsequent ENABLE operations are facilitated.
  • ENABLE VALIDATE specifies that all old and new data also complies with the constraint. An enabled validated constraint guarantees that all data is and will continue to be valid.

    If any row in the table violates the integrity constraint, the constraint remains disabled and Oracle returns an error. If all rows comply with the constraint, Oracle enables the constraint. Subsequently, if new data violates the constraint, Oracle does not execute the statement and returns an error indicating the integrity constraint violation.

    Note:

    If you place a primary key constraint in ENABLE VALIDATE mode, the validation process will verify that the primary key columns contain no nulls. To avoid this overhead, mark each column in the primary key NOT NULL before entering data into the column and before enabling the table's primary key constraint.
  • ENABLE NOVALIDATE ensures that all new DML operations on the constrained data comply with the constraint. This clause does not ensure that existing data in the table complies with the constraint and therefore does not require a table lock.

If you specify neither VALIDATE nor NOVALIDATE, the default is VALIDATE.

If you change the state of any single constraint from ENABLE NOVALIDATE to ENABLE VALIDATE, the operation can be performed in parallel, and does not block reads, writes, or other DDL operations.

Restriction on the ENABLE Clause

You cannot enable a foreign key that references a disabled unique or primary key.

DISABLE Clause

Specify DISABLE to disable the integrity constraint. Disabled integrity constraints appear in the data dictionary along with enabled constraints. If you do not specify this clause when creating a constraint, Oracle automatically enables the constraint.

  • DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. This setting lets you load data from a nonpartitioned table into a partitioned table using the exchange_partition_clause of the ALTER TABLE statement or using SQL*Loader. All other modifications to the table (inserts, updates, and deletes) by other SQL statements are disallowed.

    See Also:

    Oracle9i Data Warehousing Guide for more information on using this setting
  • DISABLE NOVALIDATE signifies that Oracle makes no effort to maintain the constraint (because it is disabled) and cannot guarantee that the constraint is true (because it is not being validated).

    You cannot drop a table whose primary key is being referenced by a foreign key even if the foreign key constraint is in DISABLE NOVALIDATE state. Further, the optimizer can use constraints in DISABLE NOVALIDATE state.

    See Also:

    Oracle9i Database Performance Tuning Guide and Reference for information on when to use this setting

If you specify neither VALIDATE nor NOVALIDATE, the default is NOVALIDATE.

If you disable a unique or primary key constraint that is using a unique index, Oracle drops the unique index.

See Also:

the enable_disable_clause of CREATE TABLE for additional notes and restrictions
RELY Clause

RELY and NORELY are valid only when you are modifying an existing constraint (that is, in the ALTER TABLE ... MODIFY constraint syntax). These parameters specify whether a constraint in NOVALIDATE mode is to be taken into account for query rewrite. Specify RELY to activate an existing constraint in NOVALIDATE mode for query rewrite in an unenforced query rewrite integrity mode. The constraint is in NOVALIDATE mode, so Oracle does not enforce it. The default is NORELY.

Unenforced constraints are generally useful only with materialized views and query rewrite. Depending on the QUERY_REWRITE_INTEGRITY mode (see ALTER SESSION ), query rewrite can use only constraints that are in VALIDATE mode, or that are in NOVALIDATE mode with the RELY parameter set, to determine join information.

Restriction on the RELY Clause

You cannot set a nondeferrable NOT NULL constraint to RELY.

See Also:

Oracle9i Data Warehousing Guide for more information on materialized views and query rewrite
Using Indexes to Enforce Constraints

When defining the state of a unique or primary key constraint, you can specify an index for Oracle to use to enforce the constraint, or you can instruct Oracle to create the index used to enforce the constraint.

using_index_clause

You can specify the using_index_clause only when enabling unique or primary key constraints. You can specify the clauses of the using_index_clause in any order, but you can specify each clause only once.

  • If you specify schema.index, Oracle attempts to enforce the constraint using the specified index. If Oracle cannot find the index or cannot use the index to enforce the constraint, Oracle returns an error.
  • If you specify the create_index_statement, Oracle attempts to create the index and use it to enforce the constraint. If Oracle cannot create the index or cannot use the index to enforce the constraint, Oracle returns an error.
  • If you neither specify an existing index nor create a new index, Oracle creates the index. In this case:
    • The index receives the same name as the constraint.
    • You can choose the values of the INITRANS, MAXTRANS, TABLESPACE, PCTFREE, and STORAGE parameters for the index. You cannot specify PCTUSED or the logging_clause for the index.
    • If table is partitioned, you can specify a locally or globally partitioned index for the unique or primary key constraint.
Restrictions on the using_index_clause
  • You cannot specify this clause for a view constraint.
  • You cannot specify this clause for a NOT NULL, foreign key, or check constraint.
  • You cannot specify an index (schema.index) or create an index (create_index_statement) when enabling the primary key of an index-organized table.

    See Also:
    • physical_attributes_clause for information on the INITRANS, MAXTRANS, TABLESPACE, and PCTFREE parameters and storage_clause for information on the storage parameters
    • CREATE INDEX for a description of LOCAL and global_partitioned_index clause, and for a description of NOSORT and logging_clause in relation to indexes
    • "Explicit Index Control Example"
NOSORT clause

Specify NOSORT to indicate that the table rows are stored in the database in ascending order and that therefore Oracle does not have to sort the rows when creating the index.

logging_clause

The logging_clause lets you specify whether creation of the index should be logged in the redo log file.

See Also:

logging_clause

global_partitioned_index

The global_partitioned_index clause lets you specify that the partitioning of the index is user defined and is not equipartitioned with the underlying table. By default, nonpartitioned indexes are global indexes. Oracle will partition the global index on the ranges of values from the table columns you specify in column_list. You cannot specify this clause for a local index.

The column_list must specify a left prefix of the index column list. That is, if the index is defined on columns a, b, and c, then for column_list you can specify (a, b, c), or (a, b), or (a, c), but you cannot specify (b, c) or (c) or (b, a).

Restrictions on the Global Partitioned Index Key
  • You cannot specify more than 32 columns in column_list.
  • The columns cannot contain the ROWID pseudocolumn or a column of type ROWID.

    Note:

    If your enterprise has or will have databases using different character sets, use caution when partitioning on character columns. The sort sequence of characters is not identical in all character sets.
    See Also:

    Oracle9i Database Globalization Support Guide for more information on character set support
index_partitioning_clause

Use this clause to describe the individual index partitions. The number of repetitions of this clause determines the number of partitions. If you omit partition, Oracle generates a name with the form SYS_P n.

For VALUES LESS THAN (value_list), specify the (noninclusive) upper bound for the current partition in a global index. The value list is a comma-delimited, ordered list of literal values corresponding to the column list in the global_partitioned_index clause. Always specify MAXVALUE as the value of the last partition.

Note:

If the index is partitioned on a DATE column, and if the date format does not specify the first two digits of the year, you must use the TO_DATE function with a 4-character format mask for the year. The date format is determined implicitly by NLS_TERRITORY or explicitly by NLS_DATE_FORMAT.

Handling Constraint Exceptions

When defining the state of a constraint, you can specify a table into which Oracle places the rowids of all rows violating the constraint.

exceptions_clause

Use the exceptions_clause syntax to define exception handling. If you omit schema, then Oracle assumes the exceptions table is in your own schema. If you omit this clause altogether, then Oracle assumes that the table is named EXCEPTIONS. The EXCEPTIONS table or the table you specify must exist on your local database.

You can create the EXCEPTIONS table using one of these scripts:

  • UTLEXCPT.SQL uses physical rowids. Therefore it can accommodate rows from conventional tables but not from index-organized tables. (See the Note that follows.)
  • UTLEXPT1.SQL uses universal rowids, so it can accommodate rows from both conventional and index-organized tables.

If you create your own exceptions table, then it must follow the format prescribed by one of these two scripts.

Restrictions on the exceptions_clause
  • You cannot specify this clause for a view constraint.
  • You cannot specify this clause in a CREATE TABLE statement, because no rowids exist until after the successful completion of the statement.

    Note:

    If you are collecting exceptions from index-organized tables based on primary keys (rather than universal rowids), then you must create a separate exceptions table for each index-organized table to accommodate its primary-key storage. You create multiple exceptions tables with different names by modifying and resubmitting the script.
    See Also:
    • Oracle9i Database Migration Guide for compatibility issues related to the use of these scripts
    • The DBMS_IOT package in Oracle9i Supplied PL/SQL Packages and Types Reference for information on the SQL scripts
    • Oracle9i Database Performance Tuning Guide and Reference for information on eliminating migrated and chained rows
View Constraints

Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.

Restrictions on View Constraints

View constraints are a subset of table constraints and are subject to the following restrictions:

  • You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
  • Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
  • View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
  • You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
  • You cannot define view constraints on attributes of an object column.

Examples

Unique Key Example

The following statement is a variation of the statement that created the sample table sh.promotions. It defines inline and implicitly enables a unique key on the promo_id column (other constraints are not shown):

CREATE TABLE promotions_var1
    ( promo_id         NUMBER(6)
                       CONSTRAINT promo_id_u  UNIQUE
    , promo_name       VARCHAR2(20)
    , promo_category   VARCHAR2(15)
    , promo_cost       NUMBER(10,2)
    , promo_begin_date DATE
    , promo_end_date   DATE
    ) ;

The constraint promo_id_u identifies the promo_id column as a unique key. This constraint ensures that no two promotions in the table have the same ID. However, the constraint does allow promotions without identifiers.

Alternatively, you can define and enable this constraint out of line:

CREATE TABLE promotions_var2
    ( promo_id         NUMBER(6)
    , promo_name       VARCHAR2(20)
    , promo_category   VARCHAR2(15)
    , promo_cost       NUMBER(10,2)
    , promo_begin_date DATE
    , promo_end_date   DATE
    , CONSTRAINT promo_id_u UNIQUE (promo_id)
   USING INDEX PCTFREE 20
      TABLESPACE stocks
      STORAGE (INITIAL 8K  NEXT 6K) );

The preceding statement also contains the using_index_clause, which specifies storage characteristics for the index that Oracle creates to enable the constraint.

Composite Unique Key Example

The following statement defines and enables a composite unique key on the combination of the warehouse_id and warehouse_name columns of the oe.warehouses table:

ALTER TABLE warehouses
   ADD CONSTRAINT wh_unq UNIQUE (warehouse_id, warehouse_name)
   USING INDEX PCTFREE 5
   EXCEPTIONS INTO wrong_id;

The wh_unq constraint ensures that the same combination of warehouse_id and warehouse_name values does not appear in the table more than once.

The ADD CONSTRAINT clause also specifies other properties of the constraint:

  • The USING INDEX clause specifies storage characteristics for the index Oracle creates to enable the constraint.
  • The EXCEPTIONS INTO clause causes Oracle to write information to the wrong_id table about any rows currently in the customers table that violate the constraint. If the wrong_id exceptions table does not already exist, then this statement will fail.
Primary Key Example

The following statement is a variation of the statement that created the sample table hr.locations. It creates the locations_demo table and defines and enables a primary key on the location_id column (other constraints from the hr.locations table are omitted):

CREATE TABLE locations_demo
    ( location_id    NUMBER(4) CONSTRAINT loc_id_pk PRIMARY KEY
    , street_address VARCHAR2(40)
    , postal_code    VARCHAR2(12)
    , city       VARCHAR2(30)
    , state_province VARCHAR2(25)
    , country_id     CHAR(2)
    ) ;

The loc_id_pk constraint, specified inline, identifies the location_id column as the primary key of the locations_demo table. This constraint ensures that no two locations in the table have the same location number and that no location identifier is NULL.

Alternatively, you can define and enable this constraint out of line:

CREATE TABLE locations_demo
    ( location_id    NUMBER(4)
    , street_address VARCHAR2(40)
    , postal_code    VARCHAR2(12)
    , city       VARCHAR2(30)
    , state_province VARCHAR2(25)
    , country_id     CHAR(2)
    , CONSTRAINT loc_id_pk PRIMARY KEY (location_id));
NOT NULL Example

The following statement alters the locations_demo table (created in "Primary Key Example" ) to define and enable a NOT NULL constraint on the country_id column:

ALTER TABLE locations_demo
   MODIFY (country_id CONSTRAINT country_nn NOT NULL);

The constraint country_nn ensures that no location in the table has a null country_id.

Composite Primary Key Example

The following statement defines a composite primary key on the combination of the prod_id and cust_id columns of the sample table sh.sales:

ALTER TABLE sales
    ADD CONSTRAINT sales_pk PRIMARY KEY (prod_id, cust_id) DISABLE;

This constraint identifies the combination of the prod_id and cust_id columns as the primary key of the sales table. The constraint ensures that no two rows in the table have the same values for both the prod_id column and the cust_id column.

The constraint clause (PRIMARY KEY) also specifies the following properties of the constraint:

  • The constraint definition does not include a constraint name, so Oracle generates a name for the constraint.
  • The DISABLE clause causes Oracle to define the constraint but not enable it.
Foreign Key Constraint Example

The following statement creates the dept_20 table and defines and enables a foreign key on the department_id column that references the primary key on the department_id column of the departments table:

CREATE TABLE dept_20
   (employee_id     NUMBER(4),
    last_name       VARCHAR2(10),
    job_id          VARCHAR2(9),
    manager_id      NUMBER(4),
    hire_date       DATE,
    salary          NUMBER(7,2),
    commission_pct  NUMBER(7,2),
    department_id   CONSTRAINT fk_deptno
                    REFERENCES departments(department_id) );

The constraint fk_deptno ensures that all departments given for employees in the dept_20 table are present in the departments table. However, employees can have null department numbers, meaning they are not assigned to any department. To ensure that all employees are assigned to a department, you could create a NOT NULL constraint on the department_id column in the dept_20 table, in addition to the REFERENCES constraint.

Before you define and enable this constraint, you must define and enable a constraint that designates the department_id column of the departments table as a primary or unique key.

The foreign key constraint definition does not use the FOREIGN KEY clause, because the constraint is defined inline. The datatype of the department_id column is not needed, because Oracle automatically assigns to this column the datatype of the referenced key.

The constraint definition identifies both the parent table and the columns of the referenced key. Because the referenced key is the parent table's primary key, the referenced key column names are optional.

Alternatively, you can define this foreign key constraint out of line:

CREATE TABLE dept_20
   (employee_id     NUMBER(4),
    last_name       VARCHAR2(10),
    job_id          VARCHAR2(9),
    manager_id      NUMBER(4),
    hire_date       DATE,
    salary          NUMBER(7,2),
    commission_pct  NUMBER(7,2),
    department_id,
   CONSTRAINT fk_deptno
      FOREIGN  KEY (department_id)
      REFERENCES  departments(department_id) );

The foreign key definitions in both statements of this statement omit the ON DELETE clause, causing Oracle to prevent the deletion of a department if any employee works in that department.

ON DELETE Example

This statement creates the dept_20 table, defines and enables two referential integrity constraints, and uses the ON DELETE clause:

CREATE TABLE dept_20
   (employee_id     NUMBER(4) PRIMARY KEY,
    last_name       VARCHAR2(10),
    job_id          VARCHAR2(9),
    manager_id      NUMBER(4) CONSTRAINT fk_mgr
                    REFERENCES employees ON DELETE SET NULL,
    hire_date       DATE,
    salary          NUMBER(7,2),
    commission_pct  NUMBER(7,2),
    department_id   NUMBER(2)   CONSTRAINT fk_deptno
                    REFERENCES departments(department_id)
                    ON DELETE CASCADE );

Because of the first ON DELETE clause, if manager number 2332 is deleted from the employees table, then Oracle sets to null the value of manager_id for all employees in the dept_20 table who previously had manager 2332.

Because of the second ON DELETE clause, Oracle cascades any deletion of a department_id value in the departments table to the department_id values of its dependent rows of the dept_20 table. For example, if Department 20 is deleted from the departments table, then Oracle deletes all of that department's employees from the dept_20 table.

Composite Foreign Key Constraint Example

The following statement defines and enables a foreign key on the combination of the employee_id and last_name columns of the dept_20 table:

ALTER TABLE dept_20
   ADD CONSTRAINT fk_empid_hiredate
   FOREIGN KEY (employee_id, hire_date)
   REFERENCES hr.job_history(employee_id, start_date)
   EXCEPTIONS INTO wrong_emp;

The constraint fk_empid_empname ensures that all the employees in the dept_20 table have employee_id and last_name combinations that exist in the employees table. Before you define and enable this constraint, you must define and enable a constraint that designates the combination of the employee_id and last_name columns of the employees table as a primary or unique key.

The EXCEPTIONS INTO clause causes Oracle to write information to the wrong_id table about any rows in the dept_20 table that violate the constraint. If the wrong_id exceptions table does not already exist, then this statement will fail.

Check Constraint Examples

The following statement creates a divisions table and defines a check constraint in each of the table's columns:

CREATE TABLE divisions
   (div_no    NUMBER  CONSTRAINT check_divno
              CHECK (div_no BETWEEN 10 AND 99)
              DISABLE,
    div_name  VARCHAR2(9)  CONSTRAINT check_divname
              CHECK (div_name = UPPER(div_name))
              DISABLE,
    office    VARCHAR2(10)  CONSTRAINT check_office
              CHECK (office IN ('DALLAS','BOSTON',
              'PARIS','TOKYO'))
              DISABLE);

Each constraint restricts the values of the column in which it is defined:

  • check_divno ensures that no division numbers are less than 10 or greater than 99.
  • check_divname ensures that all department names are in uppercase.
  • check_office restricts department locations to Dallas, Boston, Paris, or Tokyo.

Because each CONSTRAINT clause contains the DISABLE clause, Oracle only defines the constraints and does not enable them.

The following statement creates the dept_20 table, defining out of line and implicitly enabling a check constraint:

CREATE TABLE dept_20
   (employee_id     NUMBER(4) PRIMARY KEY,
    last_name       VARCHAR2(10),
    job_id          VARCHAR2(9),
    manager_id      NUMBER(4),
    salary          NUMBER(7,2),
    commission_pct  NUMBER(7,2),
    department_id   NUMBER(2),
    CONSTRAINT check_sal CHECK (salary * commission_pct <= 5000));

This constraint uses an inequality condition to limit an employee's total commission, the product of salary and commission_pct, to $5000:

  • If an employee has non-null values for both salary and commission, then the product of these values must not exceed $5000 to satisfy the constraint.
  • If an employee has a null salary or commission, then the result of the condition is unknown and the employee automatically satisfies the constraint.

Because the constraint clause in this example does not supply a constraint name, Oracle generates a name for the constraint.

The following statement defines and enables a primary key constraint, two foreign key constraints, a NOT NULL constraint, and two check constraints:

CREATE TABLE order_detail
  (CONSTRAINT pk_od PRIMARY KEY (order_id, part_no),
   order_id    NUMBER
      CONSTRAINT fk_oid
         REFERENCES oe.orders(order_id),
   part_no     NUMBER
      CONSTRAINT fk_pno
         REFERENCES oe.product_information(product_id),
   quantity    NUMBER
      CONSTRAINT nn_qty NOT NULL
      CONSTRAINT check_qty CHECK (quantity > 0),
   cost        NUMBER
      CONSTRAINT check_cost CHECK (cost > 0) );

The constraints enable the following rules on table data:

  • pk_od identifies the combination of the order_id and product_id columns as the primary key of the table. To satisfy this constraint, no two rows in the table can contain the same combination of values in the order_id and the product_id columns, and no row in the table can have a null in either the order_id or the product_id column.
  • fk_oid identifies the order_id column as a foreign key that references the order_id column in the orders table in the sample schema oe. All new values added to the column order_detail.order_id must already appear in the column oe.orders.order_id.
  • fk_pno identifies the product_id column as a foreign key that references the product_id column in the product_information table owned by oe. All new values added to the column order_detail.product_id must already appear in the column oe.product_information.product_id.
  • nn_qty forbids nulls in the quantity column.
  • check_qty ensures that values in the quantity column are always greater than zero.
  • check_cost ensures the values in the cost column are always greater than zero.

This example also illustrates the following points about constraint clauses and column definitions:

  • Out-of-line constraint definition can appear before or after the column definitions. In this example, the out-of-line definition of the pk_od constraint precedes the column definitions.
  • A column definition can contain multiple inline constraint definitions. In this example, the definition of the quantity column contains the definitions of both the nn_qty and check_qty constraints.
  • A table can have multiple CHECK constraints. Multiple CHECK constraints, each with a simple condition enforcing a single business rule, is better than a single CHECK constraint with a complicated condition enforcing multiple business rules. When a constraint is violated, Oracle returns an error identifying the constraint. Such an error more precisely identifies the violated business rule if the identified constraint enables a single business rule.
Attribute-Level Constraints Example

The following example guarantees that a value exists for both the first_name and last_name attributes of the name column in the students table:

CREATE TYPE person_name AS OBJECT
   (first_name VARCHAR2(30), last_name VARCHAR2(30));
/

CREATE TABLE students (name person_name, age INTEGER,
   CHECK (name.first_name IS NOT NULL AND
          name.last_name IS NOT NULL));
REF Constraint Examples

The following example creates a duplicate of the sample schema object type cust_address_typ, and then creates a table containing a REF column with a SCOPE constraint:

CREATE TYPE cust_address_typ_new AS OBJECT
    ( street_address     VARCHAR2(40)
    , postal_code        VARCHAR2(10)
    , city               VARCHAR2(30)
    , state_province     VARCHAR2(10)
    , country_id         CHAR(2)
    );
/
CREATE TABLE address_table OF cust_address_typ_new;

CREATE TABLE customer_addresses (
   add_id NUMBER,
   address REF cust_address_typ_new
   SCOPE IS address_table);

The following example creates the same table but with a referential integrity constraint on the REF column that references the OID column of the parent table:

CREATE TABLE customer_addresses (
   add_id NUMBER,
   address REF cust_address_typ REFERENCES address_table);

The following example uses the type department_typ and the table departments_obj_t (created in "Creating Object Tables: Examples" ). A table with a scoped REF is then created.

CREATE TABLE employees_obj
   ( e_name   VARCHAR2(100),
     e_number NUMBER,
     e_dept   REF department_typ SCOPE IS departments_obj_t );

The following statement creates a table with a REF column which has a referential integrity constraint defined on it:

CREATE TABLE employees_obj
   ( e_name   VARCHAR2(100),
     e_number NUMBER,
     e_dept   REF department_typ REFERENCES departments_obj_t);
Explicit Index Control Example

The following statement shows another way to create a unique (or primary key) constraint that gives you explicit control over the index (or indexes) Oracle uses to enforce the constraint:

CREATE TABLE promotions_var3
    ( promo_id         NUMBER(6)
    , promo_name       VARCHAR2(20)
    , promo_category   VARCHAR2(15)
    , promo_cost       NUMBER(10,2)
    , promo_begin_date DATE
    , promo_end_date   DATE
    , CONSTRAINT promo_id_u UNIQUE (promo_id, promo_cost)
         USING INDEX (CREATE UNIQUE INDEX promo_ix1
            ON promotions_var3 (promo_id, promo_cost))
    , CONSTRAINT promo_id_u2 UNIQUE (promo_cost, promo_id)
         USING INDEX promo_ix1);

This example also shows that you can create an index for one constraint and use that index to create and enable another constraint in the same statement.

DEFERRABLE Constraint Examples

The following statement creates table games with a NOT DEFERRABLE INITIALLY IMMEDIATE constraint check (by default) on the scores column:

CREATE TABLE games (scores NUMBER CHECK (scores >= 0));

To define a unique constraint on a column as INITIALLY DEFERRED DEFERRABLE, issue the following statement:

CREATE TABLE games
  (scores NUMBER, CONSTRAINT unq_num UNIQUE (scores)
   INITIALLY DEFERRED DEFERRABLE);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Common SQL DDL Clauses , 4 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

deallocate_unused_clause

Purpose

Use the deallocate_unused_clause to explicitly deallocate unused space at the end of a database object segment and make the space available for other segments in the tablespace.

You can deallocate unused space using the following statements:

  • ALTER CLUSTER (see ALTER CLUSTER )
  • ALTER INDEX: to deallocate unused space from the index, an index partition, or an index subpartition (see ALTER INDEX )
  • ALTER MATERIALIZED VIEW: to deallocate unused space from the overflow segment of an index-organized materialized view (see ALTER MATERIALIZED VIEW )
  • ALTER TABLE: to deallocate unused space from the table, a table partition, a table subpartition, the mapping table of an index-organized table, the overflow segment of an index-organized table, or a LOB storage segment (see ALTER TABLE )

Syntax

deallocate_unused_clause::=

Text description of clauses19.gif follows
Text description of deallocate_unused_clause

Semantics

This section describes the semantics of the deallocate_unused_clause. For additional information, refer to the SQL statement in which you set or reset this clause for a particular database object.

Note:

You cannot specify both the deallocate_unused_clause and the allocate_extent_clause in the same statement.

Oracle frees only unused space above the high water mark (that is, the point beyond which database blocks have not yet been formatted to receive data). Oracle deallocates unused space beginning from the end of the object and moving toward the beginning of the object to the high water mark.

If an extent is completely contained in the deallocation, then the whole extent is freed for reuse. If an extent is partially contained in the deallocation, then the used part up to the high water mark becomes the extent, and the remaining unused space is freed for reuse.

Oracle credits the amount of the released space to the user quota for the tablespace in which the deallocation occurs.

The exact amount of space freed depends on the values of the INITIAL, MINEXTENTS, and NEXT storage parameters.

See Also:

storage_clause for a description of these parameters

KEEP integer

Specify the number of bytes above the high water mark that the segment of the database object is to have after deallocation.

  • If you omit KEEP and the high water mark is above the size of INITIAL and MINEXTENTS, then all unused space above the high water mark is freed. When the high water mark is less than the size of INITIAL or MINEXTENTS, then all unused space above MINEXTENTS is freed.
  • If you specify KEEP, then the specified amount of space is kept and the remaining space is freed. When the remaining number of extents is less than MINEXTENTS, then MINEXTENTS is adjusted to the new number of extents. If the initial extent becomes smaller than INITIAL, then INITIAL is adjusted to the new size.
  • In either case, Oracle sets the value of the NEXT storage parameter to the size of the last extent that was deallocated.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


Common SQL DDL Clauses , 5 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

file_specification

Purpose

Use one of the file_specification forms to specify a file as a datafile or tempfile, or to specify a group of one or more files as a redo log file group.

A file_specification can appear in the following statements:

  • CREATE CONTROLFILE (see CREATE CONTROLFILE )
  • CREATE DATABASE (see CREATE DATABASE )
  • ALTER DATABASE (see ALTER DATABASE )
  • CREATE TABLESPACE (see CREATE TABLESPACE )
  • CREATE TEMPORARY TABLESPACE (see CREATE TEMPORARY TABLESPACE )
  • ALTER TABLESPACE (see ALTER TABLESPACE )

Prerequisites

You must have the privileges necessary to issue one of the statements listed in the preceding section.

Syntax

file_specification::=

Text description of clauses18.gif follows
Text description of file_specification

datafile_tempfile_spec::=

Text description of clauses20.gif follows
Text description of datafile_tempfile_spec

redo_log_file_spec::=

Text description of clauses21.gif follows
Text description of redo_log_file_spec

autoextend_clause::=

Text description of clauses22.gif follows
Text description of autoextend_clause

maxsize_clause::=

Text description of clauses23.gif follows
Text description of maxsize_clause

Semantics

This section describes the semantics of file_specification. For additional information, refer to the SQL statement in which you specify a datafile, tempfile, or redo log file.

'filename'

For a new file, filename is the name of the new file. If you are not using Oracle-managed files, then you must specify filename or the statement fails. However, if you are using Oracle-managed files, then filename is optional, as are the remaining clauses of the specification. In this case, Oracle creates a unique name for the file and saves it in the directory specified by either the DB_CREATE_FILE_DEST initialization parameter (for any type of file) or by the DB_CREATE_ONLINE_LOG_DEST_n initialization parameter (which takes precedence over DB_CREATE_FILE_DEST for log files).

See Also:

Oracle9i Database Administrator's Guide for more information on Oracle-managed files, "Specifying a Datafile: Example" , and "Specifying a Log File: Example"

For an existing file, you must specify a filename. Specify the name of either a datafile, tempfile, or a redo log file member. The filename can contain only single-byte characters from 7-bit ASCII or EBCDIC character sets. Multibyte characters are not valid.

A redo log file group can have one or more members (copies). Each filename must be fully specified according to the conventions for your operating system.

SIZE Clause

Specify the size of the file in bytes. Use K or M to specify the size in kilobytes or megabytes.

  • For undo tablespaces, you must specify the SIZE clause for each datafile. For other tablespaces, you can omit this parameter if the file already exists, or if you are creating an Oracle-managed file.
  • If you omit this clause when creating an Oracle-managed file, then Oracle creates a 100M file.
  • The size of a tablespace must be one block greater than the sum of the sizes of the objects contained in it.

    See Also:

    Oracle9i Database Administrator's Guide for information on Automatic Undo Management and undo tablespaces and "Adding a Log File: Example"

REUSE

Specify REUSE to allow Oracle to reuse an existing file. You must specify REUSE if you specify a filename that already exists.

  • If the file already exists, then Oracle reuses the filename and applies the new size (if you specify SIZE) or retains the original size.
  • If the file does not exist, then Oracle ignores this clause and creates the file.
Restriction on the REUSE Clause

You cannot specify REUSE unless you have specified filename.

Note:

Whenever Oracle uses an existing file, the file's previous contents are lost.
See Also:

"Adding a Datafile: Example" and "Adding a Log File: Example"

autoextend_clause

Use the autoextend_clause to enable or disable the automatic extension of a new datafile or tempfile. If you omit this clause:

  • For Oracle-managed files:
    • If you specify SIZE, Oracle creates a file of the specified size with AUTOEXTEND disabled.
    • If you do not specify SIZE, Oracle creates a 100M file with AUTOEXTEND enabled and MAXSIZE unlimited.
  • For user-managed files, with or without SIZE specified, Oracle creates a file with AUTOEXTEND disabled.
ON

Specify ON to enable autoextend.

OFF

Specify OFF to turn off autoextend if is turned on.

Note:

When you turn off autoextend, the values of NEXT and MAXSIZE are set to zero. If you turn autoextend back on in a subsequent statement, you must reset these values.
NEXT

Use the NEXT clause to specify the size in bytes of the next increment of disk space to be allocated automatically when more extents are required. Use K or M to specify this size in kilobytes or megabytes. The default is the size of one data block.

MAXSIZE

Use the MAXSIZE clause to specify the maximum disk space allowed for automatic extension of the datafile.

UNLIMITED

Use the UNLIMITED clause if you do not want to limit the disk space that Oracle can allocate to the datafile or tempfile.

Restriction on the autoextend_clause

You cannot specify this clause as part of datafile_tempfile_spec in a CREATE CONTROLFILE statement or in an ALTER DATABASE CREATE DATAFILE clause.

Examples

Specifying a Log File: Example

The following statement creates a database named payable that has two redo log file groups, each with two members, and one datafile:

CREATE DATABASE payable
   LOGFILE GROUP 1 ('diska:log1.log', 'diskb:log1.log') SIZE 50K,
           GROUP 2 ('diska:log2.log', 'diskb:log2.log') SIZE 50K
   DATAFILE 'diskc:dbone.dat' SIZE 30M;

The first file specification in the LOGFILE clause specifies a redo log file group with the GROUP value 1. This group has members named 'diska:log1.log' and 'diskb:log1.log', each 50 kilobytes in size.

The second file specification in the LOGFILE clause specifies a redo log file group with the GROUP value 2. This group has members named 'diska:log2.log' and 'diskb:log2.log', also 50 kilobytes in size.

The file specification in the DATAFILE clause specifies a datafile named 'diskc:dbone.dat', 30 megabytes in size.

Each file specification specifies a value for the SIZE parameter and omits the REUSE clause, so none of these files can already exist. Oracle must create them.

Adding a Log File: Example

The following statement adds another redo log file group with two members to the payable database:

ALTER DATABASE payable
   ADD LOGFILE GROUP 3 ('diska:log3.log', 'diskb:log3.log')
   SIZE 50K REUSE;

The file specification in the ADD LOGFILE clause specifies a new redo log file group with the GROUP value 3. This new group has members named 'diska:log3.log' and 'diskb:log3.log', each 50 kilobytes in size. Because the file specification specifies the REUSE clause, each member can (but need not) already exist.

Specifying a Datafile: Example

The following statement creates a tablespace named stocks that has three datafiles:

CREATE TABLESPACE stocks
   DATAFILE 'stock1.dat' SIZE 10M,
            'stock2.dat' SIZE 10M,
            'stock3.dat' SIZE 10M;

The file specifications for the datafiles specify files named 'diskc:stock1.dat', 'diskc:stock2.dat', and 'diskc:stock3.dat'.

Adding a Datafile: Example

The following statement alters the stocks tablespace and adds a new datafile:

ALTER TABLESPACE stocks
   ADD DATAFILE 'stock4.dat' SIZE 10M REUSE;

The file specification specifies a datafile named 'diskc:stock4.dat'. If the filename does not exist, then Oracle simply ignores the REUSE keyword.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Common SQL DDL Clauses , 6 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

logging_clause

Purpose

The logging_clause lets you specify whether creation of a database object will be logged in the redo log file (LOGGING) or not (NOLOGGING).

This clause also specifies whether subsequent Direct Loader (SQL*Loader) and direct-path INSERT operations against the object are logged (LOGGING) or not logged (NOLOGGING).

You can specify the logging_clause in the following statements:

  • CREATE TABLE and ALTER TABLE: for logging of the table, one of its partitions, a LOB segment, or the overflow segment of an index-organized table (see CREATE TABLE and ALTER TABLE ).
  • CREATE INDEX and ALTER INDEX: for logging of the index or one of its partitions (see CREATE INDEX and ALTER INDEX ).
  • CREATE MATERIALIZED VIEW and ALTER MATERIALIZED VIEW: for logging of the materialized view, one of its partitions, or a LOB segment (see CREATE MATERIALIZED VIEW and ALTER MATERIALIZED VIEW ).
  • CREATE MATERIALIZED VIEW LOG and ALTER MATERIALIZED VIEW LOG: for logging of the materialized view log or one of its partitions (see CREATE MATERIALIZED VIEW LOG and ALTER MATERIALIZED VIEW LOG .)
  • CREATE TABLESPACE and ALTER TABLESPACE: to set or modify the default logging characteristics for all objects created in the tablespace (see CREATE TABLESPACE and ALTER TABLESPACE .)

You can also specify LOGGING or NOLOGGING for the following operations:

  • Rebuilding an index (using CREATE INDEX ... REBUILD)
  • Moving a table (using ALTER TABLE ... MOVE)

Syntax

logging_clause::=

Text description of clauses16.gif follows
Text description of logging_clause

Semantics

This section describes the semantics of the logging_clause. For additional information, refer to the SQL statement in which you set or reset logging characteristics for a particular database object.

Specify LOGGING if you want the creation of a database object, as well as subsequent inserts into the object, to be logged in the redo log file.

Specify NOLOGGING if you do not want these operations to be logged.

  • For a nonpartitioned object, the value specified for this clause is the actual physical attribute of the segment associated with the object.
  • For partitioned objects, the value specified for this clause is the default physical attribute of the segments associated with all partitions specified in the CREATE statement (and in subsequent ALTER ... ADD PARTITION statements), unless you specify the logging attribute in the PARTITION description.

If the object for which you are specifying the logging attributes resides in a database or tablespace in force logging mode, then Oracle ignores any NOLOGGING setting until the database or tablespace is taken out of force logging mode.

If the database is run in ARCHIVELOG mode, then media recovery from a backup made before the LOGGING operation re-creates the object. However, media recovery from a backup made before the NOLOGGING operation does not re-create the object.

The size of a redo log generated for an operation in NOLOGGING mode is significantly smaller than the log generated in LOGGING mode.

In NOLOGGING mode, data is modified with minimal logging (to mark new extents INVALID and to record dictionary changes). When applied during media recovery, the extent invalidation records mark a range of blocks as logically corrupt, because the redo data is not fully logged. Therefore, if you cannot afford to lose the database object, then you should take a backup after the NOLOGGING operation.

NOLOGGING is supported in only a subset of the clauses that support LOGGING. Only the following operations support the NOLOGGING mode:

DML:
  • Direct-path INSERT (serial or parallel)
  • Direct Loader (SQL*Loader)
DDL:
  • CREATE TABLE ... AS SELECT
  • CREATE TABLE ... LOB_storage_clause ... LOB_parameters ... NOCACHE | CACHE READS
  • ALTER TABLE ... LOB_storage_clause ... LOB_parameters ... NOCACHE | CACHE READS (for specify logging of newly created LOB columns)
  • ALTER TABLE ... modify_LOB_storage_clause ... modify_LOB_parameters ... NOCACHE | CACHE READS (to change logging of existing LOB columns)
  • ALTER TABLE ... MOVE
  • ALTER TABLE ... [all partition operations that involve data movement]
    • ALTER TABLE ... ADD PARTITION (hash partition only)
    • ALTER TABLE ... MERGE PARTITIONS
    • ALTER TABLE ... SPLIT PARTITION
    • ALTER TABLE ... MOVE PARTITION
    • ALTER TABLE ... MODIFY PARTITION ... ADD SUBPARTITION
    • ALTER TABLE ... MODIFY PARTITION ... COALESCE SUBPARTITION
    • ALTER TABLE ... MODIFY PARTITION ... REBUILD UNUSABLE INDEXES
  • CREATE INDEX
  • ALTER INDEX ... REBUILD
  • ALTER INDEX ... REBUILD PARTITION
  • ALTER INDEX ... SPLIT PARTITION

For objects other than LOBs, if you omit this clause, then the logging attribute of the object defaults to the logging attribute of the tablespace in which it resides.

For LOBs, if you omit this clause:

  • If you specify CACHE, then LOGGING is used (because you cannot have CACHE NOLOGGING).
  • If you specify NOCACHE or CACHE READS, then the logging attribute defaults to the logging attribute of the tablespace in which it resides.

NOLOGGING does not apply to LOBs that are stored inline with row data. That is, if you specify NOLOGGING for LOBs with values less than 4000 bytes and you have not disabled STORAGE IN ROW, then Oracle ignores the NOLOGGING specification and treats the LOB data the same as other table data.

See Also:

Oracle9i Database Concepts and Oracle9i Database Administrator's Guide for more information about logging and parallel DML
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Common SQL DDL Clauses , 7 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

parallel_clause

Purpose

The parallel_clause lets you parallelize the creation of a database object and set the default degree of parallelism for subsequent queries of and DML operations on the object.

You can specify the parallel_clause in the following statements:

  • CREATE TABLE: to set parallelism for the table (see CREATE TABLE ).
  • ALTER TABLE (see ALTER TABLE ):
    • To change parallelism for the table
    • To parallelize the operations of adding, coalescing, exchanging, merging, splitting, truncating, dropping, or moving a table partition
  • CREATE CLUSTER and ALTER CLUSTER: to set or alter parallelism for a cluster (see CREATE CLUSTER and ALTER CLUSTER ).
  • CREATE INDEX: to set parallelism for the index (see CREATE INDEX ).
  • ALTER INDEX (see ALTER INDEX ):
    • To change parallelism for the table
    • To parallelize the rebuilding of the index or the splitting of an index partition
  • CREATE MATERIALIZED VIEW: to set parallelism for the materialized view (see CREATE MATERIALIZED VIEW ).
  • ALTER MATERIALIZED VIEW (see ALTER MATERIALIZED VIEW ):
    • To change parallelism for the materialized view
    • To parallelize the operations of adding, coalescing, exchanging, merging, splitting, truncating, dropping, or moving a materialized view partition
    • To parallelize the operations of adding or moving materialized view subpartitions
  • CREATE MATERIALIZED VIEW LOG: to set parallelism for the table (see CREATE MATERIALIZED VIEW LOG ).
  • ALTER MATERIALIZED VIEW LOG (see ALTER MATERIALIZED VIEW LOG ):
    • To change parallelism for the materialized view
    • To parallelize the operations of adding, coalescing, exchanging, merging, splitting, truncating, dropping, or moving a materialized view partition
  • ALTER DATABASE ... RECOVER: to recover the database (see ALTER DATABASE ).
  • ALTER DATABASE ... standby_database_clauses: to parallelize operations on the standby database (see ALTER DATABASE ).

Syntax

parallel_clause::=

Text description of clauses14.gif follows
Text description of parallel_clause

Semantics

This section describes the semantics of the parallel_clause. For additional information, refer to the SQL statement in which you set or reset parallelism for a particular database object or operation.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Common SQL DDL Clauses , 8 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

physical_attributes_clause

Purpose

The physical_attributes_clause lets you specify the value of the PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters and the storage characteristics of a table, cluster, index, or materialized view.

You can specify the physical_attributes_clause in the following statements:

  • CREATE CLUSTER and ALTER CLUSTER: to set or change the physical attributes of the cluster and all tables in the cluster (see CREATE CLUSTER and ALTER CLUSTER ).
  • CREATE TABLE: to set the physical attributes of the table, a table partition, the OIDINDEX of an object table, or the overflow segment of an index-organized table (see CREATE TABLE ).
  • ALTER TABLE: to change the physical attributes of the table, the default physical attributes of future table partitions, or the physical attributes of existing table partitions (see ALTER TABLE ).

    Notes:
    • You cannot specify physical attributes for a temporary table.
    • You cannot specify physical attributes for a clustered table. Tables in a cluster inherit the cluster's physical attributes.
  • CREATE INDEX: to set the physical attributes of an index, or index partition (see CREATE INDEX ).
  • ALTER INDEX: to change the physical attributes of the index, the default physical attributes of future partitions, or the physical attributes of existing index partitions (see ALTER INDEX ).
  • CREATE MATERIALIZED VIEW: to set the physical attributes of the materialized view, one of its partitions, or the index Oracle generates to maintain the materialized view (see CREATE MATERIALIZED VIEW ).
  • ALTER MATERIALIZED VIEW: to change the physical attributes of the materialized view, the default physical attributes of future partitions, the physical attributes of an existing partition, or the index Oracle creates to maintain the materialized view (see ALTER MATERIALIZED VIEW ).
  • CREATE MATERIALIZED VIEW LOG and ALTER MATERIALIZED VIEW LOG: to set or change the physical attributes of the materialized view log (see CREATE MATERIALIZED VIEW LOG and ALTER MATERIALIZED VIEW LOG ).

Syntax

physical_attributes_clause::=

Text description of clauses15.gif follows
Text description of physical_attributes_clause

(storage_clause )

Semantics

This section describes the parameters of the physical_attributes_clause. For additional information, refer to the SQL statement in which you set or reset these parameters for a particular database object.

PCTFREE integer

Specify a whole number representing the percentage of space in each data block of the database object reserved for future updates to the object's rows. The value of PCTFREE must be a value from 0 to 99. A value of 0 means that the entire block can be filled by inserts of new rows. The default value is 10. This value reserves 10% of each block for updates to existing rows and allows inserts of new rows to fill a maximum of 90% of each block.

PCTFREE has the same function in the statements that create and alter tables, partitions, clusters, indexes, materialized views, and materialized view logs. The combination of PCTFREE and PCTUSED determines whether new rows will be inserted into existing data blocks or into new blocks.

Restriction on the PCTFREE Clause

When altering an index, you can specify this parameter only in the modify_index_default_attrs clause and the split_partition_clause.

PCTUSED integer

Specify a whole number representing the minimum percentage of used space that Oracle maintains for each data block of the database object. A block becomes a candidate for row insertion when its used space falls below PCTUSED. PCTUSED is specified as a positive integer from 0 to 99 and defaults to 40.

PCTUSED has the same function in the statements that create and alter tables, partitions, clusters, materialized views, and materialized view logs.

PCTUSED is not a valid table storage characteristic for an index-organized table (ORGANIZATION INDEX).

The sum of PCTFREE and PCTUSED must be equal to or less than 100. You can use PCTFREE and PCTUSED together to utilize space within a table more efficiently.

Restrictions on the PCTUSED Clause

You cannot specify this parameter for an index or for the index segment of an index-organized table.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for information on the performance effects of different values PCTUSED and PCTFREE

INITRANS integer

Specify the initial number of concurrent transaction entries allocated within each data block allocated to the database object. This value can range from 1 to 255 and defaults to 1, with the following exceptions:

  • The default INITRANS value for a cluster or index is 2 or the default INITRANS value of the cluster's tablespace, whichever is greater.
  • The default value for an index is 2

In general, you should not change the INITRANS value from its default.

Each transaction that updates a block requires a transaction entry in the block. The size of a transaction entry depends on your operating system.

This parameter ensures that a minimum number of concurrent transactions can update the block and helps avoid the overhead of dynamically allocating a transaction entry.

The INITRANS parameter serves the same purpose in the statements that create and alter tables, partitions, clusters, indexes, materialized views, and materialized view logs.

MAXTRANS integer

Specify the maximum number of concurrent transactions that can update a data block allocated to the database object. This limit does not apply to queries. This value can range from 1 to 255 and the default is a function of the data block size. You should not change the MAXTRANS value from its default.

If the number of concurrent transactions updating a block exceeds the INITRANS value, then Oracle dynamically allocates transaction entries in the block until either the MAXTRANS value is exceeded or the block has no more free space.

The MAXTRANS parameter serves the same purpose in the PARTITION description, clusters, materialized views, and materialized view logs as in tables.

storage_clause

The storage_clause lets you specify storage characteristics for the table, object table OID index, partition, LOB data segment, LOB index segment, or index-organized table overflow data segment. This clause has performance ramifications for large tables. Storage should be allocated to minimize dynamic allocation of additional space.

See Also:

storage_clause

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


Common SQL DDL Clauses , 9 of 9

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

storage_clause

Purpose

The storage_clause lets you specify how Oracle should store a database object. Storage parameters affect both how long it takes to access data stored in the database and how efficiently space in the database is used.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for a discussion of the effects of the storage parameters

When you create a cluster, index, rollback segment, materialized view, materialized view log, table, or partition, you can specify values for the storage parameters for the segments allocated to these objects. If you omit any storage parameter, then Oracle uses the value of that parameter specified for the tablespace in which the object resides.

When you alter a cluster, index, rollback segment, materialized view, materialized view log, table, or partition, you can change the values of storage parameters. The new values affect only future extent allocations.

The storage_clause is part of the physical_attributes_clause, so you can specify this clause in any of the statements where you can specify the physical attributes clause (see physical_attributes_clause ).

In addition, you can specify the storage_clause in the following statements:

  • CREATE CLUSTER and ALTER CLUSTER: to set or change the storage characteristics of the cluster and all tables in the cluster (see CREATE CLUSTER and ALTER CLUSTER ).
  • CREATE INDEX and ALTER INDEX: to set or change the storage characteristics of an index or index partition (see CREATE INDEX and ALTER INDEX ).
  • CREATE MATERIALIZED VIEW and ALTER MATERIALIZED VIEW: to set or change the storage characteristics of a materialized view, one of its partitions, or the index Oracle generates to maintain the materialized view (see CREATE MATERIALIZED VIEW and ALTER MATERIALIZED VIEW ).
  • CREATE MATERIALIZED VIEW LOG and ALTER MATERIALIZED VIEW LOG: to set or change the storage characteristics of the materialized view log (see CREATE MATERIALIZED VIEW LOG and ALTER MATERIALIZED VIEW LOG ).
  • CREATE ROLLBACK SEGMENT and ALTER ROLLBACK SEGMENT: to set or change the storage attributes of a rollback segment (see CREATE ROLLBACK SEGMENT and ALTER ROLLBACK SEGMENT ).
  • CREATE TABLE and ALTER TABLE: to set the storage characteristics of a LOB data segment of the table or one of its partitions or subpartitions (see CREATE TABLE and ALTER TABLE ).
  • CREATE TABLESPACE and ALTER TABLESPACE: to set or change the default storage characteristics for objects created in the tablespace (see CREATE TABLESPACE and ALTER TABLESPACE ).
  • constraints: to specify storage for the index (and its partitions, if it is a partitioned index) used to enforce the constraint (see constraints ).

Prerequisites

To change the value of a STORAGE parameter, you must have the privileges necessary to use the appropriate CREATE or ALTER statement.

Syntax

storage_clause::=

Text description of clauses13.gif follows
Text description of storage_clause

Semantics

This section describes the parameters of the storage_clause. For additional information, refer to the SQL statement in which you set or reset these parameters for a particular database object.

Note:

The storage_clause is interpreted differently for locally managed tablespaces. At creation, Oracle ignores MAXEXTENTS and uses the remaining parameter values to calculate the initial size of the segment. For more information, see CREATE TABLESPACE .
See Also:

"Specifying Table Storage Attributes: Example" and "Specifying Rollback Segment Storage Attributes: Example"

INITIAL

Specify in bytes the size of the object's first extent. Oracle allocates space for this extent when you create the schema object. Use K or M to specify this size in kilobytes or megabytes.

The default value is the size of 5 data blocks. In tablespaces with manual segment-space management, the minimum value is the size of 2 data blocks plus one data block for each free list group you specify. In tablespaces with automatic segment-space management, the minimum value is 5 data blocks. The maximum value depends on your operating system.

In dictionary-managed tablespaces, if MINIMUM EXTENT was specified for the tablespace when it was created, then Oracle rounds the value of INITIAL up to the specified MINIMUM EXTENT size if necessary. If MINIMUM EXTENT was not specified, then Oracle rounds the INITIAL extent size for segments created in that tablespace up to the minimum value (see preceding paragraph), or to multiples of 5 blocks if the requested size is greater than 5 blocks.

In locally managed tablespaces, Oracle uses the value of INITIAL in conjunction with the size of extents specified for the tablespace to determine the object's first extent. For example, in a uniform locally managed tablespace with 5M extents, if you specify an INITIAL value of 1M, then Oracle creates five 1M extents.

Restriction on INITIAL

You cannot specify INITIAL in an ALTER statement.

See Also:

FREELIST GROUPS for information on freelist groups

NEXT

Specify in bytes the size of the next extent to be allocated to the object. Use K or M to specify the size in kilobytes or megabytes. The default value is the size of 5 data blocks. The minimum value is the size of 1 data block. The maximum value depends on your operating system. Oracle rounds values up to the next multiple of the data block size for values less than 5 data blocks. For values greater than 5 data blocks, Oracle rounds up to a value that minimizes fragmentation, as described in Oracle9i Database Administrator's Guide.

If you change the value of the NEXT parameter (that is, if you specify it in an ALTER statement), then the next allocated extent will have the specified size, regardless of the size of the most recently allocated extent and the value of the PCTINCREASE parameter.

See Also:

Oracle9i Database Administrator's Guide for information on how Oracle minimizes fragmentation

PCTINCREASE

Specify the percent by which the third and subsequent extents grow over the preceding extent. The default value is 50, meaning that each subsequent extent is 50% larger than the preceding extent. The minimum value is 0, meaning all extents after the first are the same size. The maximum value depends on your operating system.

Oracle rounds the calculated size of each new extent to the nearest multiple of the data block size.

If you change the value of the PCTINCREASE parameter (that is, if you specify it in an ALTER statement), then Oracle calculates the size of the next extent using this new value and the size of the most recently allocated extent.

Suggestion:

If you wish to keep all extents the same size, you can prevent SMON from coalescing extents by setting the value of PCTINCREASE to 0. In general, Oracle Corporation recommends a setting of 0 as a way to minimize fragmentation and avoid the possibility of very large temporary segments during processing.
Restriction on PCTINCREASE

You cannot specify PCTINCREASE for rollback segments. Rollback segments always have a PCTINCREASE value of 0.

MINEXTENTS

Specify the total number of extents to allocate when the object is created. This parameter lets you allocate a large amount of space when you create an object, even if the space available is not contiguous. The default and minimum value is 1, meaning that Oracle allocates only the initial extent, except for rollback segments, for which the default and minimum value is 2. The maximum value depends on your operating system.

If the MINEXTENTS value is greater than 1, then Oracle calculates the size of subsequent extents based on the values of the INITIAL, NEXT, and PCTINCREASE storage parameters.

When changing the value of MINEXTENTS (that is, in an ALTER statement), you can reduce the value from its current value, but you cannot increase it. Resetting MINEXTENTS to a smaller value might be useful, for example, before a TRUNCATE ... DROP STORAGE statement, if you want to ensure that the segment will maintain a minimum number of extents after the TRUNCATE operation.

Restriction on MINEXTENTS

You cannot change the value of MINEXTENTS for an object that resides in a locally managed tablespace.

MAXEXTENTS

Specify the total number of extents, including the first, that Oracle can allocate for the object. The minimum value is 1 (except for rollback segments, which always have a minimum value of 2). The default value depends on your data block size.

Restriction on MAXEXTENTS

You cannot change the value of MAXEXTENTS for an object that resides in a locally managed tablespace.

UNLIMITED

Specify UNLIMITED if you want extents to be allocated automatically as needed. Oracle Corporation recommends this setting as a way to minimize fragmentation.

However, do not use this clause for rollback segments. Rogue transactions containing inserts, updates, or deletes that continue for a long time will continue to create new extents until a disk is full.

Caution:

A rollback segment that you create without specifying the storage_clause has the same storage parameters as the tablespace in which the rollback segment is created. Thus, if you create the tablespace with MAXEXTENTS UNLIMITED, then the rollback segment will also have the same default.

FREELIST GROUPS

Specify the number of groups of free lists for the database object you are creating. The default and minimum value for this parameter is 1. Oracle uses the instance number of Real Application Clusters instances to map each instance to one free list group.

Each free list group uses one database block. Therefore:

  • If you do not specify a large enough value for INITIAL to cover the minimum value plus one data block for each free list group, then Oracle increases the value of INITIAL the necessary amount.
  • If you are creating an object in a uniform locally managed tablespace, and the extent size is not large enough to accommodate the number of freelist groups, then the create operation will fail.

    Note:

    Oracle ignores a setting of FREELIST GROUPS if the tablespace in which the object resides is in automatic segment-space management mode. If you are running your database in this mode, please refer to the FREEPOOLS parameter of the LOB_storage_clause .
Restriction on FREELIST GROUPS

You can specify the FREELIST GROUPS parameter only in CREATE TABLE, CREATE CLUSTER, CREATE MATERIALIZED VIEW, CREATE MATERIALIZED VIEW LOG, and CREATE INDEX statements.

See Also:

Oracle9i Real Application Clusters Administration

FREELISTS

For objects other than tablespaces, specify the number of free lists for each of the free list groups for the table, partition, cluster, or index. The default and minimum value for this parameter is 1, meaning that each free list group contains one free list. The maximum value of this parameter depends on the data block size. If you specify a FREELISTS value that is too large, then Oracle returns an error indicating the maximum value.

Note:

Oracle ignores a setting of FREELISTS if the tablespace in which the object resides is in automatic segment-space management mode. If you are running your database in this mode, please refer to the FREEPOOLS parameter of the LOB_storage_clause .
Restriction on FREELISTS

You can specify FREELISTS in the storage_clause of any statement except when creating or altering a tablespace or rollback segment.

OPTIMAL

The OPTIMAL keyword is relevant only to rollback segments. It specifies an optimal size in bytes for a rollback segment. Use K or M to specify this size in kilobytes or megabytes. Oracle tries to maintain this size for the rollback segment by dynamically deallocating extents when their data is no longer needed for active transactions. Oracle deallocates as many extents as possible without reducing the total size of the rollback segment below the OPTIMAL value.

The value of OPTIMAL cannot be less than the space initially allocated by the MINEXTENTS, INITIAL, NEXT, and PCTINCREASE parameters. The maximum value depends on your operating system. Oracle rounds values up to the next multiple of the data block size.

NULL

Specify NULL for no optimal size for the rollback segment, meaning that Oracle never deallocates the rollback segment's extents. This is the default behavior.

BUFFER_POOL

The BUFFER_POOL clause lets you specify a default buffer pool (cache) for a schema object. All blocks for the object are stored in the specified cache.

  • If you define a buffer pool for a partitioned table or index, then the partitions inherit the buffer pool from the table or index definition, unless overridden by a partition-level definition.
  • For an index-organized table, you can specify a buffer pool separately for the index segment and the overflow segment.
Restrictions on BUFFER_POOL
  • You cannot specify this clause for a cluster table. However, you can specify it for a cluster.
  • You cannot specify this clause for a tablespace or for a rollback segment.
KEEP

Specify KEEP to put blocks from the segment into the KEEP buffer pool. Maintaining an appropriately sized KEEP buffer pool lets Oracle retain the schema object in memory to avoid I/O operations. KEEP takes precedence over any NOCACHE clause you specify for a table, cluster, materialized view, or materialized view log.

RECYCLE

Specify RECYCLE to put blocks from the segment into the RECYCLE pool. An appropriately sized RECYCLE pool reduces the number of objects whose default pool is the RECYCLE pool from taking up unnecessary cache space.

DEFAULT

Specify DEFAULT to indicate the default buffer pool. This is the default for objects not assigned to KEEP or RECYCLE.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information about using multiple buffer pools

Examples

Specifying Table Storage Attributes: Example

The following statement creates a table and provides storage parameter values:

CREATE TABLE divisions
    (div_no     NUMBER(2),
     div_name   VARCHAR2(14),
     location   VARCHAR2(13) )
     STORAGE  ( INITIAL 100K  NEXT     50K
                MINEXTENTS 1  MAXEXTENTS 50  PCTINCREASE 5);

Oracle allocates space for the table based on the STORAGE parameter values as follows:

  • The MINEXTENTS value is 1, so Oracle allocates 1 extent for the table upon creation.
  • The INITIAL value is 100K, so the first extent's size is 100 kilobytes.
  • If the table data grows to exceed the first extent, then Oracle allocates a second extent. The NEXT value is 50K, so the second extent's size would be 50 kilobytes.
  • If the table data subsequently grows to exceed the first two extents, then Oracle allocates a third extent. The PCTINCREASE value is 5, so the calculated size of the third extent is 5% larger than the second extent, or 52.5 kilobytes. If the data block size is 2 kilobytes, then Oracle rounds this value to 52 kilobytes.

    If the table data continues to grow, then Oracle allocates more extents, each 5% larger than the previous one.

  • The MAXEXTENTS value is 50, so Oracle can allocate as many as 50 extents for the table.
Specifying Rollback Segment Storage Attributes: Example

The following statement creates a rollback segment and provides storage parameter values:

CREATE ROLLBACK SEGMENT rs_store
    STORAGE ( INITIAL  10K  NEXT 10K
              MINEXTENTS 2  MAXEXTENTS 25
               OPTIMAL 50K );

Oracle allocates space for the rollback segment based on the STORAGE parameter values as follows:

  • The MINEXTENTS value is 2, so Oracle allocates 2 extents for the rollback segment upon creation.
  • The INITIAL value is 10K, so the first extent's size is 10 kilobytes.
  • The NEXT value is 10K, so the second extent's size is 10 kilobytes.
  • If the rollback data exceeds the first two extents, then Oracle allocates a third extent. The PCTINCREASE value for rollback segments is always 0, so the third and subsequent extents are the same size as the second extent, 10 kilobytes.
  • The MAXEXTENTS value is 25, so Oracle can allocate as many as 25 extents for the rollback segment.
  • The OPTIMAL value is 50K, so Oracle deallocates extents if the rollback segment exceeds 50 kilobytes. Oracle deallocates only extents that contain data for transactions that are no longer active.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Queries and Subqueries, 1 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

8
SQL Queries and Subqueries

This chapter describes SQL queries and subqueries.

This chapter contains these sections:

  • About Queries and Subqueries
  • Creating Simple Queries
  • Hierarchical Queries
  • The UNION [ALL], INTERSECT, MINUS Operators
  • Sorting Query Results
  • Joins
  • Using Subqueries
  • Unnesting of Nested Subqueries
  • Selecting from the DUAL Table
  • Distributed Queries
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Queries and Subqueries, 2 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

About Queries and Subqueries

A query is an operation that retrieves data from one or more tables or views. In this reference, a top-level SELECT statement is called a query, and a query nested within another SQL statement is called a subquery.

This section describes some types of queries and subqueries and how to use them. The top level of the syntax is shown in this chapter.

See Also:

SELECT for the full syntax of all the clauses and the semantics of this statement

select::=

Text description of queriesa.gif follows
Text description of select

subquery::=

Text description of queries2.gif follows
Text description of subquery

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Queries and Subqueries, 3 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Creating Simple Queries

The list of expressions that appears after the SELECT keyword and before the FROM clause is called the select list. Within the select list, you specify one or more columns in the set of rows you want Oracle to return from one or more tables, views, or materialized views. The number of columns, as well as their datatype and length, are determined by the elements of the select list.

If two or more tables have some column names in common, then you must qualify column names with names of tables. Otherwise, fully qualified column names are optional. However, it is always a good idea to qualify table and column references explicitly. Oracle often does less work with fully qualified table and column names.

You can use a column alias, c_alias, to label the preceding expression in the select list so that the column is displayed with a new heading. The alias effectively renames the select list item for the duration of the query. The alias can be used in the ORDER BY clause, but not other clauses in the query.

You can use comments in a SELECT statement to pass instructions, or hints, to the Oracle optimizer. The optimizer uses hints to choose an execution plan for the statement.

See Also:

"Hints" and Oracle9i Database Performance Tuning Guide and Reference for more information on hints
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Queries and Subqueries, 11 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Distributed Queries

Oracle's distributed database management system architecture lets you access data in remote databases using Oracle Net and an Oracle server. You can identify a remote table, view, or materialized view by appending @dblink to the end of its name. The dblink must be a complete or partial name for a database link to the database containing the remote table, view, or materialized view.

See Also:
  • "Referring to Objects in Remote Databases" for more information on referring to database links
  • Oracle9i Net Services Administrator's Guide for information on accessing remote databases
Restrictions on Distributed Queries

Distributed queries are currently subject to the restriction that all tables locked by a FOR UPDATE clause and all tables with LONG columns selected by the query must be located on the same database. For example, the following statement will raise an error because it selects press_release, a LONG value, from the print_media table on the remote database and locks the print_media table on the local database:

SELECT r.product_id, l.ad_id, r.press_release
   FROM pm.print_media@remote r, pm.print_media l
   FOR UPDATE OF l.ad_id;

In addition, Oracle currently does not support distributed queries that select user-defined types or object REFs on remote tables.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Queries and Subqueries, 4 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Hierarchical Queries

If a table contains hierarchical data, then you can select rows in a hierarchical order using the hierarchical query clause:

hierarchical_query_clause::=

Text description of queries3.gif follows
Text description of hierarchical_query_clause

  • START WITH specifies the root row(s) of the hierarchy.
  • CONNECT BY specifies the relationship between parent rows and child rows of the hierarchy. In a hierarchical query, one expression in condition must be qualified with the PRIOR operator to refer to the parent row. For example,
    ... PRIOR expr = expr
or
... expr = PRIOR expr

    If the CONNECT BY condition is compound, then only one condition requires the PRIOR operator. For example:

    CONNECT BY last_name != 'King' AND PRIOR employee_id = manager_id

    In addition, the CONNECT BY condition cannot contain a subquery.

    PRIOR is a unary operator and has the same precedence as the unary + and - arithmetic operators. It evaluates the immediately following expression for the parent row of the current row in a hierarchical query.

    PRIOR is most commonly used when comparing column values with the equality operator. (The PRIOR keyword can be on either side of the operator.) PRIOR causes Oracle to use the value of the parent row in the column. Operators other than the equal sign (=) are theoretically possible in CONNECT BY clauses. However, the conditions created by these other operators can result in an infinite loop through the possible combinations. In this case Oracle detects the loop at run time and returns an error.

    See Also:

    "Examples"

The manner in which Oracle processes a WHERE clause (if any) in a hierarchical query depends on whether the WHERE clause contains a join:

  • If the WHERE predicate contains a join, Oracle applies the join predicates before doing the CONNECT BY processing.
  • If the WHERE clause does not contain a join, Oracle applies all predicates other than the CONNECT BY predicates after doing the CONNECT BY processing without affecting the other rows of the hierarchy.

Oracle uses the information from the hierarchical query clause to form the hierarchy using the following steps:

  1. Oracle processes the WHERE clause either before or after the CONNECT BY clause depending on whether the WHERE clause contains any join predicates (as described in the preceding bullet list).
  2. Oracle selects the root row(s) of the hierarchy--those rows that satisfy the START WITH condition.
  3. Oracle selects the child rows of each root row. Each child row must satisfy the condition of the CONNECT BY condition with respect to one of the root rows.
  4. Oracle selects successive generations of child rows. Oracle first selects the children of the rows returned in step 3, and then the children of those children, and so on. Oracle always selects children by evaluating the CONNECT BY condition with respect to a current parent row.
  5. If the query contains a WHERE clause without a join, then Oracle eliminates all rows from the hierarchy that do not satisfy the condition of the WHERE clause. Oracle evaluates this condition for each row individually, rather than removing all the children of a row that does not satisfy the condition.
  6. Oracle returns the rows in the order shown in Figure 8-1. In the diagram, children appear below their parents. For an explanation of hierarchical trees, see Figure 2-1, "Hierarchical Tree" .

Figure 8-1 Hierarchical Queries

Text description of queries4.gif follows
Text description of the illustration queries4.gif

To find the children of a parent row, Oracle evaluates the PRIOR expression of the CONNECT BY condition for the parent row and the other expression for each row in the table. Rows for which the condition is true are the children of the parent. The CONNECT BY condition can contain other conditions to further filter the rows selected by the query. The CONNECT BY condition cannot contain a subquery.

If the CONNECT BY condition results in a loop in the hierarchy, then Oracle returns an error. A loop occurs if one row is both the parent (or grandparent or direct ancestor) and a child (or a grandchild or a direct descendent) of another row.

Note:

In a hierarchical query, do not specify either ORDER BY or GROUP BY, as they will destroy the hierarchical order of the CONNECT BY results. If you want to order rows of siblings of the same parent, then use the ORDER SIBLINGS BY clause. See order_by_clause .

Examples

The following hierarchical query uses the CONNECT BY clause to define the relationship between employees and managers:

SELECT employee_id, last_name, manager_id
   FROM employees
   CONNECT BY PRIOR employee_id = manager_id;

EMPLOYEE_ID LAST_NAME                 MANAGER_ID
----------- ------------------------- ----------
        101 Kochhar                          100
        108 Greenberg                        101
        109 Faviet                           108
        110 Chen                             108
        111 Sciarra                          108
        112 Urman                            108
        113 Popp                             108
        200 Whalen                           101
.
.
.

The next example is similar to the preceding example, but uses the LEVEL pseudocolumn to show parent and child rows:

SELECT employee_id, last_name, manager_id, LEVEL
   FROM employees
   CONNECT BY PRIOR employee_id = manager_id;

EMPLOYEE_ID LAST_NAME                 MANAGER_ID      LEVEL
----------- ------------------------- ---------- ----------
        101 Kochhar                          100          1
        108 Greenberg                        101          2
        109 Faviet                           108          3
        110 Chen                             108          3
        111 Sciarra                          108          3
        112 Urman                            108          3
        113 Popp                             108          3
...

Finally, the next example adds a START WITH clause to specify a root row for the hierarchy, and an ORDER BY clause using the SIBLINGS keyword to preserve ordering within the hierarchy:

SELECT last_name, employee_id, manager_id, LEVEL
      FROM employees
      START WITH employee_id = 100
      CONNECT BY PRIOR employee_id = manager_id
      ORDER SIBLINGS BY last_name;

LAST_NAME                 EMPLOYEE_ID MANAGER_ID      LEVEL
------------------------- ----------- ---------- ----------
King                              100                     1
Cambrault                         148        100          2
Bates                             172        148          3
Bloom                             169        148          3
Fox                               170        148          3
Kumar                             173        148          3
Ozer                              168        148          3
Smith                             171        148          3
De Haan                           102        100          2
Hunold                            103        102          3
Austin                            105        103          4
Ernst                             104        103          4
Lorentz                           107        103          4
Pataballa                         106        103          4
Errazuriz                         147        100          2
Ande                              166        147          3
Banda                             167        147          3
...
See Also:
  • LEVEL for a discussion of how the LEVEL pseudocolumn operates in a hierarchical query
  • SYS_CONNECT_BY_PATH for information on retrieving the path of column values from root to node
  • order_by_clause for more information on the SIBLINGS keyword of ORDER BY clauses
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Queries and Subqueries, 7 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Joins

A join is a query that combines rows from two or more tables, views, or materialized views. Oracle performs a join whenever multiple tables appear in the query's FROM clause. The query's select list can select any columns from any of these tables. If any two of these tables have a column name in common, then you must qualify all references to these columns throughout the query with table names to avoid ambiguity.

Join Conditions

Most join queries contain WHERE clause conditions that compare two columns, each from a different table. Such a condition is called a join condition. To execute a join, Oracle combines pairs of rows, each containing one row from each table, for which the join condition evaluates to TRUE. The columns in the join conditions need not also appear in the select list.

To execute a join of three or more tables, Oracle first joins two of the tables based on the join conditions comparing their columns and then joins the result to another table based on join conditions containing columns of the joined tables and the new table. Oracle continues this process until all tables are joined into the result. The optimizer determines the order in which Oracle joins tables based on the join conditions, indexes on the tables, and, in the case of the cost-based optimization approach, statistics for the tables.

In addition to join conditions, the WHERE clause of a join query can also contain other conditions that refer to columns of only one table. These conditions can further restrict the rows returned by the join query.

Note:

You cannot specify LOB columns in the WHERE clause if the WHERE clause contains any joins. The use of LOBs in WHERE clauses is also subject to other restrictions. See Oracle9i Application Developer's Guide - Large Objects (LOBs) for more information.

Equijoins

An equijoin is a join with a join condition containing an equality operator. An equijoin combines rows that have equivalent values for the specified columns. Depending on the internal algorithm the optimizer chooses to execute the join, the total size of the columns in the equijoin condition in a single table may be limited to the size of a data block minus some overhead. The size of a data block is specified by the initialization parameter DB_BLOCK_SIZE.

See Also:

"Using Join Queries: Examples"

Self Joins

A self join is a join of a table to itself. This table appears twice in the FROM clause and is followed by table aliases that qualify column names in the join condition. To perform a self join, Oracle combines and returns rows of the table that satisfy the join condition.

See Also:

"Using Self Joins: Example"

Cartesian Products

If two tables in a join query have no join condition, then Oracle returns their Cartesian product. Oracle combines each row of one table with each row of the other. A Cartesian product always generates many rows and is rarely useful. For example, the Cartesian product of two tables, each with 100 rows, has 10,000 rows. Always include a join condition unless you specifically need a Cartesian product. If a query joins three or more tables and you do not specify a join condition for a specific pair, then the optimizer may choose a join order that avoids producing an intermediate Cartesian product.

Inner Joins

An inner join (sometimes called a "simple join") is a join of two or more tables that returns only those rows that satisfy the join condition.

Outer Joins

An outer join extends the result of a simple join. An outer join returns all rows that satisfy the join condition and also returns some or all of those rows from one table for which no rows from the other satisfy the join condition.

  • To write a query that performs an outer join of tables A and B and returns all rows from A (a left outer join), use the LEFT [OUTER] JOIN syntax in the FROM clause, or apply the outer join operator (+) to all columns of B in the join condition in the WHERE clause. For all rows in A that have no matching rows in B, Oracle returns null for any select list expressions containing columns of B.
  • To write a query that performs an outer join of tables A and B and returns all rows from B (a right outer join), use the RIGHT [OUTER] JOIN syntax in the FROM clause, or apply the outer join operator (+) to all columns of A in the join condition in the WHERE clause. For all rows in B that have no matching rows in A, Oracle returns null for any select list expressions containing columns of A.
  • To write a query that performs an outer join and returns all rows from A and B, extended with nulls if they do not satisfy the join condition (a full outer join), use the FULL [OUTER] JOIN syntax in the FROM clause.

Oracle Corporation recommends that you use the FROM clause OUTER JOIN syntax rather than the Oracle join operator. Outer join queries that use the Oracle join operator (+) are subject to the following rules and restrictions, which do not apply to the FROM clause join syntax:

  • You cannot specify the (+) operator in a query block that also contains FROM clause join syntax.
  • The (+) operator can appear only in the WHERE clause or, in the context of left-correlation (that is, when specifying the TABLE clause) in the FROM clause, and can be applied only to a column of a table or view.
  • If A and B are joined by multiple join conditions, then you must use the (+) operator in all of these conditions. If you do not, then Oracle will return only the rows resulting from a simple join, but without a warning or error to advise you that you do not have the results of an outer join.
  • The (+) operator does not produce an outer join if you specify one table in the outer query and the other table in an inner query.
  • You cannot use the (+) operator to outer-join a table to itself, although self joins are valid. For example, the following statement is not valid:
    -- The following statement is not valid:
SELECT employee_id, manager_id
   FROM employees
   WHERE employees.manager_id(+) = employees.employee_id;

    However, the following self join is valid:

    SELECT e1.employee_id, e1.manager_id, e2.employee_id
   FROM employees e1, employees e2
   WHERE e1.manager_id(+) = e2.employee_id;
  • The (+) operator can be applied only to a column, not to an arbitrary expression. However, an arbitrary expression can contain one or more columns marked with the (+) operator.
  • A condition containing the (+) operator cannot be combined with another condition using the OR logical operator.
  • A condition cannot use the IN comparison condition to compare a column marked with the (+) operator with an expression.
  • A condition cannot compare any column marked with the (+) operator with a subquery.

If the WHERE clause contains a condition that compares a column from table B with a constant, then the (+) operator must be applied to the column so that Oracle returns the rows from table A for which it has generated nulls for this column. Otherwise Oracle will return only the results of a simple join.

In a query that performs outer joins of more than two pairs of tables, a single table can be the null-generated table for only one other table. For this reason, you cannot apply the (+) operator to columns of B in the join condition for A and B and the join condition for B and C.

See Also:

SELECT for the syntax for an outer join
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Queries and Subqueries, 10 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Selecting from the DUAL Table

DUAL is a table automatically created by Oracle along with the data dictionary. DUAL is in the schema of the user SYS, but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value 'X'. Selecting from the DUAL table is useful for computing a constant expression with the SELECT statement. Because DUAL has only one row, the constant is returned only once. Alternatively, you can select a constant, pseudocolumn, or expression from any table, but the value will be returned as many times as there are rows in the table.

See Also:

"SQL Functions" for many examples of selecting a constant value from DUAL
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Queries and Subqueries, 6 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Sorting Query Results

Use the ORDER BY clause to order the rows selected by a query. Sorting by position is useful in the following cases:

  • To order by a lengthy select list expression, you can specify its position, rather than duplicate the entire expression, in the ORDER BY clause.
  • For compound queries (containing set operators UNION, INTERSECT, MINUS, or UNION ALL), the ORDER BY clause must use positions, rather than explicit expressions. Also, the ORDER BY clause can appear only in the last component query. The ORDER BY clause orders all rows returned by the entire compound query.

The mechanism by which Oracle sorts values for the ORDER BY clause is specified either explicitly by the NLS_SORT initialization parameter or implicitly by the NLS_LANGUAGE initialization parameter. You can change the sort mechanism dynamically from one linguistic sort sequence to another using the ALTER SESSION statement. You can also specify a specific sort sequence for a single query by using the NLSSORT function with the NLS_SORT parameter in the ORDER BY clause.

See Also:

Oracle9i Database Globalization Support Guide for information on the NLS parameters
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Queries and Subqueries, 5 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

The UNION [ALL], INTERSECT, MINUS Operators

You can combine multiple queries using the set operators UNION, UNION ALL, INTERSECT, and MINUS. All set operators have equal precedence. If a SQL statement contains multiple set operators, then Oracle evaluates them from the left to right if no parentheses explicitly specify another order.

The corresponding expressions in the select lists of the component queries of a compound query must match in number and datatype. If component queries select character data, then the datatype of the return values are determined as follows:

  • If both queries select values of datatype CHAR, then the returned values have datatype CHAR.
  • If either or both of the queries select values of datatype VARCHAR2, then the returned values have datatype VARCHAR2.
Restrictions on Set Operators
  • The set operators are not valid on columns of type BLOB, CLOB, BFILE, VARRAY, or nested table.
  • The UNION, INTERSECT, and MINUS operators are not valid on LONG columns.
  • If the select list preceding the set operator contains an expression, then you must provide a column alias for the expression in order to refer to it in the order_by_clause.
  • You cannot also specify the for_update_clause with these set operators.
  • You cannot specify the order_by_clause in the subquery of these operators.
  • You cannot use these operators in SELECT statements containing TABLE collection expressions.

    Note:

    To comply with emerging SQL standards, a future release of Oracle will give the INTERSECT operator greater precedence than the other set operators. Therefore, you should use parentheses to specify order of evaluation in queries that use the INTERSECT operator with other set operators.

The following examples combine the two query results with each of the set operators.

UNION Example

The following statement combines the results with the UNION operator, which eliminates duplicate selected rows. This statement shows that you must match datatype (using the TO_CHAR function) when columns do not exist in one or the other table:

SELECT location_id, department_name "Department",
   TO_CHAR(NULL) "Warehouse"  FROM departments
   UNION
   SELECT location_id, TO_CHAR(NULL) "Department", warehouse_name
   FROM warehouses;

LOCATION_ID Department            Warehouse
----------- --------------------- --------------------------
       1400 IT
       1400                       Southlake, Texas
       1500 Shipping
       1500                       San Francisco
       1600                       New Jersey
       1700 Accounting
       1700 Administration
       1700 Benefits
       1700 Construction
...
UNION ALL Example

The UNION operator returns only distinct rows that appear in either result, while the UNION ALL operator returns all rows. The UNION ALL operator does not eliminate duplicate selected rows:

SELECT product_id FROM order_items
UNION
SELECT product_id FROM inventories;

SELECT location_id  FROM locations
UNION ALL
SELECT location_id  FROM departments;

A location_id value that appears multiple times in either or both queries (such as '1700') is returned only once by the UNION operator, but multiple times by the UNION ALL operator.

INTERSECT Example

The following statement combines the results with the INTERSECT operator, which returns only those rows returned by both queries:

SELECT product_id FROM inventories
INTERSECT
SELECT product_id FROM order_items;
MINUS Example

The following statement combines results with the MINUS operator, which returns only rows returned by the first query but not by the second:

SELECT product_id FROM inventories
MINUS
SELECT product_id FROM order_items;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Queries and Subqueries, 9 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Unnesting of Nested Subqueries

Subqueries are "nested" when they appear in the WHERE clause of the parent statement. When Oracle evaluates a statement with a nested subquery, it must evaluate the subquery portion multiple times and may overlook some efficient access paths or joins.

Subquery unnesting unnests and merges the body of the subquery into the body of the statement that contains it, allowing the optimizer to consider them together when evaluating access paths and joins. The optimizer can unnest most subqueries, with some exceptions. Those exceptions include hierarchical subqueries and subqueries that contain a ROWNUM pseudocolumn, one of the set operators, a nested aggregate function, or a correlated reference to a query block that is not the subquery's immediate outer query block.

Assuming no restrictions exist, the optimizer automatically unnests some (but not all) of the following nested subqueries:

  • Uncorrelated IN subqueries
  • IN and EXISTS correlated subqueries, as long as they do not contain aggregate functions or a GROUP BY clause

You can enable extended subquery unnesting by instructing the optimizer to unnest additional types of subqueries:

  • You can unnest an uncorrelated NOT IN subquery by specifying the HASH_AJ or MERGE_AJ hint in the subquery.
  • You can unnest other subqueries by specifying the UNNEST hint in the subquery.

    See Also:

    Chapter 2, "Basic Elements of Oracle SQL" for information on hints
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Queries and Subqueries, 8 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Using Subqueries

A subquery answers multiple-part questions. For example, to determine who works in Taylor's department, you can first use a subquery to determine the department in which Taylor works. You can then answer the original question with the parent SELECT statement. A subquery in the FROM clause of a SELECT statement is also called an inline view. A subquery in the WHERE clause of a SELECT statement is also called a nested subquery.

A subquery can contain another subquery. Oracle imposes no limit on the number of subquery levels in the FROM clause of the top-level query. You can nest up to 255 levels of subqueries in the WHERE clause.

If columns in a subquery have the same name as columns in the containing statement, then you must prefix any reference to the column of the table from the containing statement with the table name or alias. To make your statements easier for you to read, always qualify the columns in a subquery with the name or alias of the table, view, or materialized view.

Oracle performs a correlated subquery when the subquery references a column from a table referred to in the parent statement. A correlated subquery is evaluated once for each row processed by the parent statement. The parent statement can be a SELECT, UPDATE, or DELETE statement.

A correlated subquery answers a multiple-part question whose answer depends on the value in each row processed by the parent statement. For example, you can use a correlated subquery to determine which employees earn more than the average salaries for their departments. In this case, the correlated subquery specifically computes the average salary for each department.

See Also:

"Using Correlated Subqueries: Examples"

Use subqueries for the following purposes:

  • To define the set of rows to be inserted into the target table of an INSERT or CREATE TABLE statement
  • To define the set of rows to be included in a view or materialized view in a CREATE VIEW or CREATE MATERIALIZED VIEW statement
  • To define one or more values to be assigned to existing rows in an UPDATE statement
  • To provide values for conditions in a WHERE clause, HAVING clause, or START WITH clause of SELECT, UPDATE, and DELETE statements
  • To define a table to be operated on by a containing query

    You do this by placing the subquery in the FROM clause of the containing query as you would a table name. You may use subqueries in place of tables in this way as well in INSERT, UPDATE, and DELETE statements.

    Subqueries so used can employ correlation variables, but only those defined within the subquery itself, not outer references. Outer references ("left-correlated subqueries") are allowed only in the FROM clause of a SELECT statement.

    See Also:

    table_collection_expression

    Scalar subqueries, which return a single column value from a single row, are a valid form of expression. You can use scalar subquery expressions in most of the places where expr is called for in syntax.

    See Also:

    "Scalar Subquery Expressions"

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 1 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

9
SQL Statements: ALTER CLUSTER to ALTER SEQUENCE

This chapter lists the various types of SQL statements and then describes the first set (in alphabetical order) of SQL statements. The remaining SQL statements appear in alphabetical order in Chapter 10 through Chapter 18.

This chapter contains the following sections:

  • Types of SQL Statements
  • Organization of SQL Statements
  • ALTER CLUSTER
  • ALTER DATABASE
  • ALTER DIMENSION
  • ALTER FUNCTION
  • ALTER INDEX
  • ALTER INDEXTYPE
  • ALTER JAVA
  • ALTER MATERIALIZED VIEW
  • ALTER MATERIALIZED VIEW LOG
  • ALTER OPERATOR
  • ALTER OUTLINE
  • ALTER PACKAGE
  • ALTER PROCEDURE
  • ALTER PROFILE
  • ALTER RESOURCE COST
  • ALTER ROLE
  • ALTER ROLLBACK SEGMENT
  • ALTER SEQUENCE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 4 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER CLUSTER

Purpose

Use the ALTER CLUSTER statement to redefine storage and parallelism characteristics of a cluster.

Note:

You cannot use this statement to change the number or the name of columns in the cluster key, and you cannot change the tablespace in which the cluster is stored.
See Also:
  • CREATE CLUSTER for information on creating a cluster
  • DROP CLUSTER and DROP TABLE for information on removing tables from a cluster

Prerequisites

The cluster must be in your own schema or you must have the ALTER ANY CLUSTER system privilege.

Syntax

alter_cluster::=

Text description of statements_14.gif follows
Text description of alter_cluster

physical_attributes_clause::=

Text description of statements_133.gif follows
Text description of physical_attributes_clause

(storage_clause )

allocate_extent_clause::=

Text description of statements_120.gif follows
Text description of allocate_extent_clause

deallocate_unused_clause::=

Text description of statements_188a.gif follows
Text description of deallocate_unused_clause

parallel_clause::=

Text description of statements_126.gif follows
Text description of parallel_clause

Semantics

schema

Specify the schema containing the cluster. If you omit schema, Oracle assumes the cluster is in your own schema.

cluster

Specify the name of the cluster to be altered.

physical_attributes_clause

Use this clause to change the values of the PCTUSED, PCTFREE, INITRANS, and MAXTRANS parameters of the cluster.

Use the STORAGE clause to change the storage characteristics of the cluster.

Restriction on Physical Attributes

You cannot change the values of the storage parameters INITIAL and MINEXTENTS for a cluster.

See Also:
  • physical_attributes_clause for a full description of this clause
  • storage_clause for a full description of the storage parameters

SIZE integer

Use the SIZE clause to specify the number of cluster keys that will be stored in data blocks allocated to the cluster.

Restriction on SIZE

You can change the SIZE parameter only for an indexed cluster, not for a hash cluster.

See Also:

CREATE CLUSTER for a description of the SIZE parameter and "Modifying a Cluster: Example"

allocate_extent_clause

Specify the allocate_extent_clause to explicitly allocate a new extent for the cluster.

When you explicitly allocate an extent with this clause, Oracle does not evaluate the cluster's storage parameters and determine a new size for the next extent to be allocated (as it does when you create a table). Therefore, specify SIZE if you do not want Oracle to use a default value.

Restriction on Allocating Extents

You can allocate a new extent only for an indexed cluster, not for a hash cluster.

See Also:

allocate_extent_clause for a full description of this clause and "Deallocating Unused Space: Example"

deallocate_unused_clause

Use the deallocate_unused_clause to explicitly deallocate unused space at the end of the cluster and make the freed space available for other segments.

See Also:

deallocate_unused_clause for a full description of this clause

CACHE | NOCACHE

CACHE

Specify CACHE if you want the blocks retrieved for this cluster to be placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This clause is useful for small lookup tables.

NOCACHE

Specify NOCACHE if you want the blocks retrieved for this cluster to be placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed. This is the default behavior.

parallel_clause

Specify the parallel_clause to change the default degree of parallelism for queries and DML on the cluster.

Restriction on Parallelized Clusters

If the tables in cluster contain any columns of LOB or user-defined object type, this statement as well as subsequent INSERT, UPDATE, or DELETE operations on cluster are executed serially without notification.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

Examples

The following examples modify the clusters that were created in the "Examples" section of CREATE CLUSTER on .

Modifying a Cluster: Example

The next statement alters the personnel cluster:

ALTER CLUSTER personnel
   SIZE 1024 CACHE;

Oracle allocates 1024 bytes for each cluster key value and turns on the cache attribute. Assuming a data block size of 2 kilobytes, future data blocks within this cluster contain 2 cluster keys in each data block, or 2 kilobytes divided by 1024 bytes.

Deallocating Unused Space: Example

The following statement deallocates unused space from the language cluster, keeping 30 kilobytes of unused space for future use:

ALTER CLUSTER language
   DEALLOCATE UNUSED KEEP 30 K;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 5 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER DATABASE

Purpose

Use the ALTER DATABASE statement to modify, maintain, or recover an existing database.

See Also:
  • Oracle9i User-Managed Backup and Recovery Guide and Oracle9i Recovery Manager User's Guide for examples of performing media recovery
  • Oracle Data Guard Concepts and Administration for additional information on using the ALTER DATABASE statement to maintain standby databases
  • CREATE DATABASE for information on creating a database

Prerequisites

You must have the ALTER DATABASE system privilege.

To specify the RECOVER clause, you must also have the SYSDBA system privilege.

Syntax

alter_database::=

Text description of statements_124.gif follows
Text description of alter_database

Groups of ALTER DATABASE syntax:

  • startup_clauses::=
  • recovery_clauses::=
  • database_file_clauses::=
  • logfile_clauses::=
  • controlfile_clauses::=
  • standby_database_clauses::=
  • default_settings_clauses::=
  • conversion_clauses::=
  • redo_thread_clauses::=
  • security_clause::=

startup_clauses::=

Text description of statements_18.gif follows
Text description of startup_clauses

recovery_clauses::=

Text description of statements_116.gif follows
Text description of recovery_clauses

(general_recovery::= , managed_standby_recovery::= )

general_recovery::=

Text description of statements_110.gif follows
Text description of general_recovery

(full_database_recovery::= , partial_database_recovery::= , parallel_clause::= )

full_database_recovery::=

Text description of statements_128.gif follows
Text description of full_database_recovery

partial_database_recovery::=

Text description of statements_130.gif follows
Text description of partial_database_recovery

parallel_clause::=

Text description of statements_112.gif follows
Text description of parallel_clause

managed_standby_recovery::=

Text description of statements_134.gif follows
Text description of managed_standby_recovery

(recover_clause::= , cancel_clause::= , finish_clause::= )

recover_clause::=

Text description of statements_160.gif follows
Text description of recover_clause

(parallel_clause::= )

cancel_clause::=

Text description of statements_189b.gif follows
Text description of cancel_clause

finish_clause::=

Text description of statements_147a.gif follows
Text description of finish_clause

(parallel_clause::= )

database_file_clauses::=

Text description of statements_114.gif follows
Text description of database_file_clauses

(datafile_tempfile_spec::= , autoextend_clause::= )

autoextend_clause::=

Text description of statements_136.gif follows
Text description of autoextend_clause

maxsize_clause::=

Text description of statements_138.gif follows
Text description of maxsize_clause

logfile_clauses::=

Text description of statements_140.gif follows
Text description of logfile_clauses

(redo_log_file_spec::= )

logfile_descriptor::=

Text description of statements_142.gif follows
Text description of logfile_descriptor

controlfile_clauses::=

Text description of statements_144.gif follows
Text description of controlfile_clauses

trace_file_clause::=

Text description of statements_143.gif follows
Text description of trace_file_clause

standby_database_clauses::=

Text description of statements_146.gif follows
Text description of standby_database_clauses

(redo_log_file_spec::= )

commit_switchover_clause::=

Text description of statements_155a.gif follows
Text description of commit_switchover_clause

default_settings_clauses::=

Text description of statements_148.gif follows
Text description of default_settings_clauses

set_time_zone_clause::=

Text description of statements_189a.gif follows
Text description of set_time_zone_clause

conversion_clauses::=

Text description of statements_118.gif follows
Text description of conversion_clauses

redo_thread_clauses::=

Text description of statements_152.gif follows
Text description of redo_thread_clauses

security_clause::=

Text description of statements_159.gif follows
Text description of security_clause

Semantics

database

Specify the name of the database to be altered. The database name can contain only ASCII characters. If you omit database, Oracle alters the database identified by the value of the initialization parameter DB_NAME. You can alter only the database whose control files are specified by the initialization parameter CONTROL_FILES. The database identifier is not related to the Oracle Net database specification.

startup_clauses

The startup_clauses let you mount and open the database so that it is accessible to users.

MOUNT Clause

Use the MOUNT clause to mount the database. Do not use this clause when the database is mounted.

MOUNT STANDBY DATABASE

Specify MOUNT STANDBY DATABASE to mount a physical standby database. As soon as this statement executes, the standby instance can receive archived redo logs from the primary instance and can archive the logs to the STANDBY_ARCHIVE_DEST location.

See Also:

Oracle Data Guard Concepts and Administration
MOUNT CLONE DATABASE

Specify MOUNT CLONE DATABASE to mount the clone database.

See Also:

Oracle9i User-Managed Backup and Recovery Guide for more information on clone databases
OPEN Clause

Use the OPEN clause to make the database available for normal use. You must mount the database before you can open it.

If you specify only OPEN, without any other keywords, the default is OPEN READ WRITE NORESETLOGS.

READ WRITE

Specify READ WRITE to open the database in read/write mode, allowing users to generate redo logs. This is the default.

See Also:

"READ ONLY / READ WRITE: Example"

RESETLOGS

Specify RESETLOGS to reset the current log sequence number to 1 and discards any redo information that was not applied during recovery, ensuring that it will never be applied. This effectively discards all changes that are in the redo log, but not in the database.

You must specify RESETLOGS to open the database after performing media recovery with an incomplete recovery using the RECOVER clause or with a backup control file. After opening the database with this clause, you should perform a complete database backup.

NORESETLOGS

Specify NORESETLOGS to retain the current state of the log sequence number and redo log files.

Restriction on Resetting Logs

You can specify RESETLOGS and NORESETLOGS only after performing incomplete media recovery or complete media recovery with a backup control file. In any other case, Oracle uses the NORESETLOGS automatically.

MIGRATE

Use the MIGRATE clause only if you are upgrading from Oracle release 7.3.4 to the current release. This clause instructs Oracle to modify system parameters dynamically as required for the upgrade. For upgrade from releases other than 7.3.4, you can use the SQL*Plus STARTUP MIGRATE command.

See Also:
  • Oracle9i Database Migration Guide for information on the steps required to migrate a database from one release to another
  • SQL*Plus User's Guide and Reference for information on the SQL*Plus STARTUP command
READ ONLY

Specify READ ONLY to restrict users to read-only transactions, preventing them from generating redo logs. You can use this clause to make a physical standby database available for queries even while archive logs are being copied from the primary database site.

Restrictions on the OPEN Clause
  • You cannot open a database READ ONLY if it is currently opened READ WRITE by another instance.
  • You cannot open a database READ ONLY if it requires recovery.
  • You cannot take tablespaces offline while the database is open READ ONLY. However, you can take datafiles offline and online, and you can recover offline datafiles and tablespaces while the database is open READ ONLY.

recovery_clauses

The recovery_clauses include post-backup operations.

See Also:

Oracle9i Backup and Recovery Concepts and Oracle9i Recovery Manager User's Guide for information on backing up the database and "Database Recovery: Examples"

general_recovery

The general_recovery clause lets you control media recovery for the database or standby database, or for specified tablespaces or files. You can use this clause when your instance has the database mounted, open or closed, and the files involved are not in use.

Restrictions on General Database Recovery
  • You can recover the entire database only when the database is closed.
  • Your instance must have the database mounted in exclusive mode.
  • You can recover tablespaces or datafiles when the database is open or closed, if the tablespaces or datafiles to be recovered are offline.
  • You cannot perform media recovery if you are connected to Oracle through the Shared Server architecture.

    Note:

    If you do not have special media requirements, Oracle Corporation recommends that you use the SQL*Plus RECOVER command rather than the general_recovery_clause.
    See Also:
    • Oracle9i User-Managed Backup and Recovery Guide for more information on media recovery
    • SQL*Plus User's Guide and Reference for information on the SQL*Plus RECOVER command
AUTOMATIC

Specify AUTOMATIC if you want Oracle to automatically generate the name of the next archived redo log file needed to continue the recovery operation. If the LOG_ARCHIVE_DEST_n parameters are defined, Oracle scans those that are valid and enabled for the first local destination. It uses that destination in conjunction with LOG_ARCHIVE_FORMAT to generate the target redo log filename. If the LOG_ARCHIVE_DEST_n parameters are not defined, Oracle uses the value of the LOG_ARCHIVE_DEST parameter instead.

If the resulting file is found, Oracle applies the redo contained in that file. If the file is not found, Oracle prompts you for a filename, displaying the generated filename as a suggestion.

If you specify neither AUTOMATIC nor LOGFILE, Oracle prompts you for a filename, displaying the generated filename as a suggestion. You can then accept the generated filename or replace it with a fully qualified filename. If you know that the archived filename differs from what Oracle would generate, you can save time by using the LOGFILE clause.

FROM 'location'

Specify FROM 'location' to indicate the location from which the archived redo log file group is read. The value of location must be a fully specified file location following the conventions of your operating system. If you omit this parameter, Oracle assumes that the archived redo log file group is in the location specified by the initialization parameter LOG_ARCHIVE_DEST or LOG_ARCHIVE_DEST_1.

full_database_recovery

The full_database_recovery clause lets you recover an entire database.

DATABASE

Specify the DATABASE clause to recover the entire database. This is the default. You can use this clause only when the database is closed.

STANDBY DATABASE

Specify the STANDBY DATABASE clause to manually recover a physical standby database using the control file and archived redo log files copied from the primary database. The standby database must be mounted but not open.

Note:

This clause recovers only online datafiles.
  • Use the UNTIL clause to specify the duration of the recovery operation.
    • CANCEL indicates cancel-based recovery. This clause recovers the database until you issue the ALTER DATABASE statement with the RECOVER CANCEL clause.
    • TIME indicates time-based recovery. This parameter recovers the database to the time specified by the date. The date must be a character literal in the format 'YYYY-MM-DD:HH24:MI:SS'.
    • CHANGE indicates change-based recovery. This parameter recovers the database to a transaction-consistent state immediately before the system change number (SCN) specified by integer.
  • Specify USING BACKUP CONTROLFILE if you want to use a backup control file instead of the current control file.
partial_database_recovery

The partial_database_recovery clause lets you recover individual tablespaces and datafiles.

TABLESPACE

Specify the TABLESPACE clause to recover only the specified tablespaces. You can use this clause if the database is open or closed, provided the tablespaces to be recovered are offline.

See Also:

"Using Parallel Recovery Processes: Example"

DATAFILE

Specify the DATAFILE clause to recover the specified datafiles. You can use this clause when the database is open or closed, provided the datafiles to be recovered are offline.

You can identify the datafile by name or by number. If you identify it by number, then filenumber is an integer representing the number found in the FILE# column of the V$DATAFILE dynamic performance view or in the FILE_ID column of the DBA_DATA_FILES data dictionary view.

STANDBY TABLESPACE

Specify STANDBY TABLESPACE to reconstruct a lost or damaged tablespace in the standby database using archived redo log files copied from the primary database and a control file.

STANDBY DATAFILE

Specify STANDBY DATAFILE to manually reconstruct a lost or damaged datafile in the physical standby database using archived redo log files copied from the primary database and a control file. You can identify the file by name or by number, as described for the DATAFILE clause.

  • Specify UNTIL [CONSISTENT WITH] CONTROLFILE if you want the recovery of an old standby datafile or tablespace to use the current standby database control file. However, any redo in advance of the standby controlfile will not be applied. The keywords CONSISTENT WITH are optional and are provided for semantic clarity.
LOGFILE

Specify the LOGFILE 'filename' to continue media recovery by applying the specified redo log file.

TEST

Use the TEST clause to conduct a trial recovery. A trial recovery is useful if a normal recovery procedure has encountered some problem. It lets you look ahead into the redo stream to detect possible additional problems. The trial recovery applies redo in a way similar to normal recovery, but it does not write changes to disk, and it rolls back its changes at the end of the trial recovery.

ALLOW ... CORRUPTION

The ALLOW integer CORRUPTION clause lets you specify, in the event of logfile corruption, the number of corrupt blocks that can be tolerated while allowing recovery to proceed.

When you use this clause during trial recovery (that is, in conjunction with the TEST clause), integer can exceed 1. When using this clause during normal recovery, integer cannot exceed 1.

See Also:
  • Oracle9i User-Managed Backup and Recovery Guide for information on database recovery in general
  • Oracle Data Guard Concepts and Administration for information on managed recovery of standby databases
parallel_clause

Use the PARALLEL clause to specify whether the recovery of media will be parallelized.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

CONTINUE

Specify CONTINUE to continue multi-instance recovery after it has been interrupted to disable a thread.

Specify CONTINUE DEFAULT to continue recovery using the redo log file that Oracle would automatically generate if no other logfile were specified. This clause is equivalent to specifying AUTOMATIC, except that Oracle does not prompt for a filename.

CANCEL

Specify CANCEL to terminate cancel-based recovery.

managed_standby_recovery

The managed_standby_recovery clause applies to physical standby only. Use it to specify managed standby recovery mode. This mode assumes that the managed standby database is an active component of an overall standby database architecture. A primary database actively archives its redo log files to the standby site. As these archived redo logs arrive at the standby site, they become available for use by a managed standby recovery operation. Managed standby recovery is restricted to media recovery. You can use this clause when your instance has the database mounted, open or closed, and the files involved are not in use.

Restrictions on Managed Standby Recovery

The same restrictions apply as are listed under general_recovery .

See Also:

Oracle Data Guard Concepts and Administration for more information on the parameters of this clause "Recovering a Managed Standby Database: Examples"

DISCONNECT

Specify DISCONNECT to indicate that the managed redo process (MRP), an Oracle background process, should apply archived redo files as a detached background process. Doing so leaves the current session available for other tasks. (The FROM SESSION keywords are optional and are provided for semantic clarity.)

Restrictions on DISCONNECT
  • You can specify DISCONNECT only when you are initiating managed standby recovery. You cannot specify it after the operation has started.
  • You cannot specify both TIMEOUT and DISCONNECT [FROM SESSION]. TIMEOUT applies only to foreground recovery operations, whereas the DISCONNECT clause initiates background recovery operations.
TIMEOUT integer

Specify in minutes the wait period of the managed recovery operation. The recovery process waits for integer minutes for a requested archived log redo to be available for writing to the managed standby database. If the redo log file does not become available within that time, the recovery process terminates with an error message. You can then issue the statement again to return to managed standby recovery mode.

If you omit TIMEOUT or if you specify NOTIMEOUT, the database remains in managed standby recovery mode until you reissue the statement with the RECOVER CANCEL clause or until instance shutdown or failure.

Restrictions on TIMEOUT
  • If you specify TIMEOUT, you cannot also specify FINISH.
  • You cannot specify both TIMEOUT and DISCONNECT [FROM SESSION]. TIMEOUT applies only to foreground recovery operations, whereas the DISCONNECT clause initiates background recovery operations.
NODELAY | DEFAULT DELAY | DELAY integer

Specify DELAY to instruct Oracle to wait the specified interval (in minutes) before applying the archived redo logs. The delay interval begins after the archived redo logs have been selected for recovery.

  • Specify NODELAY if the need arises to apply a delayed archivelog immediately on the standby database.
  • Specify DEFAULT DELAY to revert to the number of minutes specified in the LOG_ARCHIVE_DEST_n initialization parameter on the primary database.

Both of these parameters override any setting of DELAY in the LOG_ARCHIVE_DEST_n parameter on the primary database. If you specify neither of these parameters, application of the archivelog is delayed according to the LOG_ARCHIVE_DEST_n setting. If DELAY was not specified in that parameter, the archivelog is applied immediately.

Restrictions on DELAY
  • You cannot specify both NODELAY and DELAY.
  • If you specify DELAY, you cannot also specify FINISH.

    See Also:

    Oracle9i Database Reference for detailed information on the LOG_ARCHIVE_DEST_n parameter
NEXT integer

Use the NEXT parameter to apply the specified number of archived redo logs as soon as possible after they have been archived. This parameter temporarily overrides any delay setting in the LOG_ARCHIVE_DEST_n initialization parameter on the primary database and over any DELAY values specified in an earlier ALTER DATABASE ... managed_standby_recovery statement. Once the integer archived redo logs are processed, any such delay again takes effect.

Restriction on NEXT

If you specify NEXT, you cannot also specify FINISH.

See Also:

Oracle9i Database Reference for detailed information on the LOG_ARCHIVE_DEST_n parameter
EXPIRE integer

Specify the number of minutes from the current time after which the managed recovery operation terminates automatically. The process may actually expire after the interval specified, because Oracle will finish processing any archived redo log that is being processed at the expiration time.

Specify NOEXPIRE to disable a previously specified EXPIRE option.

Expiration is always relative to the time the current statement is issued rather than to the start time of the managed recovery process. To terminate an existing managed recovery operation, use the CANCEL parameter.

Restriction on EXPIRE

If you specify EXPIRE, you cannot also specify FINISH.

THROUGH Clause

Use this clause to instruct Oracle when to terminate managed recovery.

  • THROUGH ... SEQUENCE: Specify this clause if you want Oracle to terminate managed recovery based on thread number and sequence number of an archivelog. Once the corresponding archivelog has been applied, managed recovery terminates. If you omit the THREAD clause, Oracle assumes thread 1.
  • THROUGH ALL ARCHIVELOG: Specify this clause if you want Oracle to continue the managed standby process until all archivelogs have been recovered. You can use this statement to override an earlier statement that specified THROUGH ... SEQUENCE. If you omit the THROUGH clause entirely, this is the default.
  • THROUGH ... SWITCHOVER: The managed standby recovery process normally stops when it encounters a switchover operation, because these operations produce an "end-of-redo archival" indicator. This clause is useful if you have more than one standby database, all but one of which will remain in the standby role after the switchover. This clause keeps the managed standby recovery process operational. It lets these "secondary" standby databases wait to receive the redo stream from the new primary database, rather than stopping the recovery process and then starting it again after the new primary database is activated.
    • Specify ALL to keep managed standby recovery operational through all switchover operations.
    • Specify LAST to cancel managed standby recovery operations after the final end-of-redo archival indicator.
    • Specify NEXT to cancel managed standby recovery after recovering the next end-of-redo archival indicator encountered. This is the default.
CANCEL

Specify CANCEL to terminate the managed standby recovery operation after applying all the redo in the current archived redo file. If you specify only the CANCEL keyword, session control returns when the recovery process actually terminates.

  • Specify CANCEL IMMEDIATE to terminate the managed recovery operation after applying all the redo in the current archived redo file or after the next redo log file read, whichever comes first. Session control returns when the recovery process actually terminates.
Restriction on CANCEL IMMEDIATE

The CANCEL IMMEDIATE clause cannot be issued from the same session that issued the RECOVER MANAGED STANDBY DATABASE statement.

  • CANCEL IMMEDIATE NOWAIT is the same as CANCEL IMMEDIATE except that session control returns immediately, not after the recovery process terminates.
  • CANCEL NOWAIT terminates the managed recovery operation after the next redo log file read and returns session control immediately.
FINISH

The FINISH clause applies only to physical standby databases. Specify FINISH to recover the current standby online redo logfiles of the standby database. Use this clause only in the event of the failure of the primary database, when the logwriter (LGWR) process has been transmitting redo to the standby current logs. This clause overrides any delay intervals specified for the archivelogs, so that Oracle applies the logs immediately.

After the FINISH operation, you must open the standby database as the primary database.

Specify NOWAIT to have control returned immediately rather than after the recovery process is complete.

Restrictions on FINISH

You cannot specify FINISH if you have also specified TIMEOUT, DELAY, EXPIRE, or NEXT.

parallel_clause

Use the parallel_clause to indicate whether Oracle should parallelize the managed recovery processes. If you specify NOPARALLEL or omit this clause entirely, Oracle performs the managed standby recovery operation serially.

See Also:
  • parallel_clause for more information on this clause
  • Oracle Data Guard Concepts and Administration for guidelines on determining whether parallel managed standby recovery will result in performance gains
END BACKUP Clause

Specify END BACKUP to take out of online backup mode any datafiles in the database currently in online backup mode. The database must be mounted but not open when you perform this operation.

You can end online ("hot") backup operations in three ways. During normal operation, you can take a tablespace out of online backup mode using the ALTER TABLESPACE ... END BACKUP statement. Doing so avoids the increased overhead of leaving the tablespace in online backup mode.

After a system failure, instance failure, or SHUTDOWN ABORT operation, Oracle does not know whether the files in online backup mode match the files at the time the system crashed. If you know the files are consistent, you can take either individual datafiles or all datafiles out of online backup mode. Doing so avoids media recovery of the files upon startup.

  • To take an individual datafile out of online backup mode, use the ALTER DATABASE DATAFILE ... END BACKUP statement. See database_file_clauses .
  • To take all datafiles in a tablespace out of online backup mode, use an ALTER TABLESPACE ... END BACKUP statement.

    See Also:

    ALTER TABLESPACE for information on ending online tablespace backup

database_file_clauses

The database_file_clauses let you modify datafiles and tempfiles. You can use any of the following clauses when your instance has the database mounted, open or closed, and the files involved are not in use.

CREATE DATAFILE

Use the CREATE DATAFILE clause to create a new empty datafile in place of an old one. You can use this clause to re-create a datafile that was lost with no backup. The filename or filenumber must identify a file that is or was once part of the database. If you identify the file by number, then filenumber is an integer representing the number found in the FILE# column of the V$DATAFILE dynamic performance view or in the FILE_ID column of the DBA_DATA_FILES data dictionary view.

  • Specify AS NEW to create an Oracle-managed datafile with a system-generated filename, the same size as the file being replaced, in the default file system location for datafiles.
  • Specify AS datafile_tempfile_spec to assign a filename (and optional size) for the new datafile.

If the original file (filename or filenumber) is an existing Oracle-managed datafile, then Oracle attempts to delete the original file after creating the new file. If the original file is an existing user-managed datafile, Oracle does not attempt to delete the original file.

If you omit the AS clause entirely, Oracle creates the new file with the same name and size as the file specified by filename or filenumber.

During recovery, all archived redo logs written to since the original datafile was created must be applied to the new, empty version of the lost datafile.

Oracle creates the new file in the same state as the old file when it was created. You must perform media recovery on the new file to return it to the state of the old file at the time it was lost.

Restrictions on Creating New Datafiles
  • You cannot create a new file based on the first datafile of the SYSTEM tablespace.
  • You cannot specify the autoextend_clause of datafile_tempfile_spec in this CREATE DATAFILE clause.

    See Also:

    file_specification for a full description of the file specification (datafile_tempfile_spec) and "Creating a New Datafile: Example"

DATAFILE Clauses

The DATAFILE clauses let you manipulate a file that you identify by name or by number. If you identify it by number, then filenumber is an integer representing the number found in the FILE# column of the V$DATAFILE dynamic performance view or in the FILE_ID column of the DBA_DATA_FILES data dictionary view. The DATAFILE clauses affect your database files as follows:

ONLINE

Specify ONLINE to bring the datafile online.

OFFLINE

Specify OFFLINE to take the datafile offline. If the database is open, you must perform media recovery on the datafile before bringing it back online, because a checkpoint is not performed on the datafile before it is taken offline.

DROP

If the database is in NOARCHIVELOG mode, you must specify the DROP clause to take a datafile offline. However, the DROP clause does not remove the datafile from the database. To do that, you must drop the tablespace in which the datafile resides. Until you do so, the datafile remains in the data dictionary with the status RECOVER or OFFLINE.

If the database is in ARCHIVELOG mode, Oracle ignores the DROP keyword.

RESIZE

Specify RESIZE if you want Oracle to attempt to increase or decrease the size of the datafile to the specified absolute size in bytes. Use K or M to specify this size in kilobytes or megabytes. There is no default, so you must specify a size.

If sufficient disk space is not available for the increased size, or if the file contains data beyond the specified decreased size, Oracle returns an error.

See Also:

"Resizing a Datafile: Example"

END BACKUP

Specify END BACKUP to take the datafile out of online backup mode. The END BACKUP clause is described more fully at the top level of the syntax of ALTER DATABASE. See "END BACKUP Clause" .

TEMPFILE Clause

Use the TEMPFILE clause to resize your temporary datafile or specify the autoextend_clause, with the same effect as with a permanent datafile. You can identify the tempfile by name or by number. If you identify it by number, then filenumber is an integer representing the number found in the FILE# column of the V$TEMPFILE dynamic performance view.

Note:

On some operating systems, Oracle does not allocate space for the tempfile until the tempfile blocks are actually accessed. This delay in space allocation results in faster creation and resizing of tempfiles, but it requires that sufficient disk space is available when the tempfiles are later used. To avoid potential problems, before you create or resize a tempfile, ensure that the available disk space exceeds the size of the new tempfile or the increased size of a resized tempfile. The excess space should allow for anticipated increases in disk space use by unrelated operations as well. Then proceed with the creation or resizing operation.
Restriction on Modifying Tempfiles

You cannot specify TEMPFILE unless the database is open.

DROP

Specify DROP to drop tempfile from the database. The tablespace remains.

If you specify INCLUDING DATAFILES, Oracle also deletes the associated operating system files and writes a message to the alert log for each such deleted file.

autoextend_clause

Use the autoextend_clause to enable or disable the automatic extension of a new datafile or tempfile.

See Also:

file_specification for information about the autoextend_clause
RENAME FILE Clause

Use the RENAME FILE clause to rename datafiles, tempfiles, or redo log file members. You must create each filename using the conventions for filenames on your operating system before specifying this clause.

  • To use this clause for datafiles and tempfiles, the database must be mounted. The database can also be open, but the datafile or tempfile being renamed must be offline.
  • To use this clause for logfiles, the database must be mounted but not open.

This clause renames only files in the control file. It does not actually rename them on your operating system. The operating system files continue to exist, but Oracle no longer uses them. If the old files were Oracle managed, Oracle drops the old operating system file after this statement executes, because the control file no longer points to them as datafiles, tempfiles, or redo log files.

See Also:

"Renaming a Log File Member: Example"

logfile_clauses

The logfile clauses let you add, drop, or modify log files.

ARCHIVELOG | NOARCHIVELOG

Use the ARCHIVELOG clause and NOARCHIVELOG clause only if your instance has the database mounted but not open, with Real Application Clusters disabled.

ARCHIVELOG

Specify ARCHIVELOG if you want the contents of a redo log file group to be archived before the group can be reused. This mode prepares for the possibility of media recovery. Use this clause only after shutting down your instance normally, or immediately with no errors, and then restarting it and mounting the database with Real Application Clusters disabled.

NOARCHIVELOG

Specify NOARCHIVELOG if you do not want the contents of a redo log file group to be archived so that the group can be reused. This mode does not prepare for recovery after media failure.

[NO] FORCE LOGGING

Use this clause to put the database into or take the database out of FORCE LOGGING mode. The database must be mounted or open.

In FORCE LOGGING mode, Oracle will log all changes in the database except for changes in temporary tablespaces and temporary segments. This setting takes precedence over and is independent of any NOLOGGING or FORCE LOGGING settings you specify for individual tablespaces and any NOLOGGING settings you specify for individual database objects.

If you specify FORCE LOGGING, Oracle waits for all ongoing unlogged operations to finish.

See Also:

Oracle9i Database Administrator's Guide for information on when to use FORCE LOGGING mode
ADD [STANDBY] LOGFILE Clause

Use the ADD LOGFILE clause to add one or more redo log file groups to the specified thread, making them available to the instance assigned the thread. If you specify STANDBY, the redo log file created is for use by physical standby databases only.

To learn whether a logfile has been designated for online or standby database use, query the TYPE column of the V$LOGFILE dynamic performance view.

See Also:

"Adding Redo Log File Groups: Examples"

THREAD

The THREAD clause is applicable only if you are using Oracle with the Real Application Clusters option in parallel mode. integer is the thread number. The number of threads you can create is limited by the value of the MAXINSTANCES parameter specified in the CREATE DATABASE statement.

If you omit THREAD, the redo log file group is added to the thread assigned to your instance.

GROUP

The GROUP clause uniquely identifies the redo log file group among all groups in all threads and can range from 1 to the MAXLOGFILES value. You cannot add multiple redo log file groups having the same GROUP value. If you omit this parameter, Oracle generates its value automatically. You can examine the GROUP value for a redo log file group through the dynamic performance view V$LOG.

redo_log_file_spec

Each redo_log_file_spec specifies a redo log file group containing one or more members (that is, one or more copies).

See Also:
  • file_specification
  • Oracle9i Database Reference for information on dynamic performance views
DROP LOGFILE Clause

Use the DROP LOGFILE clause to drop all members of a redo log file group. Specify a redo log file group as indicated for the ADD LOGFILE MEMBER clause.

  • To drop the current log file group, you must first issue an ALTER SYSTEM SWITCH LOGFILE statement.
  • You cannot drop a redo log file group if it needs archiving.
  • You cannot drop a redo log file group if doing so would cause the redo thread to contain less than two redo log file groups.

    See Also:

    ALTER SYSTEM and "Dropping Log File Members: Example"

ADD [STANDBY] LOGFILE MEMBER Clause

Use the ADD LOGFILE MEMBER clause to add new members to existing redo log file groups. Each new member is specified by 'filename'. If the file already exists, it must be the same size as the other group members, and you must specify REUSE. If the file does not exist, Oracle creates a file of the correct size. You cannot add a member to a group if all of the group's members have been lost through media failure.

You can specify STANDBY for symmetry, to indicate that the logfile member is for use only by a physical standby database. However, this keyword is not required. If group integer was added for standby database use, all of its members will be used only for standby databases as well.

You can specify an existing redo log file group in one of two ways:

GROUP integer

Specify the value of the GROUP parameter that identifies the redo log file group.

filename(s)

List all members of the redo log file group. You must fully specify each filename according to the conventions of your operating system.

See Also:

"Adding Redo Log File Group Members: Example"

DROP LOGFILE MEMBER Clause

Use the DROP LOGFILE MEMBER clause to drop one or more redo log file members. Each 'filename' must fully specify a member using the conventions for filenames on your operating system.

  • To drop a log file in the current log, you must first issue an ALTER SYSTEM SWITCH LOGFILE statement.

    See Also:

    ALTER SYSTEM

  • You cannot use this clause to drop all members of a redo log file group that contains valid data. To perform that operation, use the DROP LOGFILE clause.

    See Also:

    "Dropping Log File Members: Example"

ADD SUPPLEMENTAL LOG DATA Clause

Specify the ADD SUPPLEMENTAL LOG DATA clause to place additional column data into the log stream any time an update operation is performed. These four keywords alone enable minimal supplemental logging, which is not enabled by default.

Minimal supplemental logging ensures that Logminer (and any products building on Logminer technology) will have sufficient information to support chained rows and various storage arrangements such as cluster tables.

If supplemental log data will be the source of change in another database, such as a logical standby, the log data must also uniquely identify each row updated. In this case, you should enable identification key ("full") supplemental logging by specifying PRIMARY KEY COLUMNS and UNIQUE KEY COLUMNS.

PRIMARY KEY COLUMNS

When you specify PRIMARY KEY COLUMNS, Oracle ensures, for all tables with a primary key, that all columns of the primary key are placed into the redo log whenever an update operation is performed. If no primary key is defined, Oracle places into the redo log a set of columns that uniquely identifies the row. This set may include all columns with a fixed-length maximum size.

UNIQUE INDEX COLUMNS

When you specify UNIQUE INDEX COLUMNS, Oracle ensures, for all tables with a unique key, that if any unique key columns are modified, all other columns belonging to the unique key are also placed into the redo log.

Note:

You can issue this statement when the database is open. However, Oracle will invalidate all DML cursors in the cursor cache, which will have an effect on performance until the cache is repopulated.
See Also:

Oracle Data Guard Concepts and Administration for information on supplemental logging
DROP SUPPLEMENTAL LOG DATA Clause

Use the DROP SUPPLEMENTAL LOG DATA clause to instruct Oracle to stop placing additional log information into the redo log stream whenever an update operation occurs. This statement terminates the effect of a previous ADD SUPPLEMENTAL LOG DATA statement.

See Also:

Oracle Data Guard Concepts and Administration for information on supplemental logging
CLEAR LOGFILE Clause

Use the CLEAR LOGFILE clause to reinitialize an online redo log, optionally without archiving the redo log. CLEAR LOGFILE is similar to adding and dropping a redo log, except that the statement may be issued even if there are only two logs for the thread and also may be issued for the current redo log of a closed thread.

  • You must specify UNARCHIVED if you want to reuse a redo log that was not archived.

    Caution:

    Specifying UNARCHIVED makes backups unusable if the redo log is needed for recovery.
  • You must specify UNRECOVERABLE DATAFILE if you have taken the datafile offline with the database in ARCHIVELOG mode (that is, you specified ALTER DATABASE ... DATAFILE OFFLINE without the DROP keyword), and if the unarchived log to be cleared is needed to recover the datafile before bringing it back online. In this case, you must drop the datafile and the entire tablespace once the CLEAR LOGFILE statement completes.

    Do not use CLEAR LOGFILE to clear a log needed for media recovery. If it is necessary to clear a log containing redo after the database checkpoint, you must first perform incomplete media recovery. The current redo log of an open thread can be cleared. The current log of a closed thread can be cleared by switching logs in the closed thread.

    If the CLEAR LOGFILE statement is interrupted by a system or instance failure, then the database may hang. If this occurs, reissue the statement after the database is restarted. If the failure occurred because of I/O errors accessing one member of a log group, then that member can be dropped and other members added.

    See Also:

    "Clearing a Log File: Example"

controlfile_clauses

The controlfile_clauses let you create or back up a control file.

CREATE STANDBY CONTROLFILE Clause

The CREATE STANDBY CONTROLFILE clause applies only to physical standby databases. Use this clause to create a control file to be used to maintain a physical standby database. If the file already exists, you must specify REUSE.

See Also:

Oracle Data Guard Concepts and Administration
BACKUP CONTROLFILE Clause

Use the BACKUP CONTROLFILE clause to back up the current control file. The database must be open or mounted when you specify this clause.

TO 'filename'

Specify the file to which the control file is backed up. You must fully specify the filename using the conventions for your operating system. If the specified file already exists, you must specify REUSE.

TO TRACE

Specify TO TRACE if you want Oracle to write SQL statements to a trace file rather than making a physical backup of the control file. You can use SQL statements written to the trace file to start up the database, re-create the control file, and recover and open the database appropriately, based on the created control file.

You can copy the statements from the trace file into a script file, edit the statements as necessary, and use the script if all copies of the control file are lost (or to change the size of the control file).

  • Specify AS filename if you want Oracle to place the script into a file called filename rather than into the standard trace file.
  • Specify REUSE to allow Oracle to overwrite any existing file called filename.
  • RESETLOGS indicates that the SQL statement written to the trace file for starting the database is ALTER DATABASE OPEN RESETLOGS. This setting is valid only if the online logs are unavailable.
  • NORESETLOGS indicates that the SQL statement written to the trace file for starting the database is ALTER DATABASE OPEN NORESETLOGS. This setting is valid only if all the online logs are available.

If you cannot predict the future state of the online logs, specify neither RESETLOGS nor NORESETLOGS. In this case, Oracle puts both versions of the script into the trace file, and you can choose which version is appropriate when the script becomes necessary.

standby_database_clauses

Use these clauses to activate the standby database or to specify whether it is in protected or unprotected mode.

See Also:

Oracle Data Guard Concepts and Administration for descriptions of physical and logical the standby database and for information on maintaining and using standby databases
ACTIVATE STANDBY DATABASE Clause

The ACTIVATE STANDBY DATABASE clause changes the state of a standby database to an active database and prepares it to become the primary database. The database must be mounted before you can specify this clause.

PHYSICAL

Specify PHYSICAL to activate a physical standby database. This is the default.

LOGICAL

Specify LOGICAL to activate a logical standby database. If you have more than one logical standby database, you should first ensure that the same log data is available on all the standby systems.

SKIP [STANDBY LOGFILE]

This clause applies only to physical standby databases. Use this clause to force the operation to proceed even if standby redo logfiles contain data that could be recovered using the RECOVER MANAGED STANDBY DATABASE FINISH command.

Note:

Oracle Corporation recommends that you always use the RECOVER MANAGED STANDBY DATABASE FINISH statement for physical standby even if you do not use standby redo logfiles. Use the SKIP clause only if it is acceptable to discard the contents of the standby redo log.
SET STANDBY [DATABASE] Clause

Use this clause to specify the level of protection for the data in your database environment. You specify this clause from the primary database, which must be mounted but not open.

Note:

The PROTECTED and UNPROTECTED keywords have been replaced for clarity but are still supported. PROTECTED is equivalent to TO MAXIMIZE PROTECTION. UNPROTECTED is equivalent to TO MAXIMIZE PERFORMANCE.
TO MAXIMIZE PROTECTION

This setting establishes "maximum protection mode" and offers the highest level of data protection. A transaction does not commit until all data needed to recover that transaction has been written to at least one physical standby database that is configured to use the SYNC log transport mode. If the primary database is unable to write the redo records to at least one such standby database, the primary database is shut down. This mode guarantees zero data loss, but it has the greatest potential impact on the performance and availability of the primary database.

TO MAXIMIZE AVAILABILITY

This setting establishes "maximum availability mode" and offers the next highest level of data protection. A transaction does not commit until all data needed to recover that transaction has been written to at least one (physical or logical) standby database that is configured to use the SYNC log transport mode. Unlike maximum protection mode, the primary database does not shut down if it is unable to write the redo records to at least one such standby database. Instead, the protection is lowered to maximum performance mode until the fault has been corrected and the standby database has caught up with the primary database. This mode guarantees zero data loss unless the primary database fails while in maximum performance mode. Maximum availability mode provides the highest level of data protection that is possible without affecting the availability of the primary database.

TO MAXIMIZE PERFORMANCE

This setting establishes "maximum performance mode" and is the default setting. A transaction commits before the data needed to recover that transaction has been written to a standby database. Therefore, some transactions may be lost if the primary database fails and you are unable to recover the redo records from the primary database. This mode provides the highest level of data protection that is possible without affecting the performance of the primary database.

To determine the current mode of the database, query the PROTECTION_MODE column of the V$DATABASE dynamic performance view.

See Also:

Oracle Data Guard Concepts and Administration for full information on using these standby database settings
REGISTER LOGFILE Clause

Specify the REGISTER LOGFILE clause from the standby database to manually register log files from the failed primary.

For a logical standby database, you can use this command to seed the initial starting point for a new logical standby database. Then when you issue an ALTER DATABASE START LOGICAL STANDBY APPLY INITIAL command, Oracle will use the lowest registered logfile as its starting point.

OR REPLACE

Specify OR REPLACE to allow an existing archivelog entry in the standby database to be updated, for example, when its location or file specification changes. The SCNs of the entries must match exactly, and the original entry must have been created by the managed standby log transmittal mechanism.

COMMIT TO SWITCHOVER Clause

Use this clause to perform a "graceful switchover", in which the current primary database take on standby status, and one standby database becomes the primary database. In a Real Application Clusters environment, all instances other than the instance from which you issue this statement must be shutdown normally.

  • Specify PHYSICAL to prepare the primary database to run in the role of a physical standby database.
  • Specify LOGICAL to prepare the primary database to run in the role of a logical standby database. If you specify LOGICAL, you must then issue an ALTER DATABASE START LOGICAL STANDBY APPLY statement.
  • On the primary database, specify COMMIT TO SWITCHOVER TO STANDBY to perform a graceful database switchover of the primary database to standby database status. The primary database must be open.
  • On one of the standby databases, issue a COMMIT TO SWITCHOVER TO PRIMARY statement to perform a graceful switchover of this standby database to primary status. The standby database must be mounted or open in READ ONLY mode.
WITH | WITHOUT SESSION SHUTDOWN

If you specify WITH SESSION SHUTDOWN, Oracle shuts down any open application sessions and rolls back uncommitted transactions as part of the execution of this statement. If you omit this clause or specify WITHOUT SESSION SHUTDOWN (which is the default), the statement will fail if any application sessions are open.

Restriction on WITH SESSION SHUTDOWN

This clause is not necessary or supported for a logical database.

WAIT | NOWAIT

Specify WAIT if you want Oracle to return control after the completion of the SWITCHOVER command. Specify NOWAIT if you want Oracle to return control before the switchover operation is complete. the default is WAIT.

See Also:

Oracle Data Guard Concepts and Administration for full information on graceful switchover between primary and standby databases
START LOGICAL STANDBY APPLY Clause

Specify the START LOGICAL STANDBY APPLY clause to begin applying redo logs to a logical standby database.

  • Specify INITIAL the first time you apply the logs to the standby database.
  • Specify NEW PRIMARY after the ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY statement or when a standby database has completed processing logs from one primary and now a new database becomes the primary.
STOP | ABORT LOGICAL STANDBY Clause

Use this clause to stop the log apply services. This clause applies only to logical standby databases, not to physical standby databases. Use the STOP clause to stop the apply in an orderly fashion.

default_settings_clauses

Use these clauses to modify the default settings of the database.

CHARACTER SET, NATIONAL CHARACTER SET

CHARACTER SET changes the character set the database uses to store data. NATIONAL CHARACTER SET changes the national character set used to store data in columns specifically defined as NCHAR, NCLOB, or NVARCHAR2. Specify character_set without quotation marks. The database must be open.

Cautions:
  • You cannot roll back an ALTER DATABASE CHARACTER SET or ALTER DATABASE NATIONAL CHARACTER SET statement. Therefore, you should perform a full backup before issuing either of these statements.
  • Oracle Corporation recommends that you use the Character Set Scanner (CSSCAN) to analyze your data before migrating your existing database character set to a new database character set. Doing so will help you avoid losing non-ASCII data that you might not have been aware was in your database. Please see Oracle9i Database Globalization Support Guide for more information about CSSCAN.
Notes on Changing Character Sets

In Oracle9i, CLOB data is stored as UCS-2 (two-byte fixed-width Unicode) for multibyte database character sets. For single-byte database character sets, CLOB data is stored in the database character set. When you change the database or national character set with an ALTER DATABASE statement, no data conversion is performed. Therefore, if you change the database character set from single byte to multibyte using this statement, CLOB columns will remain in the original database character set. This may introduce data inconsistency in your CLOB columns. Likewise, if you change the national character set from one Unicode set to another, your SQL NCHAR columns (NCHAR, NVARCHAR2, NCLOB) may be corrupted.

The recommended procedure for changing database character sets is:

  1. Export the CLOB and SQL NCHAR datatype columns.
  2. Drop the tables containing the CLOB and SQL NCHAR columns.
  3. Use ALTER DATABASE statements to change the character set and national character set.
  4. Reimport the CLOB and SQL NCHAR columns.
Restrictions on Changing Character Sets
  • You must have SYSDBA system privilege, and you must start up the database in restricted mode (for example, with the SQL*Plus STARTUP RESTRICT command).
  • The current character set must be a strict subset of the character set to which you change. That is, each character represented by a codepoint value in the source character set must be represented by the same codepoint value in the target character set.

    See Also:

    Oracle9i Database Globalization Support Guide for information on database character set migration and "Changing a Character Set: Example"

set_time_zone_clause

Use the SET TIME_ZONE clause to set the time zone of the database. You can specify the time zone in two ways:

  • By specifying a displacement from UTC (Coordinated Universal Time--formerly Greenwich Mean Time). The valid range of hh:mm is -12:00 to +14:00.
  • By specifying a time zone region. To see a listing of valid region names, query the TZNAME column of the V$TIMEZONE_NAMES dynamic performance view.

    Note:

    Oracle Corporation recommends that you set the database time zone to UTC ("0:00"). Doing so can improve performance, especially across databases, as no conversion of time zones will be required.
    See Also:

    Oracle9i Database Reference for information on the dynamic performance views

Oracle normalizes all new TIMESTAMP WITH LOCAL TIME ZONE data to the time zone of the database when the data is stored on disk. Oracle does not automatically update existing data in the database to the new time zone. To determine the time zone of the database, query the built-in function DBTIMEZONE (see DBTIMEZONE ).

After setting or changing the time zone with this clause, you must restart the database for the new time zone to take effect.

DEFAULT TEMPORARY TABLESPACE Clause

Specify this clause to change the default temporary tablespace of the database. After this operation completes, Oracle automatically reassigns to the new default temporary tablespace all users who had been assigned to the old default temporary tablespace. You can then drop the old default temporary tablespace if you wish.

To learn the name of the current default temporary tablespace, query the PROPERTY_VALUE column of the DATABASE_PROPERTIES data dictionary table where the PROPERTY_NAME = 'DEFAULT_TEMP_TABLESPACE'.

Restrictions on Default Temporary Tablespaces
  • The tablespace you assign or reassign as the default temporary tablespace must have a standard block size.
  • If the SYSTEM tablespace is locally managed, the tablespace you specify as the default temporary tablespace must also be locally managed.

    See Also:

    "Defining a Default Temporary Tablespace: Example"

conversion_clauses

RESET COMPATIBILITY Clause

Specify RESET COMPATIBILITY to mark the database to be reset to an earlier version of Oracle when the database is next restarted. The database must be open.

Note:

RESET COMPATIBILITY works only if you have successfully disabled Oracle features that affect backward compatibility.
See Also:

Oracle9i Database Migration Guide for more information on downgrading to an earlier version of Oracle
CONVERT Clause

Use the CONVERT clause to complete the conversion of the Oracle7 data dictionary. After you use this clause, the Oracle7 data dictionary no longer exists in the Oracle database.

Note:

Use this clause only when you are migrating to Oracle9i, and do not use this clause when the database is mounted.
See Also:

Oracle9i Database Migration Guide

redo_thread_clauses

Use these clauses to enable and disable the thread of redo log file groups.

ENABLE THREAD Clause

In an Oracle Real Application Clusters environment, specify ENABLE THREAD to enable the specified thread of redo log file groups. The thread must have at least two redo log file groups before you can enable it. The database must be open.

PUBLIC

Specify PUBLIC to make the enabled thread available to any instance that does not explicitly request a specific thread with the initialization parameter THREAD. If you omit PUBLIC, the thread is available only to the instance that explicitly requests it with the initialization parameter THREAD.

See Also:

Oracle9i Real Application Clusters Administration for more information on enabling and disabling threads
DISABLE THREAD Clause

Specify DISABLE THREAD to disable the specified thread, making it unavailable to all instances. The database must be open, but you cannot disable a thread if an instance using it has the database mounted.

See Also:

Oracle9i Real Application Clusters Administration for more information on enabling and disabling threads and "Disabling and Enabling a Real Application Clusters Thread: Examples"

RENAME GLOBAL_NAME Clause

Specify RENAME GLOBAL_NAME to change the global name of the database. The database is the new database name and can be as long as eight bytes. The optional domain specifies where the database is effectively located in the network hierarchy. Do not use this clause when the database is mounted.

Note:

Renaming your database does not change global references to your database from existing database links, synonyms, and stored procedures and functions on remote databases. Changing such references is the responsibility of the administrator of the remote databases.
See Also:

Oracle9i Heterogeneous Connectivity Administrator's Guide for more information on global names and "Changing the Global Database Name: Example"

security_clause

Use the security_clause (GUARD) to protect data in the database from being changed.

ALL

Specify ALL to prevent all users other than SYS from making changes to any data in the database.

STANDBY

Specify STANDBY to prevent all users other than SYS from making changes to any database object being maintained by logical standby. This setting is useful if you want report operations to be able to modify data as long as it is not being replicated by logical standby.

See Also:

Oracle Data Guard Concepts and Administration for information on logical standby
NONE

Specify NONE if you want normal security for all data in the database.

Examples

READ ONLY / READ WRITE: Example

The first statement that follows opens the database in read-only mode. The second statement returns the database to read/write mode and clears the online redo logs:

ALTER DATABASE OPEN READ ONLY;

ALTER DATABASE OPEN READ WRITE RESETLOGS;
Using Parallel Recovery Processes: Example

The following statement performs tablespace recovery using parallel recovery processes:

ALTER DATABASE
   RECOVER TABLESPACE tbs_03
   PARALLEL;
Adding Redo Log File Groups: Examples

The following statement adds a redo log file group with two members and identifies it with a GROUP parameter value of 3:

ALTER DATABASE
  ADD LOGFILE GROUP 3
    ('diska:log3.log' ,
     'diskb:log3.log') SIZE 50K;

The following statement adds a redo log file group containing two members to thread 5 (in a Real Application Clusters environment) and assigns it a GROUP parameter value of 4:

ALTER DATABASE
    ADD LOGFILE THREAD 5 GROUP 4
        ('diska:log4.log',
         'diskb:log4:log');
Dropping Log File Members: Example

The following statement drops one redo log file member added in the previous example:

ALTER DATABASE
    DROP LOGFILE MEMBER 'diskb:log3.log';

The following statement drops all members of the redo log file group 3:

ALTER DATABASE DROP LOGFILE GROUP 3;
Adding Redo Log File Group Members: Example

The following statement adds a member to the redo log file group added in the previous example:

ALTER DATABASE
   ADD LOGFILE MEMBER 'diskc:log3.log'
   TO GROUP 3;
Renaming a Log File Member: Example

The following statement renames a redo log file member:

ALTER DATABASE
    RENAME FILE 'diskc:log3.log' TO 'diskb:log3.log';

The preceding statement only changes the member of the redo log group from one file to another. The statement does not actually change the name of the file 'diskc:log3.log' to 'diskb:log3.log'. You must perform this operation through your operating system.

Defining a Default Temporary Tablespace: Example

The following statement makes the tbs_5 tablespace the default temporary tablespace of the database. This statement either establishes a default temporary tablespace if none was specified at create time, or replaces an existing default temporary tablespace with temp:

ALTER DATABASE
   DEFAULT TEMPORARY TABLESPACE tbs_5;
Disabling and Enabling a Real Application Clusters Thread: Examples

The following statement disables thread 5 in a Real Application Clusters environment:

ALTER DATABASE
    DISABLE THREAD 5;

The following statement enables thread 5 in a Real Application Clusters environment, making it available to any Oracle instance that does not explicitly request a specific thread:

ALTER DATABASE
    ENABLE PUBLIC THREAD 5;
Creating a New Datafile: Example

The following statement creates a new datafile 'tabspace_file04.dbf' based on the file 'tabspace_file03.dbf'. Before creating the new datafile, you must take the existing datafile (or the tablespace in which it resides) offline.

ALTER DATABASE
    CREATE DATAFILE 'tbs_f03.dbf'
                 AS 'tbs_f04.dbf';
Changing the Global Database Name: Example

The following statement changes the global name of the database and includes both the database name and domain:

ALTER DATABASE
    RENAME GLOBAL_NAME TO demo.world.oracle.com;
Changing a Character Set: Example

The following statements change the database character set and national character set to the UTF8 character set:

ALTER DATABASE CHARACTER SET UTF8;
ALTER DATABASE NATIONAL CHARACTER SET UTF8;

The database name is optional, and the character set name is specified without quotation marks.

Resizing a Datafile: Example

The following statement attempts to change the size of datafile 'disk1:db1.dat':

ALTER DATABASE
    DATAFILE 'disk1:db1.dat' RESIZE 10 M;
Clearing a Log File: Example

The following statement clears a log file:

ALTER DATABASE
    CLEAR LOGFILE 'diskc:log3.log';
Database Recovery: Examples

The following statement performs complete recovery of the entire database, letting Oracle generate the name of the next archived redo log file needed:

ALTER DATABASE
  RECOVER AUTOMATIC DATABASE;

The following statement explicitly names a redo log file for Oracle to apply:

ALTER DATABASE
    RECOVER LOGFILE 'diskc:log3.log';

The following statement recovers the standby datafile /finance/stbs_21.f, using the corresponding datafile in the original standby database, plus all relevant archived logs and the current standby database control file:

ALTER DATABASE
   RECOVER STANDBY DATAFILE '/finance/stbs_21.f'
   UNTIL CONTROLFILE;

The following statement performs time-based recovery of the database:

ALTER DATABASE
    RECOVER AUTOMATIC UNTIL TIME '2001-10-27:14:00:00';

Oracle recovers the database until 2:00 p.m. on October 27, 2001.

For an example of recovering a tablespace, see "Using Parallel Recovery Processes: Example" .

Recovering a Managed Standby Database: Examples

The following statement recovers the standby database in managed standby recovery mode:

ALTER DATABASE
   RECOVER MANAGED STANDBY DATABASE;

The following statement puts the database in managed standby recovery mode. The managed recovery process will wait up to 60 minutes for the next archive log:

ALTER DATABASE
   RECOVER MANAGED STANDBY DATABASE TIMEOUT 60;

If each subsequent log arrives within 60 minutes of the last log, recovery continues indefinitely or until manually terminated.

The following statement terminates the managed recovery operation:

ALTER DATABASE
   RECOVER MANAGED STANDBY DATABASE CANCEL IMMEDIATE;

The managed recovery operation terminates before the next group of redo is read from the current redo log file. Media recovery ends in the "middle" of applying redo from the current redo log file.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 6 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER DIMENSION

Purpose

Use the ALTER DIMENSION statement to change the hierarchical relationships or dimension attributes of a dimension.

See Also:

CREATE DIMENSION for more information on dimensions

Prerequisites

The dimension must be in your schema or you must have the ALTER ANY DIMENSION system privilege to use this statement.

A dimension is always altered under the rights of the owner.

Syntax

alter_dimension::=

Text description of statements_171.gif follows
Text description of alter_dimension

level_clause::=

Text description of statements_172.gif follows
Text description of level_clause

hierarchy_clause::=

Text description of statements_173.gif follows
Text description of hierarchy_clause

join_clause::=

Text description of statements_154.gif follows
Text description of join_clause

attribute_clause::=

Text description of statements_174.gif follows
Text description of attribute_clause

Semantics

The following keywords, parameters, and clauses have meaning unique to ALTER DIMENSION. Keywords, parameters, and clauses that do not appear here have the same functionality that they have in the CREATE DIMENSION statement.

See Also:

CREATE DIMENSION

schema

Specify the schema of the dimension you want to modify. If you do not specify schema, Oracle assumes the dimension is in your own schema.

dimension

Specify the name of the dimension. This dimension must already exist.

ADD

The ADD clauses let you add a level, hierarchy, or attribute to the dimension. Adding one of these elements does not invalidate any existing materialized view.

Oracle processes ADD LEVEL clauses prior to any other ADD clauses.

DROP

The DROP clauses let you drop a level, hierarchy, or attribute from the dimension. Any level, hierarchy, or attribute you specify must already exist.

Restriction on DROP

If any attributes or hierarchies reference a level, you cannot drop the level until you either drop all the referencing attributes and hierarchies or specify CASCADE.

CASCADE

Specify CASCADE if you want Oracle to drop any attributes or hierarchies that reference the level, along with the level itself.

RESTRICT

Specify RESTRICT if you want to prevent Oracle from dropping a level that is referenced by any attributes or hierarchies. This is the default.

COMPILE

Specify COMPILE to explicitly recompile an invalidated dimension. Oracle automatically compiles a dimension when you issue an ADD clause or DROP clause. However, if you alter an object referenced by the dimension (for example, if you drop and then re-create a table referenced in the dimension), the dimension will be invalidated, and you must recompile it explicitly.

Example

Modifying a Dimension: Examples

The following examples modify the customers_dim dimension in the sample schema sh:

ALTER DIMENSION customers_dim
   DROP ATTRIBUTE country;

ALTER DIMENSION customers_dim
   ADD LEVEL zone IS customers.cust_postal_code
   ADD ATTRIBUTE zone DETERMINES (cust_city);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 7 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER FUNCTION

Purpose

Use the ALTER FUNCTION statement to recompile an invalid standalone stored function. Explicit recompilation eliminates the need for implicit run-time recompilation and prevents associated run-time compilation errors and performance overhead.

The ALTER FUNCTION statement is similar to ALTER PROCEDURE . For information on how Oracle recompiles functions and procedures, see Oracle9i Database Concepts.

Note:

This statement does not change the declaration or definition of an existing function. To redeclare or redefine a function, use the CREATE FUNCTION statement with the OR REPLACE clause; see CREATE FUNCTION .

Prerequisites

The function must be in your own schema or you must have ALTER ANY PROCEDURE system privilege.

Syntax

alter_function::=

Text description of statements_175.gif follows
Text description of alter_function

Semantics

schema

Specify the schema containing the function. If you omit schema, Oracle assumes the function is in your own schema.

function

Specify the name of the function to be recompiled.

COMPILE

Specify COMPILE to cause Oracle to recompile the function. The COMPILE keyword is required. If Oracle does not compile the function successfully, you can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

During recompilation, Oracle drops all persistent compiler switch settings, retrieves them again from the session, and stores them at the end of compilation. To avoid this process, specify the REUSE SETTINGS clause.

DEBUG

Specify DEBUG to instruct the PL/SQL compiler to generate and store the code for use by the PL/SQL debugger.

REUSE SETTINGS

Specify REUSE SETTINGS to prevent Oracle from dropping and reacquiring compiler switch settings. With this clause, Oracle preserves the existing settings and uses them for the recompilation.

If you specify both DEBUG and REUSE SETTINGS, Oracle sets the persistently stored value of the PLSQL_COMPILER_FLAGS parameter to INTERPRETED, DEBUG. No other compiler switch values are changed.

See Also:

PL/SQL User's Guide and Reference and Oracle9i Application Developer's Guide - Fundamentals for more information on the interaction of the PLSQL_COMPILER_FLAGS parameter with the COMPILE clause

Example

Recompiling a Function: Example

To explicitly recompile the function get_bal owned by the sample user oe, issue the following statement:

ALTER FUNCTION oe.get_bal
   COMPILE;

If Oracle encounters no compilation errors while recompiling get_bal, get_bal becomes valid. Oracle can subsequently execute it without recompiling it at run time. If recompiling get_bal results in compilation errors, Oracle returns an error, and get_bal remains invalid.

Oracle also invalidates all objects that depend upon get_bal. If you subsequently reference one of these objects without explicitly recompiling it first, Oracle recompiles it implicitly at run time.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 8 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER INDEX

Purpose

Use the ALTER INDEX statement to change or rebuild an existing index.

See Also:

CREATE INDEX for information on creating an index

Prerequisites

The index must be in your own schema or you must have ALTER ANY INDEX system privilege.

To execute the MONITORING USAGE clause, the index must be in your own schema.

To modify a domain index, you must have EXECUTE object privilege on the indextype of the index.

Schema object privileges are granted on the parent index, not on individual index partitions or subpartitions.

You must have tablespace quota to modify, rebuild, or split an index partition or to modify or rebuild an index subpartition.

See Also:

CREATE INDEX and Oracle9i Data Cartridge Developer's Guide for information on domain indexes

Syntax

alter_index::=

Text description of statements_176.gif follows
Text description of alter_index

(deallocate_unused_clause::= , allocate_extent_clause::= , parallel_clause::= , physical_attributes_clause::= , logging_clause::= , rebuild_clause::= , alter_index_partitioning::= )

deallocate_unused_clause::=

Text description of statements_177.gif follows
Text description of deallocate_unused_clause

allocate_extent_clause::=

Text description of statements_178.gif follows
Text description of allocate_extent_clause

parallel_clause::=

Text description of statements_179.gif follows
Text description of parallel_clause

physical_attributes_clause::=

Text description of statements_180.gif follows
Text description of physical_attributes_clause

(storage_clause::= )

logging_clause::=

Text description of statements_147.gif follows
Text description of logging_clause

rebuild_clause::=

Text description of statements_132.gif follows
Text description of rebuild_clause

(physical_attributes_clause::= , key_compression::= , logging_clause::= )

key_compression::=

Text description of statements_181.gif follows
Text description of key_compression

alter_index_partitioning::=

Text description of statements_156.gif follows
Text description of alter_index_partitioning

(modify_index_default_attrs::= , modify_index_partition::= , rename_index_partition::= , drop_index_partition::= , split_index_partition::= , modify_index_subpartition::= )

modify_index_default_attrs::=

Text description of statements_178a.gif follows
Text description of modify_index_default_attrs

(physical_attributes_clause::= , logging_clause::= )

modify_index_partition::=

Text description of statements_183.gif follows
Text description of modify_index_partition

(physical_attributes_clause::= , logging_clause::= , allocate_extent_clause::= , deallocate_unused_clause::= )

rename_index_partition::=

Text description of statements_184.gif follows
Text description of rename_index_partition

drop_index_partition::=

Text description of statements_185.gif follows
Text description of drop_index_partition

split_index_partition::=

Text description of statements_186.gif follows
Text description of split_index_partition

(parallel_clause::= )

index_partition_description::=

Text description of statements_184a.gif follows
Text description of index_partition_description

(key_compression::= )

segment_attributes_clause::=

Text description of statements_185a.gif follows
Text description of segment_attributes_clause

(physical_attributes_clause::= , logging_clause::= )

modify_index_subpartition::=

Text description of statements_188.gif follows
Text description of modify_index_subpartition

(allocate_extent_clause::= , deallocate_unused_clause::= )

Semantics

schema

Specify the schema containing the index. If you omit schema, Oracle assumes the index is in your own schema.

index

Specify the name of the index to be altered.

Restrictions on Modifying Indexes
  • If index is a domain index, you can specify only the PARAMETERS clause, the RENAME clause, the rebuild_clause (with or without the PARAMETERS clause), the parallel_clause, or the UNUSABLE clause. No other clauses are valid.
  • You cannot alter or rename a domain index that is marked LOADING or FAILED. If an index is marked FAILED, the only clause you can specify is REBUILD.

    See Also:

    Oracle9i Data Cartridge Developer's Guide for information on the LOADING and FAILED states of domain indexes

deallocate_unused_clause

Use the deallocate_unused_clause to explicitly deallocate unused space at the end of the index and make the freed space available for other segments in the tablespace.

If index is range-partitioned or hash-partitioned, Oracle deallocates unused space from each index partition. If index is a local index on a composite-partitioned table, Oracle deallocates unused space from each index subpartition.

Restrictions on Deallocating Space
  • You cannot specify this clause for an index on a temporary table.
  • You cannot specify this clause and also specify the rebuild_clause.

    See Also:

    deallocate_unused_clause for a full description of this clause
KEEP integer

The KEEP clause lets you specify the number of bytes above the high water mark that the index will have after deallocation. If the number of remaining extents are less than MINEXTENTS, then MINEXTENTS is set to the current number of extents. If the initial extent becomes smaller than INITIAL, then INITIAL is set to the value of the current initial extent. If you omit KEEP, all unused space is freed.

See Also:

ALTER TABLE for a complete description of this clause

allocate_extent_clause

The allocate_extent_clause lets you explicitly allocate a new extent for the index. For a local index on a hash-partitioned table, Oracle allocates a new extent for each partition of the index.

Restriction on Allocating Extents

You cannot specify this clause for an index on a temporary table or for a range-partitioned or composite-partitioned index.

See Also:

allocate_extent_clause for a full description of this clause

parallel_clause

Use the PARALLEL clause to change the default degree of parallelism for queries and DML on the index.

Restriction on Parallelizing Indexes

You cannot specify this clause for an index on a temporary table.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE and "Enabling Parallel Queries: Example"

physical_attributes_clause

Use the physical_attributes_clause to change the values of parameters for a nonpartitioned index, all partitions and subpartitions of a partitioned index, a specified partition, or all subpartitions of a specified partition.

See Also:
  • the physical attributes parameters in CREATE TABLE
  • "Modifying Real Attributes: Example" and "Changing MAXEXTENTS: Example"
Restrictions on Index Physical Attributes
  • You cannot specify this clause for an index on a temporary table.
  • You cannot specify the PCTUSED parameter at all when altering an index.
  • You can specify the PCTFREE parameter only as part of the rebuild_clause, the modify_index_default_attrs clause, or the split_partition_clause.
storage_clause

Use the storage_clause to change the storage parameters for a nonpartitioned index, index partition, or all partitions of a partitioned index, or default values of these parameters for a partitioned index.

See Also:

storage_clause

logging_clause

Use the logging_clause to specify whether subsequent Direct Loader (SQL*Loader) and direct-path INSERT operations against a nonpartitioned index, a range or hash index partition, or all partitions or subpartitions of a composite-partitioned index will be logged (LOGGING) or not logged (NOLOGGING) in the redo log file.

An index segment can have logging attributes different from those of the base table and different from those of other index segments for the same base table.

Restriction on Index Logging

You cannot specify this clause for an index on a temporary table.

See Also:
  • logging_clause for a full description of this clause
  • Oracle9i Database Concepts and the Oracle9i Data Warehousing Guide for more information about LOGGING and parallel DML
RECOVERABLE | UNRECOVERABLE

These keywords are deprecated and have been replaced with LOGGING and NOLOGGING, respectively. Although RECOVERABLE and UNRECOVERABLE are supported for backward compatibility, Oracle Corporation strongly recommends that you use the LOGGING and NOLOGGING keywords.

RECOVERABLE is not a valid keyword for creating partitioned tables or LOB storage characteristics. UNRECOVERABLE is not a valid keyword for creating partitioned or index-organized tables. Also, it can be specified only with the AS subquery clause of CREATE INDEX.

rebuild_clause

Use the rebuild_clause to re-create an existing index or one of its partitions or subpartitions. If index is marked UNUSABLE, a successful rebuild will mark it USABLE. For a function-based index, this clause also enables the index. If the function on which the index is based does not exist, the rebuild statement will fail.

Restrictions on Rebuilding Indexes
  • You cannot rebuild an index on a temporary table.
  • You cannot rebuild a bitmap index that is marked INVALID. Instead, you must drop and then re-create it.
  • You cannot rebuild an entire partitioned index. You must rebuild each partition or subpartition, as described for the PARTITION clause.
  • You cannot also specify the deallocate_unused_clause in this statement.
  • You cannot change the value of the PCTFREE parameter for the index as a whole (ALTER INDEX) or for a partition (ALTER INDEX ... MODIFY PARTITION). You can specify PCTFREE in all other forms of the ALTER INDEX statement.
  • For a domain index:
    • You can specify only the PARAMETERS clause (either for the index or for a partition of the index) or the parallel_clause. No other rebuild clauses are valid.
    • You can rebuild the index only if index is not marked IN_PROGRESS.
    • You can rebuild the index partitions only if index is not marked IN_PROGRESS or FAILED and partition is not marked IN_PROGRESS.
  • You cannot rebuild a local index, but you can rebuild a partition of a local index (ALTER INDEX ... REBUILD PARTITION).
  • For a local index on a hash partition or subpartition, the only parameter you can specify is TABLESPACE.
PARTITION Clause

Use the PARTITION clause to rebuild one partition of an index. You can also use this clause to move an index partition to another tablespace or to change a create-time physical attribute.

Note:

The storage of partitioned database entities in tablespaces of different block sizes is subject to several restrictions. Please refer to Oracle9i Database Administrator's Guide for a discussion of these restrictions.
Restriction on Rebuilding Partitions

You cannot specify this clause for a local index on a composite-partitioned table. Instead, use the REBUILD SUBPARTITION clause.

See Also:

Oracle9i Database Administrator's Guide for more information about partition maintenance operations and "Rebuilding Unusable Index Partitions: Example"

SUBPARTITION Clause

Use the SUBPARTITION clause to rebuild one subpartition of an index. You can also use this clause to move an index subpartition to another tablespace. If you do not specify TABLESPACE, the subpartition is rebuilt in the same tablespace.

Note:

The storage of partitioned database entities in tablespaces of different block sizes is subject to several restrictions. Please refer to Oracle9i Database Administrator's Guide for a discussion of these restrictions.
Restrictions on Modifying Index Subpartitions
  • The only parameters you can specify for a subpartition are TABLESPACE and the parallel_clause.
  • You cannot rebuild the subpartition of a list partition.
REVERSE | NOREVERSE

Indicate whether the bytes of the index block are stored in reverse order:

  • REVERSE stores the bytes of the index block in reverse order and excludes the rowid when the index is rebuilt.
  • NOREVERSE stores the bytes of the index block without reversing the order when the index is rebuilt. Rebuilding a REVERSE index without the NOREVERSE keyword produces a rebuilt, reverse-keyed index.
Restrictions on Reverse Indexes
  • You cannot reverse a bitmap index or an index-organized table.
  • You cannot specify REVERSE or NOREVERSE for a partition or subpartition.

    See Also:

    "Storing Index Blocks in Reverse Order: Example"

parallel_clause

Use the parallel_clause to parallelize the rebuilding of the index.

See Also:

"Rebuilding an Index in Parallel: Example"

TABLESPACE Clause

Specify the tablespace where the rebuilt index, index partition, or index subpartition will be stored. The default is the default tablespace where the index or partition resided before you rebuilt it.

COMPRESS | NOCOMPRESS

Specify COMPRESS to enable key compression, which eliminates repeated occurrence of key column values. Use integer to specify the prefix length (number of prefix columns to compress).

  • For unique indexes, the range of valid prefix length values is from 1 to the number of key columns minus 1. The default prefix length is the number of key columns minus 1.
  • For nonunique indexes, the range of valid prefix length values is from 1 to the number of key columns. The default prefix length is number of key columns.

Oracle compresses only nonpartitioned indexes that are nonunique or unique indexes of at least two columns.

Specify NOCOMPRESS to disable key compression. This is the default.

Restriction on Key Compression

You cannot specify COMPRESS for a bitmap index.

ONLINE Clause

Specify ONLINE to allow DML operations on the table or partition during rebuilding of the index.

Restrictions on ONLINE
  • Parallel DML is not supported during online index building. If you specify ONLINE and then issue parallel DML statements, Oracle returns an error.
  • You cannot specify ONLINE for a bitmap index or a cluster index.
  • For a unique index on an index-organized table, the number of index key columns plus the number of primary key columns in the index-organized table cannot exceed 32.
COMPUTE STATISTICS Clause

Specify COMPUTE STATISTICS if you want to collect statistics at relatively little cost during the rebuilding of an index. These statistics are stored in the data dictionary for ongoing use by the optimizer in choosing a plan of execution for SQL statements.

The types of statistics collected depend on the type of index you are rebuilding.

Note:

If you create an index using another index (instead of a table), the original index might not provide adequate statistical information. Therefore, Oracle generally uses the base table to compute the statistics, which will improve the statistics but may negatively affect performance.

Additional methods of collecting statistics are available in PL/SQL packages and procedures

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference and "Collecting Index Statistics: Example"

logging_clause

Specify whether the ALTER INDEX ... REBUILD operation will be logged.

See Also:

logging_clause for a full description of this clause

PARAMETERS Clause

The PARAMETERS clause applies only to domain indexes. This clause specifies the parameter string that is passed uninterpreted to the appropriate ODCI indextype routine. The maximum length of the parameter string is 1000 characters.

If you are altering or rebuilding an entire index, the string must refer to index-level parameters. If you are rebuilding a partition of the index, the string must refer to partition-level parameters.

If index is marked UNUSABLE, modifying the parameters alone does not make it USABLE. You must also rebuild the UNUSABLE index to make it usable.

Note:

If you have installed Oracle Text, you can rebuild your Oracle Text domain indexes using parameters specific to that product. For more information on those parameters, please refer to Oracle Text Reference.
Restrictions on the PARAMETERS Clause
  • You can specify this clause only for a domain index.
  • You can modify index partitions only if index is not marked IN_PROGRESS or FAILED, no index partitions are marked IN_PROGRESS, and the partition being modified is not marked FAILED.

    See Also:
    • Oracle9i Data Cartridge Developer's Guide for more information on indextype routines.
    • CREATE INDEX for more information on domain indexes

ENABLE Clause

ENABLE applies only to a function-based index that has been disabled because a user-defined function used by the index was dropped or replaced. This clause enables such an index if these conditions are true:

  • The function is currently valid
  • The signature of the current function matches the signature of the function when the index was created
  • The function is currently marked as DETERMINISTIC
Restriction on Enabling Function-based Indexes

You cannot specify any other clauses of ALTER INDEX in the same statement with ENABLE.

DISABLE Clause

DISABLE applies only to a function-based index. This clause enables you to disable the use of a function-based index. You might want to do so, for example, while working on the body of the function. Afterward you can either rebuild the index or specify another ALTER INDEX statement with the ENABLE keyword.

UNUSABLE Clause

Specify UNUSABLE to mark the index or index partition(s) or index subpartition(s) UNUSABLE. An unusable index must be rebuilt, or dropped and re-created, before it can be used. While one partition is marked UNUSABLE, the other partitions of the index are still valid. You can execute statements that require the index if the statements do not access the unusable partition. You can also split or rename the unusable partition before rebuilding it.

Restriction on Marking Indexes Unusable

You cannot specify this clause for an index on a temporary table.

RENAME Clause

Use this clause to rename an index. The new_index_name is a single identifier and does not include the schema name.

Restriction on Renaming Indexes

For a domain index, neither index nor any partitions of index can be marked IN_PROGRESS or FAILED.

See Also:

"Renaming an Index: Example"

COALESCE Clause

Specify COALESCE to instruct Oracle to merge the contents of index blocks where possible to free blocks for reuse.

Restrictions on Coalescing Index Blocks
  • You cannot specify this clause for an index on a temporary table.
  • Do not specify this clause for the primary key index of an index-organized table. Instead use the COALESCE clause of ALTER TABLE.

    See Also:
    • Oracle9i Database Administrator's Guide for more information on space management and coalescing indexes
    • COALESCE for information on coalescing space of an index-organized table

MONITORING USAGE | NOMONITORING USAGE

Use this clause to determine whether Oracle should monitor index use.

  • Specify MONITORING USAGE to begin monitoring the index. Oracle first clears existing information on index usage, and then monitors the index for use until a subsequent ALTER INDEX ... NOMONITORING USAGE statement is executed.
  • To terminate monitoring of the index, specify NOMONITORING USAGE.

To see whether the index has been used since this ALTER INDEX ... NOMONITORING USAGE statement was issued, query the USED column of the V$OBJECT_USAGE dynamic performance view.

See Also:

Oracle9i Database Reference for information on the data dictionary and dynamic performance views

UPDATE BLOCK REFERENCES Clause

The UPDATE BLOCK REFERENCES clause is valid only for normal and domain indexes on index-organized tables. Specify this clause to update all the stale "guess" data block addresses stored as part of the index row with the correct database address for the corresponding block identified by the primary key.

Note:

For a domain index, Oracle executes the ODCIIndexAlter routine with the alter_option parameter set to AlterIndexUpdBlockRefs. This routine enables the cartridge code to update the stale "guess" data block addresses in the index.
Restriction on UPDATE BLOCK REFERENCES

You cannot combine this clause with any other clause of ALTER INDEX.

alter_index_partitioning

The partitioning clauses of the ALTER INDEX statement are valid only for partitioned indexes.

Note:

The storage of partitioned database entities in tablespaces of different block sizes is subject to several restrictions. Please refer to Oracle9i Database Administrator's Guide for a discussion of these restrictions.
Restrictions on Altering Index Partitions
  • You cannot specify any of these clauses for an index on a temporary table.
  • You can combine several operations on the base index into one ALTER INDEX statement (except RENAME and REBUILD), but you cannot combine partition operations with other partition operations or with operations on the base index.
modify_index_default_attrs

Specify new values for the default attributes of a partitioned index.

Restriction on Modifying Partition Default Attributes

The only attribute you can specify for an index on a hash-partitioned or composite-partitioned table is TABLESPACE.

TABLESPACE

Specify the default tablespace for new partitions of an index or subpartitions of an index partition.

logging_clause

Specify the default logging attribute of a partitioned index or an index partition.

See Also:

logging_clause for a full description of this clause
FOR PARTITION

Use the FOR PARTITION clause to specify the default attributes for the subpartitions of a partition of a local index on a composite-partitioned table.

Restriction on FOR PARTITION

You cannot specify FOR PARTITION for a list partition.

See Also:

"Modifying Default Attributes: Example"

modify_index_partition

Use the modify_index_partition clause to modify the real physical attributes, logging attribute, or storage characteristics of index partition partition or its subpartitions.

UPDATE BLOCK REFERENCES

The UPDATE BLOCK REFERENCES clause is valid only for normal indexes on index-organized tables. Use this clause to update all stale "guess" data block addresses stored in the secondary index partition.

Restrictions on UPDATE BLOCK REFERENCES
  • You cannot specify the physical_attributes_clause for an index on a hash-partitioned table.
  • You cannot specify UPDATE BLOCK REFERENCES with any other clause in ALTER INDEX.

    Note:

    If the index is a local index on a composite-partitioned table, the changes you specify here will override any attributes specified earlier for the subpartitions of index, as well as establish default values of attributes for future subpartitions of that partition. To change the default attributes of the partition without overriding the attributes of subpartitions, use ALTER TABLE ... MODIFY DEFAULT ATTRIBUTES OF PARTITION.
    See Also:

    "Marking an Index Unusable: Examples"

rename_index_partition

Use the rename_index_partition clauses to rename index partition or subpartition to new_name.

Restrictions on Renaming Index Partitions
  • You cannot rename the subpartition of a list partition.
  • For a partition of a domain index, index must not be marked IN_PROGRESS or FAILED, none of the partitions can be marked IN_PROGRESS, and the partition you are renaming must not be marked FAILED.

    a

    See Also:

    "Renaming an Index Partition: Example"

drop_index_partition

Use the drop_index_partition clause to remove a partition and the data in it from a partitioned global index. When you drop a partition of a global index, Oracle marks the index's next partition UNUSABLE. You cannot drop the highest partition of a global index.

See Also:

"Dropping an Index Partition: Example"

split_index_partition

Use the split_index_partition clause to split a partition of a global partitioned index into two partitions, adding a new partition to the index.

Splitting a partition marked UNUSABLE results in two partitions, both marked UNUSABLE. You must rebuild the partitions before you can use them.

Splitting a usable partition results in two partitions populated with index data. Both new partitions are usable.

AT Clause

Specify the new noninclusive upper bound for split_partition_1. The value_list must evaluate to less than the presplit partition bound for partition_name_old and greater than the partition bound for the next lowest partition (if there is one).

INTO Clause

Specify (optionally) the name and physical attributes of each of the two partitions resulting from the split.

See Also:

"Splitting a Partition: Example"

modify_index_subpartition

Use the modify_index_subpartition clause to mark UNUSABLE or allocate or deallocate storage for a subpartition of a local index on a composite-partitioned table. All other attributes of such a subpartition are inherited from partition-level default attributes.

Examples

Storing Index Blocks in Reverse Order: Example

The following statement rebuilds index ord_customer_ix (created in "Creating an Index: Example" ) so that the bytes of the index block are stored in reverse order:

ALTER INDEX ord_customer_ix REBUILD REVERSE;
Collecting Index Statistics: Example

The following statement collects statistics on the nonpartitioned ord_customer_ix index:

ALTER INDEX ord_customer_ix REBUILD COMPUTE STATISTICS;

The type of statistics collected depends on the type of index you are rebuilding.

See Also:

Oracle9i Database Concepts
Rebuilding an Index in Parallel: Example

The following statement causes the index to be rebuilt from the existing index by using parallel execution processes to scan the old and to build the new index:

ALTER INDEX ord_customer_ix REBUILD PARALLEL;
Modifying Real Attributes: Example

The following statement alters the oe.cust_lname_ix index so that future data blocks within this index use 5 initial transaction entries and an incremental extent of 100 kilobytes:

/* Unless you change the default tablespace of sample user oe,
   or specify different tablespace storage for the index, this
   example fails because the default tablespace originally assigned
   to oe is locally managed.
*/
ALTER INDEX oe.cust_lname_ix
    INITRANS 5
    STORAGE (NEXT 100K);

If the oe.cust_lname_ix index were partitioned, this statement would also alter the default attributes of future partitions of the index. New partitions added in the future would then use 5 initial transaction entries and an incremental extent of 100K.

Enabling Parallel Queries: Example

The following statement sets the parallel attributes for index upper_ix (created in "Creating a Function-Based Index: Example" ) so that scans on the index will be parallelized:

ALTER INDEX upper_ix PARALLEL;
Renaming an Index: Example

The following statement renames an index:

ALTER INDEX upper_ix RENAME TO upper_name_ix;
Marking an Index Unusable: Examples

The following statements use the cost_ix index, which was created in "Creating a Global Partitioned Index: Example" . Partition p1 of that index was dropped in "Dropping an Index Partition: Example" . The first statement marks the marks index partition p2 as UNUSABLE:

ALTER INDEX cost_ix
   MODIFY PARTITION p2 UNUSABLE;

The next statement marks the entire index cost_ix as UNUSABLE:

ALTER INDEX cost_ix UNUSABLE;
Rebuilding Unusable Index Partitions: Example

The following statements rebuild partitions p2 and p3 of the cost_ix index, making the index once more usable: The rebuilding of partition p3 will not be logged:

ALTER INDEX cost_ix
   REBUILD PARTITION p2;
ALTER INDEX cost_ix
   REBUILD PARTITION p3 NOLOGGING;
Changing MAXEXTENTS: Example

The following statement changes the maximum number of extents for partition p3 and changes the logging attribute:

/* This example will fail if the tablespace in which partition p3
   resides is locally managed.
*/
ALTER INDEX cost_ix MODIFY PARTITION p3
   STORAGE(MAXEXTENTS 30) LOGGING;
Renaming an Index Partition: Example

The following statement renames an index partition of the cost_ix index (created in "Creating a Global Partitioned Index: Example" ):

ALTER INDEX cost_ix
   RENAME PARTITION p3 TO p3_Q3;
Splitting a Partition: Example

The following statement splits partition p2 of index cost_ix (created in "Creating a Global Partitioned Index: Example" ) into p2a and p2b:

ALTER INDEX cost_ix
   SPLIT PARTITION p2 AT (1500)
   INTO ( PARTITION p2a TABLESPACE tbs_01 LOGGING,
          PARTITION p2b TABLESPACE tbs_02);
Dropping an Index Partition: Example

The following statement drops index partition p1 from the cost_ix index:

ALTER INDEX cost_ix
   DROP PARTITION p1;
Modifying Default Attributes: Example

The following statement alters the default attributes of local partitioned index prod_idx, which was created in "Creating an Index on a Hash-Partitioned Table: Example." . New partitions added in the future will use 5 initial transaction entries and an incremental extent of 100K:

ALTER INDEX prod_idx
      MODIFY DEFAULT ATTRIBUTES INITRANS 5 STORAGE (NEXT 100K);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 9 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER INDEXTYPE

Purpose

Use the ALTER INDEXTYPE statement to add or drop an operator of the indextype or to modify the implementation type or change the properties of the indextype.

Prerequisites

To alter an indextype in your own or another schema, you must have the ALTER ANY INDEXTYPE system privilege.

To add a new operator, you must have the EXECUTE object privilege on the operator.

To change the implementation type, you must have the EXECUTE object privilege on the new implementation type.

Syntax

alter_indextype::=

Text description of statements_167.gif follows
Text description of alter_indextype

using_type_clause::=

Text description of statements_168.gif follows
Text description of using_type_clause

Semantics

schema

Specify the name of the schema in which the indextype resides. If you omit schema, Oracle assumes the indextype is in your own schema.

indextype

Specify the name of the indextype to be modified.

ADD | DROP

Use the ADD or DROP clause to add or drop an operator.

  • For schema, specify the schema containing the operator. If you omit schema, Oracle assumes the operator is in your own schema.
  • For operator, specify the name of the operator supported by the indextype.

    All the operators listed in this clause should be valid operators.

  • For parameter_type, list the types of parameters to the operator.

USING Clause

The USING clause lets you specify a new type to provide the implementation for the indextype.

COMPILE

Use this clause to recompile the indextype explicitly. This clause is required only after some upgrade operations, because Oracle normally recompiles the indextype automatically.

Examples

Altering an Indextype: Example

The following example adds another operator binding to the TextIndexType indextype created in the CREATE INDEXTYPE statement. TextIndexType can now support a new operator lob_contains with the bindings(CLOB, CLOB):

ALTER INDEXTYPE TextIndexType ADD lob_contains(CLOB, CLOB);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 10 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER JAVA

Purpose

Use the ALTER JAVA statement to force the resolution of a Java class schema object or compilation of a Java source schema object. (You cannot call the methods of a Java class before all its external references to Java names are associated with other classes.)

See Also:

Oracle9i Java Stored Procedures Developer's Guide for more information on resolving Java classes and compiling Java sources

Prerequisites

The Java source or class must be in your own schema, or you must have the ALTER ANY PROCEDURE system privilege. You must also have the EXECUTE object privilege on Java classes.

Syntax

alter_java::=

Text description of statements_165.gif follows
Text description of alter_java

invoker_rights_clause::=

Text description of statements_166.gif follows
Text description of invoker_rights_clause

Semantics

JAVA SOURCE

Use ALTER JAVA SOURCE to compile a Java source schema object.

JAVA CLASS

Use ALTER JAVA CLASS to resolve a Java class schema object.

object_name

Specify a previously created Java class or source schema object. Use double quotation marks to preserve lower- or mixed-case names.

RESOLVER

The RESOLVER clause lets you specify how schemas are searched for referenced fully specified Java names, using the mapping pairs specified when the Java class or source was created.

See Also:

CREATE JAVA and "Resolving a Java Class: Example"

RESOLVE | COMPILE

RESOLVE and COMPILE are synonymous keywords. They let you specify that Oracle should attempt to resolve the primary Java class schema object.

  • When applied to a class, resolution of referenced names to other class schema objects occurs.
  • When applied to a source, source compilation occurs.

invoker_rights_clause

The invoker_rights_clause lets you specify whether the methods of the class execute with the privileges and in the schema of the user who defined it or with the privileges and in the schema of CURRENT_USER.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the member functions and procedures of the type.

AUTHID CURRENT_USER

Specify CURRENT_USER if you want the methods of the class to execute with the privileges of CURRENT_USER. This clause is the default and creates an "invoker-rights class."

This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the methods reside.

AUTHID DEFINER

Specify DEFINER if you want the methods of the class to execute with the privileges of the user who defined it.

This clause also specifies that external names resolve in the schema where the methods reside.

See Also:
  • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined
  • Oracle9i Java Stored Procedures Developer's Guide

Example

Resolving a Java Class: Example

The following statement forces the resolution of a Java class:

ALTER JAVA CLASS "Agent"
   RESOLVER (("/home/java/bin/*" pm)(* public))
   RESOLVE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 11 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER MATERIALIZED VIEW

Purpose

A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views. Collectively these are called master tables (a replication term) or detail tables (a data warehouse term). This reference uses "master tables" for consistency. The databases containing the master tables are called the master databases.

Use the ALTER MATERIALIZED VIEW statement to modify an existing materialized view in one or more of the following ways:

  • To change its storage characteristics
  • To change its refresh method, mode, or time
  • To alter its structure so that it is a different type of materialized view
  • To enable or disable query rewrite.

    Note:

    The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.
    See Also:
    • CREATE MATERIALIZED VIEW for more information on creating materialized views
    • Oracle9i Advanced Replication for information on materialized views in a replication environment
    • Oracle9i Data Warehousing Guide for information on materialized views in a data warehousing environment

Prerequisites

The privileges required to alter a materialized view should be granted directly, as follows:

The materialized view must be in your own schema, or you must have the ALTER ANY MATERIALIZED VIEW system privilege.

To enable a materialized view for query rewrite:

  • If all of the master tables in the materialized view are in your schema, you must have the QUERY REWRITE privilege.
  • If any of the master tables are in another schema, you must have the GLOBAL QUERY REWRITE privilege.
  • If the materialized view is in another user's schema, both you and the owner of that schema must have the appropriate QUERY REWRITE privilege, as described in the preceding two items. In addition, the owner of the materialized view must have SELECT access to any master tables that the materialized view owner does not own.

    See Also:

    Oracle9i Advanced Replication and Oracle9i Data Warehousing Guide

Syntax

alter_materialized_view::=

Text description of statements_189.gif follows
Text description of alter_materialized_view

(physical_attributes_clause::= , data_segment_compression::= , LOB_storage_clause::= , modify_LOB_storage_clause::= , alter_table_partitioning -- part of ALTER TABLE syntax, parallel_clause::= , logging_clause::= , allocate_extent_clause::= )

physical_attributes_clause::=

Text description of statements_162.gif follows
Text description of physical_attributes_clause

(storage_clause::= )

data_segment_compression::=

Text description of statements_191.gif follows
Text description of data_segment_compression

LOB_storage_clause::=

Text description of statements_153.gif follows
Text description of LOB_storage_clause

LOB_parameters::=

Text description of statements_157.gif follows
Text description of LOB_parameters

(storage_clause::= , logging_clause::= )

modify_LOB_storage_clause::=

Text description of statements_155.gif follows
Text description of modify_LOB_storage_clause

modify_LOB_parameters::=

Text description of statements_186a.gif follows
Text description of modify_LOB_parameters

(storage_clause::= , logging_clause::= , allocate_extent_clause::= , deallocate_unused_clause::= )

parallel_clause::=

Text description of statements_190.gif follows
Text description of parallel_clause

logging_clause::=

Text description of statements_149.gif follows
Text description of logging_clause

allocate_extent_clause::=

Text description of statements_1a.gif follows
Text description of allocate_extent_clause

deallocate_unused_clause::=

Text description of statements_187.gif follows
Text description of deallocate_unused_clause

alter_iot_clauses::=

Text description of statements_184b.gif follows
Text description of alter_iot_clauses

(index_org_table_clause::= , alter_overflow_clause::= , alter_mapping_table_clauses: not supported with materialized views)

index_org_table_clause::=

Text description of statements_135.gif follows
Text description of index_org_table_clause

(mapping_table_clause: not supported with materialized views, key_compression: not supported with materialized views, index_org_overflow_clause::= )

index_org_overflow_clause::=

Text description of statements_137.gif follows
Text description of index_org_overflow_clause

alter_overflow_clause::=

Text description of statements_139.gif follows
Text description of alter_overflow_clause

(allocate_extent_clause::= , deallocate_unused_clause::= )

add_overflow_clause::=

Text description of statements_141.gif follows
Text description of add_overflow_clause

scoped_table_ref_constraint::=

Text description of statements_170.gif follows
Text description of scoped_table_ref_constraint

alter_mv_refresh::=

Text description of statements_12.gif follows
Text description of alter_mv_refresh

Semantics

schema

Specify the schema containing the materialized view. If you omit schema, Oracle assumes the materialized view is in your own schema.

materialized_view

Specify the name of the materialized view to be altered.

physical_attributes_clause

Specify new values for the PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters (or, when used in the USING INDEX clause, for the INITRANS and MAXTRANS parameters only) and the storage characteristics for the materialized view.

See Also:
  • ALTER TABLE for information on the PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters
  • storage_clause for information about storage characteristics

data_segment_compression

Use the data_segment_compression clause to instruct Oracle whether to compress data segments to reduce disk and memory use. The COMPRESS keyword enables data segment compression. The NOCOMPRESS keyword disables data segment compression.

See Also:

data_segment_compression clause of CREATE TABLE for more information on data segment compression

LOB_storage_clause

The LOB_storage_clause lets you specify the storage characteristics of a new LOB. LOB storage behaves for materialized views exactly as it does for tables.

See Also:

the LOB_storage_clause of CREATE TABLE for information on the LOB storage parameters

modify_LOB_storage_clause

The modify_LOB_storage_clause lets you modify the physical attributes of the LOB attribute lob_item or LOB object attribute. Modification of LOB storage behaves for materialized views exactly as it does for tables.

See Also:

the modify_LOB_storage_clause of ALTER TABLE for information on the LOB storage parameters that can be modified

alter_table_partitioning

The syntax and general functioning of the partitioning clauses for materialized views is the same as for partitioned tables.

See Also:

alter_table_partitioning

Restrictions on Altering Table Partitions
  • You cannot specify the LOB_storage_clause or modify_LOB_storage_clause within any of the partitioning_clauses.
  • If you attempt to drop, truncate, or exchange a materialized view partition, Oracle raises an error.

    Note:

    If you wish to keep the contents of the materialized view synchronized with those of the master table, Oracle Corporation recommends that you manually perform a complete refresh of all materialized views dependent on the table after dropping or truncating a table partition.
MODIFY PARTITION UNUSABLE LOCAL INDEXES

Use this clause to mark UNUSABLE all the local index partitions associated with partition.

MODIFY PARTITION REBUILD UNUSABLE LOCAL INDEXES

Use this clause to rebuild the unusable local index partitions associated with partition.

parallel_clause

The parallel_clause lets you change the default degree of parallelism for the materialized view.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

logging_clause

Specify or change the logging characteristics of the materialized view.

See Also:

logging_clause for a full description of this clause

allocate_extent_clause

The allocate_extent_clause lets you explicitly allocate a new extent for the materialized view.

See Also:

allocate_extent_clause for a full description of this clause

CACHE | NOCACHE

For data that will be accessed frequently, CACHE specifies that the blocks retrieved for this table are placed at the most recently used end of the LRU list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables. NOCACHE specifies that the blocks are placed at the least recently used end of the LRU list.

See Also:

ALTER TABLE for information about specifying CACHE or NOCACHE

alter_iot_clauses

Use the alter_iot_clauses to change the characteristics of an index-organized materialized view. The keywords and parameters of the components of the alter_iot_clauses have the same semantics as in ALTER TABLE, with the restrictions that follow.

Restrictions on Altering Index-organized Materialized Views

You cannot specify the mapping_table_clause or the key_compression clause of the index_org_table_clause.

See Also:

"index_org_table_clause" of CREATE MATERIALIZED VIEW for information on creating an index-organized materialized view

USING INDEX Clause

Use this clause to change the value of INITRANS, MAXTRANS, and STORAGE parameters for the index Oracle uses to maintain the materialized view's data.

Restriction on the USING INDEX clause

You cannot specify the PCTUSED or PCTFREE parameters in this clause.

MODIFY scoped_table_ref_constraint

Use the MODIFY scoped_table_ref_constraint clause to rescope a REF column or attribute to a new table.

Restrictions on Rescoping REF Columns

You can rescope only one REF column or attribute in each ALTER MATERIALIZED VIEW statement, and this must be the only clause in this statement.

REBUILD Clause

Specify REBUILD to regenerate refresh operations if a type that is referenced in materialized_view has evolved.

Restriction on the REBUILD clause

You cannot specify any other clause in the same ALTER MATERIALIZED VIEW statement.

alter_mv_refresh

Use the alter_mv_refresh to change the default method and mode and the default times for automatic refreshes. If the contents of a materialized view's master tables are modified, the data in the materialized view must be updated to make the materialized view accurately reflect the data currently in its master table(s). This clause lets you schedule the times and specify the method and mode for Oracle to refresh the materialized view.

Note:

This clause only sets the default refresh options. For instructions on actually implementing the refresh, refer to Oracle9i Advanced Replication and Oracle9i Data Warehousing Guide.
FAST Clause

Specify FAST for incremental refresh method, which performs the refresh according to the changes that have occurred to the master tables. The changes are stored either in the materialized view log associated with the master table (for conventional DML changes) or in the direct loader log (for direct-path INSERT operations).

For both conventional DML changes and for direct-path INSERTs, other conditions may restrict the eligibility of a materialized view for fast refresh.

See Also:
  • Oracle9i Advanced Replication for restrictions on fast refresh in replication environments
  • Oracle9i Data Warehousing Guide for restrictions on fast refresh in data warehouse environments
  • "Automatic Refresh: Examples"
Restrictions on FAST Refresh
  • When you specify FAST refresh at create time, Oracle verifies that the materialized view you are creating is eligible for fast refresh. When you change the refresh method to FAST in an ALTER MATERIALIZED VIEW statement, Oracle does not perform this verification. If the materialized view is not eligible for fast refresh, Oracle will return an error when you attempt to refresh this view.
  • Materialized views are not eligible for fast refresh if the defining query contains an analytic function.

    See Also:

    "Analytic Functions"

COMPLETE Clause

Specify COMPLETE for the complete refresh method, which is implemented by executing the materialized view's defining query. If you request a complete refresh, Oracle performs a complete refresh even if a fast refresh is possible.

See Also:

"Complete Refresh: Example"

FORCE Clause

Specify FORCE if, when a refresh occurs, you want Oracle to perform a fast refresh if one is possible or a complete refresh otherwise.

ON COMMIT Clause

Specify ON COMMIT if you want a fast refresh to occur whenever Oracle commits a transaction that operates on a master table of the materialized view.

Restriction on ON COMMIT

This clause is supported only for materialized join views and single-table materialized aggregate views.

See Also:

Oracle9i Advanced Replication and Oracle9i Data Warehousing Guide
ON DEMAND Clause

Specify ON DEMAND if you want the materialized view to be refreshed on demand by calling one of the three DBMS_MVIEW refresh procedures. If you omit both ON COMMIT and ON DEMAND, ON DEMAND is the default.

See Also:
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on these procedures
  • Oracle9i Data Warehousing Guide on the types of materialized views you can create by specifying REFRESH ON DEMAND
Note:

If you specify ON COMMIT or ON DEMAND, you cannot also specify START WITH or NEXT.
START WITH Clause

Specify START WITH date to indicate a date for the first automatic refresh time.

NEXT Clause

Specify NEXT to indicate a date expression for calculating the interval between automatic refreshes.

Both the START WITH and NEXT values must evaluate to a time in the future. If you omit the START WITH value, Oracle determines the first automatic refresh time by evaluating the NEXT expression with respect to the creation time of the materialized view. If you specify a START WITH value but omit the NEXT value, Oracle refreshes the materialized view only once. If you omit both the START WITH and NEXT values, or if you omit the alter_mv_refresh entirely, Oracle does not automatically refresh the materialized view.

WITH PRIMARY KEY Clause

Specify WITH PRIMARY KEY to change a rowid materialized view to a primary key materialized view. Primary key materialized views allow materialized view master tables to be reorganized without affecting the materialized view's ability to continue to fast refresh.

For you to specify this clause, the master table must contain an enabled primary key constraint and must have defined on it a materialized view log that logs primary key information.

See Also:
  • Oracle9i Advanced Replication for detailed information about primary key materialized views and Oracle9i Database Migration Guide for information on changing rowid materialized views to primary key materialized views
  • "Primary Key Materialized View: Example"
USING ROLLBACK SEGMENT Clause

Specify USING ROLLBACK SEGMENT to change the remote rollback segment to be used during materialized view refresh, where rollback_segment is the name of the rollback segment to be used.

See Also:

Oracle9i Advanced Replication for information on changing the local materialized view rollback segment using the DBMS_REFRESH package and "Changing Materialized View Rollback Segments: Examples"

DEFAULT

Specify DEFAULT if you want Oracle to choose the rollback segment to use. If you specify DEFAULT, you cannot specify rollback_segment.

MASTER ... rollback_segment

Specify the remote rollback segment to be used at the remote master for the individual materialized view. (To change the local materialized view rollback segment, use the DBMS_REFRESH package, described in Oracle9i Advanced Replication.)

One master rollback segment is stored for each materialized view and is validated during materialized view creation and refresh. If the materialized view is complex, the master rollback segment, if specified, is ignored.

QUERY REWRITE Clause

Use this clause to determine whether the materialized view is eligible to be used for query rewrite.

ENABLE Clause

Specify ENABLE to enable the materialized view for query rewrite.

See Also:

"Enabling Query Rewrite: Example"

Restrictions on Enabling Materialized Views
  • If the materialized view is in an invalid or unusable state, it is not eligible for query rewrite in spite of the ENABLE mode.
  • You cannot enable query rewrite if the materialized view was created totally or in part from a view.
  • You can enable query rewrite only if all user-defined functions in the materialized view are DETERMINISTIC.

    See Also:

    CREATE FUNCTION

  • You can enable query rewrite only if expressions in the statement are repeatable. For example, you cannot include CURRENT_TIME or USER.

    See Also:

    Oracle9i Data Warehousing Guide for more information on query rewrite
DISABLE Clause

Specify DISABLE if you do not want the materialized view to be eligible for use by query rewrite. (If a materialized view is in the invalid state, it is not eligible for use by query rewrite, whether or not it is disabled.) However, a disabled materialized view can be refreshed.

COMPILE

Specify COMPILE to explicitly revalidate a materialized view. If an object upon which the materialized view depends is dropped or altered, the materialized view remains accessible, but it is invalid for query rewrite. You can use this clause to explicitly revalidate the materialized view to make it eligible for query rewrite.

If the materialized view fails to revalidate, it cannot be refreshed or used for query rewrite.

See Also:

"Compiling a Materialized View: Example"

CONSIDER FRESH

This clause lets you manage the staleness state of a materialized after changes have been made to its master tables. CONSIDER FRESH directs Oracle to consider the materialized view fresh and therefore eligible for query rewrite in the TRUSTED or STALE_TOLERATED modes. Because Oracle cannot guarantee the freshness of the materialized view, query rewrite in ENFORCED mode is not supported. This clause also sets the staleness state of the materialized view to UNKNOWN. The staleness state is displayed in the STALENESS column of the ALL_MVIEWS, DBA_MVIEWS, and USER_MVIEWS data dictionary views.

Note:

A materialized view is stale if changes have been made to the contents of any of its master tables. This clause directs Oracle to assume that the materialized view is fresh and that no such changes have been made. Therefore, actual updates to those tables pending refresh are purged with respect to the materialized view.
See Also:

Oracle9i Data Warehousing Guide for more information on query rewrite and the implications of performing partition maintenance operations on master tables, and "CONSIDER FRESH: Example"

Examples

Automatic Refresh: Examples

The following statement changes the default refresh method for the sales_by_month_by_state materialized view (created in "Creating Materialized Aggregate Views: Example" ) to FAST:

ALTER MATERIALIZED VIEW sales_by_month_by_state
   REFRESH FAST;

The next automatic refresh of the materialized view will be a fast refresh provided it is a simple materialized view and its master table has a materialized view log that was created before the materialized view was created or last refreshed.

Because the REFRESH clause does not specify START WITH or NEXT values, Oracle will use the refresh intervals established by the REFRESH clause when the sales_by_month_by_state materialized view was created or last altered.

The following statement stores a new interval between automatic refreshes for the sales_by_month_by_state materialized view:

ALTER MATERIALIZED VIEW sales_by_month_by_state
   REFRESH NEXT SYSDATE+7;

Because the REFRESH clause does not specify a START WITH value, the next automatic refresh occurs at the time established by the START WITH and NEXT values specified when the sales_by_month_by_state materialized view was created or last altered.

At the time of the next automatic refresh, Oracle refreshes the materialized view, evaluates the NEXT expression SYSDATE+7 to determine the next automatic refresh time, and continues to refresh the materialized view automatically once a week. Because the REFRESH clause does not explicitly specify a refresh method, Oracle continues to use the refresh method specified by the REFRESH clause of the CREATE MATERIALIZED VIEW or most recent ALTER MATERIALIZED VIEW statement.

CONSIDER FRESH: Example

The following statement instructs Oracle that materialized view sales_by_month_by_state should be considered fresh. This statement allows sales_by_month_by_state to be eligible for query rewrite in TRUSTED mode even after you have performed partition maintenance operations on the master tables of sales_by_month_by_state:

ALTER MATERIALIZED VIEW sales_by_month_by_state CONSIDER FRESH;
See Also:

Splitting Table Partitions: Examples for a partitioning maintenance example that would require this ALTER MATERIALIZED VIEW example
Complete Refresh: Example

The following statement specifies a new refresh method, a new NEXT refresh time, and a new interval between automatic refreshes of the emp_data materialized view (created in "Periodic Refresh of Materialized Views: Example" ):

ALTER MATERIALIZED VIEW emp_data
   REFRESH COMPLETE
   START WITH TRUNC(SYSDATE+1) + 9/24
   NEXT SYSDATE+7;

The START WITH value establishes the next automatic refresh for the materialized view to be 9:00 a.m. tomorrow. At that point, Oracle performs a complete refresh of the materialized view, evaluates the NEXT expression, and subsequently refreshes the materialized view every week.

Enabling Query Rewrite: Example

The following statement enables query rewrite on the materialized view mv1 and implicitly revalidates it:

ALTER MATERIALIZED VIEW emp_data
   ENABLE QUERY REWRITE;
Changing Materialized View Rollback Segments: Examples

The following statement changes the remote master rollback segment used during materialized view refresh to rbs_two:

ALTER MATERIALIZED VIEW new_employees
   REFRESH USING MASTER ROLLBACK SEGMENT rbs_two;

The following statement changes the remote master rollback segment used during materialized view refresh to one chosen by Oracle:

ALTER MATERIALIZED VIEW new_employees
   REFRESH USING DEFAULT MASTER ROLLBACK SEGMENT;
Primary Key Materialized View: Example

The following statement changes the rowid materialized view order_data (created in "Creating Rowid Materialized Views: Example" ) to a primary key materialized view. This example requires that you have already defined a materialized view log with a primary key on order_data.

ALTER MATERIALIZED VIEW order_data
   REFRESH WITH PRIMARY KEY;
Compiling a Materialized View: Example

The following statement revalidates the materialized view store_mv:

ALTER MATERIALIZED VIEW order_data COMPILE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 12 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER MATERIALIZED VIEW LOG

Purpose

Use the ALTER MATERIALIZED VIEW LOG statement to alter the storage characteristics, refresh mode or time, or type of an existing materialized view log. A materialized view log is a table associated with the master table of a materialized view.

Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.
See Also:
  • CREATE MATERIALIZED VIEW LOG for information on creating a materialized view log
  • ALTER MATERIALIZED VIEW for more information on materialized views, including refreshing them
  • CREATE MATERIALIZED VIEW for a description of the various types of materialized views

Prerequisites

Only the owner of the master table or a user with the SELECT privilege on the master table and the ALTER privilege on the materialized view log can alter a materialized view log.

See Also:

Oracle9i Advanced Replication for detailed information about the prerequisites for ALTER MATERIALIZED VIEW LOG

Syntax

alter_materialized_view_log::=

Text description of statements_15.gif follows
Text description of alter_materialized_view_log

(physical_attributes_clause::= , alter_table_partitioning -- part of ALTER TABLE syntax, parallel_clause::= , logging_clause::= , allocate_extent_clause::= , new_values_clause::= ),

new_values_clause::=

Text description of statements_17.gif follows
Text description of new_values_clause

physical_attributes_clause::=

Text description of statements_19.gif follows
Text description of physical_attributes_clause

(storage_clause::= )

allocate_extent_clause::=

Text description of statements_111.gif follows
Text description of allocate_extent_clause

parallel_clause::=

Text description of statements_169.gif follows
Text description of parallel_clause

Semantics

schema

Specify the schema containing the master table. If you omit schema, Oracle assumes the materialized view log is in your own schema.

table

Specify the name of the master table associated with the materialized view log to be altered.

physical_attributes_clause

The physical_attributes_clause lets you change the value of PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters and storage characteristics for the table, the partition, the overflow data segment, or the default characteristics of a partitioned table.

Restriction on Materialized View Physical Attributes

You cannot use the storage_clause to modify extent parameters if the materialized view log resides in a locally managed tablespace.

See Also:

CREATE TABLE for a description of these parameters

alter_table_partitioning

The syntax and general functioning of the partitioning clauses is the same as described for the ALTER TABLE statement.

Restrictions on Altering Materialized View Partitions
  • You cannot use the LOB_storage_clause or modify_LOB_storage_clause when modifying partitions of a materialized view log.
  • If you attempt to drop, truncate, or exchange a materialized view log partition, Oracle raises an error.

    See Also:

    alter_table_partitioning

parallel_clause

The parallel_clause lets you specify whether parallel operations will be supported for the materialized view log.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

logging_clause

Specify the logging attribute of the materialized view log.

See Also:

logging_clause for a full description of this clause

allocate_extent_clause

Use the allocate_extent_clause to explicitly allocate a new extent for the materialized view log.

See Also:

allocate_extent_clause for a full description of this clause

CACHE | NOCACHE Clause

For data that will be accessed frequently, CACHE specifies that the blocks retrieved for this log are placed at the most recently used end of the LRU list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables. NOCACHE specifies that the blocks are placed at the least recently used end of the LRU list.

See Also:

CREATE TABLE for information about specifying CACHE or NOCACHE

ADD Clause

The ADD clause lets you augment the materialized view log so that it records the primary key values, rowid values, or object ID values when rows in the materialized view master table are changed. This clause can also be used to record additional columns.

To stop recording any of this information, you must first drop the materialized view log and then re-create it. Dropping the materialized view log and then re-creating it forces each of the existing materialized views that depend on the master table to complete refresh on its next refresh.

Restriction on Augmenting Materialized View Logs

You can specify only one PRIMARY KEY, one ROWID, one OBJECT ID and one column list for each materialized view log. Therefore, if any of these three values were specified at create time (either implicitly or explicitly), you cannot specify those values in this ALTER statement.

OBJECT ID

Specify OBJECT ID if you want the appropriate object identifier of all rows that are changed to be recorded in the materialized view log.

Restriction on the OBJECT ID clause

You can specify OBJECT ID only for logs on object tables, and you cannot specify it for storage tables.

PRIMARY KEY

Specify PRIMARY KEY if you want the primary key values of all rows that are changed to be recorded in the materialized view log.

ROWID

Specify ROWID if you want the rowid values of all rows that are changed to be recorded in the materialized view log.

column

Specify the additional columns whose values you want to be recorded in the materialized view log for all rows that are changed. Typically these columns are filter columns (non-primary-key columns referenced by materialized views) and join columns (non-primary-key columns that define a join in the WHERE clause of the subquery).

See Also:
  • CREATE MATERIALIZED VIEW for details on explicit and implicit inclusion of materialized view log values
  • Oracle9i Advanced Replication for more information about filter columns and join columns
  • "Rowid Materialized View Log: Example"

NEW VALUES Clause

The NEW VALUES clause lets you specify whether Oracle saves both old and new values in the materialized view log. The value you set in this clause applies to all columns in the log, not only to primary key, rowid, or columns you may have added in this ALTER MATERIALIZED VIEW LOG statement.

INCLUDING

Specify INCLUDING to save both new and old values in the log. If this log is for a table on which you have a single-table materialized aggregate view, and if you want the materialized view to be eligible for fast refresh, you must specify INCLUDING.

EXCLUDING

Specify EXCLUDING to disable the recording of new values in the log. You can use this clause to avoid the overhead of recording new values.

If you have a fast-refreshable single-table materialized aggregate view defined on this table, do not specify EXCLUDING NEW VALUES unless you first change the refresh mode of the materialized view to something other than FAST.

See Also:

"Materialized View Log EXCLUDING NEW VALUES: Example"

Examples

Rowid Materialized View Log: Example

The following statement alters an existing primary key materialized view log to also record rowid information:

ALTER MATERIALIZED VIEW LOG ON order_items ADD ROWID;
Materialized View Log EXCLUDING NEW VALUES: Example

The following statement alters the materialized view log on hr.employees by adding a filter column and excluding new values. Any materialized aggregate views that use this log will no longer be fast refreshable. However, if fast refresh is no longer needed, this action avoids the overhead of recording new values:

ALTER MATERIALIZED VIEW LOG ON employees
   ADD (commission_pct)
   EXCLUDING NEW VALUES;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 13 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER OPERATOR

Purpose

Use the ALTER OPERATOR statement to compile an existing operator.

See Also:

CREATE OPERATOR

Prerequisites

The operator must be in your own or another schema, or you must have the ALTER ANY OPERATOR system privilege.

Syntax

alter_operator::=

Text description of statements_145.gif follows
Text description of alter_operator

Semantics

schema

Specify the schema containing the operator. If you omit this clause, Oracle assumes the operator is in your own schema.

operator

Specify the name of the operator to be recompiled.

COMPILE

Specify COMPILE to cause Oracle to recompile the operator. The COMPILE keyword is required.

Examples

Compiling a User-defined Operator: Example

The following example compiles the operator eq_op (which was created in "Creating User-Defined Operators: Example" ):

ALTER OPERATOR eq_op COMPILE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 14 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER OUTLINE

Purpose

Use the ALTER OUTLINE statement to rename a stored outline, reassign it to a different category, or regenerate it by compiling the outline's SQL statement and replacing the old outline data with the outline created under current conditions.

See Also:

CREATE OUTLINE and Oracle9i Database Performance Tuning Guide and Reference for more information on outlines

Prerequisites

To modify an outline, you must have the ALTER ANY OUTLINE system privilege.

Syntax

alter_outline::=

Text description of statements_113.gif follows
Text description of alter_outline

Semantics

PUBLIC | PRIVATE

Specify PUBLIC if you want to modify the public version of this outline. This is the default.

Specify PRIVATE if you want to modify the outline that is private to the current session and whose data is stored in the current parsing schema.

outline

Specify the name of the outline to be modified.

REBUILD

Specify REBUILD to regenerate the execution plan for outline using current conditions.

See Also:

"Rebuilding an Outline: Example"

RENAME TO Clause

Use the RENAME TO clause to specify an outline name to replace outline.

CHANGE CATEGORY TO Clause

Use the CHANGE CATEGORY TO clause to specify the name of the category into which the outline will be moved.

Example

Rebuilding an Outline: Example

The following statement regenerates a stored outline called salaries by compiling the outline's text and replacing the old outline data with the outline created under current conditions.

ALTER OUTLINE salaries REBUILD;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 15 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER PACKAGE

Purpose

Use the ALTER PACKAGE statement to explicitly recompile a package specification, body, or both. Explicit recompilation eliminates the need for implicit run-time recompilation and prevents associated run-time compilation errors and performance overhead.

Because all objects in a package are stored as a unit, the ALTER PACKAGE statement recompiles all package objects together. You cannot use the ALTER PROCEDURE statement or ALTER FUNCTION statement to recompile individually a procedure or function that is part of a package.

Note:

This statement does not change the declaration or definition of an existing package. To redeclare or redefine a package, use the CREATE PACKAGE or the CREATE PACKAGE BODY statement with the OR REPLACE clause.

Prerequisites

For you to modify a package, the package must be in your own schema or you must have ALTER ANY PROCEDURE system privilege.

Syntax

alter_package::=

Text description of statements_115.gif follows
Text description of alter_package

Semantics

schema

Specify the schema containing the package. If you omit schema, Oracle assumes the package is in your own schema.

package

Specify the name of the package to be recompiled.

COMPILE

You must specify COMPILE to recompile the package specification or body. The COMPILE keyword is required.

During recompilation, Oracle drops all persistent compiler switch settings, retrieves them again from the session, and stores them at the end of compilation. To avoid this process, specify the REUSE SETTINGS clause.

If recompiling the package results in compilation errors, Oracle returns an error and the body remains invalid. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

See Also:

"Recompiling a Package: Examples"

SPECIFICATION

Specify SPECIFICATION to recompile only the package specification, regardless of whether it is invalid. You might want to recompile a package specification to check for compilation errors after modifying the specification.

When you recompile a package specification, Oracle invalidates any local objects that depend on the specification, such as procedures that call procedures or functions in the package. The body of a package also depends on its specification. If you subsequently reference one of these dependent objects without first explicitly recompiling it, Oracle recompiles it implicitly at run time.

BODY

Specify BODY to recompile only the package body regardless of whether it is invalid. You might want to recompile a package body after modifying it. Recompiling a package body does not invalidate objects that depend upon the package specification.

When you recompile a package body, Oracle first recompiles the objects on which the body depends, if any of those objects are invalid. If Oracle recompiles the body successfully, the body becomes valid.

PACKAGE

Specify PACKAGE to recompile both the package specification and the package body if one exists, regardless of whether they are invalid. This is the default. The recompilation of the package specification and body lead to the invalidation and recompilation as described for SPECIFICATION and BODY.

See Also:

Oracle9i Database Concepts for information on how Oracle maintains dependencies among schema objects, including remote objects
DEBUG

Specify DEBUG to instruct the PL/SQL compiler to generate and store the code for use by the PL/SQL debugger.

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for information on debugging packages
REUSE SETTINGS

Specify REUSE SETTINGS to prevent Oracle from dropping and reacquiring compiler switch settings. With this clause, Oracle preserves the existing settings and uses them for the recompilation.

If you specify both DEBUG and REUSE SETTINGS, Oracle sets the persistently stored value of the PLSQL_COMPILER_FLAGS parameter to INTERPRETED, DEBUG. No other compiler switch values are changed.

See Also:

PL/SQL User's Guide and Reference and Oracle9i Application Developer's Guide - Fundamentals for more information on the interaction of the PLSQL_COMPILER_FLAGS parameter with the COMPILE clause

Examples

Recompiling a Package: Examples

This statement explicitly recompiles the specification and body of the hr.emp_mgmt package that was created in "Creating a Package: Example" :

ALTER PACKAGE emp_mgmt
   COMPILE PACKAGE;

If Oracle encounters no compilation errors while recompiling the accounting specification and body, emp_mgmt becomes valid. The user hr can subsequently call or reference all package objects declared in the specification of emp_mgmt without run-time recompilation. If recompiling emp_mgmt results in compilation errors, Oracle returns an error and emp_mgmt remains invalid.

Oracle also invalidates all objects that depend upon emp_mgmt. If you subsequently reference one of these objects without explicitly recompiling it first, Oracle recompiles it implicitly at run time.

To recompile the body of the emp_mgmt package in the schema hr, issue the following statement:

ALTER PACKAGE hr.emp_mgmt
   COMPILE BODY;

If Oracle encounters no compilation errors while recompiling the package body, the body becomes valid. The user hr can subsequently call or reference all package objects declared in the specification of emp_mgmt without run-time recompilation. If recompiling the body results in compilation errors, Oracle returns an error message and the body remains invalid.

Because this statement recompiles the body and not the specification of emp_mgmt, Oracle does not invalidate dependent objects.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 16 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER PROCEDURE

Purpose

Use the ALTER PROCEDURE statement to explicitly recompile a standalone stored procedure. Explicit recompilation eliminates the need for implicit run-time recompilation and prevents associated run-time compilation errors and performance overhead.

To recompile a procedure that is part of a package, recompile the entire package using the ALTER PACKAGE statement (see ALTER PACKAGE ).

Note:

This statement does not change the declaration or definition of an existing procedure. To redeclare or redefine a procedure, use the CREATE PROCEDURE statement with the OR REPLACE clause (see CREATE PROCEDURE ).

The ALTER PROCEDURE statement is quite similar to the ALTER FUNCTION statement.

See Also:

ALTER FUNCTION

Prerequisites

The procedure must be in your own schema or you must have ALTER ANY PROCEDURE system privilege.

Syntax

alter_procedure::=

Text description of statements_117.gif follows
Text description of alter_procedure

Semantics

schema

Specify the schema containing the procedure. If you omit schema, Oracle assumes the procedure is in your own schema.

procedure

Specify the name of the procedure to be recompiled.

COMPILE

Specify COMPILE to recompile the procedure. The COMPILE keyword is required. Oracle recompiles the procedure regardless of whether it is valid or invalid.

  • Oracle first recompiles objects upon which the procedure depends, if any of those objects are invalid.
  • Oracle also invalidates any local objects that depend upon the procedure, such as procedures that call the recompiled procedure or package bodies that define procedures that call the recompiled procedure.
  • If Oracle recompiles the procedure successfully, the procedure becomes valid. If recompiling the procedure results in compilation errors, then Oracle returns an error and the procedure remains invalid. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

During recompilation, Oracle drops all persistent compiler switch settings, retrieves them again from the session, and stores them at the end of compilation. To avoid this process, specify the REUSE SETTINGS clause.

See Also:

Oracle9i Database Concepts for information on how Oracle maintains dependencies among schema objects, including remote objects and "Recompiling a Procedure: Example"

DEBUG

Specify DEBUG to instruct the PL/SQL compiler to generate and store the code for use by the PL/SQL debugger.

See Also:

Oracle9i Application Developer's Guide - Fundamentals for information on debugging procedures
REUSE SETTINGS

Specify REUSE SETTINGS to prevent Oracle from dropping and reacquiring compiler switch settings. With this clause, Oracle preserves the existing settings and uses them for the recompilation.

If you specify both DEBUG and REUSE SETTINGS, Oracle sets the persistently stored value of the PLSQL_COMPILER_FLAGS parameter to INTERPRETED, DEBUG. No other compiler switch values are changed.

See Also:

PL/SQL User's Guide and Reference and Oracle9i Application Developer's Guide - Fundamentals for more information on the interaction of the PLSQL_COMPILER_FLAGS parameter with the COMPILE clause

Example

Recompiling a Procedure: Example

To explicitly recompile the procedure remove_emp owned by the user hr, issue the following statement:

ALTER PROCEDURE hr.remove_emp
   COMPILE;

If Oracle encounters no compilation errors while recompiling credit, credit becomes valid. Oracle can subsequently execute it without recompiling it at run time. If recompiling credit results in compilation errors, Oracle returns an error and credit remains invalid.

Oracle also invalidates all dependent objects. These objects include any procedures, functions, and package bodies that call credit. If you subsequently reference one of these objects without first explicitly recompiling it, Oracle recompiles it implicitly at run time.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 17 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER PROFILE

Purpose

Use the ALTER PROFILE statement to add, modify, or remove a resource limit or password management parameter in a profile.

Changes made to a profile with an ALTER PROFILE statement affect users only in their subsequent sessions, not in their current sessions.

See Also:

CREATE PROFILE for information on creating a profile

Prerequisites

You must have ALTER PROFILE system privilege to change profile resource limits. To modify password limits and protection, you must have ALTER PROFILE and ALTER USER system privileges.

Syntax

alter_profile::=

Text description of statements_119.gif follows
Text description of alter_profile

resource_parameters::=

Text description of statements_121.gif follows
Text description of resource_parameters

password_parameters::=

Text description of statements_123.gif follows
Text description of password_parameters

Semantics

The keywords, parameters, and clauses in the ALTER PROFILE statement all have the same meaning as in the CREATE PROFILE statement.

Note:

You cannot remove a limit from the DEFAULT profile.
See Also:

CREATE PROFILE and the examples in the next section

Examples

Making a Password Unavailable: Example

The following statement makes the password of the new_profile profile (created in "Creating a Profile: Example" ) unavailable for reuse for 90 days:

ALTER PROFILE new_profile
   LIMIT PASSWORD_REUSE_TIME 90
   PASSWORD_REUSE_MAX UNLIMITED;
Setting Default Password Values: Example

The following statement defaults the PASSWORD_REUSE_TIME value of the app_user profile (created in "Setting Profile Password Limits: Example" ) to its defined value in the DEFAULT profile:

ALTER PROFILE app_user
   LIMIT PASSWORD_REUSE_TIME DEFAULT
   PASSWORD_REUSE_MAX UNLIMITED;
Limiting Login Attempts and Password Lock Time: Example

The following statement alters profile app_user with FAILED_LOGIN_ATTEMPTS set to 5 and PASSWORD_LOCK_TIME set to 1:

ALTER PROFILE app_user LIMIT
   FAILED_LOGIN_ATTEMPTS 5
   PASSWORD_LOCK_TIME 1;

This statement causes app_user's account to become locked for 1 day after 5 unsuccessful login attempts.

Changing Password Lifetime and Grace Period: Example

The following statement modifies profile app_user2 PASSWORD_LIFE_TIME to 90 days and PASSWORD_GRACE_TIME to 5 days:

ALTER PROFILE app_user2 LIMIT
   PASSWORD_LIFE_TIME 90
   PASSWORD_GRACE_TIME 5;
Limiting Concurrent Sessions: Example

This statement defines a new limit of 5 concurrent sessions for the app_user profile:

ALTER PROFILE app_user LIMIT SESSIONS_PER_USER 5;

If the engineer profile does not currently define a limit for SESSIONS_PER_USER, the preceding statement adds the limit of 5 to the profile. If the profile already defines a limit, the preceding statement redefines it to 5. Any user assigned the engineer profile is subsequently limited to 5 concurrent sessions.

Removing Profile Limits: Example

This statement removes the IDLE_TIME limit from the app_user profile:

ALTER PROFILE app_user LIMIT IDLE_TIME DEFAULT;

Any user assigned the app_user profile is subject in their subsequent sessions to the IDLE_TIME limit defined in the DEFAULT profile.

Limiting Profile Idle Time: Example

This statement defines a limit of 2 minutes of idle time for the DEFAULT profile:

ALTER PROFILE default LIMIT IDLE_TIME  2;

This IDLE_TIME limit applies to these users:

  • Users who are not explicitly assigned any profile
  • Users who are explicitly assigned a profile that does not define an IDLE_TIME limit

This statement defines unlimited idle time for the app_user2 profile:

ALTER PROFILE app_user2 LIMIT IDLE_TIME UNLIMITED;

Any user assigned the app_user2 profile is subsequently permitted unlimited idle time.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 18 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER RESOURCE COST

Purpose

Use the ALTER RESOURCE COST statement to specify or change the formula by which Oracle calculates the total resource cost used in a session.

Although Oracle monitors the use of other resources, only the four resources shown in the syntax can contribute to the total resource cost for a session.

Once you have specified a formula for the total resource cost, you can limit this cost for a session with the COMPOSITE_LIMIT parameter of the CREATE PROFILE statement. If a session's cost exceeds the limit, Oracle aborts the session and returns an error. If you use the ALTER RESOURCE COST statement to change the weight assigned to each resource, Oracle uses these new weights to calculate the total resource cost for all current and subsequent sessions.

See Also:

CREATE PROFILE for information on all resources and on establishing resource limits

Prerequisites

You must have ALTER RESOURCE COST system privilege.

Syntax

alter_resource_cost::=

Text description of statements_125.gif follows
Text description of alter_resource_cost

Semantics

CPU_PER_SESSION

Specify the amount of CPU time that can be used by a session measured in hundredth of seconds.

CONNECT_TIME

Specify the elapsed time allowed for a session measured in minutes.

LOGICAL_READS_PER_SESSION

Specify the number of data blocks that can be read during a session, including blocks read from both memory and disk.

PRIVATE_SGA

Specify the number of bytes of private space in the system global area (SGA) that can be used by a session. This limit applies only if you are using Shared Server architecture and allocating private space in the SGA for your session.

integer

Specify the weight of each resource. The weight that you assign to each resource determines how much the use of that resource contributes to the total resource cost. If you do not assign a weight to a resource, the weight defaults to 0, and use of the resource subsequently does not contribute to the cost. The weights you assign apply to all subsequent sessions in the database.

Oracle calculates the total resource cost by first multiplying the amount of each resource used in the session by the resource's weight, and then summing the products for all four resources. For any session, this cost is limited by the value of the COMPOSITE_LIMIT parameter in the user's profile. Both the products and the total cost are expressed in units called service units.

Example

Altering Resource Costs: Examples

The following statement assigns weights to the resources CPU_PER_SESSION and CONNECT_TIME:

ALTER RESOURCE COST
   CPU_PER_SESSION 100
   CONNECT_TIME      1;

The weights establish this cost formula for a session:

cost = (100 * CPU_PER_SESSION) + (1 * CONNECT_TIME)

where the values of CPU_PER_SESSION and CONNECT_TIME are either values in the DEFAULT profile or in the profile of the user of the session.

Because the preceding statement assigns no weight to the resources LOGICAL_READS_PER_SESSION and PRIVATE_SGA, these resources do not appear in the formula.

If a user is assigned a profile with a COMPOSITE_LIMIT value of 500, a session exceeds this limit whenever cost exceeds 500. For example, a session using 0.04 seconds of CPU time and 101 minutes of elapsed time exceeds the limit. A session using 0.0301 seconds of CPU time and 200 minutes of elapsed time also exceeds the limit.

You can subsequently change the weights with another ALTER RESOURCE statement:

ALTER RESOURCE COST
   LOGICAL_READS_PER_SESSION 2
   CONNECT_TIME 0;

These new weights establish a new cost formula:

cost = (100 * CPU_PER_SESSION) + (2 * LOGICAL_READ_PER_SECOND)

where the values of CPU_PER_SESSION and LOGICAL_READS_PER_SECOND are either the values in the DEFAULT profile or in the profile of the user of this session.

This ALTER RESOURCE COST statement changes the formula in these ways:

  • The statement omits a weight for the CPU_PER_SESSION resource and the resource was already assigned a weight, so the resource remains in the formula with its original weight.
  • The statement assigns a weight to the LOGICAL_READS_PER_SESSION resource, so this resource now appears in the formula.
  • The statement assigns a weight of 0 to the CONNECT_TIME resource, so this resource no longer appears in the formula.
  • The statement omits a weight for the PRIVATE_SGA resource and the resource was not already assigned a weight, so the resource still does not appear in the formula.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 19 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER ROLE

Purpose

Use the ALTER ROLE statement to change the authorization needed to enable a role.

See Also:
  • CREATE ROLE for information on creating a role
  • SET ROLE for information on enabling or disabling a role for your session

Prerequisites

You must either have been granted the role with the ADMIN OPTION or have ALTER ANY ROLE system privilege.

Before you alter a role to IDENTIFIED GLOBALLY, you must:

  • Revoke all grants of roles identified externally to the role and
  • Revoke the grant of the role from all users, roles, and PUBLIC.

The one exception to this rule is that you should not revoke the role from the user who is currently altering the role.

Syntax

alter_role::=

Text description of statements_127.gif follows
Text description of alter_role

Semantics

The keywords, parameters, and clauses in the ALTER ROLE statement all have the same meaning as in the CREATE ROLE statement.

Notes:
  • When you alter a role, user sessions in which the role is already enabled are not affected.
  • If you change a role identified by password to an application role (with the USING package clause), password information associated with the role is lost. Oracle will use the new authentication mechanism the next time the role is to be enabled.
  • If you have the ALTER ANY ROLE system privilege and you change a role that is IDENTIFIED GLOBALLY to IDENTIFIED BY password, IDENTIFIED EXTERNALLY, or NOT IDENTIFIED, then Oracle grants you the altered role with the ADMIN OPTION, as it would have if you had created the role identified nonglobally.
See Also:

CREATE ROLE and the examples that follow

Examples

Changing Role Identification: Example

The following statement changes the role warehouse_user (created in "Creating a Role: Example" ) to NOT IDENTIFIED:

ALTER ROLE warehouse_user NOT IDENTIFIED;
Changing a Role Password: Example

This statement changes the password on the dw_manager role (created in "Creating a Role: Example" ) to data:

ALTER ROLE dw_manager
   IDENTIFIED BY data;

Users granted the dw_manager role must subsequently enter the new password "data" to enable the role.

Application Roles: Example

The following example changes the dw_manager role to an application role using the hr.admin package:

ALTER ROLE dw_manager IDENTIFIED USING hr.admin;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 20 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER ROLLBACK SEGMENT

Purpose

Use the ALTER ROLLBACK SEGMENT statement to bring a rollback segment online or offline, change its storage characteristics, or shrink it to an optimal or specified size.

The information in this section assumes that your database is running in rollback undo mode (the UNDO_MANAGEMENT initialization parameter is set to MANUAL or not set at all).

If your database is running in Automatic Undo Management mode (the UNDO_MANAGEMENT initialization parameter is set to AUTO), then user-created rollback segments are irrelevant. In this case, Oracle returns an error in response to any CREATE ROLLBACK SEGMENT or ALTER ROLLBACK SEGMENT statement. To suppress these errors, set the UNDO_SUPPRESS_ERRORS parameter to TRUE.

See Also:
  • CREATE ROLLBACK SEGMENT for information on creating a rollback segment
  • Oracle9i Database Reference for information on the UNDO_MANAGEMENT and UNDO_SUPPRESS_ERRORS parameters

Prerequisites

You must have ALTER ROLLBACK SEGMENT system privilege.

Syntax

alter_rollback_segment::=

Text description of statements_129.gif follows
Text description of alter_rollback_segment

(storage_clause )

Semantics

rollback_segment

Specify the name of an existing rollback segment.

ONLINE

Specify ONLINE to bring the rollback segment online. When you create a rollback segment, it is initially offline and not available for transactions. This clause brings the rollback segment online, making it available for transactions by your instance. You can also bring a rollback segment online when you start your instance with the initialization parameter ROLLBACK_SEGMENTS.

See Also:

"Bringing a Rollback Segment Online: Example"

OFFLINE

Specify OFFLINE to take the rollback segment offline.

  • If the rollback segment does not contain any information needed to roll back an active transaction, Oracle takes it offline immediately.
  • If the rollback segment does contain information for active transactions, Oracle makes the rollback segment unavailable for future transactions and takes it offline after all the active transactions are committed or rolled back.

Once the rollback segment is offline, it can be brought online by any instance.

To see whether a rollback segment is online or offline, query the data dictionary view DBA_ROLLBACK_SEGS. Online rollback segments have a STATUS value of IN_USE. Offline rollback segments have a STATUS value of AVAILABLE.

Restriction on Taking Rollback Segments Offline

You cannot take the SYSTEM rollback segment offline.

See Also:

Oracle9i Database Administrator's Guide for more information on making rollback segments available and unavailable

storage_clause

Use the storage_clause to change the rollback segment's storage characteristics.

Restriction on Rollback Segment Storage

You cannot change the values of the INITIAL and MINEXTENTS for an existing rollback segment.

See Also:

storage_clause for syntax and additional information "Changing Rollback Segment Storage: Example"

SHRINK Clause

Specify SHRINK if you want Oracle to attempt to shrink the rollback segment to an optimal or specified size. The success and amount of shrinkage depend on the available free space in the rollback segment and how active transactions are holding space in the rollback segment.

The value of integer is in bytes, unless you specify K or M for kilobytes or megabytes.

If you do not specify TO integer, then the size defaults to the OPTIMAL value of the storage_clause of the CREATE ROLLBACK SEGMENT statement that created the rollback segment. If OPTIMAL was not specified, then the size defaults to the MINEXTENTS value of the storage_clause of the CREATE ROLLBACK SEGMENT statement.

Regardless of whether you specify TO integer:

  • The value to which Oracle shrinks the rollback segment is valid for the execution of the statement. Thereafter, the size reverts to the OPTIMAL value of the CREATE ROLLBACK SEGMENT statement.
  • The rollback segment cannot shrink to less than two extents.

To determine the actual size of a rollback segment after attempting to shrink it, query the BYTES, BLOCKS, and EXTENTS columns of the DBA_SEGMENTS view.

Restriction on Shrinking Rollback Segments

In a Real Application Clusters environment, you can shrink only rollback segments that are online to your instance.

See Also:

"Resizing a Rollback Segment: Example"

Examples

Bringing a Rollback Segment Online: Example

This statement brings the rollback segment rbs_one online:

ALTER ROLLBACK SEGMENT rbs_one ONLINE;
Changing Rollback Segment Storage: Example

This statement changes the STORAGE parameters for rbs_one:

ALTER ROLLBACK SEGMENT rbs_one
   STORAGE (NEXT 1000 MAXEXTENTS 20);
Resizing a Rollback Segment: Example

This statement attempts to resize a rollback segment to 100 megabytes:

ALTER ROLLBACK SEGMENT rbs_one
   SHRINK TO 100 M;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 21 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER SEQUENCE

Purpose

Use the ALTER SEQUENCE statement to change the increment, minimum and maximum values, cached numbers, and behavior of an existing sequence. This statement affects only future sequence numbers.

See Also:

CREATE SEQUENCE for additional information on sequences

Prerequisites

The sequence must be in your own schema, or you must have the ALTER object privilege on the sequence, or you must have the ALTER ANY SEQUENCE system privilege.

Syntax

alter_sequence::=

Text description of statements_131.gif follows
Text description of alter_sequence

Semantics

The keywords and parameters in this statement serve the same purposes they serve when you create a sequence.

  • To restart the sequence at a different number, you must drop and re-create it.
  • If you change the INCREMENT BY value before the first invocation of NEXTVAL, some sequence numbers will be skipped. Therefore, if you want to retain the original START WITH value, you must drop the sequence and re-create it with the original START WITH value and the new INCREMENT BY value.
  • Oracle performs some validations. For example, a new MAXVALUE cannot be imposed that is less than the current sequence number.

    See Also:
    • CREATE SEQUENCE for information on creating a sequence
    • DROP SEQUENCE for information on dropping and re-creating a sequence

Examples

Modifying a Sequence: Examples

This statement sets a new maximum value for the customers_seq sequence:

ALTER SEQUENCE customers_seq
   MAXVALUE 1500;

This statement turns on CYCLE and CACHE for the customers_seq sequence:

ALTER SEQUENCE customers_seq
   CYCLE
   CACHE 5;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 3 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Organization of SQL Statements

All SQL statements in this chapter, as well as in Chapters 10 through 18, are organized into the following sections:

Syntax

The syntax diagrams show the keywords and parameters that make up the statement.

Caution:

Not all keywords and parameters are valid in all circumstances. Be sure to refer to the "Semantics" section of each statement and clause to learn about any restrictions on the syntax.
Purpose

The "Purpose" section describes the basic uses of the statement.

Prerequisites

The "Prerequisites" section lists privileges you must have and steps that you must take before using the statement. In addition to the prerequisites listed, most statements also require that the database be opened by your instance, unless otherwise noted.

Semantics

The "Semantics" section describes the purpose of the keywords, parameter, and clauses that make up the syntax, as well as restrictions and other usage notes that may apply to them. (The conventions for keywords and parameters used in this chapter are explained in the Preface of this reference.)

Examples

The "Examples" section shows how to use the various clauses and parameters of the statement.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: ALTER CLUSTER to ALTER SEQUENCE, 2 of 21

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Types of SQL Statements

The tables in the following sections provide a functional summary of SQL statements and are divided into these categories:

  • Data definition language (DDL) statements
  • Data manipulation language (DML) statements
  • Transaction control statements
  • Session control statements
  • System control statements

Data Definition Language (DDL) Statements

Data definition language (DDL) statements enable you to perform these tasks:

  • Create, alter, and drop schema objects
  • Grant and revoke privileges and roles
  • Analyze information on a table, index, or cluster
  • Establish auditing options
  • Add comments to the data dictionary

The CREATE, ALTER, and DROP commands require exclusive access to the specified object. For example, an ALTER TABLE statement fails if another user has an open transaction on the specified table.

The GRANT, REVOKE, ANALYZE, AUDIT, and COMMENT commands do not require exclusive access to the specified object. For example, you can analyze a table while other users are updating the table.

Oracle implicitly commits the current transaction before and after every DDL statement.

Many DDL statements may cause Oracle to recompile or reauthorize schema objects. For information on how Oracle recompiles and reauthorizes schema objects and the circumstances under which a DDL statement would cause this, see Oracle9i Database Concepts.

DDL statements are supported by PL/SQL with the use of the DBMS_SQL package.

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference

The DDL statements are:

ALTER ... (All statements beginning with ALTER)
ANALYZE
ASSOCIATE STATISTICS
AUDIT
COMMENT
CREATE ... (All statements beginning with CREATE)
DISASSOCIATE STATISTICS
DROP ... (All statements beginning with DROP)
GRANT
NOAUDIT
RENAME
REVOKE
TRUNCATE

Data Manipulation Language (DML) Statements

Data manipulation language (DML) statements query and manipulate data in existing schema objects. These statements do not implicitly commit the current transaction. The data manipulation language statements are:

CALL
DELETE
EXPLAIN PLAN
INSERT
LOCK TABLE
MERGE
SELECT
UPDATE

The CALL and EXPLAIN PLAN statements are supported in PL/SQL only when executed dynamically. All other DML statements are fully supported in PL/SQL.

Transaction Control Statements

Transaction control statements manage changes made by DML statements. The transaction control statements are:

COMMIT
ROLLBACK
SAVEPOINT
SET TRANSACTION

All transaction control statements, except certain forms of the COMMIT and ROLLBACK commands, are supported in PL/SQL. For information on the restrictions, see COMMIT and ROLLBACK .

Session Control Statements

Session control statements dynamically manage the properties of a user session. These statements do not implicitly commit the current transaction.

PL/SQL does not support session control statements. The session control statements are:

ALTER SESSION
SET ROLE

System Control Statement

The single system control statement, ALTER SYSTEM, dynamically manages the properties of an Oracle instance. This statement does not implicitly commit the current transaction and is not supported in PL/SQL.

Embedded SQL Statements

Embedded SQL statements place DDL, DML, and transaction control statements within a procedural language program. Embedded SQL is supported by the Oracle precompilers and is documented in the following books:

  • Pro*COBOL Precompiler Programmer's Guide
  • Pro*C/C++ Precompiler Programmer's Guide
  • SQL*Module for Ada Programmer's Guide
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: ALTER SESSION to ALTER SYSTEM, 1 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

10
SQL Statements: ALTER SESSION to ALTER SYSTEM

This chapter contains the following SQL statements:

  • ALTER SESSION
  • ALTER SYSTEM
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: ALTER SESSION to ALTER SYSTEM, 2 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER SESSION

Purpose

Use the ALTER SESSION statement to specify or modify any of the conditions or parameters that affect your connection to the database. The statement stays in effect until you disconnect from the database.

Prerequisites

To enable and disable the SQL trace facility, you must have ALTER SESSION system privilege.

To enable or disable resumable space allocation, you must have the RESUMABLE system privilege.

You do not need any privileges to perform the other operations of this statement unless otherwise indicated.

Syntax

alter_session::=

Text description of statements_27a.gif follows
Text description of alter_session

alter_session_set_clause::=

Text description of statements_22.gif follows
Text description of alter_session_set_clause

Semantics

ADVISE Clause

The ADVISE clause sends advice to a remote database to force a distributed transaction. The advice appears in the ADVICE column of the DBA_2PC_PENDING view on the remote database (the values are 'C' for COMMIT, 'R' for ROLLBACK, and ' ' for NOTHING). If the transaction becomes in doubt, then the administrator of that database can use this advice to decide whether to commit or roll back the transaction.

You can send different advice to different remote databases by issuing multiple ALTER SESSION statements with the ADVISE clause in a single transaction. Each such statement sends advice to the databases referenced in the following statements in the transaction until another such statement is issued.

See Also:

"Forcing a Distributed Transaction: Example"

CLOSE DATABASE LINK Clause

Specify CLOSE DATABASE LINK to close the database link dblink. When you issue a statement that uses a database link, Oracle creates a session for you on the remote database using that link. The connection remains open until you end your local session or until the number of database links for your session exceeds the value of the initialization parameter OPEN_LINKS. If you want to reduce the network overhead associated with keeping the link open, then use this clause to close the link explicitly if you do not plan to use it again in your session.

See Also:

Closing a Database Link: Example

ENABLE | DISABLE COMMIT IN PROCEDURE

Procedures and stored functions written in PL/SQL can issue COMMIT and ROLLBACK statements. If your application would be disrupted by a COMMIT or ROLLBACK statement not issued directly by the application itself, then specify DISABLE COMMIT IN PROCEDURE clause to prevent procedures and stored functions called during your session from issuing these statements.

You can subsequently allow procedures and stored functions to issue COMMIT and ROLLBACK statements in your session by issuing the ENABLE DISABLE COMMIT IN PROCEDURE.

Some applications (such as SQL*Forms) automatically prohibit COMMIT and ROLLBACK statements in procedures and stored functions. Refer to your application documentation for more information.

PARALLEL DML | DDL | QUERY

The PARALLEL parameter determines whether all subsequent DML, DDL, or query statements in the session will be considered for parallel execution. This clause enables you to override the degree of parallelism of tables during the current session without changing the tables themselves. Uncommitted transactions must either be committed or rolled back prior to executing this clause for DML.

See Also:

"Enabling Parallel DML: Example"

ENABLE Clause

Specify ENABLE to execute subsequent statements in the session in parallel. This is the default for DDL and query statements.

  • DML: The session's DML statements are executed in parallel mode if a parallel hint or a parallel clause is specified.
  • DDL: The session's DDL statements are executed in parallel mode if a parallel clause is specified.
  • QUERY: The session's queries are executed in parallel mode if a parallel hint or a parallel clause is specified
Restriction on the ENABLE clause

You cannot specify the optional PARALLEL integer with ENABLE.

DISABLE Clause

Specify DISABLE to execute subsequent statements serially. This is the default for DML statements.

  • DML: The session's DML statements are executed serially.
  • DDL: The session's DDL statements are executed serially.
  • QUERY: The session's queries are executed serially.
Restriction on the DISABLE clause

You cannot specify the optional PARALLEL integer with DISABLE.

FORCE Clause

FORCE forces parallel execution of subsequent statements in the session. If no parallel clause or hint is specified, then a default degree of parallelism is used. This clause overrides any parallel_clause specified in subsequent statements in the session, but is overridden by a parallel hint.

  • DML: Provided no parallel DML restrictions are violated, subsequent DML statements in the session are executed with the default degree of parallelism, unless a degree is specified in this clause.
  • DDL: Subsequent DDL statements in the session are executed with the default degree of parallelism, unless a degree is specified in this clause. Resulting database objects will have associated with them the prevailing degree of parallelism.

    Using FORCE DDL automatically causes all tables created in this session to be created with a default level of parallelism. The effect is the same as if you had specified the parallel_clause (with default degree) with the CREATE TABLE statement.

  • QUERY: Subsequent queries are executed with the default degree of parallelism, unless a degree is specified in this clause.
PARALLEL integer

Specify an integer to explicitly specify a degree of parallelism:

  • For FORCE DDL, the degree overrides any parallel clause in subsequent DDL statements.
  • For FORCE DML and QUERY, the degree overrides the degree currently stored for the table in the data dictionary.
  • A degree specified in a statement through a hint will override the degree being forced.

The following types of DML operations are not parallelized regardless of this clause:

  • Operations on clustered tables
  • Operations with embedded functions that either write or read database or package states
  • Operations on tables with triggers that could fire
  • Operations on tables or schema objects containing object types, or LONG or LOB datatypes.

RESUMABLE Clauses

These clauses let you enable and disable resumable space allocation. This feature allows an operation to be suspended in the event of an out-of-space error condition and to resume automatically from the point of interruption when the error condition is fixed.

Note:

Resumable space allocation is fully supported for operations on locally managed tablespaces. Some restrictions apply if you are using dictionary-managed tablespaces. For information on these restrictions, please refer to Oracle9i Database Administrator's Guide.
ENABLE RESUMABLE

This clause enables resumable space allocation for the session.

TIMEOUT

TIMEOUT lets you specify (in seconds) the time during which an operation can remain suspended while waiting for the error condition to be fixed. If the error condition is not fixed within the TIMEOUT period, then Oracle aborts the suspended operation.

NAME

NAME lets you specify a user-defined text string to help users identify the statements issued during the session while the session is in resumable mode. Oracle inserts the text string into the USER_RESUMABLE and DBA_RESUMABLE data dictionary views. If you do not specify NAME, then Oracle inserts the default string 'User username(userid), Session sessionid, Instance instanceid'.

See Also:

Oracle9i Database Reference for information on the data dictionary views
DISABLE RESUMABLE

This clause disables resumable space allocation for the session.

alter_session_set_clause

Use the alter_session_set_clause to set the parameters that follow (session parameters and initialization parameters that are dynamic in the scope of the ALTER SESSION statement). You can set values for multiple parameters in the same alter_session_set_clause.

COMMENT lets you associate a comment string with this change in the value of the parameter.

Initialization Parameters and ALTER SESSION

All initialization parameters that can be set using an ALTER SYSTEM statement are documented at ALTER SYSTEM . The initialization parameters that are dynamic in the scope of ALTER SESSION are listed in Table 10-1 with cross-references to their descriptions in ALTER SYSTEM. The only difference in behavior is that when you set these parameters using ALTER SESSION, the value you set persists only for the duration of the current session.

A number of parameters that can be set using ALTER SESSION are not initialization parameters. That is, you can set them only with ALTER SESSION, not in an initialization parameter file. Those session parameters are described after Table 10-1.

Caution:

Unless otherwise indicated, the parameters described here are initialization parameters, and the descriptions indicate only the general nature of the parameters. Before changing the values of initialization parameters, please refer to their full description in Oracle9i Database Reference or Oracle9i Database Globalization Support Guide.
Table 10-1 Initialization Parameters You Can Set with ALTER SESSION
Parameter | Comments
CURSOR_SHARING | See also Oracle9i Database Performance Tuning Guide and Reference for information on setting this parameter in these and other environments.
DB_BLOCK_CHECKING | The setting made by ALTER SESSION SET DB_BLOCK_CHECKING will be overridden by any subsequent ALTER SYSTEM SET DB_BLOCK_CHECKING statement.
DB_CREATE_FILE_DEST | --
DB_CREATE_ONLINE_LOG_DEST_n | --
DB_FILE_MULTIBLOCK_READ_COUNT | --
FILESYSTEMIO_OPTIONS | --
GLOBAL_NAMES | See "Referring to Objects in Remote Databases" and Oracle9i Heterogeneous Connectivity Administrator's Guide for more information on global name resolution and how Oracle enforces it.
HASH_AREA_SIZE | --
HASH_JOIN_ENABLED | --
LOG_ARCHIVE_DEST_n | --
LOG_ARCHIVE_DEST_STATE_n | --
LOG_ARCHIVE_MIN_SUCCEED_DEST | --
MAX_DUMP_FILE_SIZE | --
Globalization Support (NLS_) Parameters: When you start an instance, Oracle establishes globalization support based on the values of initialization parameters that begin with "NLS". You can query the dynamic performance table V$NLS_PARAMETERS to see the current globalization attributes for your session. For more information about NLS parameters, see Oracle9i Database Globalization Support Guide.
NLS_CALENDAR | --
NLS_COMP | --
NLS_CURRENCY | --
NLS_DATE_FORMAT | See "Date Format Models" for information on valid date format models.
NLS_DATE_LANGUAGE | --
NLS_DUAL_CURRENCY | See "Number Format Models" for information on number format elements.
NLS_ISO_CURRENCY | --
NLS_LANGUAGE | --
NLS_LENGTH_SEMANTICS | --
NLS_NCHAR_CONV_EXCP | --
NLS_NUMERIC_CHARACTERS | --
NLS_SORT | --
NLS_TERRITORY | --
NLS_TIMESTAMP_FORMAT | --
NLS_TIMESTAMP_TZ_FORMAT | --
OBJECT_CACHE_MAX_SIZE_PERCENT | --
OBJECT_CACHE_OPTIMAL_SIZE | --
OLAP_PAGE_POOL_SIZE | --
OPTIMIZER_DYNAMIC_SAMPLING | See Oracle9i Database Performance Tuning Guide and Reference for information on how to set this parameter.
OPTIMIZER_INDEX_CACHING | --
OPTIMIZER_INDEX_COST_ADJ | --
OPTIMIZER_MAX_PERMUTATIONS | --
OPTIMIZER_MODE | See Oracle9i Database Concepts and Oracle9i Database Performance Tuning Guide and Reference for information on how to choose a goal for the cost-based approach based on the characteristics of your application.
ORACLE_TRACE_ENABLE | --
PARALLEL_INSTANCE_GROUP | --
PARALLEL_MIN_PERCENT | --
PARTITION_VIEW_ENABLED | For important information on partition views, see "Partition Views" .
PLSQL_COMPILER_FLAGS | --
QUERY_REWRITE_ENABLED | --
QUERY_REWRITE_INTEGRITY | --
REMOTE_DEPENDENCIES_MODE | --
SESSION_CACHED_CURSORS | --
SORT_AREA_RETAINED_SIZE | --
SORT_AREA_SIZE | --
STAR_TRANSFORMATION_ENABLED | --
STATISTICS_LEVEL | --
TIMED_OS_STATISTICS | --
TIMED_STATISTICS | --
TRACE_ENABLED | --
UNDO_SUPPRESS_ERRORS | --
WORKAREA_SIZE_POLICY | --

Session Parameters and ALTER SESSION

The following parameters are session parameters only, not initialization parameters:

CONSTRAINT[S]

Syntax:

CONSTRAINT[S] = { IMMEDIATE | DEFERRED | DEFAULT }

The CONSTRAINT[S] parameter determines when conditions specified by a deferrable constraint are enforced.

  • immediate indicates that the conditions specified by the deferrable constraint are checked immediately after each DML statement. This setting is equivalent to issuing the SET CONSTRAINTS ALL IMMEDIATE statement at the beginning of each transaction in your session.

  • deferred indicates that the conditions specified by the deferrable constraint are checked when the transaction is committed. This setting is equivalent to issuing the SET CONSTRAINTS ALL DEFERRED statement at the beginning of each transaction in your session.

  • default restores all constraints at the beginning of each transaction to their initial state of DEFERRED or IMMEDIATE.
CREATE_STORED_OUTLINES

Syntax:

CREATE_STORED_OUTLINES = {TRUE | FALSE | 'category_name'}

The CREATE_STORED_OUTLINES parameter determines whether Oracle should automatically create and store an outline for each query submitted during the session.

  • true enables automatic outline creation for subsequent queries in the same session. These outlines receive a unique system-generated name and are stored in the DEFAULT category. If a particular query already has an outline defined for it in the DEFAULT category, then that outline will remain and a new outline will not be created.
  • false disables automatic outline creation during the session. This is the default.
  • category_name has the same behavior as TRUE except that any outline created during the session is stored in the category_name category.
CURRENT_SCHEMA

Syntax:

CURRENT_SCHEMA = schema

The CURRENT_SCHEMA parameter changes the current schema of the session to the specified schema. Subsequent unqualified references to schema objects during the session will resolve to objects in the specified schema. The setting persists for the duration of the session or until you issue another ALTER SESSION SET CURRENT_SCHEMA statement.

This setting offers a convenient way to perform operations on objects in a schema other than that of the current user without having to qualify the objects with the schema name. This setting changes the current schema, but it does not change the session user or the current user, nor does it give you any additional system or object privileges for the session.

ERROR_ON_OVERLAP_TIME

Syntax:

ERROR_ON_OVERLAP_TIME = {TRUE | FALSE}

The ERROR_ON_OVERLAP_TIME determines how Oracle should handle an ambiguous boundary datetime value--that is, a case in which it is not clear whether the datetime is in standard or daylight savings time.

  • Specify TRUE to return an error for the ambiguous overlap timestamp.
  • Specify FALSE to default the ambiguous overlap timestamp to the standard time. This is the default.

FLAGGER

Syntax:

FLAGGER = { ENTRY | INTERMEDIATE | FULL | OFF }

The FLAGGER parameter specifies FIPS flagging, which causes an error message to be generated when a SQL statement issued is an extension of ANSI SQL92. FLAGGER is a session parameter only, not an initialization parameter.

In Oracle, there is currently no difference between Entry, Intermediate, or Full level flagging. Once flagging is set in a session, a subsequent ALTER SESSION SET FLAGGER statement will work, but generates the message, ORA-00097. This allows FIPS flagging to be altered without disconnecting the session. OFF turns off flagging.

See Also:

Appendix B, "Oracle and Standard SQL", for more information about Oracle compliance with current ANSI SQL standards
INSTANCE

Syntax:

INSTANCE = integer

The INSTANCE parameter in a Real Application Clusters environment accesses database files as if the session were connected to the instance specified by integer. INSTANCE is a session parameter only, not an initialization parameter. For optimum performance, each instance of Real Application Clusters uses its own private rollback segments, freelist groups, and so on. In a Real Application Clusters environment, you normally connect to a particular instance and access data that is partitioned primarily for your use. If you must connect to another instance, then the data partitioning can be lost. Setting this parameter lets you access an instance as if you were connected to your own instance.

ISOLATION_LEVEL

Syntax:

ISOLATION_LEVEL = {SERIALIZABLE | READ COMMITTED}

The ISOLATION_LEVEL parameter specifies how transactions containing database modifications are handled. ISOLATION_LEVEL is a session parameter only, not an initialization parameter.

  • SERIALIZABLE indicates that transactions in the session use the serializable transaction isolation mode as specified in SQL92. That is, if a serializable transaction attempts to execute a DML statement that updates rows currently being updated by another uncommitted transaction at the start of the serializable transaction, then the DML statement fails. A serializable transaction can see its own updates.
  • READ COMMITTED indicates that transactions in the session will use the default Oracle transaction behavior. Thus, if the transaction contains DML that requires row locks held by another transaction, then the DML statement will wait until the row locks are released.
PLSQL_DEBUG

Syntax:

PLSQL_DEBUG = { TRUE | FALSE }

The PLSQL_DEBUG parameter sets the default for including or not including debugging information during compile operations. Setting this parameter to TRUE has the same effect as adding the DEBUG keyword to ALTER {FUNCTION | PROCEDURE | PACKAGE} COMPILE statements.

SKIP_UNUSABLE_INDEXES

Syntax:

SKIP_UNUSABLE_INDEXES = { TRUE | FALSE }

The SKIP_UNUSABLE_INDEXES parameter controls the use and reporting of tables with unusable indexes or index partitions. SKIP_UNUSABLE_INDEXES is a session parameter only, not an initialization parameter.

  • TRUE disables error reporting of indexes and index partitions marked UNUSABLE. This setting allows all operations (inserts, deletes, updates, and selects) on tables with unusable indexes or index partitions.

    Note:

    If an index is used to enforce a UNIQUE constraint on a table, then allowing insert and update operations on the table might violate the constraint. Therefore, this setting does not disable error reporting for unusable indexes that are unique.
  • FALSE enables error reporting of indexes marked UNUSABLE. This setting does not allow inserts, deletes, and updates on tables with unusable indexes or index partitions. This is the default.
SQL_TRACE

Syntax:

INSTANCE = integer

SQL_TRACE is an initialization parameter. However, when you change its value with an ALTER SESSION statement, the results are not reflected in the V$PARAMETER view. Therefore, in this context it is considered a session parameter only.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on the SQL trace facility, including how to format and interpret its output
TIME_ZONE

Syntax:

TIME_ZONE =  '[+ | -] hh:mm'
             | LOCAL
             | DBTIMEZONE
             | 'time_zone_region'

The TIME_ZONE parameter specifies the default local time zone displacement for the current SQL session. TIME_ZONE is a session parameter only, not an initialization parameter. To determine the time zone of the current session, query the built-in function SESSIONTIMEZONE (see SESSIONTIMEZONE ).

  • Specify a format mask ('[+|-]hh:mm') indicating the hours and minutes before or after UTC (Coordinated Universal Time--formerly Greenwich Mean Time). The valid range for hh:mm is -12:00 to +14:00.
  • Specify LOCAL to set the default local time zone displacement of the current SQL session to the original default local time zone displacement that was established when the current SQL session was started.
  • Specify DBTIMEZONE to set the current session time zone to match the value set for the database time zone. If you specify this setting, then the DBTIMEZONE function will return the database time zone as a UTC offset or a time zone region, depending on how the database time zone has been set.
  • Specify a valid time_zone_region. To see a listing of valid region names, query the TZNAME column of the V$TIMEZONE_NAMES dynamic performance view. If you specify this setting, then the SESSIONTIMEZONE function will return the region name.

    Note:

    You can also set the default client session time zone using the ORA_SDTZ environment variable. Please refer to Oracle9i Database Globalization Support Guide for more information on this variable.
USE_PRIVATE_OUTLINES

Syntax:

USE_PRIVATE_OUTLINES = { TRUE | FALSE | category_name }

The USE_PRIVATE_OUTLINES parameter lets you control the use of private outlines. When this parameter is enabled and an outlined SQL statement is issued, the optimizer retrieves the outline from the session private area rather than the public area used when USE_STORED_OUTLINES is enabled. If no outline exists in the session private area, then the optimizer will not use an outline to compile the statement. USE_PRIVATE_OUTLINES is not an initialization parameter.

  • TRUE causes the optimizer to use private outlines stored in the DEFAULT category when compiling requests.
  • FALSE specifies that the optimizer should not use stored private outlines. This is the default. If USE_STORED_OUTLINES is enabled, then the optimizer will use stored public outlines.
  • category_name causes the optimizer to use outlines stored in the category_name category when compiling requests.
Restriction on USE_PRIVATE_OUTLINES

You cannot enable this parameter if USE_STORED_OUTLINES is enabled.

USE_STORED_OUTLINES

Syntax:

USE_STORED_OUTLINES = { TRUE | FALSE | category_name }

The USE_STORED_OUTLINES parameter determines whether the optimizer will use stored public outlines to generate execution plans. USE_STORED_OUTLINES is not an initialization parameter.

  • TRUE causes the optimizer to use outlines stored in the DEFAULT category when compiling requests.
  • FALSE specifies that the optimizer should not use stored outlines. This is the default.
  • category_name causes the optimizer to use outlines stored in the category_name category when compiling requests.

Restriction on USED_STORED_OUTLINES

You cannot enable this parameter if USE_PRIVATE_OUTLINES is enabled.

Examples

Enabling Parallel DML: Example

Issue the following statement to enable parallel DML mode for the current session:

ALTER SESSION ENABLE PARALLEL DML;
Forcing a Distributed Transaction: Example

The following transaction inserts an employee record into the employees table on the database identified by the database link remote and deletes an employee record from the employees table on the database identified by local:

ALTER SESSION
   ADVISE COMMIT;

INSERT INTO employees@remote
   VALUES (8002, 'Juan', 'Fernandez', 'juanf@hr.com', NULL,
   TO_DATE('04-OCT-1992', 'DD-MON-YYYY'), 'SA_CLERK', 3000,
   NULL, 121, 20);

ALTER SESSION
   ADVISE ROLLBACK;

DELETE FROM employees@local
   WHERE employee_id = 8002;

COMMIT;

This transaction has two ALTER SESSION statements with the ADVISE clause. If the transaction becomes in doubt, then remote is sent the advice 'COMMIT' by virtue of the first ALTER SESSION statement and local is sent the advice 'ROLLBACK' by virtue of the second.

Closing a Database Link: Example

This statement updates the jobs table on the local database using a database link, commits the transaction, and explicitly closes the database link:

UPDATE jobs@local SET min_salary = 3000
   WHERE job_id = 'SH_CLERK';

COMMIT;

ALTER SESSION
   CLOSE DATABASE LINK local;
Changing the Date Format Dynamically: Example

The following statement dynamically changes the default date format for your session to 'YYYY MM DD-HH24:MI:SS':

ALTER SESSION
   SET NLS_DATE_FORMAT = 'YYYY MM DD HH24:MI:SS';

Oracle uses the new default date format:

SELECT TO_CHAR(SYSDATE) Today
   FROM DUAL;

TODAY
-------------------
2001 04 12 12:30:38
Changing the Date Language Dynamically: Example

The following statement changes the language for date format elements to French:

ALTER SESSION
 SET NLS_DATE_LANGUAGE = French;

SELECT TO_CHAR(SYSDATE, 'Day DD Month YYYY') Today
 FROM DUAL;

TODAY
---------------------------
Jeudi    12 Avril     2001
Changing the ISO Currency: Example

The following statement dynamically changes the ISO currency symbol to the ISO currency symbol for the territory America:

ALTER SESSION
   SET NLS_ISO_CURRENCY = America;

SELECT TO_CHAR( SUM(salary), 'C999G999D99') Total
   FROM employees;

TOTAL
------------------
     USD694,900.00
Changing the Decimal Character and Group Separator: Example

The following statement dynamically changes the decimal character to comma (,) and the group separator to period (.):

ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ',.' ;

Oracle returns these new characters when you use their number format elements:

ALTER SESSION SET NLS_CURRENCY = 'FF';

SELECT TO_CHAR( SUM(salary), 'L999G999D99') Total FROM employees;

TOTAL
---------------------
         FF694.900,00
Changing the NLS Currency: Example

The following statement dynamically changes the local currency symbol to 'DM':

ALTER SESSION
   SET NLS_CURRENCY = 'DM';

SELECT TO_CHAR( SUM(salary), 'L999G999D99') Total
   FROM employees;

TOTAL
---------------------
         DM694.900,00
Changing the NLS Language: Example

The following statement dynamically changes to French the language in which error messages are displayed:

ALTER SESSION
   SET NLS_LANGUAGE = FRENCH;

Session modifiee.

SELECT * FROM DMP;

ORA-00942: Table ou vue inexistante
Changing the Linguistic Sort Sequence: Example

The following statement dynamically changes the linguistic sort sequence to Spanish:

ALTER SESSION
   SET NLS_SORT = XSpanish;

Oracle sorts character values based on their position in the Spanish linguistic sort sequence.

Enabling SQL Trace: Example

To enable the SQL trace facility for your session, issue the following statement:

ALTER SESSION
   SET SQL_TRACE = TRUE;
Enabling Query Rewrite: Example

This statement enables query rewrite in the current session for all materialized views that have not been explicitly disabled:

ALTER SESSION SET QUERY_REWRITE_ENABLED = TRUE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: ALTER SESSION to ALTER SYSTEM, 3 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER SYSTEM

Purpose

Use the ALTER SYSTEM statement to dynamically alter your Oracle instance. The settings stay in effect as long as the database is mounted.

Prerequisites

You must have ALTER SYSTEM system privilege.

Syntax

alter_system::=

Text description of statements_23.gif follows
Text description of alter_system

archive_log_clause::=

Text description of statements_24.gif follows
Text description of archive_log_clause

end_session_clauses::=

Text description of statements_25.gif follows
Text description of end_session_clauses

alter_system_set_clause::=

Text description of statements_26.gif follows
Text description of alter_system_set_clause

alter_system_reset_clause::=

Text description of statements_27.gif follows
Text description of alter_system_reset_clause

Semantics

archive_log_clause

The archive_log_clause manually archives redo log files or enables or disables automatic archiving. To use this clause, your instance must have the database mounted. The database can be either open or closed unless otherwise noted.

THREAD Clause

Specify THREAD to indicate the thread containing the redo log file group to be archived.

Restriction on the THREAD clause

Set this parameter only if you are using Oracle with Real Application Clusters.

See Also:

"Archiving Redo Logs Manually: Examples"

SEQUENCE Clause

Specify SEQUENCE to manually archive the online redo log file group identified by the log sequence number integer in the specified thread. If you omit the THREAD parameter, then Oracle archives the specified group from the thread assigned to your instance.

CHANGE Clause

Specify CHANGE to manually archive the online redo log file group containing the redo log entry with the system change number (SCN) specified by integer in the specified thread. If the SCN is in the current redo log file group, then Oracle performs a log switch. If you omit the THREAD parameter, then Oracle archives the groups containing this SCN from all enabled threads.

You can use this clause only when your instance has the database open.

CURRENT Clause

Specify CURRENT to manually archive the current redo log file group of the specified thread, forcing a log switch. If you omit the THREAD parameter, then Oracle archives all redo log file groups from all enabled threads, including logs previous to current logs. You can specify CURRENT only when the database is open.

NOSWITCH

Specify NOSWITCH if you want to manually archive the current redo log file group without forcing a log switch. This setting is used primarily with standby databases to prevent data divergence when the primary database shuts down. Divergence implies the possibility of data loss in case of primary database failure.

You can use the NOSWITCH clause only when your instance has the database mounted but not open. If the database is open, then this operation closes the database automatically. You must then manually shut down the database before you can reopen it.

GROUP Clause

Specify GROUP to manually archive the online redo log file group with the GROUP value specified by integer. You can determine the GROUP value for a redo log file group by querying the data dictionary view DBA_LOG_FILES. If you specify both the THREAD and GROUP parameters, then the specified redo log file group must be in the specified thread.

LOGFILE Clause n

Specify LOGFILE to manually archive the online redo log file group containing the redo log file member identified by 'filename'. If you specify both the THREAD and LOGFILE parameters, then the specified redo log file group must be in the specified thread.

If the database was mounted with a backup controlfile, then specify USING BACKUP CONTROLFILE to permit archiving of all online logfiles, including the current logfile.

Restriction on the LOGFILE clause

You must archive redo log file groups in the order in which they are filled. If you specify a redo log file group for archiving with the LOGFILE parameter, and earlier redo log file groups are not yet archived, then Oracle returns an error.

NEXT Clause

Specify NEXT to manually archive the next online redo log file group from the specified thread that is full but has not yet been archived. If you omit the THREAD parameter, then Oracle archives the earliest unarchived redo log file group from any enabled thread.

ALL Clause

Specify ALL to manually archive all online redo log file groups from the specified thread that are full but have not been archived. If you omit the THREAD parameter, then Oracle archives all full unarchived redo log file groups from all enabled threads.

START Clause

Specify START to enable automatic archiving of redo log file groups.

Restriction on the START clause

You can enable automatic archiving only for the thread assigned to your instance.

TO location Clause

Specify TO 'location' to indicate the primary location to which the redo log file groups are archived. The value of this parameter must be a fully specified file location following the conventions of your operating system. If you omit this parameter, then Oracle archives the redo log file group to the location specified by the initialization parameters LOG_ARCHIVE_DEST or LOG_ARCHIVE_DEST_n.

STOP Clause

Specify STOP to disable automatic archiving of redo log file groups. You can disable automatic archiving only for the thread assigned to your instance.

CHECKPOINT Clause

Specify CHECKPOINT to explicitly force Oracle to perform a checkpoint, ensuring that all changes made by committed transactions are written to datafiles on disk. You can specify this clause only when your instance has the database open. Oracle does not return control to you until the checkpoint is complete.

GLOBAL

In a Real Application Clusters environment, this setting causes Oracle to perform a checkpoint for all instances that have opened the database. This is the default.

LOCAL

In a Real Application Clusters environment, this setting causes Oracle to perform a checkpoint only for the thread of redo log file groups for the instance from which you issue the statement.

See Also:

"Forcing a Checkpoint: Example"

CHECK DATAFILES Clause

In a distributed database system, such as a Real Application Clusters environment, this clause updates an instance's SGA from the database control file to reflect information on all online datafiles.

  • Specify GLOBAL to perform this synchronization for all instances that have opened the database. This is the default.
  • Specify LOCAL to perform this synchronization only for the local instance.

Your instance should have the database open.

end_session_clauses

The end_session_clauses give you several ways to end the current session.

DISCONNECT SESSION Clause

Use the DISCONNECT SESSION clause to disconnect the current session by destroying the dedicated server process (or virtual circuit if the connection was made by way of a Shared Server). To use this clause, your instance must have the database open. You must identify the session with both of the following values from the V$SESSION view:

  • For integer1, specify the value of the SID column.
  • For integer2, specify the value of the SERIAL# column.

If system parameters are appropriately configured, then application failover will take effect.

  • The POST_TRANSACTION setting allows ongoing transactions to complete before the session is disconnected. If the session has no ongoing transactions, then this clause has the same effect described for as KILL SESSION.
  • The IMMEDIATE setting disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
    • If you also specify POST_TRANSACTION and the session has ongoing transactions, then the IMMEDIATE keyword is ignored.
    • If you do not specify POST_TRANSACTION, or you specify POST_TRANSACTION but the session has no ongoing transactions, then this clause has the same effect as described for KILL SESSION IMMEDIATE.

      See Also:

      "Disconnecting a Session: Example"

KILL SESSION Clause

The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions, release all session locks, and partially recover session resources. To use this clause, your instance must have the database open, and your session and the session to be killed must be on the same instance. You must identify the session with both of the following values from the V$SESSION view:

  • For integer1, specify the value of the SID column.
  • For integer2, specify the value of the SERIAL# column.

If the session is performing some activity that must be completed, such as waiting for a reply from a remote database or rolling back a transaction, then Oracle waits for this activity to complete, marks the session as terminated, and then returns control to you. If the waiting lasts a minute, then Oracle marks the session to be killed and returns control to you with a message that the session is marked to be killed. The PMON background process then marks the session as terminated when the activity is complete.

Whether or not the session has an ongoing transaction, Oracle does not recover the entire session state until the session user issues a request to the session and receives a message that the session has been killed.

See Also:

"Killing a Session: Example"

IMMEDIATE

Specify IMMEDIATE to instruct Oracle to roll back ongoing transactions, release all session locks, recover the entire session state, and return control to you immediately.

DISTRIBUTED RECOVERY Clause

The DISTRIBUTED RECOVERY clause lets you enable or disable distributed recovery. To use this clause, your instance must have the database open.

ENABLE

Specify ENABLE to enable distributed recovery. In a single-process environment, you must use this clause to initiate distributed recovery.

You may need to issue the ENABLE DISTRIBUTED RECOVERY statement more than once to recover an in-doubt transaction if the remote node involved in the transaction is not accessible. In-doubt transactions appear in the data dictionary view DBA_2PC_PENDING.

See Also:

"Enabling Distributed Recovery: Example"

DISABLE

Specify DISABLE to disable distributed recovery.

RESTRICTED SESSION Clause

The RESTRICTED SESSION clause lets you restrict logon to Oracle.

You can use this clause regardless of whether your instance has the database dismounted or mounted, open or closed.

ENABLE

Specify ENABLE to allows only users with RESTRICTED SESSION system privilege to log on to Oracle. Existing sessions are not terminated.

DISABLE

Specify DISABLE to reverse the effect of the ENABLE RESTRICTED SESSION clause, allowing all users with CREATE SESSION system privilege to log on to Oracle. This is the default.

See Also:

"Restricting Session Logons: Example"

FLUSH SHARED_POOL Clause

The FLUSH SHARED POOL clause lets you clear all data from the shared pool in the system global area (SGA). The shared pool stores

  • Cached data dictionary information and
  • Shared SQL and PL/SQL areas for SQL statements, stored procedures, function, packages, and triggers.

This statement does not clear shared SQL and PL/SQL areas for items that are currently being executed. You can use this clause regardless of whether your instance has the database dismounted or mounted, open or closed.

See Also:

"Clearing the Shared Pool: Example"

SWITCH LOGFILE Clause

The SWITCH LOGFILE clause lets you explicitly force Oracle to begin writing to a new redo log file group, regardless of whether the files in the current redo log file group are full. When you force a log switch, Oracle begins to perform a checkpoint but returns control to you immediately rather than when the checkpoint is complete. To use this clause, your instance must have the database open.

See Also:

"Forcing a Log Switch: Example"

SUSPEND | RESUME

The SUSPEND clause lets you suspend all I/O (datafile, control file, and file header) as well as queries, in all instances, enabling you to make copies of the database without having to handle ongoing transactions.

Restrictions on SUSPEND and RESUME
  • Do not use this clause unless you have put the database tablespaces in hot backup mode.
  • If you start a new instance while the system is suspended, then that new instance will not be suspended.

The RESUME clause lets you make the database available once again for queries and I/O.

QUIESCE RESTRICTED | UNQUIESCE

Use the QUIESCE RESTRICTED and UNQUIESCE clauses to put the database in and take it out of the quiesced state. This state enables database administrators to perform administrative operations that cannot be safely performed in the presence of concurrent transactions, queries, or PL/SQL operations.

Note:

The QUIESCE RESTRICTED clause is valid only if the Database Resource Manager feature is installed and only if the Resource Manager has been on continuously since database startup in any instances that have opened the database.

If multiple QUIESCE RESTRICTED or UNQUIESCE statements issue at the same time from different sessions or instances, then all but one will receive an error.

QUIESCE RESTRICTED

Specify QUIESCE RESTRICTED to put the database in the quiesced state. For all instances with the database open, this clause has the following effect:

  • Oracle instructs the Database Resource Manager in all instances to prevent all inactive sessions (other than SYS and SYSTEM) from becoming active. No user other than SYS and SYSTEM can start a new transaction, a new query, a new fetch, or a new PL/SQL operation.
  • Oracle waits for all existing transactions in all instances that were initiated by a user other than SYS or SYSTEM to finish (either commit or abort). Oracle also waits for all running queries, fetches, and PL/SQL procedures in all instances that were initiated by users other than SYS or SYSTEM and that are not inside transactions to finish. If a query is carried out by multiple successive OCI fetches, then Oracle does not wait for all fetches to finish. It waits for the current fetch to finish and then blocks the next fetch. Oracle also waits for all sessions (other than those of SYS or SYSTEM) that hold any shared resources (such as enqueues) to release those resources. After all these operations finish, Oracle places the database into quiesced state and finishes executing the QUIESCE RESTRICTED statement.
  • If an instance is running in shared server mode, then Oracle instructs the Database Resource Manager to block logins (other than SYS or SYSTEM) on that instance. If an instance is running in non-shared-server mode, then Oracle does not impose any restrictions on user logins in that instance.

During the quiesced state, you cannot change the Resource Manager plan in any instance.

UNQUIESCE

Specify UNQUIESCE to take the database out of quiesced state. Doing so permits transactions, queries, fetches, and PL/SQL procedures that were initiated by users other than SYS or SYSTEM to be undertaken once again. The UNQUIESCE statement does not have to originate in the same session that issued the QUIESCE RESTRICTED statement.

SHUTDOWN Clause

The SHUTDOWN clause is relevant only if your system is using Oracle's shared server architecture. It shuts down a dispatcher identified by dispatcher_name. The dispatcher_name must be a string of the form 'D xxx', where xxx indicates the number of the dispatcher. For a listing of dispatcher names, query the NAME column of the V$DISPATCHER dynamic performance view.

  • If you specify IMMEDIATE, then the dispatcher stops accepting new connections immediately and Oracle terminates all existing connections through that dispatcher. After all sessions are cleaned up, the dispatcher process literally shuts down.
  • If you do not specify IMMEDIATE, then the dispatcher stops accepting new connections immediately but waits for all its users to disconnect and for all its database links to terminate. Then it literally shuts down.

REGISTER Clause

Specify REGISTER to instruct the PMON background process to register the instance with the listeners immediately. If you do not specify this clause, then registration of the instance does not occur until the next time PMON executes the discovery routine. As a result, clients may not be able to access the services for as long as 60 seconds after the listener is started.

See Also:

Oracle9i Database Concepts and Oracle9i Net Services Administrator's Guide for information on the PMON background process and listeners

alter_system_set_clause

The alter_system_set_clause lets you set or reset the value of any initialization parameter. The parameters are described in "Initialization Parameters and ALTER SYSTEM" .

The ability to change initialization parameter values depends on whether you have started up the database with a traditional parameter file (pfile) or with a server parameter file (spfile). To determine whether you can change the value of a particular parameter, query the ISSYS_MODIFIABLE column of the V$PARAMETER dynamic performance view.

When setting the parameter's value, you can specify additional settings as follows:

COMMENT

The COMMENT clause lets you associate a comment string with this change in the value of the parameter. If you also specify SPFILE, then this comment will appear in the parameter file to indicate the most recent change made to this parameter.

DEFERRED

The DEFERRED keyword sets or modifies the value of the parameter for future sessions that connect to the database. Current sessions retain the old value.

You must specify DEFERRED if the value of the ISSYS_MODIFIABLE column of V$PARAMETER for this parameter is DEFERRED. If the value of that column is IMMEDIATE, then the DEFERRED keyword in this clause is optional. If the value of that column is FALSE, then you cannot specify DEFERRED in this ALTER SYSTEM statement.

See Also:

Oracle9i Database Reference for information on the V$PARAMETER dynamic performance view
SCOPE

The SCOPE clause lets you specify when the change takes effect. Scope depends on whether you are started up the database using a parameter file (pfile) or server parameter file (spfile).

MEMORY

MEMORY indicates that the change is made in memory, takes effect immediately, and persists until the database is shut down. If you started up the database using a parameter file (pfile), then this is the only scope you can specify.

SPFILE

SPFILE indicates that the change is made in the server parameter file. The new setting takes effect when the database is next shut down and started up again. You must specify SPFILE when changing the value of a static parameter.

BOTH

BOTH indicates that the change is made in memory and in the server parameter file. The new setting takes effect immediately and persists after the database is shut down and started up again.

If a server parameter file was used to start up the database, then BOTH is the default. If a parameter file was used to start up the database, then MEMORY is the default, as well as the only scope you can specify.

SID

The SID clause is relevant only in a Real Application Clusters environment. This clause lets you specify the SID of the instance where the value will take effect.

  • Specify SID = '*' if you want Oracle to change the value of the parameter for all instances.
  • Specify SID = 'sid' if you want Oracle to change the value of the parameter only for the instance sid. This setting takes precedence over previous and subsequent ALTER SYSTEM SET statements that specify SID = '*'.

If you do not specify this clause:

  • If the instance was started up with a pfile (client-side initialization parameter file), then Oracle assumes the SID of the current instance.
  • If the instance was started up with an spfile (server parameter file), then Oracle assumes SID = '*'.

If you specify an instance other than the current instance, then Oracle sends a message to that instance to change the parameter value in the memory of that instance.

See Also:

Oracle9i Database Reference for information about the V$PARAMETER view

alter_system_reset_clause

The alter_system_reset_clause is for use in a Real Application Clusters environment. It gives you separate control for an individual instance over parameters that may have been set for all instances in a server parameter file. The SCOPE clause has the same behavior as described for the alter_system_set_clause.

SID

Specify the SID clause to remove a previously specified setting of this parameter for your instance (that is, a previous ALTER SYSTEM SET ... SID = 'sid' statement). Your instance will assume the value of the parameter as specified in a previous or subsequent ALTER SYSTEM SET ... SID = '*' statement.

See Also:

Oracle9i Real Application Clusters Deployment and Performance for information on setting parameter values for an individual instance in a Real Application Clusters environment

Initialization Parameters and ALTER SYSTEM

This section contains an alphabetical listing of all initialization parameters with brief descriptions only. The hyperlinks within the descriptions take you to the full descriptions in Oracle9i Database Reference.

ACTIVE_INSTANCE_COUNT

Parameter type | Integer
Default value | There is no default value.
Parameter class | Static
Range of values | 1 or >= the number of instances in the cluster. (Values other than 1 have no effect on the active or standby status of any instances.)
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.
Note:

This parameter functions only in a cluster with only two instances.

ACTIVE_INSTANCE_COUNT enables you to designate one instance in a two-instance cluster as the primary instance and the other instance as the secondary instance. This parameter has no functionality in a cluster with more than two instances.

AQ_TM_PROCESSES

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 10

AQ_TM_PROCESSES enables time monitoring of queue messages. The times can be used in messages that specify delay and expiration properties. Values from 1 to 10 specify the number of queue monitor processes created to monitor the messages. If AQ_TM_PROCESSES is not specified or is set to 0, then the queue monitor is not created.

ARCHIVE_LAG_TARGET

Parameter type | Integer
Default value | 0 (disabled)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 or any integer in [60, 7200]
Real Application Clusters | Multiple instances should use the same value.

ARCHIVE_LAG_TARGET limits the amount of data that can be lost and effectively increases the availability of the standby database by forcing a log switch after a user-specified time period elapses.

AUDIT_FILE_DEST

Parameter type | String
Syntax | AUDIT_FILE_DEST = 'directory'
Default value | ORACLE_HOME/rdbms/audit
Parameter class | Static

AUDIT_FILE_DEST specifies the directory where Oracle stores auditing files.

AUDIT_SYS_OPERATIONS

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

AUDIT_SYS_OPERATIONS enables or disables the auditing of operations issued by user SYS, and users connecting with SYSDBA or SYSOPER privileges. The audit records are written to the operating system's audit trail.

AUDIT_TRAIL

Parameter type | String
Syntax | AUDIT_TRAIL = {NONE | FALSE | DB | TRUE | OS}
Default value | There is no default value.
Parameter class | Static

AUDIT_TRAIL enables or disables the automatic writing of rows to the audit trail.

BACKGROUND_CORE_DUMP

Parameter type | String
Syntax | BACKGROUND_CORE_DUMP = {partial | full}
Default value | partial
Parameter class | Static

BACKGROUND_CORE_DUMP specifies whether Oracle includes the SGA in the core file for Oracle background processes.

BACKGROUND_DUMP_DEST

Parameter type | String
Syntax | BACKGROUND_DUMP_DEST = {pathname | directory}
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid local path, directory, or disk

BACKGROUND_DUMP_DEST specifies the pathname (directory or disc) where debugging trace files for the background processes (LGWR, DBWn, and so on) are written during Oracle operations.

BACKUP_TAPE_IO_SLAVES

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM ... DEFERRED
Range of values | true | false

BACKUP_TAPE_IO_SLAVES specifies whether I/O server processes (also called slaves) are used by the Recovery Manager to back up, copy, or restore data to tape. When the value is set to true, Oracle uses an I/O server process to write to or read from a tape device. When the value is set to false (the default), Oracle does not use I/O server process for backups. Instead, the shadow process engaged in the backup accesses the tape device.

BITMAP_MERGE_AREA_SIZE

Parameter type | Integer
Default value | 1048576 (1 MB)
Parameter class | Static
Range of values | Operating system-dependent
Note:

Oracle does not recommend using the BITMAP_MERGE_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. BITMAP_MERGE_AREA_SIZE is retained for backward compatibility.

BITMAP_MERGE_AREA_SIZE is relevant only for systems containing bitmap indexes. It specifies the amount of memory Oracle uses to merge bitmaps retrieved from a range scan of the index. The default value is 1 MB. A larger value usually improves performance, because the bitmap segments must be sorted before being merged into a single bitmap.

BLANK_TRIMMING

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

BLANK_TRIMMING specifies the data assignment semantics of character datatypes.

BUFFER_POOL_KEEP

Parameter type | String
Syntax | BUFFER_POOL_KEEP = {integer | (BUFFERS:integer, LRU_LATCHES:integer)} where integer is the number of buffers and, optionally, the number of LRU latches.
Default value | There is no default value.
Parameter class | Static
Note:

This parameter is deprecated in favor of the DB_KEEP_CACHE_SIZE parameter. Oracle recommends that you use DB_KEEP_CACHE_SIZE instead. Also, BUFFER_POOL_KEEP cannot be combined with the new dynamic DB_KEEP_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error. BUFFER_POOL_KEEP is retained for backward compatibility only.

BUFFER_POOL_KEEP lets you save objects in the buffer cache by setting aside a portion of the total number of buffers (the value of the DB_BLOCK_BUFFERS parameter) as a KEEP buffer pool. You can also allocate to the KEEP buffer pool a specified portion of the total number of LRU latches.

BUFFER_POOL_RECYCLE

Parameter type | String
Syntax | BUFFER_POOL_RECYCLE = {integer | (BUFFERS:integer, LRU_LATCHES:integer)} where integer is the number of buffers and, optionally, the number of LRU latches.
Default value | There is no default value.
Parameter class | Static
Note:

This parameter is deprecated in favor of the DB_RECYCLE_CACHE_SIZE parameter. Oracle recommends that you use DB_RECYCLE_CACHE_SIZE instead. Also, BUFFER_POOL_RECYCLE cannot be combined with the new dynamic DB_RECYCLE_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error. BUFFER_POOL_RECYCLE is retained for backward compatibility only.

BUFFER_POOL_RECYCLE lets you limit the size of objects in the buffer cache by setting aside a portion of the total number of buffers (the value of the DB_BLOCK_BUFFERS parameter) as a RECYCLE buffer pool. You can also allocate to the RECYCLE buffer pool a specified portion of the total number of LRU latches.

CIRCUITS

Parameter type

Integer

Default value

Derived:

  • If you are using shared server architecture, then the value of SESSIONS
  • If you are not using the shared server architecture, then the value is 0

Parameter class

Static

CIRCUITS specifies the total number of virtual circuits that are available for inbound and outbound network sessions. It is one of several parameters that contribute to the total SGA requirements of an instance.

CLUSTER_DATABASE

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false
Real Application Clusters | Multiple instances must have the same value.

CLUSTER_DATABASE is an Oracle9i Real Application Clusters parameter that specifies whether or not Oracle9i Real Application Clusters is enabled.

CLUSTER_DATABASE_INSTANCES

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | Any nonzero value

CLUSTER_DATABASE_INSTANCES is an Oracle9i Real Application Clusters parameter that specifies the number of instances that are configured as part of your cluster database. You must set this parameter for every instance. Normally you should set this parameter to the number of instances in your Oracle9i Real Application Clusters environment. A proper setting for this parameter can improve memory use.

CLUSTER_INTERCONNECTS

Parameter type | String
Syntax | CLUSTER_INTERCONNECTS = ifn [: ifn ... ]
Default value | There is no default value.
Parameter class | Static
Range of values | One or more IP addresses, separated by colons

CLUSTER_INTERCONNECTS provides Oracle with information about additional cluster interconnects available for use in Oracle9i Real Application Clusters environments.

COMMIT_POINT_STRENGTH

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 0 to 255

COMMIT_POINT_STRENGTH is relevant only in distributed database systems. It specifies a value that determines the commit point site in a distributed transaction. The node in the transaction with the highest value for COMMIT_POINT_STRENGTH will be the commit point site.

COMPATIBLE

Parameter type | String
Syntax | COMPATIBLE = release_number
Default value | 8.1.0
Parameter class | Static
Range of values | Default release to current release
Real Application Clusters | Multiple instances must have the same value.

COMPATIBLE allows you to use a new release, while at the same time guaranteeing backward compatibility with an earlier release. This is helpful if it becomes necessary to revert to the earlier release.

CONTROL_FILE_RECORD_KEEP_TIME

Parameter type | Integer
Default value | 7 (days)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 365 (days)

CONTROL_FILE_RECORD_KEEP_TIME specifies the minimum number of days before a reusable record in the control file can be reused. In the event a new record needs to be added to a reusable section and the oldest record has not aged enough, the record section expands. If this parameter is set to 0, then reusable sections never expand, and records are reused as needed.

CONTROL_FILES

Parameter type | String
Syntax | CONTROL_FILES = filename [, filename [...] ] Note: The control file name can be an OMF (Oracle Managed Files) name. This occurs when the control file is re-created using the CREATE CONTROLFILE REUSE statement.
Default value | Operating system-dependent
Parameter class | Static
Range of values | 1 to 8 filenames
Real Application Clusters | Multiple instances must have the same value.

Every database has a control file, which contains entries that describe the structure of the database (such as its name, the timestamp of its creation, and the names and locations of its datafiles and redo files). CONTROL_FILES specifies one or more names of control files, separated by commas.

CORE_DUMP_DEST

Parameter type | String
Syntax | CORE_DUMP_DEST = directory
Default value | ORACLE_HOME/DBS
Parameter class | Dynamic: ALTER SYSTEM

CORE_DUMP_DEST is primarily a UNIX parameter and may not be supported on your platform. It specifies the directory where Oracle dumps core files.

CPU_COUNT

Parameter type | Integer
Default value | Set automatically by Oracle
Parameter class | Static
Range of values | 0 to unlimited
Caution:

On most platforms, Oracle automatically sets the value of CPU_COUNT to the number of CPUs available to your Oracle instance. Do not change the value of CPU_COUNT.

CPU_COUNT specifies the number of CPUs available to Oracle. On single-CPU computers, the value of CPU_COUNT is 1.

CREATE_BITMAP_AREA_SIZE

Parameter type | Integer
Default value | 8388608 (8 MB)
Parameter class | Static
Range of values | Operating system-dependent
Note:

Oracle does not recommend using the CREATE_BITMAP_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. CREATE_BITMAP_AREA_SIZE is retained for backward compatibility.

CREATE_BITMAP_AREA_SIZE is relevant only for systems containing bitmap indexes. It specifies the amount of memory (in bytes) allocated for bitmap creation. The default value is 8 MB. A larger value may speed up index creation.

CREATE_STORED_OUTLINES

Syntax:

CREATE_STORED_OUTLINES = {TRUE | FALSE | category_name} [NOOVERRIDE]

The CREATE_STORED_OUTLINES parameter determines whether Oracle should automatically create and store an outline for each query submitted on the system. CREATE_STORED_OUTLINES is not an initialization parameter.

  • TRUE enables automatic outline creation for subsequent queries in the system. These outlines receive a unique system-generated name and are stored in the DEFAULT category. If a particular query already has an outline defined for it in the DEFAULT category, then that outline will remain and a new outline will not be created.
  • FALSE disables automatic outline creation for the system. This is the default.
  • category_name has the same behavior as TRUE except that any outline created in the system is stored in the category_name category.
  • NOOVERRIDE specifies that this system setting will not override the setting for any session in which this parameter was explicitly set. If you do not specify NOOVERRIDE, then this setting takes effect in all sessions.

CURSOR_SHARING

Parameter type | String
Syntax | CURSOR_SHARING = {SIMILAR | EXACT | FORCE}
Default value | EXACT
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

CURSOR_SHARING determines what kind of SQL statements can share the same cursors.

CURSOR_SPACE_FOR_TIME

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

CURSOR_SPACE_FOR_TIME lets you use more space for cursors in order to save time. It affects both the shared SQL area and the client's private SQL area.

DB_nK_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_[2 | 4 | 8 | 16 | 32]K_CACHE_SIZE = integer [K | M | G]
Default value | 0 (additional block size caches are not configured by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

DB_nK_CACHE_SIZE (where n = 2, 4, 8, 16, 32) specifies the size of the cache for the n K buffers. You can set this parameter only when DB_BLOCK_SIZE has a value other than n K. For example, if DB_BLOCK_SIZE=4096, then it is illegal to specify the parameter DB_4K_CACHE_SIZE (because the size for the 4 KB block cache is already specified by DB_CACHE_SIZE).

DB_BLOCK_BUFFERS

Parameter type | Integer
Default value | Derived: 48 MB / DB_BLOCK_SIZE
Parameter class | Static
Range of values | 50 to an operating system-specific maximum
Real Application Clusters | Multiple instances can have different values, and you can change the values as needed.
Note:

This parameter is deprecated in favor of the DB_CACHE_SIZE parameter. Oracle recommends that you use DB_CACHE_SIZE instead. Also, DB_BLOCK_BUFFERS cannot be combined with the new dynamic DB_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error. DB_BLOCK_BUFFERS is retained for backward compatibility.

DB_BLOCK_BUFFERS specifies the number of database buffers in the buffer cache. It is one of several parameters that contribute to the total memory requirements of the SGA of an instance.

DB_BLOCK_CHECKING

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

DB_BLOCK_CHECKING controls whether Oracle performs block checking for data blocks. When this parameter is set to true, Oracle performs block checking for all data blocks. When it is set to false, Oracle does not perform block checking for blocks in the user tablespaces. However, block checking for the SYSTEM tablespace is always turned on.

DB_BLOCK_CHECKSUM

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

DB_BLOCK_CHECKSUM determines whether DBWn and the direct loader will calculate a checksum (a number calculated from all the bytes stored in the block) and store it in the cache header of every data block when writing it to disk. Checksums are verified when a block is read-only if this parameter is true and the last write of the block stored a checksum. In addition, Oracle gives every log block a checksum before writing it to the current log.

DB_BLOCK_SIZE

Parameter type | Integer
Default value | 2048
Parameter class | Static
Range of values | 2048 to 32768, but your operating system may have a narrower range
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.
Caution:

Set this parameter at the time of database creation. Do not alter it afterward.

DB_BLOCK_SIZE specifies the size (in bytes) of Oracle database blocks. Typical values are 2048 and 4096. The value for DB_BLOCK_SIZE in effect at the time you create the database determines the size of the blocks. The value must remain set to its initial value.

DB_CACHE_ADVICE

Parameter type | String
Syntax | DB_CACHE_ADVICE = {ON | READY | OFF}
Default value | If STATISTICS_LEVEL is set to TYPICAL or ALL, then ON If STATISTICS_LEVEL is set to BASIC, then OFF
Parameter class | Dynamic: ALTER SYSTEM

DB_CACHE_ADVICE enables or disables statistics gathering used for predicting behavior with different cache sizes through the V$DB_CACHE_ADVICE performance view.

DB_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_CACHE_SIZE = integer [K | M | G]
Default value | 48 MB, rounded up to the nearest granule size
Parameter class | Dynamic: ALTER SYSTEM

DB_CACHE_SIZE specifies the size of the DEFAULT buffer pool for buffers with the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).

DB_CREATE_FILE_DEST

Parameter type | String
Syntax | DB_CREATE_FILE_DEST = directory
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

DB_CREATE_FILE_DEST sets the default location for Oracle-managed datafiles. This location is also used as the default for Oracle-managed control files and online redo logs if DB_CREATE_ONLINE_LOG_DEST_n is not specified.

DB_CREATE_ONLINE_LOG_DEST_n

Parameter type | String
Syntax | DB_CREATE_ONLINE_LOG_DEST_[1 | 2 | 3 | 4 | 5] = directory
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

DB_CREATE_ONLINE_LOG_DEST_n (where n = 1, 2, 3, ... 5) sets the default location for Oracle-managed control files and online redo logs.

DB_DOMAIN

Parameter type | String
Syntax | DB_DOMAIN = domain_name
Default value | There is no default value.
Parameter class | Static
Range of values | Any legal string of name components, separated by periods and up to 128 characters long (including the periods). This value cannot be NULL.
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

In a distributed database system, DB_DOMAIN specifies the logical location of the database within the network structure. You should set this parameter if this database is or ever will be part of a distributed system. The value consists of the extension components of a global database name, consisting of valid identifiers, separated by periods. Oracle Corporation recommends that you specify DB_DOMAIN as a unique string for all databases in a domain.

DB_FILE_MULTIBLOCK_READ_COUNT

Parameter type | Integer
Default value | 8
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | Operating system-dependent

DB_FILE_MULTIBLOCK_READ_COUNT is one of the parameters you can use to minimize I/O during table scans. It specifies the maximum number of blocks read in one I/O operation during a sequential scan. The total number of I/Os needed to perform a full table scan depends on such factors as the size of the table, the multiblock read count, and whether parallel execution is being utilized for the operation.

DB_FILE_NAME_CONVERT

Parameter type

String

Syntax

DB_FILE_NAME_CONVERT = [(]'string1' , 'string2' , 'string3' , 'string4' , ...[)]

Where:

  • string1 is the pattern of the primary database filename
  • string2 is the pattern of the standby database filename
  • string3 is the pattern of the primary database filename
  • string4 is the pattern of the standby database filename

You can use as many pairs of primary and standby replacement strings as required. You can use single or double quotation marks. The parentheses are optional.

Following are example settings that are acceptable:

DB_FILE_NAME_CONVERT = ('/dbs/t1/','/dbs/t1/s_','dbs/t2/ ','dbs/t2/s_')

Default value

None

Parameter class

Static

DB_FILE_NAME_CONVERT is useful for creating a duplicate database for recovery purposes. It converts the filename of a new datafile on the primary database to a filename on the standby database. If you add a datafile to the primary database, you must add a corresponding file to the standby database. When the standby database is updated, this parameter converts the datafile name on the primary database to the datafile name on the standby database. The file on the standby database must exist and be writable, or the recovery process will halt with an error.

DB_FILES

Parameter type | Integer
Default value | 200
Parameter class | Static
Range of values | Minimum: the largest among the absolute file numbers of the datafiles in the database Maximum: operating system-dependent
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

DB_FILES specifies the maximum number of database files that can be opened for this database. The maximum valid value is the maximum number of files, subject to operating system constraint, that will ever be specified for the database, including files to be added by ADD DATAFILE statements.

DB_KEEP_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_KEEP_CACHE_SIZE = integer [K | M | G]
Default value | 0 (KEEP cache is not configured by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

DB_KEEP_CACHE_SIZE specifies the size of the KEEP buffer pool. The size of the buffers in the KEEP buffer pool is the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).

DB_NAME

Parameter type | String
Syntax | DB_NAME = database_name
Default value | There is no default value.
Parameter class | Static
Real Application Clusters | You must set this parameter for every instance. Multiple instances must have the same value, or the same value must be specified in the STARTUP OPEN SQL*Plus statement or the ALTER DATABASE MOUNT SQL statement.

DB_NAME specifies a database identifier of up to 8 characters. If specified, it must correspond to the name specified in the CREATE DATABASE statement. Although the use of DB_NAME is optional, you should generally set it before issuing the CREATE DATABASE statement, and then reference it in that statement.

DB_RECYCLE_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_RECYCLE_CACHE_SIZE = integer [K | M | G]
Default value | 0 (RECYCLE cache is not configured by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

DB_RECYCLE_CACHE_SIZE specifies the size of the RECYCLE buffer pool. The size of the buffers in the RECYCLE pool is the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).

DB_WRITER_PROCESSES

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 1 to 20

DB_WRITER_PROCESSES is useful for systems that modify data heavily. It specifies the initial number of database writer processes for an instance.

DBLINK_ENCRYPT_LOGIN

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

When you attempt to connect to a database using a password, Oracle encrypts the password before sending it to the database. DBLINK_ENCRYPT_LOGIN specifies whether or not attempts to connect to other Oracle servers through database links should use encrypted passwords.

DBWR_IO_SLAVES

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to operating system-dependent

DBWR_IO_SLAVES is relevant only on systems with only one database writer process (DBW0). It specifies the number of I/O server processes used by the DBW0 process. The DBW0 process and its server processes always write to disk. By default, the value is 0 and I/O server processes are not used.

DG_BROKER_CONFIG_FILEn

Parameter type | String
Syntax | DG_BROKER_CONFIG_FILE[1 | 2] = filename
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SYSTEM
Range of values | One filename

DG_BROKER_CONFIG_FILEn (where n = 1, 2) specifies the names for the Data Guard broker configuration files.

DG_BROKER_START

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

DG_BROKER_START enables Oracle to determine whether or not the DMON (Data Guard broker) process should be started. DMON is a non-fatal Oracle background process and exists as long as the instance exists, whenever this parameter is set to true.

DISK_ASYNCH_IO

Parameter type | Boolean
Default value | true
Parameter class | Static
Range of values | true | false

DISK_ASYNCH_IO controls whether I/O to datafiles, control files, and logfiles is asynchronous (that is, whether parallel server processes can overlap I/O requests with CPU processing during table scans). If your platform supports asynchronous I/O to disk, Oracle Corporation recommends that you leave this parameter set to its default value. However, if the asynchronous I/O implementation is not stable, you can set this parameter to false to disable asynchronous I/O. If your platform does not support asynchronous I/O to disk, this parameter has no effect.

DISPATCHERS

Parameter type | String
Syntax | DISPATCHERS = 'dispatch_clause'
 | dispatch_clause::= (PROTOCOL = protocol) | (ADDRESS = address) | (DESCRIPTION = description ) [options_clause]
 | options_clause::= (DISPATCHERS = integer | SESSIONS = integer | CONNECTIONS = integer | TICKS = seconds | POOL = {1 | ON | YES | TRUE | BOTH | ({IN | OUT} = ticks) | 0 | OFF | NO | FALSE | ticks} | MULTIPLEX = {1 | ON | YES | TRUE | 0 | OFF | NO | FALSE | BOTH | IN | OUT} | LISTENER = tnsname | SERVICE = service | INDEX = integer)
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

DISPATCHERS configures dispatcher processes in the shared server architecture. The parsing software supports a name-value syntax to enable the specification of attributes in a position-independent case-insensitive manner. For example:

DISPATCHERS = "(PROTOCOL=TCP)(DISPATCHERS=3)"

DISTRIBUTED_LOCK_TIMEOUT

Parameter type | Integer
Default value | 60
Parameter class | Static
Range of values | 1 to unlimited

DISTRIBUTED_LOCK_TIMEOUT specifies the amount of time (in seconds) for distributed transactions to wait for locked resources.

DML_LOCKS

Parameter type | Integer
Default value | Derived: 4 * TRANSACTIONS
Parameter class | Static
Range of values | 20 to unlimited; a setting of 0 disables enqueues
Real Application Clusters | You must set this parameter for every instance, and all instances must have positive values or all must be 0.

A DML lock is a lock obtained on a table that is undergoing a DML operation (insert, update, delete). DML_LOCKS specifies the maximum number of DML locks--one for each table modified in a transaction. The value should equal the grand total of locks on tables currently referenced by all users. For example, if three users are modifying data in one table, then three entries would be required. If three users are modifying data in two tables, then six entries would be required.

Note:

You can set this parameter using ALTER SYSTEM only if you have started up the database using a server parameter file (spfile), and you must specify SCOPE = SPFILE.

DRS_START

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false
Note:

This parameter is deprecated in favor of the DG_BROKER_START parameter. Oracle recommends that you use DG_BROKER_START instead. DRS_START is retained for backward compatibility only.

DRS_START enables Oracle to determine whether or not the DMON (Data Guard broker) process should be started. DMON is a non-fatal Oracle background process and exists as long as the instance exists, whenever this parameter is set to true.

ENQUEUE_RESOURCES

Parameter type | Integer
Default value | Derived from SESSIONS parameter
Parameter class | Static
Range of values | 10 to unlimited

ENQUEUE_RESOURCES sets the number of resources that can be concurrently locked by the lock manager. An enqueue is a sophisticated locking mechanism that permits several concurrent processes to share known resources to varying degrees. Any object that can be used concurrently can be protected with enqueues. For example, Oracle allows varying levels of sharing on tables: two processes can lock a table in share mode or in share update mode.

Note:

You can set this parameter using ALTER SYSTEM only if you have started up the database using a server parameter file (spfile), and you must specify SCOPE = SPFILE.

EVENT

Parameter type | String
Default value | There is no default value.
Parameter class | Static

EVENT is a parameter used only to debug the system. Do not alter the value of this parameter except under the supervision of Oracle Support Services staff.

FAL_CLIENT

Parameter type | String
Syntax | FAL_CLIENT = string
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

FAL_CLIENT specifies the FAL (fetch archive log) client name that is used by the FAL service, configured through the FAL_SERVER parameter, to refer to the FAL client. The value is an Oracle Net service name, which is assumed to be configured properly on the FAL server system to point to the FAL client (standby database).

FAL_SERVER

Parameter type | String
Syntax | FAL_SERVER = string
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

FAL_SERVER specifies the FAL (fetch archive log) server for a standby database. The value is an Oracle Net service name, which is assumed to be configured properly on the standby database system to point to the desired FAL server.

FAST_START_IO_TARGET

Parameter type | Integer
Default value | All the buffers in the cache
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 1000 to all buffers in the cache. A setting of 0 disables limiting recovery I/Os.
Real Application Clusters | Multiple instances can have different values, and you can change the values at runtime.
Note:

This parameter is deprecated in favor of the FAST_START_MTTR_TARGET parameter. Oracle recommends that you use FAST_START_MTTR_TARGET instead. FAST_START_IO_TARGETis retained for backward compatibility only.

FAST_START_IO_TARGET (available only with the Oracle Enterprise Edition) specifies the number of I/Os that should be needed during crash or instance recovery.

FAST_START_MTTR_TARGET

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 3600 seconds
Real Application Clusters | Multiple instances can have different values, and you can change the values at runtime.

FAST_START_MTTR_TARGET enables you to specify the number of seconds the database takes to perform crash recovery of a single instance. When specified, FAST_START_MTTR_TARGET

  • Is overridden by FAST_START_IO_TARGET
  • Is overridden by LOG_CHECKPOINT_INTERVAL

FAST_START_PARALLEL_ROLLBACK

Parameter type | String
Syntax | FAST_START_PARALLEL_ROLLBACK = {HI | LO | FALSE}
Default value | LOW
Parameter class | Dynamic: ALTER SYSTEM

FAST_START_PARALLEL_ROLLBACK determines the maximum number of processes that can exist for performing parallel rollback. This parameter is useful on systems in which some or all of the transactions are long running.

FILE_MAPPING

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

FILE_MAPPING enables or disables file mapping. The FMON background process will be started to manage the mapping information when file mapping is enabled.

FILESYSTEMIO_OPTIONS

Parameter type | String
Syntax | FILESYSTEMIO_OPTIONS = {none | setall | directIO | asynch}
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

FILESYSTEMIO_OPTIONS specifies I/O operations for file system files.

FIXED_DATE

Parameter type | String
Syntax | FIXED_DATE = YYYY-MM-DD-HH24:MI:SS (or the default Oracle date format)
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

FIXED_DATE enables you to set a constant date that SYSDATE will always return instead of the current date. This parameter is useful primarily for testing. The value can be in the format shown above or in the default Oracle date format, without a time.

GC_FILES_TO_LOCKS

Parameter type | String
Syntax | GC_FILES_TO_LOCKS = '{file_list=lock_count[!blocks][EACH][:...]}' Spaces are not allowed within the quotation marks.
Default value | There is no default value.
Parameter class | Static
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have identical values. To change the value, you must shut down all instances in the cluster, change the value for each instance, and then start up each instance.
Note:

Setting this parameter to any value other than the default will disable Cache Fusion processing in Oracle9i Real Application Clusters.

GC_FILES_TO_LOCKS is an Oracle9i Real Application Clusters parameter that has no effect on an instance running in exclusive mode. It controls the mapping of pre-release 9.0.1 parallel cache management (PCM) locks to datafiles.

GLOBAL_CONTEXT_POOL_SIZE

Parameter type | String
Default value | 1 MB
Parameter class | Static
Range of values | Any integer value in MB

GLOBAL_CONTEXT_POOL_SIZE specifies the amount of memory to allocate in the SGA for storing and managing global application context.

GLOBAL_NAMES

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

GLOBAL_NAMES specifies whether a database link is required to have the same name as the database to which it connects.

HASH_AREA_SIZE

Parameter type | Integer
Default value | Derived: 2 * SORT_AREA_SIZE
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to operating system-dependent
Note:

Oracle does not recommend using the HASH_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. HASH_AREA_SIZE is retained for backward compatibility.

HASH_AREA_SIZE is relevant to parallel execution operations and to the query portion of DML or DDL statements. It specifies the maximum amount of memory, in bytes, to be used for hash joins.

HASH_JOIN_ENABLED

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SESSION
Range of values | true | false

HASH_JOIN_ENABLED specifies whether the optimizer should consider using a hash join as a join method. If set to false, then hashing is not available as a join method. If set to true, then the optimizer compares the cost of a hash join with other types of joins, and chooses hashing if it gives the best cost. Oracle Corporation recommends that you set this parameter to true for all data warehousing applications.

HI_SHARED_MEMORY_ADDRESS

Parameter type | Integer
Default value | 0
Parameter class | Static

HI_SHARED_MEMORY_ADDRESS specifies the starting address at runtime of the system global area (SGA). It is ignored on platforms that specify the SGA's starting address at linktime.

HS_AUTOREGISTER

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

HS_AUTOREGISTER enables or disables automatic self-registration of Heterogeneous Services (HS) agents. When enabled, information is uploaded into the server's data dictionary to describe a previously unknown agent class or a new agent version.

IFILE

Parameter type | Parameter file
Syntax | IFILE = parameter_file_name
Default value | There is no default value.
Parameter class | Static
Range of values | Valid parameter filenames
Real Application Clusters | Multiple instances can have different values.

Use IFILE to embed another parameter file within the current parameter file. For example:

IFILE = COMMON.ORA

INSTANCE_GROUPS

Parameter type | String
Syntax | INSTANCE_GROUPS = group_name [, group_name ... ]
Default value | There is no default value.
Parameter class | Static
Range of values | One or more instance group names, separated by commas
Real Application Clusters | Multiple instances can have different values.

INSTANCE_GROUPS is an Oracle9i Real Application Clusters parameter that you can specify only in parallel mode. Used in conjunction with the PARALLEL_INSTANCE_GROUP parameter, it lets you restrict parallel query operations to a limited number of instances.

INSTANCE_NAME

Parameter type | String
Syntax | INSTANCE_NAME = instance_id
Default value | The instance's SID Note: The SID identifies the instance's shared memory on a host, but may not uniquely distinguish this instance from other instances.
Parameter class | Static
Range of values | Any alphanumeric characters

In an Oracle9i Real Application Clusters environment, multiple instances can be associated with a single database service. Clients can override Oracle's connection load balancing by specifying a particular instance by which to connect to the database. INSTANCE_NAME specifies the unique name of this instance.

INSTANCE_NUMBER

Parameter type | Integer
Default value | Lowest available number; derived from instance start up order and INSTANCE_NUMBER value of other instances. If not configured for Oracle9i Real Application Clusters, then 0.
Parameter class | Static
Range of values | 1 to maximum number of instances specified when the database was created
Real Application Clusters | You must set this parameter for every instance, and all instances must have different values.

INSTANCE_NUMBER is an Oracle9i Real Application Clusters parameter that can be specified in parallel mode or exclusive mode. It specifies a unique number that maps the instance to one free list group for each database object created with storage parameter FREELIST GROUPS.

JAVA_MAX_SESSIONSPACE_SIZE

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to 4 GB

Java session space is the memory that holds Java state from one database call to another. JAVA_MAX_SESSIONSPACE_SIZE specifies (in bytes) the maximum amount of session space made available to a Java program executing in the server. When a user's session-duration Java state attempts to exceed this amount, the Java virtual machine kills the session with an out-of-memory failure.

JAVA_POOL_SIZE

Parameter type | Big integer
Syntax | LARGE_POOL_SIZE = integer [K | M | G]
Default value | 24 MB, rounded up to the nearest granule size
Parameter class | Static
Range of values | Minimum: the granule size Maximum: operating system-dependent

JAVA_POOL_SIZE specifies the size (in bytes) of the Java pool, from which the Java memory manager allocates most Java state during runtime execution. This memory includes the shared in-memory representation of Java method and class definitions, as well as the Java objects that are migrated to the Java session space at end-of-call.

JAVA_SOFT_SESSIONSPACE_LIMIT

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to 4 GB

Java session space is the memory that holds Java state from one database call to another. JAVA_SOFT_SESSIONSPACE_LIMIT specifies (in bytes) a soft limit on Java memory usage in a session, as a means to warn you if a user's session-duration Java state is using too much memory. When a user's session-duration Java state exceeds this size, Oracle generates a warning that goes into the trace files.

JOB_QUEUE_PROCESSES

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 1000
Real Application Clusters | Multiple instances can have different values.

JOB_QUEUE_PROCESSES specifies the maximum number of processes that can be created for the execution of jobs. It specifies the number of job queue processes per instance (J000, ... J999). Replication uses job queues for data refreshes. Advanced queuing uses job queues for message propagation. You can create user job requests through the DBMS_JOB package.

LARGE_POOL_SIZE

Parameter type

Big integer

Syntax

LARGE_POOL_SIZE = integer [K | M | G]

Default value

0 if both of the following are true:

  • The pool is not required by parallel execution
  • DBWR_IO_SLAVES is not set

Otherwise, derived from the values of PARALLEL_MAX_SERVERS, PARALLEL_THREADS_PER_CPU, CLUSTER_DATABASE_INSTANCES, DISPATCHERS, and DBWR_IO_SLAVES.

Parameter class

Dynamic: ALTER SYSTEM

Range of values

300 KB to at least 2 GB (actual maximum is operating system-specific)

LARGE_POOL_SIZE lets you specify the size (in bytes) of the large pool allocation heap. The large pool allocation heap is used in shared server systems for session memory, by parallel execution for message buffers, and by backup processes for disk I/O buffers. (Parallel execution allocates buffers out of the large pool only when PARALLEL_AUTOMATIC_TUNING is set to true.)

LICENSE_MAX_SESSIONS

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to number of session licenses
Real Application Clusters | Multiple instances can have different values, but the total for all instances mounting a database should be less than or equal to the total number of sessions licensed for that database.

LICENSE_MAX_SESSIONS specifies the maximum number of concurrent user sessions allowed. When this limit is reached, only users with the RESTRICTED SESSION privilege can connect to the database. Users who are not able to connect receive a warning message indicating that the system has reached maximum capacity.

LICENSE_MAX_USERS

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to number of user licenses
Real Application Clusters | Multiple instances should have the same values. If different instances specify different values for this parameter, then the value of the first instance to mount the database takes precedence.

LICENSE_MAX_USERS specifies the maximum number of users you can create in the database. When you reach this limit, you cannot create more users. You can, however, increase the limit.

Restriction on LICENSE_MAX_USERS

You cannot reduce the limit on users below the current number of users created for the database.

See Also:

"Changing Licensing Parameters: Examples"

LICENSE_SESSIONS_WARNING

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to value of LICENSE_MAX_SESSIONS parameter
Real Application Clusters | Multiple instances can have different values.

LICENSE_SESSIONS_WARNING specifies a warning limit on the number of concurrent user sessions. When this limit is reached, additional users can connect, but Oracle writes a message in the alert file for each new connection. Users with RESTRICTED SESSION privilege who connect after the limit is reached receive a warning message stating that the system is nearing its maximum capacity.

LOCAL_LISTENER

Parameter type | String
Syntax | LOCAL_LISTENER = network_name
Default value | (ADDRESS = (PROTOCOL=TCP)(HOST=)(PORT=1521))
Parameter class | Dynamic: ALTER SYSTEM

LOCAL_LISTENER specifies a network name that resolves to an address or address list of Oracle Net local listeners (that is, listeners that are running on the same machine as this instance). The address or address list is specified in the TNSNAMES.ORA file or other address repository as configured for your system.

LOCK_NAME_SPACE

Parameter type | String
Syntax | LOCK_NAME_SPACE = namespace
Default value | There is no default value.
Parameter class | Static
Range of values | Up to 8 alphanumeric characters. No special characters allowed.

LOCK_NAME_SPACE specifies the namespace that the distributed lock manager (DLM) uses to generate lock names. Consider setting this parameter if a standby or clone database has the same database name on the same cluster as the primary database.

LOCK_SGA

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

LOCK_SGA locks the entire SGA into physical memory. It is usually advisable to lock the SGA into real (physical) memory, especially if the use of virtual memory would include storing some of the SGA using disk space. This parameter is ignored on platforms that do not support it.

LOG_ARCHIVE_DEST

Parameter type | String
Syntax | LOG_ARCHIVE_DEST = filespec
Default value | Null
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path or device name, except raw partitions
Real Application Clusters | Multiple instances can have different values.
Note:

For Enterprise Edition users, this parameter has been deprecated in favor of the LOG_ARCHIVE_DEST_n parameters. If Oracle Enterprise Edition is not installed or it is installed, but you have not specified any LOG_ARCHIVE_DEST_n parameters, this parameter is valid.

LOG_ARCHIVE_DEST is applicable only if you are running the database in ARCHIVELOG mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST is incompatible with the LOG_ARCHIVE_DEST_n parameters, and must be defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string. Use a text string to specify the default location and root of the disk file or tape device when archiving redo log files. (Archiving to tape is not supported on all operating systems.) The value cannot be a raw partition.

LOG_ARCHIVE_DEST_n

Parameter type

String

Syntax

LOG_ARCHIVE_DEST_[1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10] =

   { null_string} |
     { LOCATION=path_name | SERVICE=service_name }
     [ { MANDATORY | OPTIONAL } ]
     [ REOPEN[=seconds] | NOREOPEN ]
     [ DELAY[=minutes] | NODELAY ]
     [ REGISTER[=template] | NOREGISTER ]
     [ TEMPLATE=template] | NOTEMPLATE ]
     [ ALTERNATE=destination | NOALTERNATE ]
     [ DEPENDENCY=destination | NODEPENDENCY ]
     [ MAX_FAILURE=count | NOMAX_FAILURE ]
     [ QUOTA_SIZE=blocks | NOQUOTA_SIZE ]
     [ QUOTA_USED=blocks | NOQUOTA_USED ]
     [ ARCH | LGWR ]
     [ SYNC[=PARALLEL|NOPARALLEL] | ASYNC[=blocks] ]
     [ AFFIRM | NOAFFIRM ]
     [ NET_TIMEOUT=seconds | NONET_TIMEOUT ]
   }

Default value

There is no default value.

Parameter class

Dynamic: ALTER SESSION, ALTER SYSTEM
Note:

This parameter is valid only if you have installed Oracle Enterprise Edition. You may continue to use LOG_ARCHIVE_DEST if you have installed Oracle Enterprise Edition. However, you cannot use both LOG_ARCHIVE_DEST_n and LOG_ARCHIVE_DEST, as they are not compatible.

The LOG_ARCHIVE_DEST_n parameters (where n = 1, 2, 3, ... 10) define up to ten archive log destinations. The parameter integer suffix is defined as the handle displayed by the V$ARCHIVE_DEST dynamic performance view.

LOG_ARCHIVE_DEST_STATE_n

Parameter type | String
Syntax | LOG_ARCHIVE_DEST_STATE_n = {alternate | reset | defer | enable}
Default value | enable
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

The LOG_ARCHIVE_DEST_STATE_n parameters (wheren = 1, 2, 3, ... 10) specify the availability state of the corresponding destination. The parameter suffix (1 through 10) specifies one of the ten corresponding LOG_ARCHIVE_DEST_n destination parameters.

LOG_ARCHIVE_DUPLEX_DEST

Parameter type | String
Syntax | LOG_ARCHIVE_DUPLEX_DEST = filespec
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Either a null string or any valid path or device name, except raw partitions
Note:

If you are using Oracle Enterprise Edition, this parameter is deprecated in favor of the LOG_ARCHIVE_DEST_n parameters. If Oracle Enterprise Edition is not installed or it is installed but you have not specified any LOG_ARCHIVE_DEST_n parameters, this parameter is valid.

LOG_ARCHIVE_DUPLEX_DEST is similar to the initialization parameter LOG_ARCHIVE_DEST. This parameter specifies a second archive destination: the duplex archive destination. This duplex archive destination can be either a must-succeed or a best-effort archive destination, depending on how many archive destinations must succeed (as specified in the LOG_ARCHIVE_MIN_SUCCEED_DEST parameter).

LOG_ARCHIVE_FORMAT

Parameter type | String
Syntax | LOG_ARCHIVE_FORMAT = filename
Default value | Operating system-dependent
Parameter class | Static
Range of values | Any string that resolves to a valid filename
Real Application Clusters | Multiple instances can have different values, but identical values are recommended.

LOG_ARCHIVE_FORMAT is applicable only if you are using the redo log in ARCHIVELOG mode. Use a text string and variables to specify the default filename format when archiving redo log files. The string generated from this format is appended to the string specified in the LOG_ARCHIVE_DEST parameter.

LOG_ARCHIVE_MAX_PROCESSES

Parameter type | Integer
Default value | 1
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any integer from 1 to 10

LOG_ARCHIVE_MAX_PROCESSES specifies the number of archiver background processes (ARC0 through ARC9) Oracle initially invokes.

LOG_ARCHIVE_MIN_SUCCEED_DEST

Parameter type | Integer
Default value | 1
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | 1 to 10 if you are using LOG_ARCHIVE_DEST_n 1 or 2 if you are using LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST

LOG_ARCHIVE_MIN_SUCCEED_DEST defines the minimum number of destinations that must succeed in order for the online logfile to be available for reuse.

LOG_ARCHIVE_START

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false
Real Application Clusters | Multiple instances can have different values.

LOG_ARCHIVE_START is applicable only when you use the redo log in ARCHIVELOG mode. It indicates whether archiving should be automatic or manual when the instance starts up.

LOG_ARCHIVE_TRACE

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0, 1, 2, 4, 8, 16, 32, 64, 128
Real Application Clusters | Multiple instances can have different values.

LOG_ARCHIVE_TRACE controls output generated by the archivelog process.

LOG_BUFFER

Parameter type | Integer
Default value | 512 KB or 128 KB * CPU_COUNT, whichever is greater
Parameter class | Static
Range of values | Operating system-dependent

LOG_BUFFER specifies the amount of memory (in bytes) that Oracle uses when buffering redo entries to a redo log file. Redo log entries contain a record of the changes that have been made to the database block buffers. The LGWR process writes redo log entries from the log buffer to a redo log file.

LOG_CHECKPOINT_INTERVAL

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Unlimited
Real Application Clusters | Multiple instances can have different values.

LOG_CHECKPOINT_INTERVAL specifies the frequency of checkpoints in terms of the number of redo log file blocks that can exist between an incremental checkpoint and the last block written to the redo log. This number refers to physical operating system blocks, not database blocks.

LOG_CHECKPOINT_TIMEOUT

Parameter type | Integer
Default value | 1800
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to unlimited
Real Application Clusters | Multiple instances can have different values.

LOG_CHECKPOINT_TIMEOUT specifies (in seconds) the amount of time that has passed since the incremental checkpoint at the position where the last write to the redo log (sometimes called the tail of the log) occurred. This parameter also signifies that no buffer will remain dirty (in the cache) for more than integer seconds.

LOG_CHECKPOINTS_TO_ALERT

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

LOG_CHECKPOINTS_TO_ALERT lets you log your checkpoints to the alert file. Doing so is useful for determining whether checkpoints are occurring at the desired frequency.

LOG_FILE_NAME_CONVERT

Parameter type

String

Syntax

LOG_FILE_NAME_CONVERT = [(]'string1' , 'string2' , 'string3' , 'string4' , ...[)]

Where:

  • string1 is the pattern of the primary database filename
  • string2 is the pattern of the standby database filename
  • string3 is the pattern of the primary database filename
  • string4 is the pattern of the standby database filename

You can use as many pairs of primary and standby replacement strings as required. You can use single or double quotation marks. The parentheses are optional.

Following are example settings that are acceptable:

LOG_FILE_NAME_CONVERT=('/dbs/t1/','/dbs/t1/s_','dbs/t2/ ','dbs/t2/s_')

Default value

None

Parameter class

Static

Range of values

Character strings

LOG_FILE_NAME_CONVERT converts the filename of a new log file on the primary database to the filename of a log file on the standby database. If you add a log file to the primary database, you must add a corresponding file to the standby database.

LOG_PARALLELISM

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 1 to 255

LOG_PARALLELISM specifies the level of concurrency for redo allocation within Oracle.

LOGMNR_MAX_PERSISTENT_SESSIONS

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 1 to LICENSE_MAX_SESSIONS

LOGMNR_MAX_PERSISTENT_SESSIONS enables you to specify the maximum number of persistent LogMiner mining sessions (which are LogMiner sessions that are backed up on disk) that are concurrently active when all sessions are mining redo logs generated by standalone instances. This pre-allocates 2*LOGMNR_MAX_PERSISTENT_SESSIONS MB of contiguous memory in the SGA for use by LogMiner.

MAX_COMMIT_PROPAGATION_DELAY

Parameter type | Integer
Default value | 700
Parameter class | Static
Range of values | 0 to 90000
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have identical values.
Caution:

Change this parameter only when it is absolutely necessary to see the most current version of the database when performing a query.

MAX_COMMIT_PROPAGATION_DELAY is an Oracle9i Real Application Clusters parameter. This initialization parameter should not be changed except under a limited set of circumstances specific to the cluster database.

MAX_DISPATCHERS

Parameter type | Integer
Default value | 5
Parameter class | Static
Range of values | 5 or the number of dispatchers configured, whichever is greater

MAX_DISPATCHERS specifies the maximum number of dispatcher processes allowed to be running simultaneously. The default value applies only if dispatchers have been configured for the system.

MAX_DUMP_FILE_SIZE

Parameter type | String
Syntax | MAX_DUMP_FILE_SIZE = {integer [K | M] | UNLIMITED}
Default value | UNLIMITED
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | 0 to unlimited, or UNLIMITED

MAX_DUMP_FILE_SIZE specifies the maximum size of trace files (excluding the alert file). Change this limit if you are concerned that trace files may use too much space.

MAX_ENABLED_ROLES

Parameter type | Integer
Default value | 20
Parameter class | Static
Range of values | 0 to 148

MAX_ENABLED_ROLES specifies the maximum number of database roles that users can enable, including roles contained within other roles.

MAX_ROLLBACK_SEGMENTS

Parameter type | Integer
Default value | MAX(30, TRANSACTIONS/TRANSACTIONS_PER_ROLLBACK_SEGMENT)
Parameter class | Static
Range of values | 2 to 65535

MAX_ROLLBACK_SEGMENTS specifies the maximum size of the rollback segment cache in the SGA. The number specified signifies the maximum number of rollback segments that can be kept online (that is, status of ONLINE) simultaneously by one instance.

MTS Parameters

See "Shared Server Parameters" .

MAX_SHARED_SERVERS

Parameter type | Integer
Default value | Derived from SHARED_SERVERS (either 20 or 2*SHARED_SERVERS)
Parameter class | Static
Range of values | Operating system-dependent

MAX_SHARED_SERVERS specifies the maximum number of shared server processes allowed to be running simultaneously. If artificial deadlocks occur too frequently on your system, you should increase the value of MAX_SHARED_SERVERS.

NLS_CALENDAR

Parameter type | String
Syntax | NLS_CALENDAR = "calendar_system"
Default value | None
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid calendar format name

NLS_CALENDAR specifies which calendar system Oracle uses. It can have one of the following values:

  • Arabic Hijrah
  • English Hijrah
  • Gregorian
  • Japanese Imperial
  • Persian
  • ROC Official (Republic of China)
  • Thai Buddha

NLS_COMP

Parameter type | String
Syntax | NLS_COMP = {BINARY | ANSI}
Default value | BINARY
Parameter class | Dynamic: ALTER SESSION

Normally, comparisons in the WHERE clause and in PL/SQL blocks is binary unless you specify the NLSSORT function. By setting NLS_COMP to ANSI, you indicate that comparisons in the WHERE clause and in PL/SQL blocks should use the linguistic sort specified in the NLS_SORT parameter. You must also define an index on the column for which you want linguistic sorts.

NLS_CURRENCY

Parameter type | String
Syntax | NLS_CURRENCY = currency_symbol
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid character string, with a maximum of 10 bytes (not including null)

NLS_CURRENCY specifies the string to use as the local currency symbol for the L number format element. The default value of this parameter is determined by NLS_TERRITORY.

NLS_DATE_FORMAT

Parameter type | String
Syntax | NLS_DATE_FORMAT = "format"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid date format mask but not exceeding a fixed length

NLS_DATE_FORMAT specifies the default date format to use with the TO_CHAR and TO_DATE functions. The default value of this parameter is determined by NLS_TERRITORY.

NLS_DATE_LANGUAGE

Parameter type | String
Syntax | NLS_DATE_LANGUAGE = language
Default value | Derived from NLS_LANGUAGE
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid NLS_LANGUAGE value

NLS_DATE_LANGUAGE specifies the language to use for the spelling of day and month names and date abbreviations (a.m., p.m., AD, BC) returned by the TO_DATE and TO_CHAR functions.

NLS_DUAL_CURRENCY

Parameter type | String
Syntax | NLS_DUAL_CURRENCY = currency_symbol
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid format name up to 10 characters

NLS_DUAL_CURRENCY specifies the dual currency symbol (such as "Euro") for the territory. The default is the dual currency symbol defined in the territory of your current language environment.

NLS_ISO_CURRENCY

Parameter type | String
Syntax | NLS_ISO_CURRENCY = territory
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic : ALTER SESSION
Range of values | Any valid NLS_TERRITORY value

NLS_ISO_CURRENCY specifies the string to use as the international currency symbol for the C number format element.

NLS_LANGUAGE

Parameter type | String
Syntax | NLS_LANGUAGE = language
Default value | Operating system-dependent, derived from the NLS_LANG environment variable
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid language name

NLS_LANGUAGE specifies the default language of the database. This language is used for messages, day and month names, symbols for AD, BC, a.m., and p.m., and the default sorting mechanism. This parameter also determines the default values of the parameters NLS_DATE_LANGUAGE and NLS_SORT.

NLS_LENGTH_SEMANTICS

Parameter type | String
Syntax | NLS_LENGTH_SEMANTICS = string Example: NLS_LENGTH_SEMANTICS = 'CHAR'
Default value | BYTE
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | BYTE | CHAR

NLS_LENGTH_SEMANTICS enables you to create CHAR and VARCHAR2 columns using either byte or character length semantics. Existing columns are not affected.

NLS_NCHAR_CONV_EXCP

Parameter type | String
Syntax | NLS_NCHAR_CONV_EXCP = {TRUE | FALSE}
Default value | FALSE
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

NLS_NCHAR_CONV_EXCP determines whether data loss during an implicit or explicit character type conversion will report an error.

NLS_NUMERIC_CHARACTERS

Parameter type | String
Syntax | NLS_NUMERIC_CHARACTERS = "decimal_character group_separator"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION

NLS_NUMERIC_CHARACTERS specifies the characters to use as the group separator and decimal character. It overrides those characters defined implicitly by NLS_TERRITORY. The group separator separates integer groups (that is, thousands, millions, billions, and so on). The decimal separates the integer portion of a number from the decimal portion.

NLS_SORT

Parameter type | String
Syntax | NLS_SORT = {BINARY | linguistic_definition}
Default value | Derived from NLS_LANGUAGE
Parameter class | Dynamic: ALTER SESSION
Range of values | BINARY or any valid linguistic definition name

NLS_SORT specifies the collating sequence for ORDER BY queries.

NLS_TERRITORY

Parameter type | String
Syntax | NLS_TERRITORY = territory
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid territory name

NLS_TERRITORY specifies the name of the territory whose conventions are to be followed for day and week numbering.

NLS_TIMESTAMP_FORMAT

Parameter type | String
Syntax | NLS_TIMESTAMP_FORMAT = "format"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid datetime format mask

NLS_TIMESTAMP_FORMAT defines the default timestamp format to use with the TO_CHAR and TO_TIMESTAMP functions.

NLS_TIMESTAMP_TZ_FORMAT

Parameter type | String
Syntax | NLS_TIMESTAMP_TZ_FORMAT = "format"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid datetime format mask

NLS_TIMESTAMP_TZ_FORMAT defines the default timestamp with time zone format to use with the TO_CHAR and TO_TIMESTAMP_TZfunctions.

O7_DICTIONARY_ACCESSIBILITY

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

O7_DICTIONARY_ACCESSIBILITY is intended for use when you migrate from Oracle7 to Oracle Security Server. It controls restrictions on SYSTEM privileges. If the parameter is set to true, access to objects in the SYS schema is allowed (Oracle7 behavior). The default setting of false ensures that system privileges that allow access to objects in "any schema" do not allow access to objects in SYS schema.

OBJECT_CACHE_MAX_SIZE_PERCENT

Parameter type | Integer
Default value | 10
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | 0 to operating system-dependent maximum

The object cache is a memory block on the client that allows applications to store entire objects and to navigate among them without round trips to the server. OBJECT_CACHE_MAX_SIZE_PERCENT specifies the percentage of the optimal cache size that the session object cache can grow past the optimal size. The maximum size is equal to the optimal size plus the product of this percentage and the optimal size. When the cache size exceeds this maximum size, the system will attempt to shrink the cache to the optimal size.

OBJECT_CACHE_OPTIMAL_SIZE

Parameter type | Integer
Default value | 102400 (100K)
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | 10 KB to operating system-dependent maximum

The object cache is a memory block on the client that allows applications to store entire objects and to navigate among them without round trips to the server. OBJECT_CACHE_OPTIMAL_SIZE specifies (in bytes) the size to which the session object cache is reduced when the size of the cache exceeds the maximum size.

OLAP_PAGE_POOL_SIZE

Parameter type | Integer
Default value | 32 MB
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | 32 MB to 2 GB

OLAP_PAGE_POOL_SIZE specifies the size (in bytes) of the OLAP pool.

OPEN_CURSORS

Parameter type | Integer
Default value | 50
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 1 to 4294967295 (4 GB -1)

OPEN_CURSORS specifies the maximum number of open cursors (handles to private SQL areas) a session can have at once. You can use this parameter to prevent a session from opening an excessive number of cursors. This parameter also constrains the size of the PL/SQL cursor cache which PL/SQL uses to avoid having to reparse as statements are reexecuted by a user.

OPEN_LINKS

Parameter type | Integer
Default value | 4
Parameter class | Static
Range of values | 0 to 255

OPEN_LINKS specifies the maximum number of concurrent open connections to remote databases in one session. These connections include database links, as well as external procedures and cartridges, each of which uses a separate process.

OPEN_LINKS_PER_INSTANCE

Parameter type | Integer
Default value | 4
Parameter class | Static
Range of values | 0 to 4294967295 (4 GB -1)
Real Application Clusters | Multiple instances can have different values.

OPEN_LINKS_PER_INSTANCE specifies the maximum number of migratable open connections globally for each database instance. XA transactions use migratable open connections so that the connections are cached after a transaction is committed. Another transaction can use the connection, provided the user who created the connection is the same as the user who owns the transaction.

OPTIMIZER_DYNAMIC_SAMPLING

Parameter type | Integer
Default value | If OPTIMIZER_FEATURES_ENABLE is set to 9.2.0 or higher, then 1 If OPTIMIZER_FEATURES_ENABLE is set to 9.0.1 or lower, then 0
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | 0 to 10

OPTIMIZER_DYNAMIC_SAMPLING controls the level of dynamic sampling performed by the optimizer.

OPTIMIZER_FEATURES_ENABLE

Parameter type | String
Syntax | OPTIMIZER_FEATURES_ENABLE = {8.0.0 | 8.0.3 | 8.0.4 | 8.0.5 | 8.0.6 | 8.0.7 | 8.1.0 | 8.1.3 | 8.1.4 | 8.1.5 | 8.1.6 | 8.1.7 | 9.0.0 | 9.0.1 | 9.2.0}
Default value | 9.2.0
Parameter class | Static

OPTIMIZER_FEATURES_ENABLE acts as an umbrella parameter for enabling a series of optimizer features based on an Oracle release number.

OPTIMIZER_INDEX_CACHING

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to 100

OPTIMIZER_INDEX_CACHING lets you adjust the behavior of cost-based optimization to favor nested loops joins and IN-list iterators.

OPTIMIZER_INDEX_COST_ADJ

Parameter type | Integer
Default value | 100
Parameter class | Dynamic: ALTER SESSION
Range of values | 1 to 10000

OPTIMIZER_INDEX_COST_ADJ lets you tune optimizer behavior for access path selection to be more or less index friendly--that is, to make the optimizer more or less prone to selecting an index access path over a full table scan.

OPTIMIZER_MAX_PERMUTATIONS

Parameter type | Integer
Default value | If OPTIMIZER_FEATURES_ENABLE is set to 9.0.0 or higher, then 2000 If OPTIMIZER_FEATURES_ENABLE is set to 8.1.7 or lower, then 80000
Parameter class | Dynamic: ALTER SESSION
Range of values | 4 to 80000

OPTIMIZER_MAX_PERMUTATIONS restricts the number of permutations of the tables the optimizer will consider in queries with joins. Such a restriction ensures that the parse time for the query stays within acceptable limits. However, a slight risk exists that the optimizer will overlook a good plan it would otherwise have found.

OPTIMIZER_MODE

Parameter type | String
Syntax | OPTIMIZER_MODE = {first_rows_[1 | 10 | 100 | 1000] | first_rows | all_rows | choose | rule}
Default value | choose
Parameter class | Dynamic: ALTER SESSION

OPTIMIZER_MODE establishes the default behavior for choosing an optimization approach for the instance.

ORACLE_TRACE_COLLECTION_NAME

Parameter type | String
Syntax | ORACLE_TRACE_COLLECTION_NAME = collection_name
Default value | There is no default value.
Parameter class | Static
Range of values | Valid collection name up to 16 characters long (except for platforms that enforce 8-character file names)

A collection is data collected for events that occurred while an instrumented product was running. ORACLE_TRACE_COLLECTION_NAME specifies the Oracle Trace collection name for this instance. Oracle also uses this parameter in the output file names (collection definition file .cdf and data collection file .dat). If you set ORACLE_TRACE_ENABLE to true, setting this value to a non-null string will start a default Oracle Trace collection that will run until this value is set to null again.

ORACLE_TRACE_COLLECTION_PATH

Parameter type | String
Syntax | ORACLE_TRACE_COLLECTION_PATH = pathname
Default value | Operating system-specific
Parameter class | Static
Range of values | Full directory pathname

ORACLE_TRACE_COLLECTION_PATH specifies the directory pathname where the Oracle Trace collection definition (.cdf) and data collection (.dat) files are located. If you accept the default, the Oracle Trace .cdf and .dat files will be located in ORACLE_HOME/otrace/admin/cdf.

ORACLE_TRACE_COLLECTION_SIZE

Parameter type | Integer
Default value | 5242880
Parameter class | Static
Range of values | 0 to 4294967295

ORACLE_TRACE_COLLECTION_SIZE specifies (in bytes) the maximum size of the Oracle Trace collection file (.dat). Once the collection file reaches this maximum, the collection is disabled. A value of 0 means that the file has no size limit.

ORACLE_TRACE_ENABLE

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

To enable Oracle Trace collections for the server, set ORACLE_TRACE_ENABLE to true. This setting alone does not start an Oracle Trace collection, but it allows Oracle Trace to be used for the server.

ORACLE_TRACE_FACILITY_NAME

Parameter type | String
Syntax | ORACLE_TRACE_FACILITY_NAME = {ORACLED | ORACLEE | ORACLESM | ORACLEC}
Default value | ORACLED
Parameter class | Static

ORACLE_TRACE_FACILITY_NAME specifies the event set that Oracle Trace collects. The value of this parameter, followed by the .fdf extension, is the name of the Oracle Trace product definition file. That file must be located in the directory specified by the ORACLE_TRACE_FACILITY_PATH parameter. The product definition file contains definition information for all the events and data items that can be collected for products that use the Oracle Trace data collection API.

ORACLE_TRACE_FACILITY_PATH

Parameter type | String
Syntax | ORACLE_TRACE_FACILITY_PATH = pathname
Default value | Operating system-specific
Parameter class | Static
Range of values | Full directory pathname

ORACLE_TRACE_FACILITY_PATH specifies the directory pathname where Oracle Trace facility definition files are located. On Solaris, the default path is ORACLE_HOME/otrace/admin/fdf/. On NT, the default path is %OTRACE80%\ADMIN\FDF\.

OS_AUTHENT_PREFIX

Parameter type | String
Syntax | OS_AUTHENT_PREFIX = authentication_prefix
Default value | OPS$
Parameter class | Static

OS_AUTHENT_PREFIX specifies a prefix that Oracle uses to authenticate users attempting to connect to the server. Oracle concatenates the value of this parameter to the beginning of the user's operating system account name and password. When a connection request is attempted, Oracle compares the prefixed username with Oracle usernames in the database.

OS_ROLES

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

OS_ROLES determines whether Oracle or the operating system identifies and manages the roles of each username.

PARALLEL_ADAPTIVE_MULTI_USER

Parameter type | Boolean
Default value | Derived from the value of PARALLEL_AUTOMATIC_TUNING
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

PARALLEL_ADAPTIVE_MULTI_USER, when set to true, enables an adaptive algorithm designed to improve performance in multiuser environments that use parallel execution. The algorithm automatically reduces the requested degree of parallelism based on the system load at query startup time. The effective degree of parallelism is based on the default degree of parallelism, or the degree from the table or hints, divided by a reduction factor.

PARALLEL_AUTOMATIC_TUNING

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

When PARALLEL_AUTOMATIC_TUNING is set to true, Oracle determines the default values for parameters that control parallel execution. In addition to setting this parameter, you must specify the PARALLEL clause for the target tables in the system. Oracle then tunes all subsequent parallel operations automatically.

PARALLEL_EXECUTION_MESSAGE_SIZE

Parameter type | Integer
Default value | Operating system-dependent
Parameter class | Static
Range of values | 2148 to 65535 (64 KB - 1)
Real Application Clusters | Multiple instances must have the same value.

PARALLEL_EXECUTION_MESSAGE_SIZE specifies the size of messages for parallel execution (formerly referred to as parallel query, PDML, Parallel Recovery, replication).

PARALLEL_INSTANCE_GROUP

Parameter type | String
Syntax | PARALLEL_INSTANCE_GROUP = group_name
Default value | A group consisting of all instances currently active
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | Any group name specified in the INSTANCE_GROUPS parameter of any active instance
Real Application Clusters | Different instances can have different values.

PARALLEL_INSTANCE_GROUP is an Oracle9i Real Application Clusters parameter that you can specify in parallel mode only. Used in conjunction with the INSTANCE_GROUPS parameter, it lets you restrict parallel query operations to a limited number of instances.

PARALLEL_MAX_SERVERS

Parameter type | Integer
Default value | Derived from the values of CPU_COUNT, PARALLEL_AUTOMATIC_TUNING, and PARALLEL_ADAPTIVE_MULTI_USER
Parameter class | Static
Range of values | 0 to 3599
Real Application Clusters | Multiple instances must have the same value.
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

PARALLEL_MAX_SERVERS specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle increases the number of processes from the number created at instance startup up to this value.

PARALLEL_MIN_PERCENT

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to 100
Real Application Clusters | Multiple instances can have different values.

PARALLEL_MIN_PERCENT operates in conjunction with PARALLEL_MAX_SERVERS and PARALLEL_MIN_SERVERS. It lets you specify the minimum percentage of parallel execution processes (of the value of PARALLEL_MAX_SERVERS) required for parallel execution. Setting this parameter ensures that parallel operations will not execute sequentially unless adequate resources are available. The default value of 0 means that no minimum percentage of processes has been set.

PARALLEL_MIN_SERVERS

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to value of PARALLEL_MAX_SERVERS
Real Application Clusters | Multiple instances can have different values.
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

PARALLEL_MIN_SERVERS specifies the minimum number of parallel execution processes for the instance. This value is the number of parallel execution processes Oracle creates when the instance is started.

PARALLEL_THREADS_PER_CPU

Parameter type | Integer
Default value | Operating system-dependent, usually 2
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any nonzero number
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

PARALLEL_THREADS_PER_CPU specifies the default degree of parallelism for the instance and determines the parallel adaptive and load balancing algorithms. The parameter describes the number of parallel execution processes or threads that a CPU can handle during parallel execution.

PARTITION_VIEW_ENABLED

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION
Range of values | true | false
Note:

Oracle Corporation recommends that you use partitioned tables (available starting with Oracle8) rather than partition views. Partition views are supported for backward compatibility only.

PARTITION_VIEW_ENABLED specifies whether the optimizer uses partition views. If you set this parameter to true, the optimizer prunes (or skips) unnecessary table accesses in a partition view and alters the way it computes statistics on a partition view from statistics on underlying tables.

PGA_AGGREGATE_TARGET

Parameter type | Big integer
Syntax | PGA_AGGREGATE_TARGET = integer [K | M | G]
Default value | 0 (automatic memory management is turned OFF by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: 10 MB Maximum: 4096 GB - 1

PGA_AGGREGATE_TARGET specifies the target aggregate PGA memory available to all server processes attached to the instance. You must set this parameter to enable the automatic sizing of SQL working areas used by memory-intensive SQL operators such as sort, group-by, hash-join, bitmap merge, and bitmap create.

PLSQL_COMPILER_FLAGS

Parameter type | String
Syntax | PLSQL_COMPILER_FLAGS = { [DEBUG | NON_DEBUG] [INTERPRETED | NATIVE] }
Default value | INTERPRETED, NON_DEBUG
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

PLSQL_COMPILER_FLAGS is a parameter used by the PL/SQL compiler. It specifies a list of compiler flags as a comma-separated list of strings.

PLSQL_NATIVE_C_COMPILER

Parameter type | String
Syntax | PLSQL_NATIVE_C_COMPILER = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_C_COMPILER specifies the full path name of a C compiler which is used to compile the generated C file into an object file.

PLSQL_NATIVE_LIBRARY_DIR

Parameter type | String
Syntax | PLSQL_NATIVE_LIBRARY_DIR = directory
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid directory path

PLSQL_NATIVE_LIBRARY_DIR is a parameter used by the PL/SQL compiler. It specifies the name of a directory where the shared objects produced by the native compiler are stored.

PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 232-1 (max value represented by 32 bits)

PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT specifies the number of subdirectories created by the database administrator in the directory specified by PLSQL_NATIVE_LIBRARY_DIR.

PLSQL_NATIVE_LINKER

Parameter type | String
Syntax | PLSQL_NATIVE_LINKER = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_LINKER specifies the full path name of a linker such as ld in UNIX or GNU ld which is used to link the object file into a shared object or DLL.

PLSQL_NATIVE_MAKE_FILE_NAME

Parameter type | String
Syntax | PLSQL_NATIVE_MAKE_FILE_NAME = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_MAKE_FILE_NAME specifies the full path name of a make file. The make utility (specified by PLSQL_NATIVE_MAKE_UTILITY) uses this make file to generate the shared object or DLL.

PLSQL_NATIVE_MAKE_UTILITY

Parameter type | String
Syntax | PLSQL_NATIVE_MAKE_UTILITY = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_MAKE_UTILITY specifies the full path name of a make utility such as make in UNIX or gmake (GNU make). The make utility is needed to generate the shared object or DLL from the generated C source.

PLSQL_V2_COMPATIBILITY

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

PL/SQL Version 2 allows some abnormal behavior that Version 8 disallows. If you want to retain that behavior for backward compatibility, set PLSQL_V2_COMPATIBILITY to true. If you set it to false, PL/SQL Version 8 behavior is enforced and Version 2 behavior is not allowed.

PRE_PAGE_SGA

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

PRE_PAGE_SGA determines whether Oracle reads the entire SGA into memory at instance startup. Operating system page table entries are then prebuilt for each page of the SGA. This setting can increase the amount of time necessary for instance startup, but it is likely to decrease the amount of time necessary for Oracle to reach its full performance capacity after startup.

PROCESSES

Parameter type | Integer
Default value | Derived from PARALLEL_MAX_SERVERS
Parameter class | Static
Range of values | 6 to operating system-dependent
Real Application Clusters | Multiple instances can have different values.

PROCESSES specifies the maximum number of operating system user processes that can simultaneously connect to Oracle. Its value should allow for all background processes such as locks, job queue processes, and parallel execution processes.

QUERY_REWRITE_ENABLED

Parameter type | String
Syntax | QUERY_REWRITE_ENABLED = {force | true | false}
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Real Application Clusters | Multiple instances can have different values.

QUERY_REWRITE_ENABLED allows you to enable or disable query rewriting globally for the database.

See Also:

"Enabling Query Rewrite: Example"

QUERY_REWRITE_INTEGRITY

Parameter type | String
Syntax | QUERY_REWRITE_INTEGRITY = {stale_tolerated | trusted | enforced}
Default value | enforced
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Real Application Clusters | Multiple instances can have different values.

QUERY_REWRITE_INTEGRITY determines the degree to which Oracle must enforce query rewriting. At the safest level, Oracle does not use query rewrite transformations that rely on unenforced relationships.

RDBMS_SERVER_DN

Parameter type | X.500 Distinguished Name
Default value | There is no default value.
Parameter class | Static
Range of values | All X.500 Distinguished Name format values

RDBMS_SERVER_DN specifies the Distinguished Name (DN) of the Oracle server. It is used for retrieving Enterprise Roles from an enterprise directory service.

READ_ONLY_OPEN_DELAYED

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

READ_ONLY_OPEN_DELAYED determines when datafiles in read-only tablespaces are accessed.

RECOVERY_PARALLELISM

Parameter type | Integer
Default value | Operating system-dependent
Parameter class | Static
Range of values | Operating system-dependent, but cannot exceed PARALLEL_MAX_SERVERS

RECOVERY_PARALLELISM specifies the number of processes to participate in instance or crash recovery. A value of 0 or 1 indicates that recovery is to be performed serially by one process.

REMOTE_ARCHIVE_ENABLE

Parameter type | String
Syntax | REMOTE_ARCHIVE_ENABLE = {receive [, send] | false | true}
Default value | true
Parameter class | Static

REMOTE_ARCHIVE_ENABLE enables or disables the sending of redo archival to remote destinations and the receipt of remotely archived redo.

REMOTE_DEPENDENCIES_MODE

Parameter type | String
Syntax | REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value | TIMESTAMP
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

REMOTE_DEPENDENCIES_MODE specifies how Oracle should handle dependencies upon remote PL/SQL stored procedures.

REMOTE_LISTENER

Parameter type | String
Syntax | REMOTE_LISTENER = network_name
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

REMOTE_LISTENER specifies a network name that resolves to an address or address list of Oracle Net remote listeners (that is, listeners that are not running on the same machine as this instance). The address or address list is specified in the TNSNAMES.ORA file or other address repository as configured for your system.

REMOTE_LOGIN_PASSWORDFILE

Parameter type | String
Syntax | REMOTE_LOGIN_PASSWORDFILE= {NONE | SHARED | EXCLUSIVE}
Default value | NONE
Parameter class | Static
Real Application Clusters | Multiple instances must have the same value.

REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file and how many databases can use the password file.

REMOTE_OS_AUTHENT

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

REMOTE_OS_AUTHENT specifies whether remote clients will be authenticated with the value of the OS_AUTHENT_PREFIX parameter.

REMOTE_OS_ROLES

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

REMOTE_OS_ROLES specifies whether operating system roles are allowed for remote clients. The default value, false, causes Oracle to identify and manage roles for remote clients.

REPLICATION_DEPENDENCY_TRACKING

Parameter type | Boolean
Default value | true
Parameter class | Static
Range of values | true | false

REPLICATION_DEPENDENCY_TRACKING enables or disables dependency tracking for read/write operations to the database. Dependency tracking is essential for propagating changes in a replicated environment in parallel.

RESOURCE_LIMIT

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

RESOURCE_LIMIT determines whether resource limits are enforced in database profiles.

See Also:

"Enabling Resource Limits: Example"

RESOURCE_MANAGER_PLAN

Parameter type | String
Syntax | RESOURCE_MANAGER_PLAN = plan_name
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid character string

RESOURCE_MANAGER_PLAN specifies the top-level resource plan to use for an instance. The resource manager will load this top-level plan along with all its descendants (subplans, directives, and consumer groups). If you do not specify this parameter, the resource manager is off by default.

ROLLBACK_SEGMENTS

Parameter type | String
Syntax | ROLLBACK_SEGMENTS = (segment_name [, segment_name] ... )
Default value | The instance uses public rollback segments by default if you do not specify this parameter
Parameter class | Static
Range of values | Any rollback segment names listed in DBA_ROLLBACK_SEGS except SYSTEM
Real Application Clusters | Multiple instances must have different values.

ROLLBACK_SEGMENTS allocates one or more rollback segments by name to this instance. If you set this parameter, the instance acquires all of the rollback segments named in this parameter, even if the number of rollback segments exceeds the minimum number required by the instance (calculated as TRANSACTIONS / TRANSACTIONS_PER_ROLLBACK_SEGMENT).

ROW_LOCKING

Parameter type | String
Syntax | ROW_LOCKING = {ALWAYS | DEFAULT | INTENT}
Default value | ALWAYS
Parameter class | Static
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

ROW_LOCKING specifies whether row locks are acquired during UPDATE operations.

SERIAL_REUSE

Parameter type | String
Syntax | SERIAL_REUSE = {DISABLE | SELECT | DML | PLSQL | ALL}
Default value | DISABLE
Parameter class | Static

SERIAL_REUSE specifies which types of cursors make use of the serial-reusable memory feature. This feature allocates private cursor memory in the SGA so that it can be reused (serially, not concurrently) by sessions executing the same cursor.

SERVICE_NAMES

Parameter type | String
Syntax | SERVICE_NAMES = db_service_name [, db_service_name [,...] ]
Default value | DB_NAME.DB_DOMAIN if defined
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any ASCII string or comma-separated list of string names

SERVICE_NAMES specifies one or more names for the database service to which this instance connects. You can specify multiple service names in order to distinguish among different uses of the same database.

SESSION_CACHED_CURSORS

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to operating system-dependent
Real Application Clusters | Multiple instances can have different values.

SESSION_CACHED_CURSORS lets you specify the number of session cursors to cache. Repeated parse calls of the same SQL statement cause the session cursor for that statement to be moved into the session cursor cache. Subsequent parse calls will find the cursor in the cache and do not need to reopen the cursor. Oracle uses a least recently used algorithm to remove entries in the session cursor cache to make room for new entries when needed.

SESSION_MAX_OPEN_FILES

Parameter type | Integer
Default value | 10
Parameter class | Static
Range of values | 1 to either 50 or the value of MAX_OPEN_FILES defined at the operating system level, whichever is less

SESSION_MAX_OPEN_FILES specifies the maximum number of BFILEs that can be opened in any session. Once this number is reached, subsequent attempts to open more files in the session by using DBMS_LOB.FILEOPEN() or OCILobFileOpen() will fail. The maximum value for this parameter depends on the equivalent parameter defined for the underlying operating system.

SESSIONS

Parameter type | Integer
Default value | Derived: (1.1 * PROCESSES) + 5
Parameter class | Static
Range of values | 1 to 231

SESSIONS specifies the maximum number of sessions that can be created in the system. Because every login requires a session, this parameter effectively determines the maximum number of concurrent users in the system. You should always set this parameter explicitly to a value equivalent to your estimate of the maximum number of concurrent users, plus the number of background processes, plus approximately 10% for recursive sessions.

SGA_MAX_SIZE

Parameter type | Big integer
Syntax | SGA_MAX_SIZE = integer [K | M | G]
Default value | Initial size of SGA at startup, dependent on the sizes of different pools in the SGA, such as buffer cache, shared pool, large pool, and so on.
Parameter class | Static
Range of values | 0 to operating system-dependent

SGA_MAX_SIZE specifies the maximum size of SGA for the lifetime of the instance.

SHADOW_CORE_DUMP

Parameter type | String
Syntax | SHADOW_CORE_DUMP = {partial | full | none}
Default value | partial
Parameter class | Static

SHADOW_CORE_DUMP specifies whether Oracle includes the SGA in the core file for foreground (client) processes.

SHARED_MEMORY_ADDRESS

Parameter type | Integer
Default value | 0
Parameter class | Static

SHARED_MEMORY_ADDRESS and HI_SHARED_MEMORY_ADDRESS specify the starting address at runtime of the system global area (SGA). This parameter is ignored on the many platforms that specify the SGA's starting address at linktime.

SHARED_POOL_RESERVED_SIZE

Parameter type | Big integer
Syntax | SHARED_POOL_RESERVED_SIZE = integer [K | M | G]
Default value | 5% of the value of SHARED_POOL_SIZE
Parameter class | Static
Range of values | Minimum: 5000 Maximum: one half of the value of SHARED_POOL_SIZE

SHARED_POOL_RESERVED_SIZE specifies (in bytes) the shared pool space that is reserved for large contiguous requests for shared pool memory.

SHARED_POOL_SIZE

Parameter type | Big integer
Syntax | SHARED_POOL_SIZE = integer [K | M | G]
Default value | 32-bit platforms: 8 MB, rounded up to the nearest granule size 64-bit platforms: 64 MB, rounded up to the nearest granule size
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

SHARED_POOL_SIZE specifies (in bytes) the size of the shared pool. The shared pool contains shared cursors, stored procedures, control structures, and other structures. If you set PARALLEL_AUTOMATIC_TUNING to false, then Oracle also allocates parallel execution message buffers from the shared pool. Larger values improve performance in multi-user systems. Smaller values use less memory.

Shared Server Parameters

Beginning in Oracle9i, the multi-threaded server architecture is called shared server architecture.

When you start your instance, Oracle creates shared server processes and dispatcher processes for the shared server architecture based on the values of the SHARED_SERVERS and DISPATCHERS initialization parameters. You can also set the SHARED_SERVERS and DISPATCHERS parameters with ALTER SYSTEM to perform one of the following operations while the instance is running:

  • Create additional shared server processes by increasing the minimum number of shared server processes.
  • Terminate existing shared server processes after their current calls finish processing.
  • Create more dispatcher processes for a specific protocol, up to a maximum across all protocols specified by the initialization parameter MAX_DISPATCHERS.
  • Terminate existing dispatcher processes for a specific protocol after their current user processes disconnect from the instance.

SHARED_SERVERS

Parameter type | Integer
Default value | If you are using shared server architecture, then the value is 1. If you are not using shared server architecture, then the value is 0.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Operating system-dependent

SHARED_SERVERS specifies the number of server processes that you want to create when an instance is started up. If system load decreases, this minimum number of servers is maintained. Therefore, you should take care not to set SHARED_SERVERS too high at system startup.

See Also:

"Changing Shared Server Settings: Examples"

SHARED_SERVER_SESSIONS

Parameter type | Integer
Default value | Derived: the lesser of CIRCUITS and SESSIONS - 5
Parameter class | Static
Range of values | 0 to SESSIONS - 5

SHARED_SERVER_SESSIONS specifies the total number of shared server architecture user sessions to allow. Setting this parameter enables you to reserve user sessions for dedicated servers.

SORT_AREA_RETAINED_SIZE

Parameter type | Integer
Default value | Derived from SORT_AREA_SIZE
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | From the value equivalent of two database blocks to the value of SORT_AREA_SIZE
Note:

Oracle does not recommend using the SORT_AREA_RETAINED_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_RETAINED_SIZE is retained for backward compatibility.

SORT_AREA_RETAINED_SIZE specifies (in bytes) the maximum amount of the user global area (UGA) memory retained after a sort run completes. The retained size controls the size of the read buffer, which Oracle uses to maintain a portion of the sort in memory. This memory is released back to the UGA, not to the operating system, after the last row is fetched from the sort space.

SORT_AREA_SIZE

Parameter type | Integer
Default value | 65536
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | Minimum: the value equivalent of six database blocks Maximum: operating system-dependent
Note:

Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility.

SORT_AREA_SIZE specifies in bytes the maximum amount of memory Oracle will use for a sort. After the sort is complete, but before the rows are returned, Oracle releases all of the memory allocated for the sort, except the amount specified by the SORT_AREA_RETAINED_SIZE parameter. After the last row is returned, Oracle releases the remainder of the memory.

SPFILE

Parameter type | String
Syntax | SPFILE = spfile_name
Default value | ORACLE_HOME/dbs/spfile.ora
Parameter class | Static
Range of values | Any valid SPFILE
Real Application Clusters | Multiple instances should have the same value.

The value of this parameter is the name of the current server parameter file (SPFILE) in use. This parameter can be defined in a client side PFILE to indicate the name of the server parameter file to use.

SQL92_SECURITY

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

The SQL92 standards specify that security administrators should be able to require that users have SELECT privilege on a table when executing an UPDATE or DELETE statement that references table column values in a WHERE or SET clause. SQL92_SECURITY lets you specify whether users must have been granted the SELECT object privilege in order to execute such UPDATE or DELETE statements.

SQL_TRACE

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

The value of SQL_TRACE disables or enables the SQL trace facility. Setting this parameter to true provides information on tuning that you can use to improve performance. You can change the value using the DBMS_SYSTEM package.

STANDBY_ARCHIVE_DEST

Parameter type | String
Syntax | STANDBY_ARCHIVE_DEST = filespec
Default value | Operating system-specific
Parameter class | Dynamic: ALTER SYSTEM
Range of values | A valid path or device name other than RAW

STANDBY_ARCHIVE_DEST is relevant only for a standby database in managed recovery mode. It specifies the location of archive logs arriving from a primary database. Oracle uses STANDBY_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT to fabricate the fully qualified standby log filenames and stores the filenames in the standby control file.

STANDBY_FILE_MANAGEMENT

Parameter type | String
Syntax | STANDBY_FILE_MANAGEMENT = {MANUAL | AUTO}
Default value | MANUAL
Parameter class | Dynamic: ALTER SYSTEM

STANDBY_FILE_MANAGEMENT enables or disables automatic standby file management. When automatic standby file management is enabled, operating system file additions and deletions on the primary database are replicated on the standby database.

STAR_TRANSFORMATION_ENABLED

Parameter type | String
Syntax | STAR_TRANSFORMATION_ENABLED = {TEMP_DISABLE | TRUE | FALSE}
Default value | FALSE
Parameter class | Dynamic: ALTER SESSION

STAR_TRANSFORMATION_ENABLED determines whether a cost-based query transformation will be applied to star queries.

STATISTICS_LEVEL

Parameter type | String
Syntax | STATISTICS_LEVEL = {ALL | TYPICAL | BASIC}
Default value | TYPICAL
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

STATISTICS_LEVEL sets the statistics collection level of the database.

TAPE_ASYNCH_IO

Parameter type | Boolean
Default value | true
Parameter class | Static
Range of values | true | false

TAPE_ASYNCH_IO controls whether I/O to sequential devices (for example, backup or restore of Oracle data to or from tape) is asynchronous--that is, whether parallel server processes can overlap I/O requests with CPU processing during table scans. If your platform supports asynchronous I/O to sequential devices, Oracle Corporation recommends that you leave this parameter set to its default. However, if the asynchronous I/O implementation is not stable, you can set TAPE_ASYNCH_IO to false to disable asynchronous I/O. If your platform does not support asynchronous I/O to sequential devices, this parameter has no effect.

THREAD

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to the maximum number of enabled threads
Real Application Clusters | If specified, multiple instances must have different values.

THREAD is an Oracle9i Real Application Clusters parameter that specifies the number of the redo thread to be used by an instance.

TIMED_OS_STATISTICS

Parameter type | Integer
Default value | If STATISTICS_LEVEL is set to ALL, then 5 If STATISTICS_LEVEL is set to BASIC or TYPICAL, then 0
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | Unlimited

TIMED_OS_STATISTICS specifies the interval (in seconds) at which Oracle collects operating system statistics when a request is made from the client to the server or when a request completes.

TIMED_STATISTICS

Parameter type | Boolean
Default value | If STATISTICS_LEVEL is set to TYPICAL or ALL, then true If STATISTICS_LEVEL is set to BASIC, then false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

TIMED_STATISTICS specifies whether or not statistics related to time are collected.

TRACE_ENABLED

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

TRACE_ENABLED controls tracing of the execution history, or code path, of Oracle. Oracle Support Services uses this information for debugging.

TRACEFILE_IDENTIFIER

Parameter type | String
Syntax | TRACEFILE_IDENTIFIER = "traceid"
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION
Range of values | Any characters that can occur as part of a file name on the customer platform

TRACEFILE_IDENTIFIER specifies a custom identifier that becomes part of the Oracle Trace file name. Such a custom identifier is used to identify a trace file simply from its name and without having to open it or view its contents.

TRANSACTION_AUDITING

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM ... DEFERRED
Range of values | true | false

If TRANSACTION_AUDITING is true, Oracle generates a special redo record that contains the user logon name, username, the session ID, some operating system information, and client information. For each successive transaction, Oracle generates a record that contains only the session ID. These subsequent records link back to the first record, which also contains the session ID.

TRANSACTIONS

Parameter type | Integer
Default value | Derived: (1.1 * SESSIONS)
Parameter class | Static
Range of values | 4 to 232
Real Application Clusters | Multiple instances can have different values.

TRANSACTIONS specifies the maximum number of concurrent transactions. Greater values increase the size of the SGA and can increase the number of rollback segments allocated. The default value is greater than SESSIONS (and, in turn, PROCESSES) to allow for recursive transactions.

Note:

You can set this parameter using ALTER SYSTEM only if you have started up the database using a server parameter file (spfile), and you must specify SCOPE = SPFILE.

TRANSACTIONS_PER_ROLLBACK_SEGMENT

Parameter type | Integer
Default value | 5
Parameter class | Static
Range of values | 1 to operating system-dependent
Real Application Clusters | Multiple instances can have different values.

TRANSACTIONS_PER_ROLLBACK_SEGMENT specifies the number of concurrent transactions you expect each rollback segment to have to handle. The minimum number of rollback segments acquired at startup is TRANSACTIONS divided by the value for this parameter. For example, if TRANSACTIONS is 101 and this parameter is 10, then the minimum number of rollback segments acquired would be the ratio 101/10, rounded up to 11.

UNDO_MANAGEMENT

Parameter type | String
Syntax | UNDO_MANAGEMENT = {MANUAL | AUTO}
Default value | MANUAL
Parameter class | Static
Real Application Clusters | Multiple instances must have the same value.

UNDO_MANAGEMENT specifies which undo space management mode the system should use. When set to AUTO, the instance starts in automatic undo management mode. In manual undo management mode, undo space is allocated externally as rollback segments.

UNDO_RETENTION

Parameter type | Integer
Default value | 900
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 232-1 (max value represented by 32 bits)
Real Application Clusters | Multiple instances must have the same value.

UNDO_RETENTION specifies (in seconds) the amount of committed undo information to retain in the database. You can use UNDO_RETENTION to satisfy queries that require old undo information to rollback changes to produce older images of data blocks. You can set the value at instance startup.

UNDO_SUPPRESS_ERRORS

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

UNDO_SUPPRESS_ERRORS enables users to suppress errors while executing manual undo management mode operations (for example, ALTER ROLLBACK SEGMENT ONLINE) in automatic undo management mode. Setting this parameter enables users to use the undo tablespace feature before all application programs and scripts are converted to automatic undo management mode. For example, if you have a tool that uses SET TRANSACTION USE ROLLBACK SEGMENT statement, you can add the statement "ALTER SESSION SET UNDO_SUPPRESS_ERRORS = true" to the tool to suppress the ORA-30019 error.

UNDO_TABLESPACE

Parameter type | String
Syntax | UNDO_TABLESPACE = undoname
Default value | The first available undo tablespace in the database.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Legal name of an existing undo tablespace
Real Application Clusters | Multiple instances can have different values.

UNDO_TABLESPACE specifies the undo tablespace to be used when an instance starts up. If this parameter is specified when the instance is in manual undo management mode, an error will occur and startup will fail.

USE_INDIRECT_DATA_BUFFERS

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

USE_INDIRECT_DATA_BUFFERS controls how the system global area (SGA) uses memory. It enables or disables the use of the extended buffer cache mechanism for 32-bit platforms that can support more than 4 GB of physical memory. On platforms that do not support this much physical memory, this parameter is ignored.

USE_STORED_OUTLINES

Syntax: USE_STORED_OUTLINES = { TRUE | FALSE | category_name}

The USE_STORED_OUTLINES parameter determines whether the optimizer will use stored public outlines to generate execution plans. USE_STORED_OUTLINES is not an initialization parameter.

  • TRUE causes the optimizer to use outlines stored in the DEFAULT category when compiling requests.
  • FALSE specifies that the optimizer should not use stored outlines. This is the default.
  • category_name causes the optimizer to use outlines stored in the category_name category when compiling requests.

USER_DUMP_DEST

Parameter type | String
Syntax | USER_DUMP_DEST = {pathname | directory}
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid local path, directory, or disk

USER_DUMP_DEST specifies the pathname for a directory where the server will write debugging trace files on behalf of a user process.

UTL_FILE_DIR

Parameter type | String
Syntax | UTL_FILE_DIR = pathname
Default value | There is no default value.
Parameter class | Static
Range of values | Any valid directory path

UTL_FILE_DIR lets you specify one or more directories that Oracle should use for PL/SQL file I/O. If you are specifying multiple directories, you must repeat the UTL_FILE_DIR parameter for each directory on separate lines of the initialization parameter file.

WORKAREA_SIZE_POLICY

Parameter type | String
Syntax | WORKAREA_SIZE_POLICY = {AUTO | MANUAL}
Default value | If PGA_AGGREGATE_TARGET is set, then AUTO If PGA_AGGREGATE_TARGET is not set, then MANUAL
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

WORKAREA_SIZE_POLICY specifies the policy for sizing work areas. This parameter controls the mode in which working areas are tuned.

Examples

Archiving Redo Logs Manually: Examples

The following statement manually archives the redo log file group with the log sequence number 4 in thread number 3:

ALTER SYSTEM ARCHIVE LOG THREAD 3 SEQUENCE 4;

The following statement manually archives the redo log file group containing the redo log entry with the SCN 9356083:

ALTER SYSTEM ARCHIVE LOG CHANGE 9356083;

The following statement manually archives the redo log file group containing a member named 'diskl:log6.log' to an archived redo log file in the location 'diska:[arch$]':

ALTER SYSTEM ARCHIVE LOG
    LOGFILE 'diskl:log6.log'
    TO 'diska:[arch$]';
Enabling Query Rewrite: Example

This statement enables query rewrite in all sessions for all materialized views that have not been explicitly disabled:

ALTER SYSTEM SET QUERY_REWRITE_ENABLED = TRUE;
Restricting Session Logons: Example

You may want to restrict logons if you are performing application maintenance and you want only application developers with RESTRICTED SESSION system privilege to log on. To restrict logons, issue the following statement:

ALTER SYSTEM
   ENABLE RESTRICTED SESSION;

You can then terminate any existing sessions using the KILL SESSION clause of the ALTER SYSTEM statement.

After performing maintenance on your application, issue the following statement to allow any user with CREATE SESSION system privilege to log on:

ALTER SYSTEM
   DISABLE RESTRICTED SESSION;
Clearing the Shared Pool: Example

You might want to clear the shared pool before beginning performance analysis. To clear the shared pool, issue the following statement:

ALTER SYSTEM FLUSH SHARED_POOL;
Forcing a Checkpoint: Example

The following statement forces a checkpoint:

ALTER SYSTEM CHECKPOINT;
Enabling Resource Limits: Example

This ALTER SYSTEM statement dynamically enables resource limits:

ALTER SYSTEM SET RESOURCE_LIMIT = TRUE;
Changing Shared Server Settings: Examples

The following statement changes the minimum number of shared server processes to 25:

ALTER SYSTEM SET SHARED_SERVERS = 25;

If there are currently fewer than 25 shared server processes, then Oracle creates more. If there are currently more than 25, then Oracle terminates some of them when they are finished processing their current calls if the load could be managed by the remaining 25.

The following statement dynamically changes the number of dispatcher processes for the TCP/IP protocol to 5 and the number of dispatcher processes for the DECNet protocol to 10:

ALTER SYSTEM
   SET DISPATCHERS =
      '(INDEX=0)(PROTOCOL=TCP)(DISPATCHERS=5)',
      '(INDEX=1)(PROTOCOL=DECNet)(DISPATCHERS=10)';

If there are currently fewer than 5 dispatcher processes for TCP, then Oracle creates new ones. If there are currently more than 5, then Oracle terminates some of them after the connected users disconnect.

If there are currently fewer than 10 dispatcher processes for DECNet, then Oracle creates new ones. If there are currently more than 10, then Oracle terminates some of them after the connected users disconnect.

If there are currently existing dispatchers for another protocol, then the preceding statement does not affect the number of dispatchers for that protocol.

Changing Licensing Parameters: Examples

The following statement dynamically changes the limit on sessions for your instance to 64 and the warning threshold for sessions on your instance to 54:

ALTER SYSTEM
   SET LICENSE_MAX_SESSIONS = 64
   LICENSE_SESSIONS_WARNING = 54;

If the number of sessions reaches 54, then Oracle writes a warning message to the ALERT file for each subsequent session. Also, users with RESTRICTED SESSION system privilege receive warning messages when they begin subsequent sessions.

If the number of sessions reaches 64, then only users with RESTRICTED SESSION system privilege can begin new sessions until the number of sessions falls below 64 again.

The following statement dynamically disables the limit for sessions on your instance. After you issue the preceding statement, Oracle no longer limits the number of sessions on your instance.

ALTER SYSTEM SET LICENSE_MAX_SESSIONS = 0;

The following statement dynamically changes the limit on the number of users in the database to 200. After you issue the preceding statement, Oracle prevents the number of users in the database from exceeding 200.

ALTER SYSTEM SET LICENSE_MAX_USERS = 200;
Forcing a Log Switch: Example

You may want to force a log switch to drop or rename the current redo log file group or one of its members, because you cannot drop or rename a file while Oracle is writing to it. The forced log switch affects only your instance's redo log thread. The following statement forces a log switch:

ALTER SYSTEM SWITCH LOGFILE;
Enabling Distributed Recovery: Example

The following statement enables distributed recovery:

ALTER SYSTEM ENABLE DISTRIBUTED RECOVERY;

You may want to disable distributed recovery for demonstration or testing purposes.You can disable distributed recovery in both single-process and multiprocess mode with the following statement:

ALTER SYSTEM DISABLE DISTRIBUTED RECOVERY;

When your demonstration or testing is complete, you can then enable distributed recovery again by issuing an ALTER SYSTEM statement with the ENABLE DISTRIBUTED RECOVERY clause.

Killing a Session: Example

You may want to kill the session of a user that is holding resources needed by other users. The user receives an error message indicating that the session has been killed. That user can no longer make calls to the database without beginning a new session. Consider this data from the V$SESSION dynamic performance table:

SELECT sid, serial#, username
 FROM v$session;

  SID   SERIAL# USERNAME
----- --------- ----------------
    1         1
    2         1
    3         1
    4         1
    5         1
    7         1
    8        28 OPS$BQUIGLEY
   10       211 OPS$SWIFT
   11        39 OPS$OBRIEN
   12        13 SYSTEM
   13         8 SCOTT

The following statement kills the session of the user scott using the SID and SERIAL# values from V$SESSION:

ALTER SYSTEM KILL SESSION '13, 8';
Disconnecting a Session: Example

The following statement disconnects user scott's session, using the SID and SERIAL# values from V$SESSION:

ALTER SYSTEM DISCONNECT SESSION '13, 8' POST_TRANSACTION;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: ALTER TABLE to ALTER TABLESPACE, 1 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

11
SQL Statements: ALTER TABLE to ALTER TABLESPACE

This chapter contains the following SQL statements:

  • ALTER TABLE
  • ALTER TABLESPACE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: ALTER TABLE to ALTER TABLESPACE, 2 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER TABLE

Purpose

Use the ALTER TABLE statement to alter the definition of a nonpartitioned table, a partitioned table, a table partition, or a table subpartition. For object tables or relational tables with object columns, use ALTER TABLE to convert the table to the latest definition of its referenced type after the type has been altered.

See Also:
  • CREATE TABLE for information on creating tables
  • Oracle Text Reference for information on ALTER TABLE statements in conjunction with Oracle Text

Additional Topics:

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

The table must be in your own schema, or you must have ALTER privilege on the table, or you must have ALTER ANY TABLE system privilege. For some operations you may also need the CREATE ANY INDEX privilege.

Additional Prerequisites for Partitioning Operations

If you are not the owner of the table, then you need the DROP ANY TABLE privilege in order to use the drop_table_partition or truncate_table_partition clause.

You must also have space quota in the tablespace in which space is to be acquired in order to use the add_table_partition, modify_table_partition, move_table_partition, and split_table_partition clauses.

Additional Prerequisites for Constraints and Triggers

To enable a unique or primary key constraint, you must have the privileges necessary to create an index on the table. You need these privileges because Oracle creates an index on the columns of the unique or primary key in the schema containing the table.

To enable or disable triggers, the triggers must be in your schema or you must have the ALTER ANY TRIGGER system privilege.

Additional Prerequisites When Using Object Types

To use an object type in a column definition when modifying a table, either that object must belong to the same schema as the table being altered, or you must have either the EXECUTE ANY TYPE system privilege or the EXECUTE schema object privilege for the object type.

See Also:

CREATE INDEX for information on the privileges needed to create indexes

Syntax

alter_table::=

Text description of statements_312.gif follows
Text description of alter_table

Note:

You must specify some clause after table. That is, none of the clauses after table are required, but you must specify at least one of them.

Groups of ALTER TABLE syntax:

  • alter_table_properties::=
  • column_clauses::=
  • constraint_clauses::=
  • alter_table_partitioning::=
  • alter_external_table_clause::=
  • move_table_clause::=
  • enable_disable_clause::=

After each clause you will find links additional links to its component subclauses.

alter_table_properties::=

Text description of statements_393.gif follows
Text description of alter_table_properties

(physical_attributes_clause::= , logging_clause::= , data_segment_compression::= , supplemental_lg_grp_clauses::= , allocate_extent_clause::= ,deallocate_unused_clause::= , upgrade_table_clause::= , records_per_block_clause::= , parallel_clause::= , row_movement_clause::= , alter_iot_clauses::= )

physical_attributes_clause::=

Text description of statements_340.gif follows
Text description of physical_attributes_clause

(storage_clause )

logging_clause::=

Text description of statements_335.gif follows
Text description of logging_clause

data_segment_compression::=

Text description of statements_391a.gif follows
Text description of data_segment_compression

supplemental_lg_grp_clauses::=

Text description of statements_37.gif follows
Text description of supplemental_lg_grp_clauses

allocate_extent_clause::=

Text description of statements_356.gif follows
Text description of allocate_extent_clause

deallocate_unused_clause::=

Text description of statements_358.gif follows
Text description of deallocate_unused_clause

upgrade_table_clause::=

Text description of statements_36.gif follows
Text description of upgrade_table_clause

(column_properties::= , modify_LOB_storage_clause::= )

records_per_block_clause::=

Text description of statements_362.gif follows
Text description of records_per_block_clause

parallel_clause::=

Text description of statements_384a.gif follows
Text description of parallel_clause

row_movement_clause::=

Text description of statements_35.gif follows
Text description of row_movement_clause

alter_iot_clauses::=

Text description of statements_38.gif follows
Text description of alter_iot_clauses

(alter_overflow_clause::= , alter_mapping_table_clauses::= )

index_org_table_clause::=

Text description of statements_342.gif follows
Text description of index_org_table_clause

mapping_table_clause::=

Text description of statements_39.gif follows
Text description of mapping_table_clause

key_compression::=

Text description of statements_346.gif follows
Text description of key_compression

index_org_overflow_clause::=

Text description of statements_348.gif follows
Text description of index_org_overflow_clause

(segment_attributes_clause::= )

segment_attributes_clause::=

Text description of statements_344.gif follows
Text description of segment_attributes_clause

(physical_attributes_clause::= , logging_clause )

alter_overflow_clause::=

Text description of statements_364.gif follows
Text description of alter_overflow_clause

(segment_attributes_clause::= , allocate_extent_clause::= , deallocate_unused_clause::= )

add_overflow_clause::=

Text description of statements_366.gif follows
Text description of add_overflow_clause

(segment_attributes_clause::= )

alter_mapping_table_clauses::=

Text description of statements_311.gif follows
Text description of alter_mapping_table_clauses

(allocate_extent_clause::= , deallocate_unused_clause::= )

column_clauses::=

Text description of statements_316.gif follows
Text description of column_clauses

(add_column_clause::= , modify_column_clauses::= , drop_column_clause::= , rename_column_clause::= , modify_collection_retrieval::= , modify_LOB_storage_clause::= , alter_varray_col_properties::= )

add_column_clause::=

Text description of statements_318.gif follows
Text description of add_column_clause

(inline_constraint and inline_ref_constraint: constraints , column_properties::= )

modify_column_clauses::=

Text description of statements_392a.gif follows
Text description of modify_column_clauses

modify_col_properties::=

Text description of statements_374a.gif follows
Text description of modify_col_properties

(inline_constraint: constraints )

modify_col_substitutable::=

Text description of statements_389a.gif follows
Text description of modify_col_substitutable

drop_column_clause::=

Text description of statements_322.gif follows
Text description of drop_column_clause

rename_column_clause::=

Text description of statements_390.gif follows
Text description of rename_column_clause

modify_collection_retrieval::=

Text description of statements_324.gif follows
Text description of modify_collection_retrieval

constraint_clauses::=

Text description of statements_326.gif follows
Text description of constraint_clauses

(constraint_state: constraints )

drop_constraint_clause::=

Text description of statements_330.gif follows
Text description of drop_constraint_clause

column_properties::=

Text description of statements_375.gif follows
Text description of column_properties

object_type_col_properties::=

Text description of statements_376a.gif follows
Text description of object_type_col_properties

substitutable_column_clause::=

Text description of statements_336.gif follows
Text description of substitutable_column_clause

nested_table_col_properties::=

Text description of statements_338.gif follows
Text description of nested_table_col_properties

object_properties::=

Text description of statements_350.gif follows
Text description of object_properties

(inline_constraint, inline_ref_constraint, out_of_line_constraint, out_of_line_ref_constraint: constraints )

supplemental_logging_props::=

Text description of statements_352.gif follows
Text description of supplemental_logging_props

physical_properties::=

Text description of statements_354.gif follows
Text description of physical_properties

(segment_attributes_clause::= , index_org_table_clause::= , external_data_properties::= )

varray_col_properties::=

Text description of statements_360.gif follows
Text description of varray_col_properties

(substitutable_column_clause::= )

LOB_storage_clause::=

Text description of statements_34.gif follows
Text description of LOB_storage_clause

LOB_parameters::=

Text description of statements_310.gif follows
Text description of LOB_parameters

(storage_clause::= , logging_clause::= )

modify_LOB_storage_clause::=

Text description of statements_313.gif follows
Text description of modify_LOB_storage_clause

modify_LOB_parameters::=

Text description of statements_315.gif follows
Text description of modify_LOB_parameters

(storage_clause::= , logging_clause::= , allocate_extent_clause::= , deallocate_unused_clause::= )

alter_varray_col_properties::=

Text description of statements_317.gif follows
Text description of alter_varray_col_properties

LOB_partition_storage::=

Text description of statements_328.gif follows
Text description of LOB_partition_storage

(LOB_storage_clause::= , varray_col_properties::= )

XMLType_column_properties::=

Text description of statements_321.gif follows
Text description of XMLType_column_properties

XMLType_storage::=

Text description of statements_377a.gif follows
Text description of XMLType_storage

XMLSchema_spec::=

Text description of statements_385.gif follows
Text description of XMLSchema_spec

alter_external_table_clause::=

Text description of statements_325.gif follows
Text description of alter_external_table_clause

(add_column_clause::= , modify_column_clauses::= , drop_column_clause::= , drop_constraint_clause::= , parallel_clause::= )

external_data_properties::=

Text description of statements_327.gif follows
Text description of external_data_properties

alter_table_partitioning::=

Text description of statements_368.gif follows
Text description of alter_table_partitioning

(modify_table_default_attrs::= , set_subpartition_template::= , modify_table_partition::= , modify_table_subpartition::= , move_table_partition::= , move_table_subpartition::= , add_table_partition::= , coalesce_table_partition::= , drop_table_partition::= , drop_table_subpartition::= , rename_partition_subpart::= , truncate_partition_subpart::= , split_table_partition::= , split_table_subpartition:: , merge_table_partitions::= , merge_table_subpartitions::= , exchange_partition_subpart::=

modify_table_default_attrs::=

Text description of statements_370.gif follows
Text description of modify_table_default_attrs

(segment_attributes_clause::= , key_compression::=, LOB_parameters::= , alter_overflow_clause::= )

set_subpartition_template::=

Text description of statements_365.gif follows
Text description of set_subpartition_template

(list_values_clause::= , partitioning_storage_clause::= )

modify_table_partition::=

Text description of statements_395.gif follows
Text description of modify_table_partition

(modify_range_partition::= , modify_hash_partition::= , modify_list_partition::= )

modify_range_partition::=

Text description of statements_339a.gif follows
Text description of modify_range_partition

(partition_attributes::= , alter_mapping_table_clauses::= )

modify_hash_partition::=

Text description of statements_341.gif follows
Text description of modify_hash_partition

(partition_attributes::= , add_hash_subpartition::= , update_global_index_clause::= , parallel_clause::= , alter_mapping_table_clauses::= )

modify_list_partition::=

Text description of statements_386a.gif follows
Text description of modify_list_partition

(partition_attributes::= , add_list_subpartition::= )

modify_table_subpartition::=

Text description of statements_376.gif follows
Text description of modify_table_subpartition

modify_hash_subpartition::= , modify_list_subpartition::= )

move_table_partition::=

Text description of statements_377.gif follows
Text description of move_table_partition

(table_partition_description::= , update_global_index_clause::= , parallel_clause::= )

move_table_subpartition::=

Text description of statements_382.gif follows
Text description of move_table_subpartition

(subpartition_spec::= , update_global_index_clause::= , parallel_clause::= )

add_table_partition::=

Text description of statements_387a.gif follows
Text description of add_table_partition

add_range_partition_clause::=

Text description of statements_369.gif follows
Text description of add_range_partition_clause

(range_values_clause::= , table_partition_description::= )

add_hash_partition_clause::=

Text description of statements_383.gif follows
Text description of add_hash_partition_clause

(partitioning_storage_clause::= , update_global_index_clause::= , parallel_clause::= )

add_list_partition_clause::=

Text description of statements_384.gif follows
Text description of add_list_partition_clause

(list_values_clause::= , table_partition_description::= )

coalesce_table_partition::=

Text description of statements_380.gif follows
Text description of coalesce_table_partition

(update_global_index_clause::= , parallel_clause::= )

drop_table_partition::=

Text description of statements_393b.gif follows
Text description of drop_table_partition

(update_global_index_clause::= , parallel_clause::= )

drop_table_subpartition::=

Text description of statements_349.gif follows
Text description of drop_table_subpartition

(update_global_index_clause::= , parallel_clause::= )

rename_partition_subpart::=

Text description of statements_386.gif follows
Text description of rename_partition_subpart

truncate_partition_subpart::=

Text description of statements_387.gif follows
Text description of truncate_partition_subpart

(update_global_index_clause::= , parallel_clause::= )

split_table_partition::=

Text description of statements_388.gif follows
Text description of split_table_partition

(partition_spec::= , update_global_index_clause::= , parallel_clause::= )

split_table_subpartition::

Text description of statements_351.gif follows
Text description of partition_spec

(subpartition_spec::= , update_global_index_clause::= , parallel_clause::= )

merge_table_partitions::=

Text description of statements_389.gif follows
Text description of merge_table_partitions

(partition_spec::= , update_global_index_clause::= , parallel_clause::= )

merge_table_subpartitions::=

Text description of statements_393a.gif follows
Text description of merge_table_subpartitions

(subpartition_spec::= , update_global_index_clause::= , parallel_clause::= )

exchange_partition_subpart::=

Text description of statements_391.gif follows
Text description of exchange_partition_subpart

(update_global_index_clause::= , parallel_clause::= )

exceptions_clause::=

Text description of statements_392.gif follows
Text description of exceptions_clause

list_values_clause::=

Text description of statements_381.gif follows
Text description of list_values_clause

range_values_clause::=

Text description of statements_394.gif follows
Text description of range_values_clause

partitioning_storage_clause::=

Text description of statements_345.gif follows
Text description of partitioning_storage_clause

partition_attributes::=

Text description of statements_373.gif follows
Text description of partition_attributes

(physical_attributes_clause::= , logging_clause::= , allocate_extent_clause::= , deallocate_unused_clause::= , data_segment_compression::= , modify_LOB_parameters::= )

add_hash_subpartition::=

Text description of statements_374.gif follows
Text description of add_hash_subpartition

(subpartition_spec::= , update_global_index_clause::= )

add_list_subpartition::=

Text description of statements_382a.gif follows
Text description of add_list_subpartition

(subpartition_spec::= )

modify_hash_subpartition::=

Text description of statements_396.gif follows
Text description of modify_hash_subpartition

(allocate_extent_clause::= , deallocate_unused_clause::= , modify_LOB_parameters::= )

modify_list_subpartition::=

Text description of statements_383a.gif follows
Text description of modify_list_subpartition

(allocate_extent_clause::= , deallocate_unused_clause::= , modify_LOB_parameters::= )

table_partition_description::=

Text description of statements_378.gif follows
Text description of table_partition_description

(segment_attributes_clause::= , key_compression::= , LOB_storage_clause::= , varray_col_properties::= )

partition_level_subpartition::=

Text description of statements_379.gif follows
Text description of partition_level_subpartition

(subpartition_spec::= )

partition_spec::=

Text description of statements_395a.gif follows
Text description of partition_spec

(table_partition_description::= )

subpartition_spec::=

Text description of statements_380a.gif follows
Text description of subpartition_spec

(list_values_clause::= , partitioning_storage_clause::= )

update_global_index_clause::=

Text description of statements_339.gif follows
Text description of update_global_index_clause

parallel_clause::=

Text description of statements_319.gif follows
Text description of parallel_clause

move_table_clause::=

Text description of statements_3a.gif follows
Text description of move_table_clause

(segment_attributes_clause::= , index_org_table_clause::= , LOB_storage_clause::= , varray_col_properties::= )

enable_disable_clause::=

Text description of statements_32.gif follows
Text description of enable_disable_clause

(using_index_clause::= , exceptions_clause::= ,)

using_index_clause::=

Text description of statements_33.gif follows
Text description of using_index_clause

(create_index::= , storage_clause , logging_clause::= )

global_partitioned_index::=

Text description of statements_329.gif follows
Text description of global_partitioned_index

index_partitioning_clause::=

Text description of statements_331.gif follows
Text description of index_partitioning_clause

Semantics

Many clauses of the ALTER TABLE statement have the same functionality they have in a CREATE TABLE statement. For more information on such clauses, please see CREATE TABLE .

Note:

Operations performed by the ALTER TABLE statement can cause Oracle to invalidate procedures and stored functions that access the table. For information on how and when Oracle invalidates such objects, see Oracle9i Database Concepts.

schema

Specify the schema containing the table. If you omit schema, then Oracle assumes the table is in your own schema.

table

Specify the name of the table to be altered.

Restrictions on Temporary Tables

You can modify, drop columns from, or rename a temporary table. However, for a temporary table you cannot:

  • Add columns of nested table or varray type. You can add columns of other types.
  • Specify referential integrity (foreign key) constraints for an added or modified column.
  • Specify the following clauses of the LOB_storage_clause for an added or modified LOB column: TABLESPACE, storage_clause, logging_clause, or the LOB_index_clause.
  • Specify the physical_attributes_clause, nested_table_col_properties, parallel_clause, allocate_extent_clause, deallocate_unused_clause, or any of the index organized table clauses.
  • Exchange partitions between a partition and a temporary table.
  • Specify the logging_clause.
  • Specify MOVE.
Restrictions on External Tables

You can add, drop, or modify the columns of an external table. However, for an external table you cannot:

  • Add a LONG, LOB, or object type column or change the datatype of an external table column to any of these datatypes.
  • Add a constraint to an external table.
  • Modify the storage parameters of an external table.
  • Specify the logging_clause.
  • Specify MOVE.

    Note:

    If you alter a table that is a master table for one or more materialized views, then Oracle marks the materialized views INVALID. Invalid materialized views cannot be used by query rewrite and cannot be refreshed. For information on revalidating a materialized view, see ALTER MATERIALIZED VIEW .
    See Also:

    Oracle9i Data Warehousing Guide for more information on materialized views in general

alter_table_properties

Use the alter_table_clauses to modify a database table.

physical_attributes_clause

The physical_attributes_clause lets you change the value of PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters and storage characteristics.

Restrictions on Altering Table Physical Attributes
  • You cannot specify the PCTUSED parameter for the index segment of an index-organized table.
  • If you attempt to alter the storage attributes of tables in locally managed tablespaces, then Oracle raises an error. However, if some segments of a partitioned table reside in a locally managed tablespace and other segments reside in a dictionary-managed tablespace, then Oracle alters the storage attributes of the segments in the dictionary-managed tablespace but does not alter the attributes of the segments in the locally managed tablespace, and does not raise an error.
  • For segments with automatic segment-space management, Oracle ignores attempts to change the PCTUSED setting. If you alter the PCTFREE setting, then you must subsequently run the DBMS_REPAIR.segment_fix_status procedure to implement the new setting on blocks already allocated to the segment.

    Cautions:
    • For a nonpartitioned table, the values you specify override any values specified for the table at create time.
    • For a range-, list-, or hash-partitioned table, the values you specify are the default values for the table and the actual values for every existing partition, overriding any values already set for the partitions. To change default table attributes without overriding existing partition values, use the modify_table_default_attrs clause.
    • For a composite-partitioned table, the values you specify are the default values for the table and all partitions of the table and the actual values for all subpartitions of the table, overriding any values already set for the subpartitions. To change default partition attributes without overriding existing subpartition values, use the modify_table_default_attrs clause with the FOR PARTITION clause.
    See Also:
    • physical_attributes_clause for a full description of the physical attribute parameters
    • storage_clause for a description of storage parameters
data_segment_compression

The data_segment_compression clause is valid only for heap-organized tables. Use this clause to instruct Oracle whether to compress data segments to reduce disk and memory use. The COMPRESS keyword enables data segment compression. The NOCOMPRESS keyword disables data segment compression.

Note:

The first time a table is altered in such a way that compressed data will be added, all bitmap indexes and bitmap index partitions on that table must be marked UNUSABLE.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for information on calculating the compression ratio and to Oracle9i Data Warehousing Guide for information on data compression usage scenarios
  • data_segment_compression clause of CREATE TABLE information on creating objects with data segment compression
logging_clause

Specify whether subsequent Direct Loader (SQL*Loader) and direct-path INSERT operations against a nonpartitioned table, table partition, all partitions of a partitioned table, or all subpartitions of a partition will be logged (LOGGING) or not logged (NOLOGGING) in the redo log file.

When used with the modify_table_default_attrs clause, this clause affects the logging attribute of a partitioned table.

Thelogging_clause also specifies whether ALTER TABLE ... MOVE and ALTER TABLE ... SPLIT operations will be logged or not logged.

See Also:
  • logging_clause for a full description of this clause
  • Oracle9i Data Warehousing Guide for more information about the logging_clause and parallel DML

supplemental_lg_grp_clauses

The supplemental_lg_grp_clauses let you add and drop supplemental redo log groups.

  • Use the ADD LOG GROUP clause to add a redo log group.
  • Use the DROP LOG GROUP clause to drop a redo log group when it is no longer needed.

    See Also:

    Oracle Data Guard Concepts and Administration for information on supplemental redo log groups

allocate_extent_clause

Use the allocate_extent_clause to explicitly allocate a new extent for the table, the partition or subpartition, the overflow data segment, the LOB data segment, or the LOB index.

Restriction on Allocating Table Extents

You cannot allocate an extent for a temporary table or for a range- or composite-partitioned table.

See Also:

allocate_extent_clause for a full description of this clause and "Allocating Extents: Example"

deallocate_unused_clause

Use the deallocate_unused_clause to explicitly deallocate unused space at the end of the table, partition or subpartition, overflow data segment, LOB data segment, or LOB index and make the space available for other segments in the tablespace.

See Also:

deallocate_unused_clause for a full description of this clause and "Deallocating Unused Space: Example"

CACHE | NOCACHE

Use the CACHE clauses to indicate how Oracle should store blocks in the buffer cache. If you specify neither CACHE nor NOCACHE:

  • In a CREATE TABLE statement, NOCACHE is the default
  • In an ALTER TABLE statement, the existing value is not changed.
CACHE Clause

For data that is accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables.

As a parameter in the LOB_storage_clause, CACHE specifies that Oracle places LOB data values in the buffer cache for faster access.

Restriction on CACHE

You cannot specify CACHE for an index-organized table. However, index-organized tables implicitly provide CACHE behavior.

NOCACHE Clause

For data that is not accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed.

As a parameter in the LOB_storage_clause, NOCACHE specifies that the LOB value is either not brought into the buffer cache or brought into the buffer cache and placed at the least recently used end of the LRU list. (The latter is the default behavior.)

Restriction on NOCACHE

You cannot specify NOCACHE for index-organized tables.

MONITORING | NOMONITORING
MONITORING Clause

Specify MONITORING if you want Oracle to collect modification statistics on table. These statistics are estimates of the number of rows affected by DML statements over a particular period of time. They are available for use by the optimizer or for analysis by the user.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on using this clause
NOMONITORING Clause

Specify NOMONITORING if you do not want Oracle to collect modification statistics on table.

Restriction on MONITORING

You cannot specify MONITORING or NOMONITORING for a temporary table.

upgrade_table_clause

The upgrade_table_clause is relevant for object tables and for relational tables with object columns. It lets you instruct Oracle to convert the metadata of the target table to conform with the latest version of each referenced type. If table is already valid, then the table metadata remains unchanged.

Restriction on Upgrading Object Tables and Columns

Within this clause, you cannot specify object_type_col_properties as a clause of column_properties.

INCLUDING DATA

Specify INCLUDING DATA if you want Oracle to convert the data in the table to the latest type version format (if it was not converted when the type was altered). You can define the storage for any new column while upgrading the table by using the column_properties and the LOB_partition_storage. This is the default.

For information on whether a table contains data based on an older type version, refer to the DATA_UPGRADED column of the USER_TAB_COLUMNS data dictionary view.

NOT INCLUDING DATA

Specify NOT INCLUDING DATA if you want Oracle to leave column data unchanged.

Restriction on NOT INCLUDING DATA

You cannot specify NOT INCLUDING DATA if the table contains columns in Oracle8 release 8.0.x image format. To determine whether the table contains such columns, refer to the V80_FMT_IMAGE column of the USER_TAB_COLUMNS data dictionary view.

See Also:
  • Oracle9i Database Reference for information on the data dictionary views
  • ALTER TYPE for information on converting dependent table data when modifying a type upon which the table depends
  • Oracle9i Application Developer's Guide - Object-Relational Features for more information on the implications of not converting table data to the latest type version format
records_per_block_clause

The records_per_block_clause lets you specify whether Oracle restricts the number of records that can be stored in a block. This clause ensures that any bitmap indexes subsequently created on the table will be as small (compressed) as possible.

Restrictions on Restricting Records in a Block
  • You cannot specify either MINIMIZE or NOMINIMIZE if a bitmap index has already been defined on table. You must first drop the bitmap index.
  • You cannot specify this clause for an index-organized table or nested table.
MINIMIZE

Specify MINIMIZE to instruct Oracle to calculate the largest number of records in any block in the table, and limit future inserts so that no block can contain more than that number of records.

Oracle Corporation recommends that a representative set of data already exist in the table before you specify MINIMIZE. If you are using data segment compression (see data_segment_compression ), then a representative set of compressed data should already exist in the table.

Restriction on MINIMIZE

You cannot specify MINIMIZE for an empty table.

NOMINIMIZE

Specify NOMINIMIZE to disable the MINIMIZE feature. This is the default.

RENAME TO

Use the RENAME clause to rename table to new_table_name.

Restriction on Renaming a Table

You cannot rename a materialized view.

Note:

Using this clause invalidates any dependent materialized views. For more information on materialized views, see CREATE MATERIALIZED VIEW and Oracle9i Data Warehousing Guide.
row_movement_clause

The row_movement_clause lets you specify whether Oracle can move a table row. It is possible for a row to move, for example, during data segment compression or an update operation on partitioned data.

Caution:

If you need static rowids for data access, do not enable row movement. For a normal (heap-organized) table, moving a row changes that row's rowid. For a moved row in an index-organized table, the logical rowid remains valid, although the physical guess component of the logical rowid becomes inaccurate.
  • Specify ENABLE to allow Oracle to move a row, thus changing the rowid.
  • Specify DISABLE if you want to prevent Oracle from moving a row, thus preventing a change of rowid.
Restriction on Row Movement

You cannot specify this clause for a nonpartitioned index-organized table.

alter_iot_clauses

index_org_table_clause

See index_org_table_clause in the context of CREATE TABLE.

See Also:

"Modifying Index-Organized Tables: Examples"

alter_overflow_clause

The alter_overflow_clause lets you change the definition of an index-organized table. Index-organized tables keep data sorted on the primary key and are therefore best suited for primary-key-based access and manipulation.

Note:

When you add a column to an index-organized table, Oracle evaluates the maximum size of each column to estimate the largest possible row. If an overflow segment is needed but you have not specified OVERFLOW, then Oracle raises an error and does not execute the ALTER TABLE statement. This checking function guarantees that subsequent DML operations on the index-organized table will not fail because an overflow segment is lacking.
PCTTHRESHOLD integer

Specify the percentage of space reserved in the index block for an index-organized table row. PCTTHRESHOLD must be large enough to hold the primary key. All trailing columns of a row, starting with the column that causes the specified threshold to be exceeded, are stored in the overflow segment. PCTTHRESHOLD must be a value from 1 to 50. If you do not specify PCTTHRESHOLD, the default is 50.

Restriction on PCTTHRESHOLD

You cannot specify PCTTHRESHOLD for individual partitions of an index-organized table.

INCLUDING column_name

Specify a column at which to divide an index-organized table row into index and overflow portions. The primary key columns are always stored in the index. column_name can be either the last primary-key column or any non-primary-key column. All non-primary-key columns that follow column_name are stored in the overflow data segment.

Restriction on the INCLUDING Clause

You cannot specify this clause for individual partitions of an index-organized table.

Note:

If an attempt to divide a row at column_name causes the size of the index portion of the row to exceed the PCTTHRESHOLD value (either specified or default), Oracle breaks up the row based on the PCTTHRESHOLD value.

overflow_attributes

The overflow_attributes let you specify the overflow data segment physical storage and logging attributes to be modified for the index-organized table. Parameters specified in this clause are applicable only to the overflow data segment.

See Also:

CREATE TABLE

add_overflow_clause

The add_overflow_clause lets you add an overflow data segment to the specified index-organized table. You can also use this clause to explicitly allocate an extent to or deallocate unused space from an existing overflow segment.

Use the STORE IN tablespace clause to specify tablespace storage for the entire overflow segment. Use the PARTITION clause to specify tablespace storage for the segment by partition.

For a partitioned index-organized table:

  • If you do not specify PARTITION, then Oracle automatically allocates an overflow segment for each partition. The physical attributes of these segments are inherited from the table level.
  • If you wish to specify separate physical attributes for one or more partitions, then you must specify such attributes for every partition in the table. You need not specify the name of the partitions, but you must specify their attributes in the order in which they were created.

You can find the order of the partitions by querying the PARTITION_NAME and PARTITION_POSITION columns of the USER_IND_PARTITIONS view.

If you do not specify TABLESPACE for a particular partition, then Oracle uses the tablespace specified for the table. If you do not specify TABLESPACE at the table level, then Oracle uses the tablespace of the partition's primary key index segment.

See Also:

allocate_extent_clause and deallocate_unused_clause for full descriptions of these clauses of the add_overflow_clause
alter_mapping_table_clauses

The alter_mapping_table_clauses is valid only if table is index organized and has a mapping table.

UPDATE BLOCK REFERENCES

Specify UPDATE BLOCK REFERENCES to update all stale "guess" data block addresses stored as part of the logical ROWID column in the mapping table with the correct address for the corresponding block identified by the primary key.

allocate_extent_clause

Use the allocate_extent_clause to allocate a new extent at the end of the mapping table for the index-organized table.

See Also:

allocate_extent_clause for a full description of this clause
deallocate_unused_clause

Specify the deallocate_unused_clause to deallocate unused space at the end of the mapping table of the index-organized table.

See Also:

deallocate_unused_clause for a full description of this clause
COALESCE

The keyword is relevant only if table is index organized. Specify COALESCE to instruct Oracle to combine the primary key index blocks of the index-organized table where possible to free blocks for reuse. You can specify this clause with the parallel_clause.

column_clauses

add_column_clause

The add_column_clause lets you add a column to a table.

See Also:

CREATE TABLE for a description of the keywords and parameters of this clause and "Adding a Table Column: Example"

If you add a column, then the initial value of each row for the new column is null unless you specify the DEFAULT clause. In this case, Oracle updates each row in the new column with the value you specify for DEFAULT. This update operation, in turn, fires any AFTER UPDATE triggers defined on the table.

Note:

If a column has a default value, then you can use the DEFAULT clause to change the default to NULL, but you cannot remove the default value completely. That is, if a column has ever had a default value assigned to it, then the DATA_DEFAULT column of the USER_TAB_COLUMNS data dictionary view will always display either a default value or NULL.

You can add an overflow data segment to each partition of a partitioned index-organized table.

You can add LOB columns to nonpartitioned and partitioned tables. You can specify LOB storage at the table and at the partition or subpartition level.

If you previously created a view with a query that used the "SELECT *" syntax to select all columns from table, and you now add a column to table, then Oracle does not automatically add the new column to the view. To add the new column to the view, re-create the view using the CREATE VIEW statement with the OR REPLACE clause.

See Also:

CREATE VIEW

Restrictions on Adding Columns
  • You cannot add a LOB column to a clustered table.
  • If you add a LOB column to a hash-partitioned table, then the only attribute you can specify for the new partition is TABLESPACE.
  • You cannot add a column with a NOT NULL constraint if table has any rows unless you also specify the DEFAULT clause.
  • If you specify this clause for an index-organized table, then you cannot specify any other clauses in the same statement.
DEFAULT

Use the DEFAULT clause to specify a default for a new column or a new default for an existing column. Oracle assigns this value to the column if a subsequent INSERT statement omits a value for the column. If you are adding a new column to the table and specify the default value, then Oracle inserts the default column value into all rows of the table.

The datatype of the default value must match the datatype specified for the column. The column must also be long enough to hold the default value.

Restrictions on Default Column Values
  • A DEFAULT expression cannot contain references to other columns, the pseudocolumns CURRVAL, NEXTVAL, LEVEL, and ROWNUM, or date constants that are not fully specified.
  • The expression can be of any form except a scalar subquery expression.

    See Also:

    "Specifying Default Column Value: Examples"

inline_constraint

Use inline_constraint to add a constraint to the new column

inline_ref_constraint

This clause lets you describe a new column of type REF.

See Also:

constraints for syntax and description of this type of constraint, including restrictions
column_properties

The column_properties determine the storage characteristics of an object, nested table, varray, or LOB column.

object_type_col_properties

This clause is valid only when you are adding a new object type column or attribute. To modify the properties of an existing object type column, use the modify_column_clauses.

Use the object_type_col_properties to specify storage characteristics for a new object column or attribute or an element of a collection column or attribute.

column

For column, specify an object column or attribute.

substitutable_column_clause

The substitutable_column_clause indicates whether object columns or attributes in the same hierarchy are substitutable for each other. You can specify that a column is of a particular type, or whether it can contain instances of its subtypes, or both.

  • If you specify ELEMENT, you constrain the element type of a collection column or attribute to a subtype of its declared type.
  • The IS OF [TYPE] (ONLY type) clause constrains the type of the object column to a subtype of its declared type.
  • NOT SUBSTITUTABLE AT ALL LEVELS indicates that the object column cannot hold instances corresponding to any of its subtypes. Also, substitution is disabled for any embedded object attributes and elements of embedded nested tables and varrays. The default is SUBSTITUTABLE AT ALL LEVELS.
Restrictions on the substitutable_column_clause
  • You cannot specify this clause for an attribute of an object column. However, you can specify this clause for a object type column of a relational table, and for an object column of an object table if the substitutability of the object table itself has not been set.
  • For a collection type column, the only part of this clause you can specify is [NOT] SUBSTITUTABLE AT ALL LEVELS.
nested_table_col_properties

The nested_table_col_properties clause lets you specify separate storage characteristics for a nested table, which in turn lets you to define the nested table as an index-organized table. You must include this clause when creating a table with columns or column attributes whose type is a nested table. (Clauses within this clause that function the same way they function for parent object tables are not repeated here.)

  • For nested_item, specify the name of a column (or a top-level attribute of the table's object type) whose type is a nested table.

    If the nested table is a multilevel collection, then the inner nested table may not have a name. In this case, specify COLUMN_VALUE in place of the nested_item name.

  • For storage_table, specify the name of the table where the rows of nested_item reside. The storage table is created in the same schema and the same tablespace as the parent table.
Restrictions on Nested Table Column Properties
  • You cannot specify the parallel_clause.
  • You cannot specify TABLESPACE (as part of the segment_attributes_clause) for a nested table. The tablespace is always that of the parent table.
  • You cannot specify CLUSTER as part of the physical_properties clause.

    See Also:

    "Nested Tables: Examples"

varray_col_properties

The varray_col_properties clause lets you specify separate storage characteristics for the LOB in which a varray will be stored. If you specify this clause, then Oracle will always store the varray in a LOB, even if it is small enough to be stored inline. If varray_item is a multilevel collection, then Oracle stores all collection items nested within varray_item in the same LOB in which varray_item is stored.

Restriction on Varray Column Properties

You cannot specify TABLESPACE as part of LOB_parameters for a varray column. The LOB tablespace for a varray defaults to the containing table's tablespace.

LOB_storage_clause

Use the LOB_storage_clause to specify the LOB storage characteristics for a newly added LOB column, partition, or subpartition. You cannot use this clause to modify an existing LOB. Instead, you must use the modify_LOB_storage_clause.

CACHE READS Clause

CACHE READS applies only to LOB storage. It indicates that LOB values are brought into the buffer cache only during read operations, but not during write operations.

  • For LOB_item, specify the LOB column name or LOB object attribute for which you are explicitly defining tablespace and storage characteristics that are different from those of the table.
  • For LOB_segname, specify the name of the LOB data segment. You cannot use LOB_segname if more than one LOB_item is specified.

When you add a new LOB column, you can specify the logging attribute with CACHE READS, as you can when defining a LOB column at create time.

When you modify a LOB column from CACHE or NOCACHE to CACHE READS, or from CACHE READS to CACHE or NOCACHE, you can change the logging attribute. If you do not specify LOGGING or NOLOGGING, then this attribute defaults to the current logging attribute of the LOB column.

For existing LOBs, if you do not specify CACHE, NOCACHE, or CACHE READS, then Oracle retains the existing values of the LOB attributes.

Restrictions on LOB Parameters
  • The only parameter of LOB_parameters you can specify for a hash partition or hash subpartition is TABLESPACE.
  • You cannot specify the LOB_index_clause if table is partitioned.
ENABLE | DISABLE STORAGE IN ROW

Specify whether the LOB value is to be stored in the row (inline) or outside of the row (out of line). (The LOB locator is always stored inline regardless of where the LOB value is stored.)

  • ENABLE specifies that the LOB value is stored inline if its length is less than approximately 4000 bytes minus system control information. This is the default.
  • DISABLE specifies that the LOB value is stored out of line regardless of the length of the LOB value.
Restrictions on Enabling Storage in Row

You cannot change STORAGE IN ROW once it is set. Therefore, you cannot specify this clause as part of the modify_col_properties clause. However, you can change this setting when adding a new column (add_column_clause) or when moving the table (move_table_clause).

CHUNK integer

Specify the number of bytes to be allocated for LOB manipulation. If integer is not a multiple of the database block size, then Oracle rounds up (in bytes) to the next multiple. For example, if the database block size is 2048 and integer is 2050, then Oracle allocates 4096 bytes (2 blocks).The maximum value is 32768 (32 K), which is the largest Oracle block size allowed. The default CHUNK size is one Oracle database block.

Restrictions on CHUNK
  • You cannot change the value of CHUNK once it is set.
  • The value of CHUNK must be less than or equal to the value of NEXT (either the default value or that specified in the storage clause). If CHUNK exceeds the value of NEXT, then Oracle returns an error.
PCTVERSION integer

Specify the maximum percentage of overall LOB storage space to be used for maintaining old versions of the LOB. The default value is 10, meaning that older versions of the LOB data are not overwritten until 10% of the overall LOB storage space is used.

RETENTION

If the database is in automatic undo mode, then you can specify RETENTION instead of PCTVERSION to instruct Oracle to retain old versions of this LOB. This clause overrides any prior setting of PCTVERSION.

Restriction on RETENTION

You cannot specify RETENTION if the database is running in manual undo mode.

See Also:

LOB_parameters for a full description of the RETENTION parameter
FREEPOOLS integer

If the database is in automatic undo mode, then you can use this clause to specify the number of freelist groups for this LOB. This clause overrides any prior setting of FREELIST GROUPS.

Restriction on FREEPOOLS

You cannot specify FREEPOOLS if the database is running in manual undo mode.

See Also:

LOB_parameters for a full description of the FREEPOOLS parameter
LOB_index_clause

This clause has been deprecated since Oracle8i. Oracle generates an index for each LOB column. The LOB indexes are system named and system managed, and they reside in the same tablespace as the LOB data segments.

It is still possible for you to specify this clause in some cases. However, Oracle Corporation strongly recommends that you no longer do so. In any event, do not put the LOB index in a different tablespace from the LOB data.

See Also:

Oracle9i Database Migration Guide for information on how Oracle manages LOB indexes in tables migrated from earlier versions
LOB_partition_storage

The LOB_partition_storage clause lets you specify a separate LOB_storage_clause or varray_col_properties clause for each partition. You must specify the partitions in the order of partition position. You can find the order of the partitions by querying the PARTITION_NAME and PARTITION_POSITION columns of the USER_IND_PARTITIONS view.

If you do not specify a LOB_storage_clause or varray_col_properties clause for a particular partition, then the storage characteristics are those specified for the LOB item at the table level. If you also did not specify any storage characteristics for the LOB item at the table level, then Oracle stores the LOB data partition in the same tablespace as the table partition to which it corresponds.

Restriction on LOB Partition Storage

You can specify only one list of LOB_partition_storage clause in a single ALTER TABLE statement, and all LOB_storage_clauses and varray_col_properties clause must precede the list of LOB_partition_storage clauses.

XMLType_column_properties

The XMLType_column_properties let you specify storage attributes for an XMLTYPE column.

XMLType_storage

XMLType columns can be stored either in LOB or object-relational columns.

  • Specify STORE AS OBJECT RELATIONAL if you want Oracle to store the XMLType data in object-relational columns. Storing data object relationally lets you define indexes on the relational columns and enhances query performance.

    If you specify object-relational storage, you must also specify the XMLSchema_spec clause.

  • Specify STORE AS CLOB if you want Oracle to store the XMLType data in a CLOB column. Storing data in a CLOB column preserves the original content and enhances retrieval time.

    If you specify LOB storage, you can specify either LOB parameters or the XMLSchema_spec clause, but not both. Specify the XMLSchema_spec clause if you want to restrict the table or column to particular schema-based XML instances.

XMLSchema_spec

This clause lets you specify the URL of a registered XMLSchema (in the XMLSCHEMA clause or as part of the ELEMENT clause) and an XML element name. You must specify an element, although the XMLSchema URL is optional. If you do specify an XMLSchema URL, you must already have registered the XMLSchema using the DBMS_XMLSCHEMA package.

See Also:
  • LOB_storage_clause for information on the LOB_segname and LOB_parameters clauses
  • "XMLType Column Examples" for an example of XMLType columns in object-relational tables and "Using XML in SQL Statements" for an example of creating an XMLSchema
  • Oracle9i XML Database Developer's Guide - Oracle XML DB for more information on XMLType columns and tables and on creating XMLSchemas

modify_column_clauses

Use the modify_column_clauses to modify the properties of an existing column or the substitutability of an existing object type column.

See Also:

"Modifying Table Columns: Examples"

modify_col_properties

Use this clause to modify the properties of the column. Any of the optional parts of the column definition (datatype, default value, or constraint) that you omit from this clause remain unchanged.

datatype

You can change any column's datatype if all rows for the column contain nulls. However, if you change the datatype of a column in a materialized view container table, then the corresponding materialized view is invalidated.

You can omit the datatype only if the statement also designates the column as part of the foreign key of a referential integrity constraint. Oracle automatically assigns the column the same datatype as the corresponding column of the referenced key of the referential integrity constraint.

You can always increase the size of a character or raw column or the precision of a numeric column, whether or not all the columns contain nulls. You can reduce the size of a column's datatype as long as the change does not require data to be modified. Oracle scans existing data and returns an error if data exists that exceeds the new length limit.

You can modify a DATE column to TIMESTAMP or TIMESTAMP WITH LOCAL TIME ZONE. You can modify any TIMESTAMP WITH LOCAL TIME ZONE to a DATE column.

Note:

When you modify a TIMESTAMP WITH LOCAL TIME ZONE column to a DATE column, the fractional seconds and time zone adjustment data is lost.

  • If the TIMESTAMP WITH LOCAL TIME ZONE data has fractional seconds, then Oracle updates the row data for the column by rounding the fractional seconds.
  • If the TIMESTAMP WITH LOCAL TIME ZONE data has the minute field greater than equal to 60 (which can occur in a boundary case when the daylight savings rule switches), then Oracle updates the row data for the column by subtracting 60 from its minute field.

If the table is empty, then you can increase or decrease the leading field or the fractional second value of a datetime or interval column. If the table is not empty, then you can only increase the leading field or fractional second of a datetime or interval column.

You can change a LONG column to a CLOB or NCLOB column, and a LONG RAW column to a BLOB column.

  • The modified LOB column inherits all constraints and triggers that were defined on the original LONG column. If you wish to change any constraints, then you must do so in a subsequent ALTER TABLE statement.
  • If any domain indexes are defined on the LONG column, then you must drop them before modifying the column to a LOB.
  • After the modification, you will have to rebuild all other indexes on all columns of the table.

    See Also:
    • Oracle9i Application Developer's Guide - Fundamentals for information on LONG and LOB columns
    • Oracle9i Application Developer's Guide - Large Objects (LOBs) for information on LONG to LOB migration
    • ALTER INDEX for information on dropping and rebuilding indexes
    • "Converting LONG Columns to LOB: Example"

For CHAR and VARCHAR2 columns, you can change the length semantics by specifying CHAR (to indicate character semantics for a column that was originally specified in bytes) or BYTE (to indicate byte semantics for a column that was originally specified in characters). To learn the length semantics of existing columns, query the CHAR_USED column of the ALL_, USER_, or DBA_TAB_COLUMNS data dictionary view.

See Also:
  • Oracle9i Database Globalization Support Guide for information on byte and character semantics
  • Oracle9i Database Reference for information on the data dictionary views
inline_constraint

The only type of integrity constraint that you can add to an existing column using the MODIFY clause is a NOT NULL constraint, and only if the column contains no nulls. To define other types of integrity constraints (UNIQUE, PRIMARY KEY, referential integrity, and CHECK constraints) on existing columns, use the add_column_clause. To modify existing constraints on existing columns, use the constraint_clauses.

Restrictions on Modifying Column Properties
  • You cannot modify a column of a table if a domain index is defined on the column. You must first drop the domain index and then modify the column.
  • You cannot specify a column of datatype ROWID for an index-organized table, but you can specify a column of type UROWID.
  • You cannot change a column's datatype to REF.

    See Also:

    ALTER MATERIALIZED VIEW for information on revalidating a materialized view
modify_col_substitutable

Use this clause to set or change the substitutability of an existing object type column.

The FORCE keyword drops any hidden columns containing typeid information or data for subtype attributes. You must specify FORCE if the column or any attributes of its type are not FINAL.

Restrictions on Modifying Column Substitutability
  • You can specify this clause only once in any ALTER TABLE statement.
  • You cannot modify the substitutability of a column in an object table if the substitutability of the table itself has been set.
  • You cannot specify this clause if the column was created or added using the IS OF TYPE syntax (see substitutable_column_clause), which limits the range of subtypes permitted in an object column or attribute to a particular subtype.
  • You cannot change a varray column to NOT SUBSTITUTABLE if any of its attributes of nested object types is not FINAL, even by specifying FORCE.

drop_column_clause

The drop_column_clause lets you free space in the database by dropping columns you no longer need, or by marking them to be dropped at a future time when the demand on system resources is less.

  • If you drop a nested table column, then its storage table is removed.
  • If you drop a LOB column, then the LOB data and its corresponding LOB index segment are removed.
  • If you drop a BFILE column, then only the locators stored in that column are removed, not the files referenced by the locators.
  • If you drop (or mark unused) a column defined as an INCLUDING column, then the column stored immediately before this column will become the new INCLUDING column.
SET UNUSED Clause

Specify SET UNUSED to mark one or more columns as unused. Specifying this clause does not actually remove the target columns from each row in the table (that is, it does not restore the disk space used by these columns). Therefore, the response time is faster than it would be if you execute the DROP clause.

You can view all tables with columns marked UNUSED in the data dictionary views USER_UNUSED_COL_TABS, DBA_UNUSED_COL_TABS, and ALL_UNUSED_COL_TABS.

See Also:

Oracle9i Database Reference for information on the data dictionary views

Unused columns are treated as if they were dropped, even though their column data remains in the table's rows. After a column has been marked UNUSED, you have no access to that column. A "SELECT *" query will not retrieve data from unused columns. In addition, the names and types of columns marked UNUSED will not be displayed during a DESCRIBE, and you can add to the table a new column with the same name as an unused column.

Note:

Until you actually drop these columns, they continue to count toward the absolute limit of 1000 columns in a single table. However, as with all DDL statements, you cannot roll back the results of this clause. That is, you cannot issue SET USED counterpart to retrieve a column that you have SET UNUSED.

Also, if you mark a column of datatype LONG as UNUSED, then you cannot add another LONG column to the table until you actually drop the unused LONG column.
See Also:

CREATE TABLE for more information on the 1000-column limit
DROP Clause

Specify DROP to remove the column descriptor and the data associated with the target column from each row in the table. If you explicitly drop a particular column, then all columns currently marked UNUSED in the target table are dropped at the same time.

When the column data is dropped:

  • All indexes defined on any of the target columns are also dropped.
  • All constraints that reference a target column are removed.
  • If any statistics types are associated with the target columns, then Oracle disassociates the statistics from the column with the FORCE option and drops any statistics collected using the statistics type.

    Note:

    If the target column is a parent key of a nontarget column, or if a check constraint references both the target and nontarget columns, then Oracle returns an error and does not drop the column unless you have specified the CASCADE CONSTRAINTS clause. If you have specified that clause, then Oracle removes all constraints that reference any of the target columns.
    See Also:

    DISASSOCIATE STATISTICS for more information on disassociating statistics types
DROP UNUSED COLUMNS Clause

Specify DROP UNUSED COLUMNS to remove from the table all columns currently marked as unused. Use this statement when you want to reclaim the extra disk space from unused columns in the table. If the table contains no unused columns, then the statement returns with no errors.

column

Specify one or more columns to be set as unused or dropped. Use the COLUMN keyword only if you are specifying only one column. If you specify a column list, then it cannot contain duplicates.

CASCADE CONSTRAINTS

Specify CASCADE CONSTRAINTS if you want to drop all foreign key constraints that refer to the primary and unique keys defined on the dropped columns, and drop all multicolumn constraints defined on the dropped columns. If any constraint is referenced by columns from other tables or remaining columns in the target table, then you must specify CASCADE CONSTRAINTS. Otherwise, the statement aborts and an error is returned.

INVALIDATE

The INVALIDATE keyword is optional. Oracle automatically invalidates all dependent objects, such as views, triggers, and stored program units. Object invalidation is a recursive process. Therefore, all directly dependent and indirectly dependent objects are invalidated. However, only local dependencies are invalidated, because Oracle manages remote dependencies differently from local dependencies.

An object invalidated by this statement is automatically revalidated when next referenced. You must then correct any errors that exist in that object before referencing it.

See Also:

Oracle9i Database Concepts for more information on dependencies
CHECKPOINT

Specify CHECKPOINT if you want Oracle to apply a checkpoint for the DROP COLUMN operation after processing integer rows; integer is optional and must be greater than zero. If integer is greater than the number of rows in the table, then Oracle applies a checkpoint after all the rows have been processed. If you do not specify integer, then Oracle sets the default of 512. Checkpointing cuts down the amount of undo logs accumulated during the DROP COLUMN operation to avoid running out of rollback segment space. However, if this statement is interrupted after a checkpoint has been applied, then the table remains in an unusable state. While the table is unusable, the only operations allowed on it are DROP TABLE, TRUNCATE TABLE, and ALTER TABLE DROP COLUMNS CONTINUE (described in sections that follow).

You cannot use this clause with SET UNUSED, because that clause does not remove column data.

DROP COLUMNS CONTINUE Clause

Specify DROP COLUMNS CONTINUE to continue the drop column operation from the point at which it was interrupted. Submitting this statement while the table is in a valid state results in an error.

Restrictions on Dropping Columns
  • Each of the parts of this clause can be specified only once in the statement and cannot be mixed with any other ALTER TABLE clauses. For example, the following statements are not allowed:
    ALTER TABLE t1 DROP COLUMN f1 DROP (f2);
ALTER TABLE t1 DROP COLUMN f1 SET UNUSED (f2);
ALTER TABLE t1 DROP (f1) ADD (f2 NUMBER);
ALTER TABLE t1 SET UNUSED (f3)
   ADD (CONSTRAINT ck1 CHECK (f2 > 0));
  • You can drop an object type column only as an entity. To drop an attribute from an object type column, use the ALTER TYPE ... DROP ATTRIBUTE statement with the CASCADE INCLUDING TABLE DATA clause. Be aware that dropping an attribute affects all dependent objects. See DROP ATTRIBUTE for more information.
  • You can drop a column from an index-organized table only if it is not a primary key column. The primary key constraint of an index-organized table can never be dropped, so you cannot drop a primary key column even if you have specified CASCADE CONSTRAINTS.
  • You can export tables with dropped or unused columns. However, you can import a table only if all the columns specified in the export files are present in the table (that is, none of those columns has been dropped or marked unused). Otherwise, Oracle returns an error.
  • You cannot drop a column on which a domain index has been built.
  • You cannot drop a SCOPE table constraint or a WITH ROWID constraint on a REF column.
  • You cannot use this clause to drop:
    • A pseudocolumn, cluster column, or partitioning column. (You can drop nonpartitioning columns from a partitioned table if all the tablespaces where the partitions were created are online and in read/write mode.)
    • A column from: a nested table, an object table, or a table owned by SYS.

      See Also:

      "Dropping a Column: Example"

rename_column_clause

Use the rename_column_clause to rename a column of table. The new column name must not be the same as any other column name in table.

When you rename a column, Oracle handles dependent objects as follows:

  • Function-based indexes and check constraints that depend on the renamed column remain valid.
  • Dependent views, triggers, domain indexes, functions, procedures, and packages are marked INVALID. Oracle attempts to revalidate them when they are next accessed, but you may need to alter these objects with the new column name if revalidation fails.
Restrictions on Renaming Columns
  • You cannot combine this clause with any of the other column_clauses in the same statement.
  • You cannot rename a column that is used to define a join index. Instead you must drop the index, rename the column, and re-create the index.

    See Also:

    "Renaming a Column: Example"

modify_collection_retrieval

Use the modify_collection_retrieval clause to change what Oracle returns when a collection item is retrieved from the database.

collection_item

Specify the name of a column-qualified attribute whose type is nested table or varray.

RETURN AS

Specify what Oracle should return as the result of a query:

  • LOCATOR specifies that a unique locator for the nested table is returned.
  • VALUE specifies that a copy of the nested table itself is returned.

    See Also:

    "Collection Retrieval: Example"

modify_LOB_storage_clause

The modify_LOB_storage_clause lets you change the physical attributes of LOB_item. You can specify only one LOB_item for each modify_LOB_storage_clause.

The REBUILD FREEPOOLS clause removes all the old data from the LOB column. This clause is useful only if you reverting to PCTVERSION for management of LOBs. You might want to do this to manage older data blocks, and you must do this if you are downgrading to a release of Oracle earlier than 9.2.0.

Restrictions on Modifying LOB Storage
  • You cannot modify the value of the INITIAL parameter in the storage_clause when modifying the LOB storage attributes.
  • You cannot specify both the allocate_extent_clause and the deallocate_unused_clause in the same statement.
  • You cannot specify both.

    See Also:

    LOB_storage_clause of CREATE TABLE for information on setting LOB parameters and "LOB Columns: Examples"

alter_varray_col_properties

The alter_varray_col_properties clause lets you change the storage characteristics of an existing LOB in which a varray is stored.

Restriction on Altering Varray Column Properties

You cannot specify the TABLESPACE clause of LOB_parameters as part of this clause. The LOB tablespace for a varray defaults to the tablespace of the containing table.

constraint_clauses

Use the constraint_clauses to add a new constraint using out-of-line declaration, modify the state of an existing constraint, or to drop a constraint.

See Also:

constraints for a description of all the keywords and parameters of out-of-line constraints and constraint_state
Adding a Constraint

The ADD clause lets you add a new out-of-line constraint or out-of-line REF constraint to the table.

See Also:

"Disabling a CHECK Constraint: Example" , "Specifying Object Identifiers: Example" , and "REF Columns: Examples"

Modifying a Constraint

The MODIFY CONSTRAINT clause lets you change the state of an existing constraint.

Restrictions on Modifying Constraints
  • You cannot change the state of a NOT DEFERRABLE constraint to INITIALLY DEFERRED.
  • You cannot modify the datatype or length of a column that is part of a table or index partitioning or subpartitioning key.
  • You can change a CHAR column to VARCHAR2 (or VARCHAR) and a VARCHAR2 (or VARCHAR) to CHAR only if the column contains nulls in all rows or if you do not attempt to change the column size.
  • You cannot change a LONG or LONG RAW column to a LOB if it is part of a cluster. If you do change a LONG or LONG RAW column to a LOB, then the only other clauses you can specify in this ALTER TABLE statement are the DEFAULT clause and the LOB_storage_clause.
  • You can specify the LOB_storage_clause as part of modify_col_properties only when you are changing a LONG or LONG RAW column to a LOB.
  • If you specify this clause for an index-organized table, then you cannot specify any other clauses in the same statement.

    See Also:

    "Changing the State of a Constraint: Examples"

Renaming a Constraint

The RENAME CONSTRAINT clause lets you rename any existing constraint on table. The new constraint name cannot be the same as any existing constraint on any object in the same schema. All objects that are dependent on the constraint remain valid.

See Also:

"Renaming Constraints: Example"

drop_constraint_clause

The drop_constraint_clause lets you drop an integrity constraint from the database. Oracle stops enforcing the constraint and removes it from the data dictionary. You can specify only one constraint for each drop_constraint_clause, but you can specify multiple drop_constraint_clauses in one statement.

PRIMARY KEY

Specify PRIMARY KEY to drop the table's primary key constraint.

UNIQUE

Specify UNIQUE to drop the unique constraint on the specified columns.

Note:

If you drop the primary key or unique constraint from a column on which a bitmap join index is defined, then Oracle invalidates the index. See CREATE INDEX for information on bitmap join indexes.
CONSTRAINT

Specify CONSTRAINT constraint to drop an integrity constraint other than a primary key or unique constraint.

CASCADE

Specify CASCADE if you want all other integrity constraints that depend on the dropped integrity constraint to be dropped as well.

KEEP | DROP INDEX

Specify KEEP or DROP INDEX to indicate whether Oracle should preserve or drop the index it has been using to enforce the PRIMARY KEY or UNIQUE constraint.

Restrictions on Dropping Constraints
  • You cannot drop a primary key or unique key constraint that is part of a referential integrity constraint without also dropping the foreign key. To drop the referenced key and the foreign key together, use the CASCADE clause. If you omit CASCADE, then Oracle does not drop the primary key or unique constraint if any foreign key references it.
  • You cannot drop a primary key constraint (even with the CASCADE clause) on a table that uses the primary key as its object identifier (OID).
  • If you drop a referential integrity constraint on a REF column, then the REF column remains scoped to the referenced table.
  • You cannot drop the scope of the column.

    See Also:

    "Dropping Constraints: Examples"

alter_external_table_clause

Use the alter_external_table_clause to change the characteristics of an external table. This clause has no affect on the external data itself. The syntax and semantics of the parallel_clause, enable_disable_clause, external_data_properties, and REJECT LIMIT clause are the same as described for CREATE TABLE. See the external_table_clause of CREATE TABLE.

Restrictions on Altering External Tables
  • You cannot modify an external table using any clause outside of this clause.
  • You cannot add a LONG, LOB, or object type column to an external table, nor can you change the datatype of an external table column to any of these datatypes.
  • You cannot add a constraint to an external table.
  • You cannot modify the storage parameters of an external table.

alter_table_partitioning

The clauses in this section apply only to partitioned tables. You cannot combine partition operations with other partition operations or with operations on the base table in the same ALTER TABLE statement.

Notes on Altering Table Partitioning
  • For additional information on partition operations on tables with an associated CONTEXT domain index, please refer to Oracle Text Reference.
  • If you drop, exchange, truncate, move, modify, or split a partition on a table that is a master table for one or more materialized views, then existing bulk load information about the table will be deleted. Therefore, be sure to refresh all dependent materialized views before performing any of these operations.
  • If a bitmap join index is defined on table, then any operation that alters a partition of table causes Oracle to mark the index UNUSABLE.

    Note:

    The storage of partitioned database entities in tablespaces of different block sizes is subject to several restrictions. Please refer to Oracle9i Database Administrator's Guide for a discussion of these restrictions.

modify_table_default_attrs

The modify_table_default_attrs clause lets you specify new default values for the attributes of table. Partitions and LOB partitions you create subsequently will inherit these values unless you override them explicitly when creating the partition or LOB partition. Existing partitions and LOB partitions are not affected by this clause.

Only attributes named in the statement are affected, and the default values specified are overridden by any attributes specified at the individual partition level.

  • FOR PARTITION applies only to composite-partitioned tables. This clause specifies new default values for the attributes of partition. Subpartitions and LOB subpartitions of partition that you create subsequently will inherit these values unless you override them explicitly when creating the subpartition or LOB subpartition. Existing subpartitions are not affected by this clause.
  • PCTTHRESHOLD, key_compression, and the alter_overflow_clause are valid only for partitioned index-organized tables. However, in the key_compression clause, you cannot specify an integer after the COMPRESS keyword. Key compression length can be specified only when you create the table.
  • You cannot specify the PCTUSED parameter in segment_attributes for the index segment of an index-organized table.
  • You can specify the key_compression_clause only if key compression is already specified at the table level.

set_subpartition_template

Use the set_subpartition_template clause to create or replace existing default list or hash subpartition definitions for each table partition. This clause is valid only for composite-partitioned tables. It replaces the existing subpartition template or creates a new template if you have not previously created one. Existing subpartitions are not affected, nor are existing local and global indexes. However, subsequent partitioning operations (such as add and merge operations) will use the new template.

You can drop an existing subpartition template by specifying ALTER TABLE table SET SUBPARTITION TEMPLATE ().

Restrictions on Subpartition Templates
  • For a range-hash composite-partitioned table, you cannot specify the list_values_clause.
  • For a range-list composite-partitioned table, you cannot specify the hash_subpartition_quantity clause.
  • For both range-hash and range-list partitioned tables, the only clause of the partitioning_storage_clause you can specify for subpartitions is the TABLESPACE clause.

modify_table_partition

The modify_table_partition clause lets you change the real physical attributes of a range, hash, or list partition. This clause optionally modifies the storage attributes of one or more LOB items for the partition. You can specify new values for physical attributes (with some restrictions, as noted in the sections that follow), logging; and storage parameters.

You can also specify how Oracle should handle local indexes that become unusable as a result of the modification to the partition. See "UNUSABLE LOCAL INDEXES Clauses" .

For partitioned index-organized tables, you can also update the mapping table in conjunction with partition changes. See the alter_mapping_table_clauses .

See Also:

"Modifying Table Partitions: Examples"

modify_range_partition

When modifying a range partition, if table is composite partitioned:

  • If you specify the allocate_extent_clause, then Oracle allocates an extent for each subpartition of partition.
  • If you specify deallocate_unused_clause, then Oracle deallocates unused storage from each subpartition of partition.
  • Any other attributes changed in this clause will be changed in subpartitions of partition as well, overriding existing values. To avoid changing the attributes of existing subpartitions, use the FOR PARTITION clause of modify_table_default_attrs.
Restriction on Modifying Range Partitions

If you specify UNUSABLE LOCAL INDEXES, then you cannot specify any other clause of modify_range_partition.

add_hash_subpartition

This clause is valid only for range-hash composite partitions. The add_hash_subpartition clause lets you add a hash subpartition to partition. Oracle populates the new subpartition with rows rehashed from the other subpartition(s) of partition as determined by the hash function. For optimal load balancing, the total number of subpartitions should be a power of 2.

  • If you do not specify subpartition, then Oracle assigns a name in the form SYS_SUBP n.
  • The list_values_clause is not valid for this operation.
  • In the partitioning_storage_clause, the only clause you can specify for subpartitions is the TABLESPACE clause. If you do not specify TABLESPACE, then the new subpartition will reside in the default tablespace of partition.

Oracle invalidates any global indexes on table. You can update these indexes during this operation using the update_global_index_clause.

Oracle adds local index partitions corresponding to the selected partition. Oracle marks UNUSABLE, and you must rebuild, the local index partitions corresponding to the added partitions.

add_list_subpartition

the add_list_subpartition clause lets you add a list subpartition to partition. This clause is valid only for range-list composite partitions, and only if you have not already created a DEFAULT subpartition.

  • If you do not specify subpartition, then Oracle assigns a name in the form SYS_SUBP n.
  • The list_values_clause is required in this operation, and the values you specify in the list_values_clause cannot exist in any other subpartition of partition. However, these values can duplicate values found in subpartitions of other partitions.
  • In the partitioning_storage_clause, the only clause you can specify for subpartitions is the TABLESPACE clause. If you do not specify TABLESPACE, then Oracle stores the new subpartition in the default tablespace of partition. If partition has no default tablespace, then Oracle uses the default tablespace of table. If table has no default tablespace, then Oracle uses the default tablespace of the user.

Oracle also adds a subpartition with the same value list to all local index partitions of the table. The status of existing local and global index partitions of table are not affected.

Restriction on Adding list Subpartitions

You cannot specify this clause if you have already created a DEFAULT subpartition for this partition. Instead you must split the DEFAULT partition using the split_list_subpartition clause.

modify_hash_partition

When modifying a hash partition, in the partition_attributes clause, you can specify only the allocate_extent_clause and deallocate_unused_clause. All other attributes of the partition are inherited from the table-level defaults except TABLESPACE, which stays the same as it was at create time.

COALESCE SUBPARTITION

COALESCE SUBPARTITION applies only to hash subpartitions. Use the COALESCE SUBPARTITION clause if you want Oracle to select the last hash subpartition, distribute its contents into one or more remaining subpartitions (determined by the hash function), and then drop the last subpartition.

Oracle invalidates any global indexes on table. You can update these indexes during this operation using the update_global_index_clause.

Oracle drops local index partitions corresponding to the selected partition. Oracle marks UNUSABLE, and you must rebuild, the local index partitions corresponding to one or more absorbing partitions.

Restriction on Modifying Hash Partitions

If you specify UNUSABLE LOCAL INDEXES, then you cannot specify any other clause of modify_hash_partition.

modify_list_partition

When modifying a list partition, the following additional clauses are available:

Restriction on Modifying List Partitions

If you specify UNUSABLE LOCAL INDEXES, then you cannot specify any other clause of modify_list_partition.

ADD | DROP VALUES Clauses

These clauses are valid only when you are modifying list partitions. Local and global indexes on the table are not affected by either of these clauses.

  • Use the ADD VALUES clause to extend the partition_value list of partition to include additional values. The added partition values must comply with all rules and restrictions listed in the list_partitioning of CREATE TABLE .
  • Use the DROP VALUES clause to reduce the partition_value list of partition by eliminating one or more partition_value. When you specify this clause, Oracle checks to ensure that no rows with this value exist. If such rows do exist, then Oracle returns an error.

    Note:

    An ADD VALUES operation on a table with a DEFAULT list partition will be enhanced if you have defined a local prefixed index on the table. A DROP VALUES operation also will be enhanced by such an index.
Restrictions on Adding and Dropping List Values
  • You cannot add values to a default list partition. If table contains a default partition and you attempt to add values to a nondefault partition, then Oracle will check that the values being added do not already exist in the default partition. If the values do exist in the default partition, then Oracle returns an error.
  • You cannot drop values from a default partition.

modify_table_subpartition

This clause applies only to composite-partitioned tables.

modify_hash_subpartition

The modify_hash_subpartition clause lets you allocate or deallocate storage for an individual subpartition of table. This clause is valid only for range-hash composite-partitioned tables.

You can also specify how Oracle should handle local indexes that become unusable as a result of the modification to the partition. See "UNUSABLE LOCAL INDEXES Clauses" .

Restriction on Modifying Hash Subpartitions

The only modify_LOB_parameters you can specify for subpartition are the allocate_extent_clause and deallocate_unused_clause.

modify_list_subpartition

The modify_list_subpartition clause lets you make the same changes to a list subpartition that you can make to a hash subpartition. In addition, it lets you add or remove values from a list subpartition's value list. This clause is valid only for range-list composite-partitioned tables.

ADD VALUES

Specify ADD VALUES to extend the value list of subpartition.

  • The values you specify cannot already exist in the value list of subpartition or of any other subpartition of the same partition. However, the values can exist in the value lists of subpartitions of other partitions.
  • If you have defined a DEFAULT subpartition, then Oracle verifies that none of the values you are adding exist in rows of the DEFAULT subpartition. If the added values do exist in the DEFAULT subpartition, then the statement will fail.
  • Oracle adds corresponding values to the value list of any local index subpartitions. The status of local and global index partitions is not affected by this operation.
DROP VALUES

Specify DROP VALUES to remove one or more values from the value list of subpartition.

  • The values you specify must be a subset of existing values in subpartition.
  • You cannot use this clause to drop all values in a subpartition. Instead you must use an ALTER TABLE ... DROP SUBPARTITION statement.
  • If subpartition contains any rows containing one of the values being dropped, then the operation fails and Oracle returns an error. You must first delete any rows containing the values you wish to drop before reissuing the statement.
  • Oracle updates the value list of any corresponding local index subpartition. The status of local and global index partitions is not affected by this operation.

You can also specify how Oracle should handle local indexes that become unusable as a result of the modification to the partition. See "UNUSABLE LOCAL INDEXES Clauses" .

Restriction on Modifying List Subpartitions

The only modify_LOB_parameters you can specify for subpartition are the allocate_extent_clause and deallocate_unused_clause.

move_table_partition

Use the move_table_partition clause to move partition to another segment. You can move partition data to another tablespace, recluster data to reduce fragmentation, or change create-time physical attributes.

If the table contains LOB columns, then you can use the LOB_storage_clause to move the LOB data and LOB index segments associated with this partition. Only the LOBs named are affected. If you do not specify the LOB_storage_clause for a particular LOB column, then its LOB data and LOB index segments are not moved.

Oracle invalidates any global indexes on heap-organized tables. You can update these indexes during this operation using the update_global_index_clause. Global indexes on index-organized tables are primary key based, so they do not become unusable.

Oracle moves local index partitions corresponding to the specified partition. If the moved partitions are not empty, then Oracle marks them UNUSABLE, and you must rebuild them.

When you move a LOB data segment, Oracle drops the old data segment and corresponding index segment and creates new segments even if you do not specify a new tablespace.

The move operation obtains its parallel attribute from the parallel_clause, if specified. If not specified, the default parallel attributes of the table, if any, are used. If neither is specified, then Oracle performs the move without using parallelism.

Specifying the parallel_clause in MOVE PARTITION does not change the default parallel attributes of table.

Note:

For index-organized tables, Oracle uses the address of the primary key, as well as its value, to construct logical rowids. The logical rowids are stored in the secondary index of the table. If you move a partition of an index-organized table, then the address portion of the rowids will change, which can hamper performance. To ensure optimal performance, rebuild the secondary index(es) on the moved partition to update the rowids.
See Also:

Oracle9i Database Concepts for more information on logical rowids and "Moving Table Partitions: Example"

MAPPING TABLE

The MAPPING TABLE clause is relevant only for an index-organized table that already has a mapping table defined for it. Oracle moves the mapping table along with the index partition and marks all corresponding bitmap index partitions UNUSABLE.

See Also:

mapping_table_clause of CREATE TABLE
Restrictions on Moving Table Partitions
  • If partition is a hash partition, then the only attribute you can specify in this clause is TABLESPACE.
  • You cannot specify this clause for a partition containing subpartitions. However, you can move subpartitions using the move_table_subpartition_clause.

move_table_subpartition

Use the move_table_subpartition clause to move subpartition to another segment. If you do not specify TABLESPACE, then the subpartition remains in the same tablespace.

You can update global indexes on table during this operation using the update_global_index_clause. If the subpartition is not empty, then Oracle marks UNUSABLE, and you must rebuild, all local index subpartitions corresponding to the subpartition being moved.

If the table contains LOB columns, then you can use the LOB_storage_clause to move the LOB data and LOB index segments associated with this subpartition. Only the LOBs specified are affected. If you do not specify the LOB_storage_clause for a particular LOB column, then its LOB data and LOB index segments are not moved.

When you move a LOB data segment, Oracle drops the old data segment and corresponding index segment and creates new segments even if you do not specify a new tablespace.

Restriction on Moving Table Subpartitions

In subpartition_spec, the only clause of the partitioning_storage_clause you can specify is the TABLESPACE clause.

add_table_partition

Use the add_table_partition clause to add a hash, range, or list partition to table.

Oracle adds to any local index defined on table a new partition with the same name as that of the base table partition. If the index already has a partition with such a name, then Oracle generates a partition name of the form SYS_P n.

If table is index organized, then Oracle adds a partition to any mapping table and overflow area defined on the table as well.

See Also:

"Adding a Table Partition with a LOB: Examples"

add_range_partition_clause

The add_range_partition_clause lets you add a new range partition to the "high" end of a partitioned table (after the last existing partition). You can specify any create-time physical attributes for the new partition. If the table contains LOB columns, then you can also specify partition-level attributes for one or more LOB items.

If you do not specify a new partition_name, then Oracle assigns a name of the form SYS_P n. If you add a range partition to a composite-partitioned table and do not describe the subpartitions, then Oracle assigns subpartition names as described in partition_level_subpartition .

If a domain index is defined on table, then the index must not be marked IN_PROGRESS or FAILED.

A table can have up to 64K-1 partitions.

Restrictions on Adding Range Partitions
  • If the upper partition bound of each partitioning key in the existing high partition is MAXVALUE, then you cannot add a partition to the table. Instead, use the split_table_partition clause to add a partition at the beginning or the middle of the table.
  • The key_compression and OVERFLOW clauses are valid only for a partitioned index-organized table. You can specify OVERFLOW only if the partitioned table already has an overflow segment. You can specify key compression only if key compression is enabled at the table level.
  • You cannot specify the PCTUSED parameter for the index segment of an index-organized table.
range_values_clause

Specify the upper bound for the new partition. The value_list is a comma-delimited, ordered list of literal values corresponding to column_list. The value_list must collate greater than the partition bound for the highest existing partition in the table.

partition_level_subpartition

The partition_level_subpartition clause (in table_partition_description) is valid only for a composite-partitioned table. This clause lets you specify hash or list subpartitions for a new range-hash or range-list composite partition. This clause overrides any subpartition descriptions defined in subpartition_template at the table level.

For all composite partitions:

  • You can specify the number of subpartitions (and optionally one or more tablespaces where they are to be stored). In this case, Oracle assigns subpartition names of the form SYS_SUBPn. The number of tablespaces does not have to equal the number of subpartitions. If the number of partitions is greater than the number of tablespaces, Oracle cycles through the names of the tablespaces.
  • Alternatively, you can use the subpartition_spec to specify individual subpartitions by name, and optionally the tablespace where each should be stored.
  • If you omit partition_level_subpartition and if you have created a subpartition template, Oracle uses the template to create subpartitions. If you have not created a subpartition template, Oracle creates one hash subpartition or one DEFAULT list subpartition.
  • If you omit partition_level_subpartition entirely, Oracle assigns subpartition names as follows:
    • If you have specified a subpartition template and you have specified partition names, then Oracle generates subpartition names of the form "partition_name underscore (_) subpartition_name" (for example, P1_SUB1).
    • If you have not specified a subpartition template or if you have specified a subpartition template but did not specify partition names, then Oracle generates subpartition names of the form SYS_SUBP n.
  • In partition_spec, the only clause of the partitioning_storage_clause you can specify is the TABLESPACE clause.

For range-hash composite partitions, the list_values_clause of subpartition_spec is not relevant and is invalid.

For range-list composite partitions:

  • The hash_subpartition_quantity is not relevant, so you must use the lower branch of partition_level_subpartition.
  • Within subpartition_spec, you must specify the list_values_clause for each subpartition, and the values you specify for each subpartition cannot exist in any other subpartition of the same partition.

    See Also:

    CREATE TABLE

Oracle will add a new index partition with the same subpartition descriptions to all local indexes defined on table. Global indexes defined on table are not affected.

add_hash_partition_clause

The add_hash_partition_clause lets you add a new hash partition to the "high" end of a partitioned table. Oracle will populate the new partition with rows rehashed from other partitions of table as determined by the hash function. For optimal load balancing, the total number of partitions should be a power of 2.

You can specify a name for the partition, and optionally a tablespace where it should be stored. If you do not specify a name, then Oracle assigns a partition name of the form SYS_P n. If you do not specify TABLESPACE, then the new partition is stored in the table's default tablespace. Other attributes are always inherited from table-level defaults.

You can update global indexes on table during this operation using the update_global_index_clause. For a heap-organized table, if this operation causes data to be rehashed among partitions, then Oracle marks UNUSABLE, and you must rebuild, any corresponding local index partitions. Indexes on index-organized tables are primary key based, so they do not become unusable.

Use the parallel_clause to specify whether to parallelize the creation of the new partition.

See Also:

CREATE TABLE and Oracle9i Database Concepts for more information on hash partitioning
Restriction on Adding Hash Partitions

In table_partition_description, you cannot specify partition_level_subpartition.

add_list_partition_clause

The add_list_partition_clause lets you add a new partition to table using a new set of partition values. You can specify any create-time physical attributes for the new partition. If the table contains LOB columns, then you can also specify partition-level attributes for one or more LOB items.

When you add a list partition to a table, Oracle adds a corresponding index partition with the same value list to all local indexes defined on the table. Global indexes are not affected.

Restrictions on Adding List Partitions
  • In table_partition_description, you cannot specify partition_level_subpartition.
  • You cannot add a list partition if you have already defined a DEFAULT partition for the table. Instead you must use the split_table_partition clause to split the DEFAULT partition.

    See Also:
    • list_partitioning of CREATE TABLE for more information and restrictions on list partitions
    • "Working with Default List Partitions: Example"

coalesce_table_partition

COALESCE applies only to hash partitions. Use the coalesce_table_partition clause to indicate that Oracle should select the last hash partition, distribute its contents into one or more remaining partitions (determined by the hash function), and then drop the last partition.

Oracle invalidates any global indexes on heap-organized tables. You can update these indexes during this operation using the update_global_index_clause. Global indexes on index-organized tables are primary key based, so they do not become unusable.

Oracle drops local index partitions corresponding to the selected partition. Oracle marks UNUSABLE, and you must rebuild, the local index partitions corresponding to one or more absorbing partitions.

drop_table_partition

The drop_table_partition clause removes partition, and the data in that partition, from a partitioned table. If you want to drop a partition but keep its data in the table, then you must merge the partition into one of the adjacent partitions.

See Also:

merge_table_partitions

If the table has LOB columns, then Oracle also drops the LOB data and LOB index partitions (and their subpartitions, if any) corresponding to partition.

If table is index organized and has a mapping table defined on it, then Oracle drops the corresponding mapping table partition as well.

Oracle drops local index partitions and subpartitions corresponding to partition, even if they are marked UNUSABLE.

You can update global indexes on heap-organized tables during this operation using the update_global_index_clause. If you specify the parallel_clause with the update_global_index_clause, then Oracle parallelizes the index update, not the drop operation.

If you drop a range partition and later insert a row that would have belonged to the dropped partition, then Oracle stores the row in the next higher partition. However, if that partition is the highest partition, then the insert will fail because the range of values represented by the dropped partition is no longer valid for the table.

Restrictions on Dropping Table Partitions
  • You cannot drop a partition of a hash-partitioned table.
  • If table contains only one partition, then you cannot drop the partition. You must drop the table.

    See Also:

    "Dropping a Table Partition: Example"

drop_table_subpartition

Use this clause to drop a list subpartition from a range-list composite-partitioned table. Oracle deletes any rows in the dropped subpartition.

Oracle drops the corresponding subpartition of any local index. Other index subpartitions are not affected. Any global indexes are marked UNUSABLE unless you specify the update_global_index_clause.

Restrictions on Dropping Table Subpartitions
  • You cannot drop a hash subpartition. Instead use the MODIFY PARTITION ... COALESCE SUBPARTITION syntax.
  • You cannot drop the last subpartition of a partition. Instead use the drop_table_partition clause.

rename_partition_subpart

Use the rename_table_partition clause to rename a table partition or subpartition current_name to new_name. For both partitions and subpartitions, new_name must be different from all existing partitions and subpartitions of the same table.

If table is index organized, then Oracle assigns the same name to the corresponding primary key index partition as well as to any existing overflow partitions and mapping table partitions.

See Also:

"Renaming Table Partitions: Examples"

truncate_partition_subpart

Specify TRUNCATE PARTITION to remove all rows from partition or, if the table is composite partitioned, all rows from partition's subpartitions. Specify TRUNCATE SUBPARTITION to remove all rows from subpartition. If table is index organized, then Oracle also truncates any corresponding mapping table partitions and overflow area partitions.

If the partition or subpartition to be truncated contains data, then you must first disable any referential integrity constraints on the table. Alternatively, you can delete the rows and then truncate the partition.

If the table contains any LOB columns, then the LOB data and LOB index segments for this partition are also truncated. If table is composite partitioned, then the LOB data and LOB index segments for this partition's subpartitions are truncated.

If a domain index is defined on table, then the index must not be marked IN_PROGRESS or FAILED, and the index partition corresponding to the table partition being truncated must not be marked IN_PROGRESS.

For each partition or subpartition truncated, Oracle also truncates corresponding local index partitions and subpartitions. If those index partitions or subpartitions are marked UNUSABLE, then Oracle truncates them and resets the UNUSABLE marker to VALID.

You can update global indexes on table during this operation using the update_global_index_clause. If you specify the parallel_clause with the update_global_index_clause, then Oracle parallelizes the index update, not the truncate operation.

DROP STORAGE

Specify DROP STORAGE to deallocate space from the deleted rows and make it available for use by other schema objects in the tablespace.

REUSE STORAGE

Specify REUSE STORAGE to keep space from the deleted rows allocated to the partition or subpartition. The space is subsequently available only for inserts and updates to the same partition or subpartition.

See Also:

"Truncating Table Partitions: Example"

split_table_partition

The split_table_partition clause lets you create, from current_partition, two new partitions, each with a new segment and new physical attributes, and new initial extents. The segment associated with current_partition is discarded.

The new partitions inherit all unspecified physical attributes from current_partition.

Note:

Oracle can optimize and speed up SPLIT PARTITION and SPLIT SUBPARTITION operations if specific conditions are met. Please refer to Oracle9i Database Administrator's Guide for information on optimizing these operations.

If you split a DEFAULT list partition, then the first of the resulting partitions will have the split values, and the second resulting partition will have the DEFAULT value.

If table is index organized, then Oracle splits any corresponding mapping table partition and places it in the same tablespace as the parent index-organized table partition. Oracle also splits any corresponding overflow area, and you can specify segment attributes for the new overflow areas using the OVERFLOW clause.

Oracle splits the corresponding local index partition, even if it is marked UNUSABLE. Oracle marks UNUSABLE, and you must rebuild, the local index partitions corresponding to the split partitions. The new index partitions inherit their attributes from the partition being split. Oracle stores the new index partitions in the default tablespace of the index partition being split. If that index partition has no default tablespace, then Oracle uses the tablespace of the new underlying table partitions.

If table contains LOB columns, then you can use the LOB_storage_clause to specify separate LOB storage attributes for the LOB data segments resulting from the split. Oracle drops the LOB data and LOB index segments of current_partition and creates new segments for each LOB column, for each partition, even if you do not specify a new tablespace.

AT Clause

The AT clause applies only to range partitions. Specify the new noninclusive upper bound for the first of the two new partitions. The value list must compare less than the original partition bound for current_partition and greater than the partition bound for the next lowest partition (if there is one).

VALUES Clause

The VALUES clause applies only to list partitions. Specify the partition values you want to include in the first of the two new partitions. Oracle creates the first new partition using the partition value list you specify and creates the second new partition using the remaining partition values from current_partition. Therefore, the value list cannot contain all of the partition values of current_partition, nor can it contain any partition values that do not already exist for current_partition.

INTO Clause

The INTO clause lets you describe the two partitions resulting from the split. In function_spec, the keyword PARTITION is required even if you do not specify the optional names and physical attributes of the two partitions resulting from the split. If you do not specify new partition names, then Oracle assigns names of the form SYS_P n. Any attributes you do not specify are inherited from current_partition.

For range-hash composite-partitioned tables, if you specify subpartitioning for the new partitions, then you can specify only TABLESPACE for the subpartitions. All other attributes are inherited from current_partition. If you do not specify subpartitioning for the new partitions, then their tablespace is also inherited from current_partition.

For range-list composite-partitioned tables, you cannot specify subpartitions for the new partitions at all (using the partition_level_subpartition clause of table_partition_description). The subpartitions of the split partition will inherit all their attributes (number of subpartitions and value lists) from current_partition.

For all range-list composite-partitioned tables, and for range-hash composite-partitioned tables for which you do not specify subpartition names for the newly created subpartitions, the newly created subpartitions inherit their names from the parent partition as follows:

  • For those subpartitions in the parent partition with names of the form "partition_name underscore (_) subpartition_name" (for example, P1_SUBP1), Oracle generates corresponding names in the newly created subpartitions using the new partition names (for example P1A_SUB1 and P1B_SUB1).
  • For those subpartitions in the parent partition with names of any other form, Oracle generates subpartition names of the form SYS_SUBP n.

Oracle splits the corresponding partition in each local index defined on table, even if the index is marked UNUSABLE.

Oracle invalidates any global indexes on heap-organized tables. You can update these indexes during this operation using the update_global_index_clause. Global indexes on index-organized tables are primary key based, so they do not become unusable.

The parallel_clause lets you parallelize the split operation, but does not change the default parallel attributes of the table.

Restrictions on Splitting Table Partitions
  • You cannot specify this clause for a hash-partitioned table.
  • In partition_spec, you can specify the key_compression clause and OVERFLOW clause only for a partitioned index-organized table. Also, you cannot specify the PCTUSED parameter for the index segment of an index-organized table.

    See Also:

    "Splitting Table Partitions: Examples" and "Working with Default List Partitions: Example"

split_table_subpartition

Use this clause to split a list subpartition into two separate subpartitions with nonoverlapping value lists.

Note:

Oracle can optimize and speed up SPLIT PARTITION and SPLIT SUBPARTITION operations if specific conditions are met. Please refer to Oracle9i Database Administrator's Guide for information on optimizing these operations.
  • In the VALUES clause, specify the subpartition values you want to include in the first of the two new subpartitions. You can specify NULL if you have not already specified NULL for another subpartition in the same partition. Oracle creates the first new subpartition using the subpartition value list you specify and creates the second new partition using the remaining partition values from the current subpartition. Therefore, the value list cannot contain all of the partition values of the current subpartition, nor can it contain any partition values that do not already exist for the current subpartition.
  • The INTO clause lets you describe the two subpartitions resulting from the split. In subpartition_spec, the keyword PARTITION is required even if you do not specify the optional names and attributes of the two new subpartitions. If you do not specify new subpartition names, or if you omit this clause entirely, then Oracle assigns names of the form SYS_SUBP n. Any attributes you do not specify are inherited from the current subpartition.

Oracle splits any corresponding local subpartition index, even if it is marked UNUSABLE. The new index subpartitions will inherit the names of the new table subpartitions unless those names are already held by index subpartitions. In that case, Oracle assigns new index subpartition names of the form SYS_SUBPn. The new index subpartitions inherit physical attributes from the parent subpartition. However, if the parent subpartition does not have a default TABLESPACE attribute, then the new subpartitions inherit the tablespace of the corresponding new table subpartitions.

Oracle marks all global indexes on table UNUSABLE. If you also specify the update_global_index_clause, then Oracle will attempt to rebuild these global indexes.

Restrictions on Splitting Table Subpartitions
  • You cannot specify this clause for a hash subpartition.
  • In subpartition_spec, the only clause of partitioning_storage_clause you can specify is the TABLESPACE clause.

merge_table_partitions

The merge_table_partitions clause lets you merge the contents of two partitions of table into one new partition, and then drops the original two partitions.

  • The two partitions to be merged must be adjacent if they are range partitions. The new partition inherits the partition bound of the higher of the two original partitions.
  • List partitions need not be adjacent in order to be merged. When you merge two list partitions, the resulting partition value list is the union of the set of the two partition values lists of the partitions being merged. If you merge a DEFAULT list partition with another list partition, then the resulting partition will be the DEFAULT partition and will have the DEFAULT value.
  • When you merge two range-list composite partitions, you cannot specify the partition_level_subpartition. Oracle obtains the subpartitioning information from any subpartition template. If you have not specified a subpartition template, then Oracle creates exactly one DEFAULT subpartition.

Any attributes not specified in the segment_attributes_clause are inherited from table-level defaults.

If you do not specify a new partition_name, then Oracle assigns a name of the form SYS_P n. If the new partition has subpartitions, then Oracle assigns subpartition names as described in partition_level_subpartition .

Oracle marks UNUSABLE any global indexes on heap-organized tables. You can update these indexes during this operation using the update_global_index_clause. Global indexes on index-organized tables are primary key based, so they do not become unusable.

Oracle drops local index partitions corresponding to the selected partitions. Oracle marks UNUSABLE, and you must rebuild, the local index partition corresponding to merged partition.

Restriction on Merging Table Partitions

You cannot specify this clause for a hash-partitioned table. Instead, use the coalesce_table_partition clause.

See Also:

"Merging Two Table Partitions: Example" and "Working with Default List Partitions: Example"

partition_level_subpartition

The partition_level_subpartition clause is valid only when you are merging range-hash composite partitions. This clause lets you specify subpartitioning attributes for the newly merged partition. Any attributes not specified in this clause are inherited from table-level values. If you do not specify this clause, then the new merged partition inherits subpartitioning attributes from table-level defaults.

If you omit this clause, then the new partition inherits the subpartition descriptions from any subpartition template you have defined. If you have not defined a subpartition template, then Oracle creates one subpartition in the newly merged partition.

Specify the parallel_clause to parallelize the merge operation.

Restriction on the partition_level_subpartition Clause

You cannot specify this clause for a range-list composite partition.

merge_table_subpartitions

The merge_table_subpartitions clause lets you merge the contents of two list subpartitions of table into one new subpartition, and then drops the original two subpartitions. The two subpartitions to be merged must belong to the same partition, but they do not have to be adjacent. The data in the resulting subpartition will consist of the combined data from the merged subpartitions.

  • If you do not specify a new subpartition name, or if you omit the INTO clause entirely, then Oracle assigns a name of the form SYS_SUBP n.
  • If you do specify the INTO clause, then the keyword SUBPARTITION in subpartition_spec is required, you cannot specify the list_values_clause, and the only clause you can specify in the partitioning_storage_clause is the TABLESPACE clause.

Any attributes you do not specify explicitly for the new subpartition are inherited from partition-level values. If you reuse one of the subpartition names for the new subpartition, then the new subpartition will inherit values from the subpartition whose name is being reused rather than from partition-level default values.

Oracle merges corresponding local index subpartitions and marks the resulting index subpartition UNUSABLE. Oracle also marks UNUSABLE both partitioned and nonpartitioned global indexes on table.

Restriction on Merging Table Subpartitions

You cannot specify this clause for a hash subpartition.

exchange_partition_subpart

Use the EXCHANGE PARTITION or EXCHANGE SUBPARTITION clause to exchange the data and index segments of:

  • One nonpartitioned table with one hash, list, or range partition (or one hash or list subpartition)
  • One hash-partitioned table with the hash subpartitions of a range partition of a range-hash composite-partitioned table
  • One list-partitioned table with the list subpartitions of a range partition of a range-list composite-partitioned table.

In all cases, the structure of the table and the partition or subpartition being exchanged, including their partitioning keys, must be identical. In the case of list partitions and subpartitions, the corresponding value lists must also match.

This clause facilitates high-speed data loading when used with transportable tablespaces.

See Also:

Oracle9i Database Administrator's Guide for information on transportable tablespaces

If table contains LOB columns, then for each LOB column Oracle exchanges LOB data and LOB index partition or subpartition segments with corresponding LOB data and LOB index segments of table.

All of the segment attributes of the two objects (including tablespace and logging) are also exchanged.

All statistics of the table and partition are exchanged, including table, column, index statistics, and histograms. The aggregate statistics of the table receiving the new partition are recalculated.

Oracle invalidates any global indexes on the objects being exchanged. If you specify the update_global_index_clause with this clause, then Oracle updates the global indexes on the table whose partition is being exchanged. Global indexes on the table being exchanged remain invalidated. If you specify the parallel_clause with the update_global_index_clause, then Oracle parallelizes the index update, not the exchange operation.

See Also:

"Restrictions on Exchanging Partitions or Subpartitions"

WITH TABLE table

Specify the table with which the partition or subpartition will be exchanged.

INCLUDING INDEXES

Specify INCLUDING INDEXES if you want local index partitions or subpartitions to be exchanged with the corresponding table index (for a nonpartitioned table) or local indexes (for a hash-partitioned table).

EXCLUDING INDEXES

Specify EXCLUDING INDEXES if you want all index partitions or subpartitions corresponding to the partition and all the regular indexes and index partitions on the exchanged table to be marked UNUSABLE.

WITH VALIDATION

Specify WITH VALIDATION if you want Oracle to return an error if any rows in the exchanged table do not map into partitions or subpartitions being exchanged.

WITHOUT VALIDATION

Specify WITHOUT VALIDATION if you do not want Oracle to check the proper mapping of rows in the exchanged table.

exceptions_clause

Specify a table into which Oracle places the rowids of all rows violating the constraint. If you omit schema, then Oracle assumes the exceptions table is in your own schema. If you omit this clause altogether, then Oracle assumes that the table is named EXCEPTIONS. The exceptions table must be on your local database.

You can create the EXCEPTIONS table using one of these scripts:

  • UTLEXCPT.SQL uses physical rowids. Therefore it can accommodate rows from conventional tables but not from index-organized tables. (See the Note that follows.)
  • UTLEXPT1.SQL uses universal rowids, so it can accommodate rows from both heap-organized and index-organized tables.

If you create your own exceptions table, then it must follow the format prescribed by one of these two scripts.

Note:

If you are collecting exceptions from index-organized tables based on primary keys (rather than universal rowids), then you must create a separate exceptions table for each index-organized table to accommodate its primary key storage. You create multiple exceptions tables with different names by modifying and resubmitting the script.
See Also:
  • The DBMS_IOT package in Oracle9i Supplied PL/SQL Packages and Types Reference for information on the SQL scripts
  • Oracle9i Database Performance Tuning Guide and Reference for information on eliminating migrated and chained rows
  • Oracle9i Database Migration Guide for compatibility issues related to the use of these scripts
Restrictions on Specifying an Exceptions Table
  • This clause is not valid with subpartitions.
  • The partitioned table must have been defined with a UNIQUE constraint, and that constraint must be in DISABLE VALIDATE state.

If these conditions are not true, then Oracle ignores this clause.

See Also:

The constraints for more information on constraint checking and "Creating an Exceptions Table for Index-Organized Tables: Example"

Restrictions on Exchanging Partitions or Subpartitions
  • Both tables involved in the exchange must have the same primary key, and no validated foreign keys can be referencing either of the tables unless the referenced table is empty.
  • When exchanging between a partitioned table and the range partition of a composite-partitioned table, the following restrictions apply:
    • The partitioning key of the partitioned table must be identical to the subpartitioning key of the composite-partitioned table.
    • The number of partitions in the partitioned table must be identical to the number of subpartitions in the range partition of the composite-partitioned table.
    • If you are exchanging a list-partitioned table with a range-list partition of a composite-partitioned table, then the values list of the list partitions must exactly match the values list of the range-list subpartitions.
  • For partitioned index-organized tables, the following additional restrictions apply:
    • The source and target table/partition must have their primary key set on the same columns, in the same order.
    • If compression is enabled, then it must be enabled for both the source and the target, and with the same prefix length.
    • Both the source and target must be index organized.
    • Both the source and target must have overflow segments, or neither can have overflow segments. Also, both the source and target must have mapping tables, or neither can have a mapping table.
    • Both the source and target must have identical storage attributes for any LOB columns.

      See Also:

      "Exchanging Table Partitions: Example"

UNUSABLE LOCAL INDEXES Clauses

These two clauses modify the attributes of local index partitions and index subpartitions corresponding to partition (depending on whether you are modifying a partition or subpartition).

  • UNUSABLE LOCAL INDEXES marks UNUSABLE the local index partition or subpartition associated with partition.
  • REBUILD UNUSABLE LOCAL INDEXES rebuilds the unusable local index partition or subpartition associated with partition.
Restrictions on the UNUSABLE LOCAL INDEXES Clause
  • You cannot specify this clause with any other clauses of the modify_table_partition clause.
  • You cannot specify this clause in the modify_table_partition clause for a partition that has subpartitions. However, you can specify this clause in the modify_hash_subpartition or modify_list_subpartition clause.

update_global_index_clause

When you perform DDL on a table partition, if a global index is defined on table, then Oracle invalidates the entire index, not just the partitions undergoing DDL. This clause lets you update the global index partition you are changing during the DDL operation, eliminating the need to rebuild the index after the DDL.

UPDATE GLOBAL INDEXES

Specify UPDATE GLOBAL INDEXES to update the global indexes defined on table.

INVALIDATE GLOBAL INDEXES

Specify INVALIDATE GLOBAL INDEXES to invalidate the global indexes defined on table.

If you specify neither, then Oracle invalidates the global indexes.

Restrictions on Invalidating Global Indexes

This clause supports only global indexes. Domain indexes and index-organized tables are not supported. In addition, this clause updates only indexes that are USABLE and VALID. UNUSABLE indexes are left unusable, and INVALID global indexes are ignored.

See Also:

"Updating Global Indexes: Example"

parallel_clause

The parallel_clause lets you change the default degree of parallelism for queries and DML on the table.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

Restrictions on Altering Table Parallelization
  • If table contains any columns of LOB or user-defined object type, then subsequent INSERT, UPDATE, and DELETE operations on table are executed serially without notification. Subsequent queries, however, are executed in parallel.
  • If you specify the parallel_clause in conjunction with the move_table_clause, then the parallelism applies only to the move, not to subsequent DML and query operations on the table.

    See Also:

    "Notes on the parallel_clause" for CREATE TABLE and "Specifying Parallel Processing: Example"

move_table_clause

The move_table_clause lets you relocate data of a nonpartitioned table into a new segment, optionally in a different tablespace, and optionally modify any of its storage attributes.

You can also move any LOB data segments associated with the table using the LOB_storage_clause and varray_col_properties clause. LOB items not specified in this clause are not moved.

index_org_table_clause

For an index-organized table, the index_org_table_clause of the syntax lets you additionally specify overflow segment attributes. The move_table_clause rebuilds the index-organized table's primary key index. The overflow data segment is not rebuilt unless the OVERFLOW keyword is explicitly stated, with two exceptions:

  • If you alter the values of PCTTHRESHOLD or the INCLUDING column as part of this ALTER TABLE statement, then the overflow data segment is rebuilt.
  • If you explicitly move any of out-of-line columns (LOBs, varrays, nested table columns) in the index-organized table, then the overflow data segment is also rebuilt.

The index and data segments of LOB columns are not rebuilt unless you specify the LOB columns explicitly as part of this ALTER TABLE statement.

ONLINE Clause

Specify ONLINE if you want DML operations on the index-organized table to be allowed during rebuilding of the table's primary key index.

Restrictions on the ONLINE Clause
  • You cannot combine this clause with any other clause in the same statement.
  • You can specify this clause only for a nonpartitioned index-organized table.
  • Parallel DML is not supported during online MOVE. If you specify ONLINE and then issue parallel DML statements, then Oracle returns an error.
mapping_table_clause

Specify MAPPING TABLE if you want Oracle to create a mapping table if one does not already exist. If it does exist, then Oracle moves the mapping table along with the index-organized table, and marks any bitmapped indexes UNUSABLE. The new mapping table is created in the same tablespace as the parent table.

Specify NOMAPPING to instruct Oracle to drop an existing mapping table.

Restriction on Mapping Tables

You cannot specify NOMAPPING if any bitmapped indexes have been defined on table.

See Also:

mapping_table_clause of CREATE TABLE

key_compression

Use the key_compression clause to enable or disable key compression in an index-organized table.

  • COMPRESS enables key compression, which eliminates repeated occurrence of primary key column values in index-organized tables. Use integer to specify the prefix length (number of prefix columns to compress).

    The valid range of prefix length values is from 1 to the number of primary key columns minus 1. The default prefix length is the number of primary key columns minus 1.

  • NOCOMPRESS disables key compression in index-organized tables. This is the default.
TABLESPACE tablespace

Specify the tablespace into which the rebuilt index-organized table is stored.

Restrictions on Moving Tables
  • If you specify MOVE, then it must be the first clause, and the only clauses outside this clause that are allowed are the physical_attributes_clause, the parallel_clause, and the LOB_storage_clause.
  • You cannot move a table containing a LONG or LONG RAW column.
  • You cannot MOVE an entire partitioned table (either heap or index organized). You must move individual partitions or subpartitions.

    See Also:

    move_table_partition and move_table_subpartition

    Notes Regarding LOBs:

    For any LOB columns you specify in a move_table_clause:

    • Oracle drops the old LOB data segment and corresponding index segment and creates new segments, even if you do not specify a new tablespace.
    • If the LOB index in table resided in a different tablespace from the LOB data, then Oracle collocates the LOB index with the LOB data in the LOB data's tablespace after the move.

enable_disable_clause

The enable_disable_clause lets you specify whether and how Oracle should apply an integrity constraint. The DROP and KEEP clauses are valid only when you are disabling a unique or primary key constraint.

See Also:
  • The enable_disable_clause of CREATE TABLE for a complete description of this clause, including notes and restrictions that relate to this statement
  • "Using Indexes to Enforce Constraints" for information on using indexes to enforce constraints

TABLE LOCK

Oracle permits DDL operations on a table only if the table can be locked during the operation. Such table locks are not required during DML operations.

Note:

Table locks are not acquired on temporary tables.
ENABLE TABLE LOCK

Specify ENABLE TABLE LOCK to enable table locks, thereby allowing DDL operations on the table.

DISABLE TABLE LOCK

Specify DISABLE TABLE LOCK to disable table locks, thereby preventing DDL operations on the table.

ALL TRIGGERS

Use the ALL TRIGGERS clause to enable or disable all triggers associated with the table.

ENABLE ALL TRIGGERS

Specify ENABLE ALL TRIGGERS to enable all triggers associated with the table. Oracle fires the triggers whenever their triggering condition is satisfied.

To enable a single trigger, use the enable_clause of ALTER TRIGGER.

See Also:

CREATE TRIGGER , ALTER TRIGGER , and "Enabling Triggers: Example"

DISABLE ALL TRIGGERS

Specify DISABLE ALL TRIGGERS to disable all triggers associated with the table. Oracle will not fire a disabled trigger even if the triggering condition is satisfied.

Examples

Collection Retrieval: Example

The following statement modifies nested table column ad_textdocs_ntab in the sample table sh.print_media so that when queried it returns actual values instead of locators:

ALTER TABLE print_media MODIFY NESTED TABLE ad_textdocs_ntab
   RETURN AS VALUE;
Specifying Parallel Processing: Example

The following statement specifies parallel processing for queries to the sample table oe.customers:

ALTER TABLE customers
   PARALLEL;
Changing the State of a Constraint: Examples

The following statement places in ENABLE VALIDATE state an integrity constraint named emp_manager_fk in the employees table:

ALTER TABLE employees
   ENABLE VALIDATE CONSTRAINT emp_manager_fk
   EXCEPTIONS INTO exceptions;

Each row of the employees table must satisfy the constraint for Oracle to enable the constraint. If any row violates the constraint, then the constraint remains disabled. Oracle lists any exceptions in the table exceptions. You can also identify the exceptions in the employees table with the following statement:

SELECT employees.*
   FROM employees e, exceptions ex
   WHERE e.row_id = ex.row_id
      AND ex.table_name = 'EMPLOYEES'
      AND ex.constraint = 'EMP_MANAGER_FK';

The following statement tries to place in ENABLE NOVALIDATE state two constraints on the employees table:

ALTER TABLE employees
   ENABLE NOVALIDATE PRIMARY KEY
   ENABLE NOVALIDATE CONSTRAINT emp_last_name_nn;

This statement has two ENABLE clauses:

  • The first places a primary key constraint on the table in ENABLE NOVALIDATE state.
  • The second places the constraint named emp_last_name_nn in ENABLE NOVALIDATE state.

In this case, Oracle enables the constraints only if both are satisfied by each row in the table. If any row violates either constraint, then Oracle returns an error and both constraints remain disabled.

Consider a referential integrity constraint involving a foreign key on the combination of the areaco and phoneno columns of the phone_calls table. The foreign key references a unique key on the combination of the areaco and phoneno columns of the customers table. The following statement disables the unique key on the combination of the areaco and phoneno columns of the customers table:

ALTER TABLE customers
   DISABLE UNIQUE (areaco, phoneno) CASCADE;

The unique key in the customers table is referenced by the foreign key in the phone_calls table, so you must use the CASCADE clause to disable the unique key. This clause disables the foreign key as well.

Creating an Exceptions Table for Index-Organized Tables: Example

The following example creates the except_table table to hold rows from the index-organized table hr.countries that violate the primary key constraint:

EXECUTE DBMS_IOT.BUILD_EXCEPTIONS_TABLE ('hr', 'countries', 'except_table');

ALTER TABLE countries
   ENABLE PRIMARY KEY
   EXCEPTIONS INTO except_table;

To specify an exception table, you must have the privileges necessary to insert rows into the table. To examine the identified exceptions, you must have the privileges necessary to query the exceptions table.

See Also:
  • INSERT
  • SELECT for information on the privileges necessary to insert rows into tables
Disabling a CHECK Constraint: Example

The following statement defines and disables a CHECK constraint on the employees table:

ALTER TABLE employees ADD CONSTRAINT check_comp
   CHECK (salary + (commission_pct*salary) <= 5000)
   DISABLE;

The constraint check_comp ensures that no employee's total compensation exceeds $5000. The constraint is disabled, so you can increase an employee's compensation above this limit.

Enabling Triggers: Example

The following statement enables all triggers associated with the employees table:

ALTER TABLE employees
   ENABLE ALL TRIGGERS;
Deallocating Unused Space: Example

The following statement frees all unused space for reuse in table employees, where the high water mark is above MINEXTENTS:

ALTER TABLE employees
    DEALLOCATE UNUSED;
Renaming a Column: Example

The following example renames the credit_limit column of the sample table oe.customers to credit_amount:

ALTER TABLE customers
   RENAME COLUMN credit_limit TO credit_amount;
Dropping a Column: Example

This statement illustrates the drop_column_clause with CASCADE CONSTRAINTS. Assume table t1 is created as follows:

CREATE TABLE t1 (
   pk NUMBER PRIMARY KEY,
   fk NUMBER,
   c1 NUMBER,
   c2 NUMBER,
   CONSTRAINT ri FOREIGN KEY (fk) REFERENCES t1,
   CONSTRAINT ck1 CHECK (pk > 0 and c1 > 0),
   CONSTRAINT ck2 CHECK (c2 > 0)
);

An error will be returned for the following statements:

/* The next two statements return errors:
ALTER TABLE t1 DROP (pk); -- pk is a parent key
ALTER TABLE t1 DROP (c1);  -- c1 is referenced by multicolumn
                           -- constraint ck1

Submitting the following statement drops column pk, the primary key constraint, the foreign key constraint, ri, and the check constraint, ck1:

ALTER TABLE t1 DROP (pk) CASCADE CONSTRAINTS;

If all columns referenced by the constraints defined on the dropped columns are also dropped, then CASCADE CONSTRAINTS is not required. For example, assuming that no other referential constraints from other tables refer to column pk, then it is valid to submit the following statement without the CASCADE CONSTRAINTS clause:

ALTER TABLE t1 DROP (pk, fk, c1);
Modifying Index-Organized Tables: Examples

This statement modifies the INITRANS parameter for the index segment of index-organized table hr.countries:

ALTER TABLE countries INITRANS 4;

The following statement adds an overflow data segment to index-organized table countries:

ALTER TABLE countries ADD OVERFLOW;

This statement modifies the INITRANS parameter for the overflow data segment of index-organized table countries:

ALTER TABLE countries OVERFLOW INITRANS 4;
Splitting Table Partitions: Examples

The following statement splits the old partition sales_q4_2000 in the sample table sh.sales, creating two new partitions, naming one sales_q4_2000b and reusing the name of the old partition for the other:

ALTER TABLE sales SPLIT PARTITION SALES_Q4_2000
   AT (TO_DATE('15-NOV-2000','DD-MON-YYYY'))
   INTO (PARTITION SALES_Q4_2000, PARTITION SALES_Q4_2000b);

Assume that the sample table pm.print_media was range partitioned into partitions p1 and p2. (You would have to convert the LONG column in print_media to LOB before partitioning the table.) The following statement splits partition p2 of that table into partitions p2a and p2b:

ALTER TABLE print_media_part
   SPLIT PARTITION p2 AT (150) INTO
   (PARTITION p2a TABLESPACE omf_ts1
      LOB ad_photo, ad_composite) STORE AS (TABLESPACE omf_ts2),
   PARTITION p2b
      LOB (ad_photo, ad_composite) STORE AS (TABLESPACE omf_ts2));

In both partitions p2a and p2b, Oracle creates the LOB segments for columns ad_photo and ad_composite in tablespace omb_ts2. The LOB segments for the remaining columns in partition p2a are stored in tablespace omf_ts1. The LOB segments for the remaining columns in partition p2b remain in the tablespaces in which they resided prior to this ALTER statement. However, Oracle creates new segments for all the LOB data and LOB index segments, even if they are not moved to a new tablespace.

Adding a Table Partition with a LOB: Examples

The following statement adds a partition p3 to the print_media_part table (see preceding example) and specifies storage characteristics for the table's BLOB and CLOB columns:

ALTER TABLE print_media_part ADD PARTITION p3 VALUES LESS THAN
(MAXVALUE)
   LOB (ad_photo, ad_composite) STORE AS (TABLESPACE omf_ts2)
   LOB (ad_sourcetext, ad_finaltext) STORE AS (TABLESPACE omf_ts1);

The LOB data and LOB index segments for columns ad_photo and ad_composite in partition p3 will reside in tablespace omf_ts2. The remaining attributes for these LOB columns will be inherited first from the table-level defaults, and then from the tablespace defaults.

The LOB data segments for columns ad_source_text and ad_finaltext will reside in the omf_ts1 tablespace, and will inherit all other attributes from the table-level defaults and then from the tablespace defaults.

Working with Default List Partitions: Example

The following statements use the list partitioned table created in "List Partitioning Example" . The first statement splits the existing default partition into a new south partition and a default partition:

ALTER TABLE list_customers SPLIT PARTITION rest
   VALUES ('MEXICO', 'COLOMBIA')
   INTO (PARTITION south, PARTITION rest);

The next statement merges the resulting default partition with the asia partition:

ALTER TABLE list_customers
   MERGE PARTITIONS asia, rest INTO PARTITION rest;

The next statement re-creates the asia partition by splitting the default partition:

ALTER TABLE list_customers SPLIT PARTITION rest
   VALUES ('CHINA', 'THAILAND')
   INTO (PARTITION east, partition rest);
Merging Two Table Partitions: Example

The following statement merges back into one partition the partitions created in "Splitting Table Partitions: Examples" :

ALTER TABLE sales
   MERGE PARTITIONS sales_q4_2000, sales_q4_2000b
   INTO PARTITION sales_q4_2000;
Dropping a Table Partition: Example

The following statement drops partition p3 created in "Adding a Table Partition with a LOB: Examples" :

ALTER TABLE print_media_part DROP PARTITION p3;
Exchanging Table Partitions: Example

The following statement converts partition feb97 to table sales_feb97 without exchanging local index partitions with corresponding indexes on sales_feb97 and without verifying that data in sales_feb97 falls within the bounds of partition feb97:

ALTER TABLE sales
   EXCHANGE PARTITION feb97 WITH TABLE sales_feb97
   WITHOUT VALIDATION;
Modifying Table Partitions: Examples

The following statement marks all the local index partitions corresponding to the nov96 partition of the sales table UNUSABLE:

ALTER TABLE sales MODIFY PARTITION nov96
   UNUSABLE LOCAL INDEXES;

The following statement rebuilds all the local index partitions that were marked UNUSABLE:

ALTER TABLE sales MODIFY PARTITION jan97
   REBUILD UNUSABLE LOCAL INDEXES;

The following statement changes MAXEXTENTS and logging attribute for partition branch_ny:

ALTER TABLE branch MODIFY PARTITION branch_ny
   STORAGE (MAXEXTENTS 75) LOGGING;
Moving Table Partitions: Example

The following statement moves partition p2b (from "Splitting Table Partitions: Examples" ) to tablespace omf_ts1:

ALTER TABLE print_media_part
   MOVE PARTITION p2b TABLESPACE omf_ts1;
Renaming Table Partitions: Examples

The following statement renames a table:

ALTER TABLE employees RENAME TO employee;

In the following statement, partition emp3 is renamed:

ALTER TABLE employee RENAME PARTITION emp3 TO employee3;
Truncating Table Partitions: Example

The following statement deletes all the data in the sys_p017 partition and deallocates the freed space:

ALTER TABLE deliveries
   TRUNCATE PARTITION sys_p017 DROP STORAGE;
Updating Global Indexes: Example

The following statement splits partition sales_q1_2000 of the sample table sh.sales, and updates any global indexes defined on it:

ALTER TABLE sales SPLIT PARTITION sales_q1_2000
   AT (TO_DATE('16-FEB-2000','DD-MON-YYYY'))
   INTO (PARTITION q1a_2000, PARTITION q1b_2000)
   UPDATE GLOBAL INDEXES;
Specifying Object Identifiers: Example

The following statements create an object type, a corresponding object table with a primary-key-based object identifier, and a table having a user-defined REF column:

CREATE TYPE emp_t AS OBJECT (empno NUMBER, address CHAR(30));

CREATE TABLE emp OF emp_t (
   empno PRIMARY KEY)
   OBJECT IDENTIFIER IS PRIMARY KEY;

CREATE TABLE dept (dno NUMBER, mgr_ref REF emp_t SCOPE is emp);

The next statements add a constraint and a user-defined REF column, both of which reference table emp:

ALTER TABLE dept ADD CONSTRAINT mgr_cons FOREIGN KEY (mgr_ref)
   REFERENCES emp;
ALTER TABLE dept ADD sr_mgr REF emp_t REFERENCES emp;
Adding a Table Column: Example

The following statement adds a column named duty_pct of datatype NUMBER and a column named visa_needed of datatype VARCHAR2 with a size of 3 (to hold "yes" and "no" data) and a CHECK integrity constraint:

ALTER TABLE countries
   ADD (duty_pct     NUMBER(2,2)  CHECK (duty_pct < 10.5),
        visa_needed  VARCHAR2(3));
Modifying Table Columns: Examples

The following statement increases the size of the duty_pct column:

ALTER TABLE countries
   MODIFY (duty_pct NUMBER(3,2));

Because the MODIFY clause contains only one column definition, the parentheses around the definition are optional.

The following statement changes the values of the PCTFREE and PCTUSED parameters for the employees table to 30 and 60, respectively:

ALTER TABLE employees
   PCTFREE 30
   PCTUSED 60;
Converting LONG Columns to LOB: Example

The following example modifies the press_release column of the sample table pm.print_media from LONG to CLOB datatype:

ALTER TABLE print_media MODIFY (press_release CLOB);
Allocating Extents: Example

The following statement allocates an extent of 5 kilobytes for the employees table and makes it available to instance 4:

ALTER TABLE employees
  ALLOCATE EXTENT (SIZE 5K INSTANCE 4);

Because this statement omits the DATAFILE parameter, Oracle allocates the extent in one of the datafiles belonging to the tablespace containing the table.

Specifying Default Column Value: Examples

This statement modifies the min_price column of the product_information table so that it has a default value of 10:

ALTER TABLE product_information
  MODIFY (min_price DEFAULT 10);

If you subsequently add a new row to the product_information table and do not specify a value for the min_price column, then the value of the min_price column is automatically 0:

INSERT INTO product_information (product_id, product_name,
   list_price)
   VALUES (300, 'left-handed mouse', 40.50);

SELECT product_id, product_name, list_price, min_price
    FROM product_information
    WHERE product_id = 300;

PRODUCT_ID PRODUCT_NAME         LIST_PRICE  MIN_PRICE
---------- -------------------- ---------- ----------
       300 left-handed mouse          40.5         10

To discontinue previously specified default values, so that they are no longer automatically inserted into newly added rows, replace the values with nulls, as shown in this statement:

ALTER TABLE product_information
   MODIFY (min_price DEFAULT NULL);

The MODIFY clause need only specify the column name and the modified part of the definition, rather than the entire column definition. This statement has no effect on any existing values in existing rows.

Adding a Constraint to an XMLType Table: Example

The following example adds a primary key constraint to the xwarehouses table, created in "XMLType Table Examples" :

ALTER TABLE xwarehouses
   ADD (PRIMARY KEY(XMLDATA."WarehouseID"));
See Also:

XMLDATA for information about this pseudocolumn
Renaming Constraints: Example

The following statement renames the cust_fname_nn constraint on the sample table oe.customers to cust_firstname_nn:

ALTER TABLE customers RENAME CONSTRAINT cust_fname_nn
   TO cust_firstname_nn;
Dropping Constraints: Examples

The following statement drops the primary key of the departments table:

ALTER TABLE departments
    DROP PRIMARY KEY CASCADE;

If you know that the name of the PRIMARY KEY constraint is pk_dept, then you could also drop it with the following statement:

ALTER TABLE departments
    DROP CONSTRAINT pk_dept CASCADE;

The CASCADE clause drops any foreign keys that reference the primary key.

The following statement drops the unique key on the email column of the employees table:

ALTER TABLE employees
    DROP UNIQUE (email);

The DROP clause in this statement omits the CASCADE clause. Because of this omission, Oracle does not drop the unique key if any foreign key references it.

LOB Columns: Examples

The following statement adds CLOB column resume to the employee table and specifies LOB storage characteristics for the new column:

ALTER TABLE employees ADD (resume CLOB)
  LOB (resume) STORE AS resume_seg (TABLESPACE example);

To modify the LOB column resume to use caching, enter the following statement:

ALTER TABLE employees MODIFY LOB (resume) (CACHE);
Nested Tables: Examples

The following statement adds the nested table column skills to the employee table:

ALTER TABLE employees ADD (skills skill_table_type)
    NESTED TABLE skills STORE AS nested_skill_table;

You can also modify a nested table's storage characteristics. Use the name of the storage table specified in the nested_table_col_properties to make the modification. You cannot query or perform DML statements on the storage table. Use the storage table only to modify the nested table column storage characteristics.

The following statement creates table vetservice with nested table column client and storage table client_tab. Nested table vetservice is modified to specify constraints:

CREATE TYPE pet_table AS OBJECT
   (pet_name VARCHAR2(10), pet_dob DATE);

CREATE TABLE vetservice (vet_name VARCHAR2(30),
                         client   pet_table)
  NESTED TABLE client STORE AS client_tab;

ALTER TABLE client_tab ADD UNIQUE (ssn);

The following statement adds a UNIQUE constraint to nested table nested_skill_table:

ALTER TABLE nested_skill_table ADD UNIQUE (a);

The following statement alters the storage table for a nested table of REF values to specify that the REF is scoped:

CREATE TYPE emp_t AS OBJECT (eno number, ename char(31));
CREATE TYPE emps_t AS TABLE OF REF emp_t;
CREATE TABLE emptab OF emp_t;
CREATE TABLE dept (dno NUMBER, employees emps_t)
   NESTED TABLE employees STORE AS deptemps;
ALTER TABLE deptemps ADD (SCOPE FOR (column_value) IS emptab);

Similarly, to specify storing the REF with rowid:

ALTER TABLE deptemps ADD (REF(column_value) WITH ROWID);

In order to execute these ALTER TABLE statements successfully, the storage table deptemps must be empty. Also, because the nested table is defined as a table of scalars (REFs), Oracle implicitly provides the column name COLUMN_VALUE for the storage table.

See Also:
  • CREATE TABLE for more information about nested table storage
  • Oracle9i Application Developer's Guide - Fundamentals for more information about nested tables
REF Columns: Examples

In the following statement an object type dept_t has been previously defined. Now, create table staff as follows:

CREATE TABLE staff
   (name   VARCHAR(100),
    salary NUMBER,
    dept   REF dept_t);

An object table offices is created as:

CREATE TABLE offices OF dept_t;

The dept column can store references to objects of dept_t stored in any table. If you would like to restrict the references to point only to objects stored in the departments table, then you could do so by adding a scope constraint on the dept column as follows:

ALTER TABLE staff
    ADD (SCOPE FOR (dept) IS offices);

The preceding ALTER TABLE statement will succeed only if the staff table is empty.

If you want the REF values in the dept column of staff to also store the rowids, issue the following statement:

ALTER TABLE staff
   ADD (REF(dept) WITH ROWID);
Additional Examples

For examples of defining integrity constraints with the ALTER TABLE statement, see the constraints .

For examples of changing the value of a table's storage parameters, see the storage_clause .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


SQL Statements: ALTER TABLE to ALTER TABLESPACE, 3 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER TABLESPACE

Purpose

Use the ALTER TABLESPACE statement to alter an existing tablespace or one or more of its datafiles or tempfiles.

You cannot use this statement to convert a dictionary-managed tablespace to a locally managed tablespace. For that purpose, use the DBMS_SPACE_ADMIN package, which is documented in Oracle9i Supplied PL/SQL Packages and Types Reference.

See Also:

Oracle9i Database Administrator's Guide and CREATE TABLESPACE for information on creating a tablespace

Prerequisites

If you have ALTER TABLESPACE system privilege, then you can perform any of this statement's operations. If you have MANAGE TABLESPACE system privilege, then you can only perform the following operations:

  • Take the tablespace online or offline
  • Begin or end a backup
  • Make the tablespace read only or read write

Before you can make a tablespace read only, the following conditions must be met:

  • The tablespace must be online.
  • The tablespace must not contain any active rollback segments. For this reason, the SYSTEM tablespace can never be made read only, because it contains the SYSTEM rollback segment. Additionally, because the rollback segments of a read-only tablespace are not accessible, Oracle recommends that you drop the rollback segments before you make a tablespace read only.
  • The tablespace must not be involved in an open backup, because the end of a backup updates the header file of all datafiles in the tablespace.

Performing this function in restricted mode may help you meet these restrictions, because only users with RESTRICTED SESSION system privilege can be logged on.

Syntax

alter_tablespace::=

Text description of statements_333.gif follows
Text description of alter_tablespace

(datafile_tempfile_clauses::= , data_segment_compression::= --part of ALTER TABLE syntax, storage_clause::= , logging_clause::= )

datafile_tempfile_clauses::=

Text description of statements_337.gif follows
Text description of datafile_tempfile_clauses

(datafile_tempfile_spec::= --part of file_specification).

Semantics

tablespace

Specify the name of the tablespace to be altered.

Restrictions on Altering Tablespaces
  • If tablespace is an undo tablespace, then the only other clauses you can specify in this statement are ADD DATAFILE, RENAME DATAFILE, DATAFILE ... ONLINE | OFFLINE, and BEGIN | END BACKUP.
  • For locally managed temporary tablespaces the only clause you can specify in this statement is the ADD clause.

    See Also:

    Oracle9i Database Administrator's Guide for information on Automatic Undo Management and undo tablespaces

datafile_tempfile_clauses

The tablespace file clauses let you add or modify a datafile or tempfile.

ADD DATAFILE | TEMPFILE Clause

Specify ADD to add to the tablespace a datafile or tempfile specified by datafile_tempfile_spec.

For locally managed temporary tablespaces, this is the only clause you can specify at any time.

If you omit datafile_tempfile_spec, then Oracle creates an Oracle-managed file of 100M with AUTOEXTEND enabled.

You can add a datafile or tempfile to a locally managed tablespace that is online or to a dictionary managed tablespace that is online or offline. Be sure the file is not in use by another database.

Note:

On some operating systems, Oracle does not allocate space for the tempfile until the tempfile blocks are actually accessed. This delay in space allocation results in faster creation and resizing of tempfiles, but it requires that sufficient disk space is available when the tempfiles are later used. To avoid potential problems, before you create or resize a tempfile, ensure that the available disk space exceeds the size of the new tempfile or the increased size of a resized tempfile. The excess space should allow for anticipated increases in disk space use by unrelated operations as well. Then proceed with the creation or resizing operation.
See Also:

file_specification , "Adding a Datafile: Example" , and "Adding an Oracle-managed Datafile: Example"

RENAME DATAFILE Clause

Specify RENAME DATAFILE to rename one or more of the tablespace's datafiles. The database must be open, and you must take the tablespace offline before renaming it. Each 'filename' must fully specify a datafile using the conventions for filenames on your operating system.

This clause merely associates the tablespace with the new file rather than the old one. This clause does not actually change the name of the operating system file. You must change the name of the file through your operating system.

See Also:

"Moving and Renaming Tablespaces: Example"

DATAFILE | TEMPFILE ONLINE | OFFLINE

Use this clause to take all datafiles or tempfiles in the tablespace offline or put them online. This clause has no effect on the ONLINE/OFFLINE status of the tablespace.

The database must be mounted. If tablespace is SYSTEM, or an undo tablespace, or the default temporary tablespace, then the database must not be open.

DEFAULT storage_clause

DEFAULT storage_clause lets you specify the new default storage parameters for objects subsequently created in the tablespace. For a dictionary-managed temporary table, Oracle considers only the NEXT parameter of the storage_clause.

Restriction on Default Tablespace Storage

You cannot specify this clause for a locally managed tablespace.

See Also:

storage_clause

MINIMUM EXTENT

The MINIMUM EXTENT clause lets you control free space fragmentation in the tablespace by ensuring that every used or free extent in a tablespace is at least as large as, and is a multiple of, integer. This clause is not relevant for a dictionary-managed temporary tablespace.

Restriction on MINIMUM EXTENT

You cannot specify this clause for a locally managed tablespace.

See Also:

Oracle9i Database Administrator's Guide for more information about using MINIMUM EXTENT to control space fragmentation and "Changing Tablespace Extent Allocation: Example"

ONLINE

Specify ONLINE to bring the tablespace online.

OFFLINE

Specify OFFLINE to take the tablespace offline and prevent further access to its segments. When you take a tablespace offline, all of its datafiles are also offline.

Suggestion: Before taking a tablespace offline for a long time, you may want to alter the tablespace allocation of any users who have been assigned the tablespace as either a default or temporary tablespace. When the tablespace is offline, these users cannot allocate space for objects or sort areas in the tablespace. See ALTER USER for more information on allocating tablespace quota to users.
Restriction on Taking Tablespaces Offline

You cannot take a temporary tablespace offline.

NORMAL

Specify NORMAL to flush all blocks in all datafiles in the tablespace out of the SGA. You need not perform media recovery on this tablespace before bringing it back online. This is the default.

TEMPORARY

If you specify TEMPORARY, then Oracle performs a checkpoint for all online datafiles in the tablespace but does not ensure that all files can be written. Any offline files may require media recovery before you bring the tablespace back online.

IMMEDIATE

If you specify IMMEDIATE, then Oracle does not ensure that tablespace files are available and does not perform a checkpoint. You must perform media recovery on the tablespace before bringing it back online.

Note:

The FOR RECOVER setting for ALTER TABLESPACE ... OFFLINE has been deprecated. The syntax is supported for backward compatibility. However, users are encouraged to use the transportable tablespaces feature for tablespace recovery.
See Also:

Oracle9i User-Managed Backup and Recovery Guide for information on using transportable tablespaces to perform media recovery

BEGIN BACKUP

Specify BEGIN BACKUP to indicate that an open backup is to be performed on the datafiles that make up this tablespace. This clause does not prevent users from accessing the tablespace. You must use this clause before beginning an open backup.

Restrictions on Beginning Tablespace Backup

You cannot specify this clause for a read-only tablespace or for a temporary locally managed tablespace.

Note:

While the backup is in progress, you cannot take the tablespace offline normally, shut down the instance, or begin another backup of the tablespace.
See Also:

"Backing Up Tablespaces: Examples"

END BACKUP

Specify END BACKUP to indicate that an online backup of the tablespace is complete. Use this clause as soon as possible after completing an online backup. Otherwise, if an instance failure or SHUTDOWN ABORT occurs, then Oracle assumes that media recovery (possibly requiring archived redo log) is necessary at the next instance start up.

Restriction on Ending Tablespace Backup

You cannot use this clause on a read-only tablespace.

See Also:
  • Oracle9i Database Administrator's Guide for information on restarting the database without media recovery
  • ALTER DATABASE "END BACKUP Clause" for information on taking individual datafiles (or all datafiles in the tablespace) out of online ("hot") backup mode

READ ONLY | READ WRITE

Specify READ ONLY to place the tablespace in transition read-only mode. In this state, existing transactions can complete (commit or roll back), but no further write operations (DML) are allowed to the tablespace except for rollback of existing transactions that previously modified blocks in the tablespace.

Once a tablespace is read only, you can copy its files to read-only media. You must then rename the datafiles in the control file to point to the new location by using the SQL statement ALTER DATABASE ... RENAME.

See Also:
  • Oracle9i Database Concepts for more information on read-only tablespaces
  • ALTER DATABASE

Specify READ WRITE to indicate that write operations are allowed on a previously read-only tablespace.

PERMANENT | TEMPORARY

Specify PERMANENT to indicate that the tablespace is to be converted from a temporary to a permanent one. A permanent tablespace is one in which permanent database objects can be stored. This is the default when a tablespace is created.

Specify TEMPORARY to indicate specifies that the tablespace is to be converted from a permanent to a temporary one. A temporary tablespace is one in which no permanent database objects can be stored. Objects in a temporary tablespace persist only for the duration of the session.

Restrictions on Temporary Tablespaces
  • If tablespace was not created with a standard block size, then you cannot change it from permanent to temporary.
  • You cannot specify TEMPORARY for a tablespace in FORCE LOGGING mode.

COALESCE

For each datafile in the tablespace, this clause combines all contiguous free extents into larger contiguous extents.

logging_clause

Specify LOGGING if you want logging of all tables, indexes, and partitions within the tablespace. The tablespace-level logging attribute can be overridden by logging specifications at the table, index, and partition levels.

When an existing tablespace logging attribute is changed by an ALTER TABLESPACE statement, all tables, indexes, and partitions created after the statement will have the new default logging attribute (which you can still subsequently override). The logging attributes of existing objects are not changed.

If the tablespace is in FORCE LOGGING mode, then you can specify NOLOGGING in this statement to set the default logging mode of the tablespace to NOLOGGING, but this will not take the tablespace out of FORCE LOGGING mode.

[NO] FORCE LOGGING

Use this clause to put the tablespace in force logging mode or take it out of force logging mode. The database must be open and in READ WRITE mode. Neither of these settings changes the default LOGGING or NOLOGGING mode of the tablespace.

Restriction on Force Logging Mode

You cannot specify FORCE LOGGING for an undo or a temporary tablespace.

See Also:

Oracle9i Database Administrator's Guide for information on when to use FORCE LOGGING mode and "Changing Tablespace Logging Attributes: Example"

Examples

Backing Up Tablespaces: Examples

The following statement signals to the database that a backup is about to begin:

ALTER TABLESPACE tbs_01
    BEGIN BACKUP;

The following statement signals to the database that the backup is finished:

ALTER TABLESPACE tbs_01
   END BACKUP;
Moving and Renaming Tablespaces: Example

This example moves and renames a datafile associated with the tbs_01 tablespace from 'diskb:tbs_f5.dat' to 'diska:tbs_f5.dat':

  1. Take the tablespace offline using an ALTER TABLESPACE statement with the OFFLINE clause:
    ALTER TABLESPACE tbs_01 OFFLINE NORMAL;
  2. Copy the file from 'diskb:tbs_f5.dat' to 'diska:tbs_f5.dat' using your operating system's commands.
  3. Rename the datafile using the ALTER TABLESPACE statement with the RENAME DATAFILE clause:
    ALTER TABLESPACE tbs_01
  RENAME DATAFILE 'diskb:tbs_f5.dat'
  TO              'diska:tbs_f5.dat';
  4. Bring the tablespace back online using an ALTER TABLESPACE statement with the ONLINE clause:
    ALTER TABLESPACE tbs_01 ONLINE;
Adding a Datafile: Example

The following statement adds a datafile to the tablespace. When more space is needed, new extents of size 10 kilobytes will be added up to a maximum of 100 kilobytes:

ALTER TABLESPACE tbs_03
    ADD DATAFILE 'tbs_f04.dbf'
    SIZE 50K
    AUTOEXTEND ON
    NEXT 10K
    MAXSIZE 100K;
Adding an Oracle-managed Datafile: Example

The following example adds an Oracle-managed datafile to the omf_ts1 tablespace (see "Creating Oracle-managed Files: Examples" for the creation of this tablespace). The new datafile is 100M and is autoextensible with unlimited maximum size:

ALTER TABLESPACE omf_ts1 ADD DATAFILE;
Changing Tablespace Logging Attributes: Example

The following example changes the default logging attribute of a tablespace to NOLOGGING:

ALTER TABLESPACE tbs_03 NOLOGGING;

Altering a tablespace logging attribute has no affect on the logging attributes of the existing schema objects within the tablespace. The tablespace-level logging attribute can be overridden by logging specifications at the table, index, and partition levels.

Changing Tablespace Extent Allocation: Example

The following statement changes the allocation of every extent of tbs_03 to a multiple of 128K:

ALTER TABLESPACE tbs_03 MINIMUM EXTENT 128K;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 1 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

12
SQL Statements: ALTER TRIGGER to COMMIT

This chapter contains the following SQL statements:

  • ALTER TRIGGER
  • ALTER TYPE
  • ALTER USER
  • ALTER VIEW
  • ANALYZE
  • ASSOCIATE STATISTICS
  • AUDIT
  • CALL
  • COMMENT
  • COMMIT
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 2 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER TRIGGER

Purpose

Use the ALTER TRIGGER statement to enable, disable, or compile a database trigger.

Note:

This statement does not change the declaration or definition of an existing trigger. To redeclare or redefine a trigger, use the CREATE TRIGGER statement with the OR REPLACE keywords.
See Also:
  • CREATE TRIGGER for information on creating a trigger
  • DROP TRIGGER for information on dropping a trigger
  • Oracle9i Database Concepts for general information on triggers

Prerequisites

The trigger must be in your own schema or you must have ALTER ANY TRIGGER system privilege.

In addition, to alter a trigger on DATABASE, you must have the ADMINISTER DATABASE TRIGGER system privilege.

See Also:

CREATE TRIGGER for more information on triggers based on DATABASE triggers

Syntax

alter_trigger::=

Text description of statements_4a.gif follows
Text description of alter_trigger

Semantics

schema

Specify the schema containing the trigger. If you omit schema, then Oracle assumes the trigger is in your own schema.

trigger

Specify the name of the trigger to be altered.

ENABLE Clause

Specify ENABLE to enable the trigger. You can also use the ENABLE ALL TRIGGERS clause of ALTER TABLE to enable all triggers associated with a table.

See Also:

ALTER TABLE and "Enabling Triggers: Example"

DISABLE Clause

Specify DISABLE to disable the trigger. You can also use the DISABLE ALL TRIGGERS clause of ALTER TABLE to disable all triggers associated with a table.

See Also:

ALTER TABLE and "Disabling Triggers: Example"

RENAME Clause

Specify RENAME TO new_name to rename the trigger. Oracle renames the trigger and leaves it in the same state it was in before being renamed.

Note:

When you rename a trigger, Oracle rebuilds the remembered source of the trigger in the USER_SOURCE, ALL_SOURCE, and DBA_SOURCE data dictionary views. As a result, comments and formatting may change in the TEXT column of those views even though the trigger source did not change.

COMPILE Clause

Specify COMPILE to explicitly compile the trigger, whether it is valid or invalid. Explicit recompilation eliminates the need for implicit run-time recompilation and prevents associated run-time compilation errors and performance overhead.

Oracle first recompiles objects upon which the trigger depends, if any of these objects are invalid. If Oracle recompiles the trigger successfully, then the trigger becomes valid.

During recompilation, Oracle drops all persistent compiler switch settings, retrieves them again from the session, and stores them at the end of compilation. To avoid this process, specify the REUSE SETTINGS clause.

If recompiling the trigger results in compilation errors, then Oracle returns an error and the trigger remains invalid. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

DEBUG

Specify DEBUG to instruct the PL/SQL compiler to generate and store the code for use by the PL/SQL debugger.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for information on debugging procedures
  • Oracle9i Database Concepts for information on how Oracle maintains dependencies among schema objects, including remote objects
REUSE SETTINGS

Specify REUSE SETTINGS to prevent Oracle from dropping and reacquiring compiler switch settings. With this clause, Oracle preserves the existing settings and uses them for the recompilation.

If you specify both DEBUG and REUSE SETTINGS, Oracle sets the persistently stored value of the PLSQL_COMPILER_FLAGS parameter to INTERPRETED, DEBUG. No other compiler switch values are changed.

See Also:

PL/SQL User's Guide and Reference and Oracle9i Application Developer's Guide - Fundamentals for more information on the interaction of the PLSQL_COMPILER_FLAGS parameter with the COMPILE clause

Examples

Disabling Triggers: Example

The sample schema hr has a trigger named update_job_history created on the employees table. The trigger is fired whenever an UPDATE statement changes an employee's job_id. The trigger inserts into the job_history table a row that contains the employee's ID, begin and end date of the last job, and the job ID and department.

When this trigger is created, Oracle enables it automatically. You can subsequently disable the trigger with the following statement:

ALTER TRIGGER update_job_history DISABLE;

When the trigger is disabled, Oracle does not fire the trigger when an UPDATE statement changes an employee's job.

Enabling Triggers: Example

After disabling the trigger, you can subsequently enable it with the following statement:

ALTER TRIGGER update_job_history ENABLE;

After you reenable the trigger, Oracle fires the trigger whenever an employee's job changes as a result of an UPDATE statement. If an employee's job is updated while the trigger is disabled, then Oracle does not automatically fire the trigger for this employee until another transaction changes the job_id again.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 3 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER TYPE

Purpose

Use the ALTER TYPE statement to add or drop member attributes or methods. You can change the existing properties (FINAL or INSTANTIABLE) of an object type, and you can modify the scalar attributes of the type.

You can also use this statement to recompile the specification or body of the type or to change the specification of an object type by adding new object member subprogram specifications.

Prerequisites

The object type must be in your own schema and you must have CREATE TYPE or CREATE ANY TYPE system privilege, or you must have ALTER ANY TYPE system privileges.

Syntax

alter_type::=

Text description of statements_424.gif follows
Text description of alter_type

(compile_type_clause::= , replace_type_clause::= , alter_method_spec::= , alter_attribute_definition::= , dependent_handling_clause::= )

compile_type_clause::=

Text description of compile_type_clause.gif follows
Text description of compile_type_clause

replace_type_clause::=

Text description of statements_440.gif follows
Text description of replace_type_clause

invoker_rights_clause::=

Text description of statements_418.gif follows
Text description of invoker_rights_clause

element_spec::=

Text description of statements_42.gif follows
Text description of element_spec

(inheritance_clauses::= , subprogram_spec::= , constructor_spec::= , map_order_function_spec::= , pragma_clause::= )

inheritance_clauses::=

Text description of statements_43.gif follows
Text description of inheritance_clauses

subprogram_spec::=

Text description of statements_44.gif follows
Text description of subprogram_spec

(procedure_spec::= , function_spec::= )

procedure_spec::=

Text description of statements_416.gif follows
Text description of procedure_spec

function_spec::=

Text description of statements_417.gif follows
Text description of function_spec

constructor_spec::=

Text description of statements_438.gif follows
Text description of constructor_spec

map_order_function_spec::=

Text description of statements_438a.gif follows
Text description of map_order_function_spec

(function_spec::= )

pragma_clause::=

Text description of statements_413.gif follows
Text description of pragma_clause

alter_method_spec::=

Text description of statements_46.gif follows
Text description of alter_method_spec

(map_order_function_spec::= , subprogram_spec::= )

alter_attribute_definition::=

Text description of statements_47.gif follows
Text description of alter_attribute_definition

dependent_handling_clause::=

Text description of statements_48.gif follows
Text description of dependent_handling_clause

exceptions_clause::=

Text description of statements_49.gif follows
Text description of exceptions_clause

Semantics

schema

Specify the schema that contains the type. If you omit schema, then Oracle assumes the type is in your current schema.

type

Specify the name of an object type, a nested table type, or a rowid type.

compile_type_clause

Specify COMPILE to compile the object type specification and body. This is the default if neither SPECIFICATION nor BODY is specified.

During recompilation, Oracle drops all persistent compiler switch settings, retrieves them again from the session, and stores them at the end of compilation. To avoid this process, specify the REUSE SETTINGS clause.

If recompiling the type results in compilation errors, then Oracle returns an error and the type remains invalid. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

See Also:

"Recompiling a Type: Example" and "Recompiling a Type Specification: Example"

DEBUG

Specify DEBUG to instruct the PL/SQL compiler to generate and store the code for use by the PL/SQL debugger.

SPECIFICATION

Specify SPECIFICATION to compile only the object type specification.

BODY

Specify BODY to compile only the object type body.

REUSE SETTINGS

Specify REUSE SETTINGS to prevent Oracle from dropping and reacquiring compiler switch settings. With this clause, Oracle preserves the existing settings and uses them for the recompilation.

If you specify both DEBUG and REUSE SETTINGS, Oracle sets the persistently stored value of the PLSQL_COMPILER_FLAGS parameter to INTERPRETED, DEBUG. No other compiler switch values are changed.

See Also:

PL/SQL User's Guide and Reference and Oracle9i Application Developer's Guide - Fundamentals for more information on the interaction of the PLSQL_COMPILER_FLAGS parameter with the COMPILE clause

replace_type_clause

The REPLACE clause lets you add new member subprogram specifications. This clause is valid only for object types, not for nested table or varray types.

attribute

Specify an object attribute name. Attributes are data items with a name and a type specifier that form the structure of the object.

element_spec

Specify the elements of the redefined object.

inheritance_clauses

As part of the element_spec, the inheritance_clauses let you specify the relationship between super- and subtypes.

OVERRIDING

This clause is valid only for MEMBER methods. Specify OVERRIDING to indicate that this method overrides a MEMBER method defined in the supertype. This keyword is required if the method redefines a supertype method. NOT OVERRIDING is the default.

Restriction on OVERRIDING

The OVERRIDING clause is not valid for a STATIC method or for a SQLJ object type.

FINAL

Specify FINAL to indicate that this method cannot be overridden by any subtype of this type. The default is NOT FINAL.

NOT INSTANTIABLE

Specify NOT INSTANTIABLE if the type does not provide an implementation for this method. By default all methods are INSTANTIABLE.

Restriction on NOT INSTANTIABLE

: If you specify NOT INSTANTIABLE, you cannot specify FINAL or STATIC.

subprogram_spec

The MEMBER and STATIC clauses let you specify a function or procedure subprogram associated with the object type which is referenced as an attribute.

You must specify a corresponding method body in the object type body for each procedure or function specification.

See Also:
  • CREATE TYPE for a description of the difference between member and static methods, and for examples
  • PL/SQL User's Guide and Reference for information about overloading subprogram names within a package
  • CREATE TYPE BODY
procedure_spec

Enter the specification of a procedure subprogram.

function_spec

Enter the specification of a function subprogram.

pragma_clause

The pragma_clause is a complier directive that denies member functions read/write access to database tables, packaged variables, or both, and thereby helps to avoid side effects.

Oracle Corporation recommends that you avoid using this clause unless you must do so for backward compatibility of your applications. This clause has been deprecated, because beginning with Oracle9i, Oracle runs purity checks at run time. If you must use this clause for backward compatibility of your applications, you can find its description in pragma_clause (under CREATE TYPE).

Restriction on Pragmas

The pragma_clause is not valid when dropping a method.

See Also:

Oracle9i Application Developer's Guide - Fundamentals
map_order_function_spec

You can declare either one MAP method or one ORDER method, regardless how many MEMBER or STATIC methods you declare. However, a subtype can override a MAP method if the supertype defines a NOT FINAL MAP method. If you declare either method, then you can compare object instances in SQL.

If you do not declare either method, then you can compare object instances only for equality or inequality. Instances of the same type definition are equal only if each pair of their corresponding attributes is equal. No comparison method needs to be specified to determine the equality of two object types.

See Also:

"Object Values" for more information about object value comparisons
  • For MAP, specify a member function (MAP method) that returns the relative position of a given instance in the ordering of all instances of the object. A map method is called implicitly and induces an ordering of object instances by mapping them to values of a predefined scalar type. Oracle uses the ordering for comparison conditions and ORDER BY clauses.

    If the argument to the MAP method is null, then the MAP method returns null and the method is not invoked.

    An object specification can contain only one MAP method, which must be a function. The result type must be a predefined SQL scalar type, and the MAP function can have no arguments other than the implicit SELF argument.

    Note:

    If type will be referenced in queries involving sorts (through ORDER BY, GROUP BY, DISTINCT, or UNION clauses) or joins, and you want those queries to be parallelized, then you must specify a MAP member function.

A subtype cannot define a new MAP method. However, it can override an inherited MAP method.

  • For ORDER, specify a member function (ORDER method) that takes an instance of an object as an explicit argument and the implicit SELF argument and returns either a negative, zero, or positive integer. The negative, zero, or positive indicates that the implicit SELF argument is less than, equal to, or greater than the explicit argument.

    If either argument to the ORDER method is null, then the ORDER method returns null and the method is not invoked.

    When instances of the same object type definition are compared in an ORDER BY clause, the ORDER method function is invoked.

    An object specification can contain only one ORDER method, which must be a function having the return type NUMBER.

    A subtype cannot define an ORDER method, nor can it override an inherited ORDER method.

invoker_rights_clause

The invoker_rights_clause lets you specify whether the member functions and procedures of the object type execute with the privileges and in the schema of the user who owns the object type or with the privileges and in the schema of CURRENT_USER. This specification applies to the corresponding type body as well.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the member functions and procedures of the type.

Restriction on Invoker Rights

You can specify this clause only for an object type, not for a nested table or varray type.

AUTHID CURRENT_USER Clause

Specify CURRENT_USER if you want the member functions and procedures of the object type to execute with the privileges of CURRENT_USER. This clause creates an invoker-rights type.

This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the type resides.

Note:

You must specify this clause to maintain invoker-rights status for the type if you created it with this status. Otherwise the status will revert to definer rights.
AUTHID DEFINER Clause

Specify DEFINER if you want the member functions and procedures of the object type to execute with the privileges of the owner of the schema in which the functions and procedures reside, and that external names resolve in the schema where the member functions and procedures reside. This is the default.

See Also:
  • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined
  • PL/SQL User's Guide and Reference

alter_method_spec

The alter_method_spec lets you add a method to or drop a method from type. Oracle disables any function-based indexes that depend on the type.

In one ALTER TYPE statement you can add or drop multiple methods, but you can reference each method only once.

ADD

When you add a method, its name must not conflict with any existing attributes in its type hierarchy.

See Also:

"Adding a Member Function: Example"

DROP

When you drop a method, Oracle removes the method from the target type.

Restriction on Dropping Methods

You cannot drop from a subtype a method inherited from its supertype. Instead you must drop the method from the supertype.

subprogram_spec

The MEMBER and STATIC clauses let you add a procedure subprogram to or drop it from the object type.

Restriction on Subprograms

You cannot define a STATIC method on a subtype that redefines a MEMBER method in its supertype, or vice versa.

See Also:

the description of the subprogram_spec in CREATE TYPE

map_order_function_spec

If you declare either a MAP or ORDER method, then you can compare object instances in SQL.

Restriction on MAP and ORDER Methods

You cannot add an ORDER method to a subtype.

See Also:

the description of constructor_spec in CREATE TYPE

alter_attribute_definition

The alter_attribute_definition clause lets you add, drop, or modify an attribute of an object type. In one ALTER TYPE statement, you can add, drop, or modify multiple member attributes or methods, but you can reference each attribute or method only once.

ADD ATTRIBUTE

The name of the new attribute must not conflict with existing attributes or methods in the type hierarchy. Oracle adds the new attribute to the end of the locally defined attribute list.

Note:

If you add the attribute to a supertype, then it is inherited by all of its subtypes. In subtypes, inherited attributes always precede declared attributes. Therefore, you may need to update the mappings of the implicitly altered subtypes after adding an attribute to a supertype.
See Also:

"Adding a Collection Attribute: Example"

DROP ATTRIBUTE

When you drop an attribute from a type, Oracle drops the column corresponding to the dropped attribute as well as any indexes, statistics, and constraints referencing the dropped attribute.

You need not specify the datatype of the attribute you are dropping.

Restrictions on Dropping Attributes
  • You cannot drop an attribute inherited from a supertype. Instead you must drop the attribute from the supertype.
  • You cannot drop an attribute that is part of a partitioning, subpartitioning, or cluster key.
  • You cannot drop an attribute of a primary-key-based object identifier of an object table or a primary key of an index-organized table.
  • You cannot drop all of the attributes of a root type. Instead you must drop the type. However, you can drop all of the locally declared attributes of a subtype.
MODIFY ATTRIBUTE

This clause lets you modify the datatype of an existing scalar attribute. For example, you can increase the length of a VARCHAR2 or RAW attribute, or you can increase the precision or scale of a numeric attribute.

Restriction on Modifying Attributes

You cannot expand the size of an attribute referenced in a function-based index, domain index, or cluster key.

[NOT] FINAL

Use the [NOT] FINAL clause to indicate whether any further subtypes can be created for this type:

  • Specify FINAL if no further subtypes can be created for this type.
  • Specify NOT FINAL if further subtypes can be created under this type.

If you change the property between FINAL and NOT FINAL, then you must specify the CASCADE clause of the dependent_handling_clause to convert data in dependent columns and tables. You cannot defer data conversion with CASCADE NOT INCLUDING TABLE DATA.

  • If you change a type from NOT FINAL to FINAL, then you must specify CASCADE [INCLUDING TABLE DATA].
  • If you change a type from FINAL to NOT FINAL:
    • Specify CASCADE INCLUDING TABLE DATA if you want to create new substitutable tables and columns of that type, but you are not concerned about the substitutability of the existing dependent tables and columns. Oracle marks all existing dependent columns and tables NOT SUBSTITUTABLE AT ALL LEVELS, so you cannot insert the new subtype instances of the altered type into these existing columns and tables.
    • Specify CASCADE CONVERT TO SUBSTITUTABLE if you want to create new substitutable tables and columns of the type and also store new subtype instances of the altered type in existing dependent tables and columns. Oracle marks all existing dependent columns and tables SUBSTITUTABLE AT ALL LEVELS except those that are explicitly marked NOT SUBSTITUTABLE AT ALL LEVELS.

      See Also:

      Oracle9i Application Developer's Guide - Object-Relational Features for a full discussion of object type evolution
Restriction on FINAL

You cannot change a user-defined type from NOT FINAL to FINAL if the type has any subtypes.

[NOT] INSTANTIABLE

Use the [NOT] INSTANTIABLE clause to indicate whether any object instances of this type can be constructed:

  • Specify INSTANTIABLE if object instances of this type can be constructed.
  • Specify NOT INSTANTIABLE if no constructor (default or user-defined) exists for this object type. You must specify these keywords for any type with noninstantiable methods and for any type that has no attributes (either inherited or specified in this statement).
Restriction on NOT INSTANTIABLE

You cannot change a user-defined type from INSTANTIABLE to NOT INSTANTIABLE if the type has any table dependents.

dependent_handling_clause

The dependent_handling_clause lets you instruct Oracle how to handle objects that are dependent on the modified type. If this clause is not specified, then the ALTER TYPE statement will abort if the target type has any dependent type or table.

INVALIDATE Clause

Specify INVALIDATE to invalidate all dependent objects without any checking mechanism.

Note:

Because Oracle does not validate the type change, you should use this clause with caution. For example, if you drop an attribute that is a partitioning or cluster key, then you will be unable to write to the table.
CASCADE Clause

Specify the CASCADE clause if you want to propagate the type change to dependent types and tables. Oracle aborts the statement if any errors are found in the dependent types or tables unless you also specify FORCE.

INCLUDING TABLE DATA

Specify INCLUDING TABLE DATA to convert data stored in all user-defined columns to the most recent version of the column's type. This is the default.

Note:

You must specify this clause if your column data is in Oracle8 release 8.0 image format. This clause is also required if the type property is being changed between FINAL and NOT FINAL
  • For each attribute added to the column's type, Oracle adds a new attribute to the data and initializes it to NULL.
  • For each attribute dropped from the referenced type, Oracle removes the corresponding attribute data from each row in the table.

When you specify INCLUDING TABLE DATA, all of the tablespaces containing the table's data must be in read/write mode.

If you specify NOT INCLUDING TABLE DATA, then Oracle upgrades the metadata of the column to reflect the changes to the type, but does not scan the dependent column and update the data as part of this ALTER TYPE statement. However, the dependent column data remains accessible and the results of subsequent queries of the data will reflect the type modifications.

See Also:

Oracle9i Application Developer's Guide - Object-Relational Features for more information on the implications of not including table data when modifying type attribute
FORCE

Specify FORCE if you want Oracle to ignore the errors from dependent tables and indexes and log all errors in the specified exception table. The exception table must already have been created by executing the DBMS_UTILITY.CREATE_ALTER_TYPE_ERROR_TABLE procedure.

Examples

Adding a Member Function: Example

The following example uses the data_typ object type, which was created in "Object Type Examples" . A method is added to data_typ and its type body is modified to correspond. The date formats are consistent with the order_date column of the oe.orders sample table:

ALTER TYPE data_typ
   ADD MEMBER FUNCTION qtr(der_qtr DATE)
   RETURN CHAR CASCADE;

CREATE OR REPLACE TYPE BODY data_typ IS
 MEMBER FUNCTION prod (invent NUMBER) RETURN NUMBER IS
 BEGIN
 RETURN (year + invent);
 END;
   MEMBER FUNCTION qtr(der_qtr DATE) RETURN CHAR IS
   BEGIN
     IF (der_qtr < TO_DATE('01-APR', 'DD-MON')) THEN
       RETURN 'FIRST';
     ELSIF (der_qtr < TO_DATE('01-JUL', 'DD-MON')) THEN
       RETURN 'SECOND';
     ELSIF (der_qtr < TO_DATE('01-OCT', 'DD-MON')) THEN
       RETURN 'THIRD';
     ELSE
       RETURN 'FOURTH';
     END IF;
   END;
 END;
/
Adding a Collection Attribute: Example

The following example adds the phone_list_typ varray from the sample oe schema to the customer_address_typ object column of the customers table:

ALTER TYPE cust_address_typ
   ADD ATTTRIBUTE (phone phone_list_typ) CASCADE;
Recompiling a Type: Example

The following example recompiles type customer_address_typ:

ALTER TYPE customer_address_typ COMPILE;
Recompiling a Type Specification: Example

The following example compiles the type specification of link2.

CREATE TYPE link1 AS OBJECT
  (a NUMBER);
/
CREATE TYPE link2 AS OBJECT
  (a NUMBER,
   b link1,
   MEMBER FUNCTION p(c1 NUMBER) RETURN NUMBER);
/

CREATE TYPE BODY link2 AS
 MEMBER FUNCTION p(c1 NUMBER) RETURN NUMBER IS
    BEGIN
       dbms_output.put_line(c1);
       RETURN c1;
    END;
   END;
/

In the following example, both the specification and body of link2 are invalidated.

ALTER TYPE link1 ADD ATTRIBUTE (b NUMBER) INVALIDATE;

You must recompile the type by recompiling the specification and body in separate statements:

ALTER TYPE link2 COMPILE SPECIFICATION;

ALTER TYPE link2 COMPILE BODY;

Alternatively, you can compile both specification and body at the same time:

ALTER TYPE link2 COMPILE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 4 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER USER

Purpose

Use the ALTER USER statement:

  • To change the authentication or database resource characteristics of a database user.
  • To permit a proxy server to connect as a client without authentication.

Prerequisites

You must have the ALTER USER system privilege. However, you can change your own password without this privilege.

Syntax

alter_user::=

Text description of statements_425.gif follows
Text description of alter_user

proxy_clause::=

Text description of statements_426.gif follows
Text description of proxy_clause

Semantics

The keywords, parameters, and clauses described in this section are unique to ALTER USER or have different semantics than they have in CREATE USER. Keywords, parameters, and clauses that do not appear here have the same meaning as in the CREATE USER statement.

Note:

Oracle Corporation recommends that user names and passwords be encoded in ASCII or EBCDIC characters only, depending on your platform. Please refer to Oracle9i Database Administrator's Guide for more information about this recommendation.
See Also:
  • CREATE USER for information on the keywords and parameters
  • CREATE PROFILE for information on assigning limits on database resources to a user

IDENTIFIED Clause

  • Specify BY password to specify a new password for the user.

    Note:

    Oracle expects a different timestamp for each resetting of a particular password. If you reset one password multiple times within one second (for example, by cycling through a set of passwords using a script), then Oracle may return an error message that the password cannot be reused. For this reason, Oracle Corporation recommends that you avoid using scripts to reset passwords.

    You can omit the REPLACE clause if you are setting your own password for the first time or you have the ALTER USER system privilege and you are changing another user's password. However, unless you have the ALTER USER system privilege, you must always specify the REPLACE clause if a password complexity verification function has been enabled, either by running the UTLPWDMG.SQL script or by specifying such a function in the PASSWORD_VERIFY_FUNCTION parameter of a profile that has been assigned to the user.

    Note:

    Oracle does not check the old password, even if you provide it in the REPLACE clause, unless you are changing your own existing password. If such a check is important in other cases (for example, when a privileged user changes another user's password), then ensure that the password complexity verification function prohibits password changes in which the old password is null, or use the OCIPasswordChange() call instead of ALTER USER. For more information, see Oracle Call Interface Programmer's Guide.
    See Also:

    Oracle9i Database Administrator's Guide for information on the password complexity verification function
  • Specify GLOBALLY AS 'external_name' to indicate that the user must be authenticated by way of an LDAP V3 compliant directory service such as Oracle Internet Directory.

    You can change a user's access verification method to IDENTIFIED GLOBALLY AS 'external_name' only if all external roles granted directly to the user are revoked.

    You can change a user created as IDENTIFIED GLOBALLY AS 'external_name' to IDENTIFIED BY password or IDENTIFIED EXTERNALLY.

    See Also:

    CREATE USER , "Changing User Identification: Example" , and "Changing User Authentication: Examples"

TEMPORARY TABLESPACE Clause

The tablespace you assign or reassign as the user's temporary tablespace must be a temporary tablespace and must have a standard block size.

DEFAULT ROLE Clause

Specify the roles granted by default to the user at logon. This clause can contain only roles that have been granted directly to the user with a GRANT statement. You cannot use the DEFAULT ROLE clause to enable:

  • Roles not granted to the user
  • Roles granted through other roles
  • Roles managed by an external service (such as the operating system), or by the Oracle Internet Directory

Oracle enables default roles at logon without requiring the user to specify their passwords.

See Also:

CREATE ROLE

proxy_clause

The proxy_clause lets you control the ability of a proxy (an application or application server) to connect as the specified database or enterprise user and to activate all, some, or none of the user's roles.

Note:

The proxy_clause provides several varieties of proxy authentication of database and enterprise users. For information on proxy authentication of application users, see Oracle9i Application Developer's Guide - Fundamentals.
See Also:

Oracle9i Database Concepts for more information on proxies and their use of the database and "Proxy Users: Examples"

GRANT | REVOKE

Specify GRANT to allow the connection. Specify REVOKE to prohibit the connection.

CONNECT THROUGH Clause

Identify the proxy connecting to Oracle. Oracle expects the proxy to authenticate the user unless you specify the AUTHENTICATED USING clause.

WITH ROLE

WITH ROLE role_name permits the proxy to connect as the specified user and to activate only the roles that are specified by role_name.

WITH ROLE ALL EXCEPT

WITH ROLE ALL EXCEPT role_name permits the proxy to connect as the specified user and to activate all roles associated with that user except those specified by role_name.

WITH NO ROLES

WITH NO ROLES permits the proxy to connect as the specified user, but prohibits the proxy from activating any of that user's roles after connecting.

If you do not specify any of these WITH clauses, then Oracle activates all roles granted to the specified user automatically.

AUTHENTICATED USING

Specify the AUTHENTICATED USING clause if you want proxy authentication to be handled by a source other than the proxy. This clause is relevant only as part of a GRANT CONNECT THROUGH proxy clause.

PASSWORD

Specify PASSWORD if you want the proxy to present the database password of the user for authentication. The proxy relies on the database to authenticate the user based on the password.

DISTINGUISHED NAME

Specify DISTINGUISHED NAME to allow the proxy to act as the globally identified user indicated by the distinguished name.

CERTIFICATE

Specify CERTIFICATE to allow the proxy to act as the globally identified user whose distinguished name is contained in the certificate.

In both the DISTINGUISHED NAME and CERTIFICATE cases, the proxy has already authenticated and is acting on behalf of a global database user.

  • For type, specify the type of certificate to be presented. If you do not specify type, then the default is 'X.509'.
  • For version, specify the version of the certificate that is to be presented. If you do not specify version, then the default is '3'.
Restriction on CERTIFICATE

You cannot specify this clause as part of a REVOKE CONNECT THROUGH proxy clause.

See Also:
  • Oracle9i Security Overview for an overview of database security
  • Oracle9i Database Administrator's Guide and Oracle9i Application Developer's Guide - Fundamentals for information on middle-tier systems and proxy authentication

Examples

Changing User Identification: Example

The following statement changes the password of the user sidney (created in "Creating a Database User: Example" ) second_2nd_pwd and default tablespace to the tablespace example:

ALTER USER sidney
    IDENTIFIED BY second_2nd_pwd
    DEFAULT TABLESPACE example;

The following statement assigns the new_profile profile "Creating a Profile: Example" ) to the sample user sh:

ALTER USER sh
    PROFILE new_profile;

In subsequent sessions, sh is restricted by limits in the new_profile profile.

The following statement makes all roles granted directly to sh default roles, except the dw_manager role:

ALTER USER sh
    DEFAULT ROLE ALL EXCEPT dw_manager;

At the beginning of sh's next session, Oracle enables all roles granted directly to sh except the dw_manager role.

Changing User Authentication: Examples

The following statement changes the authentication mechanism of user app_user1(created in "Creating a Database User: Example" ) :

ALTER USER app_user1 IDENTIFIED GLOBALLY AS 'CN=tom,O=oracle,C=US';

The following statement causes user sidney's password to expire:

ALTER USER sidney PASSWORD EXPIRE;

If you cause a database user's password to expire with PASSWORD EXPIRE, then the user (or the DBA) must change the password before attempting to log in to the database following the expiration. However, tools such as SQL*Plus allow the user to change the password on the first attempted login following the expiration.

Proxy Users: Examples

The following statement alters the user app_user. The example permits the app_user to connect through the proxy user sh. The example also allows app_user to enable its warehouse_user role (created in "Creating a Role: Example" ) when connected through the proxy sh:

ALTER USER app_user1
   GRANT CONNECT THROUGH sh
   WITH ROLE warehouse_user;
Note:

To show basic syntax, this example uses the sample database Sales History user (sh) as the proxy. Normally a proxy user would be an application server or middle-tier entity. For information on creating the interface between an application user and a database by way of an application server, please refer to Oracle Call Interface Programmer's Guide.
See Also:
  • "Creating External Database Users: Examples" to see how to create the app_user user
  • "Creating a Role: Example" to see how to create the dw_user role

The following statement takes away the right of user app_user to connect through the proxy user sh:

ALTER USER app_user1 REVOKE CONNECT THROUGH sh;

The following hypothetical examples show other methods of proxy authentication:

ALTER USER sully GRANT CONNECT THROUGH OAS1
   AUTHENTICATED USING PASSWORD;

ALTER USER green GRANT CONNECT THROUGH WebDB
   AUTHENTICATED USING DISTINGUISHED NAME;

ALTER USER brown GRANT CONNECT THROUGH WebDB
   AUTHENTICATED USING CERTIFICATE TYPE 'X.509' VERSION '3';
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 5 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALTER VIEW

Purpose

Use the ALTER VIEW statement to explicitly recompile a view that is invalid. Explicit recompilation lets you locate recompilation errors before run time. You may want to recompile a view explicitly after altering one of its base tables to ensure that the alteration does not affect the view or other objects that depend on it.

You can also use ALTER VIEW to define, modify, or drop view constraints.

When you issue an ALTER VIEW statement, Oracle recompiles the view regardless of whether it is valid or invalid. Oracle also invalidates any local objects that depend on the view.

Notes:
  • This statement does not change the definition of an existing view. To redefine a view, you must use CREATE VIEW with the OR REPLACE keywords.
  • If you alter a view that is referenced by one or more materialized views, then those materialized views are invalidated. Invalid materialized views cannot be used by query rewrite and cannot be refreshed.
See Also:
  • CREATE VIEW for information on redefining a view
  • ALTER MATERIALIZED VIEW for information on revalidating an invalid materialized view
  • Oracle9i Data Warehousing Guide for general information on data warehouses
  • Oracle9i Database Concepts for more about dependencies among schema objects

Prerequisites

The view must be in your own schema or you must have ALTER ANY TABLE system privilege.

Syntax

alter_view::=

Text description of statements_427.gif follows
Text description of alter_view

(out_of_line_constraint::= --part of constraints syntax)

Semantics

schema

Specify the schema containing the view. If you omit schema, then Oracle assumes the view is in your own schema.

view

Specify the name of the view to be recompiled.

ADD Clause

Use the ADD clause to add a constraint to view.

See Also:

constraints for information on view constraints and their restrictions

MODIFY CONSTRAINT Clause

Use the MODIFY CONSTRAINT clause to change the RELY or NORELY setting of an existing view constraint.

Restriction on Modifying Constraints

You cannot change the setting of a unique or primary key constraint if it is part of a referential integrity constraint without dropping the foreign key or changing its setting to match that of view.

See Also:

"RELY Clause" for information on the uses of the RELY and NORELY settings

DROP Clause

Use the DROP clause to drop an existing view constraint.

Restriction on Dropping Constraints

You cannot drop a unique or primary key constraint if it is part of a referential integrity constraint on a view.

COMPILE

The COMPILE keyword is required. It directs Oracle to recompile the view.

Example

Altering a View: Example

To recompile the view customer_ro (created in "Creating a Read-Only View: Example" ), issue the following statement:

ALTER VIEW customer_ro
    COMPILE;

If Oracle encounters no compilation errors while recompiling customer_ro, then customer_ro becomes valid. If recompiling results in compilation errors, then Oracle returns an error and customer_ro remains invalid.

Oracle also invalidates all dependent objects. These objects include any procedures, functions, package bodies, and views that reference customer_ro. If you subsequently reference one of these objects without first explicitly recompiling it, then Oracle recompiles it implicitly at run time.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 6 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ANALYZE

Purpose

Use the ANALYZE statement to collect non-optimizer statistics, for example, to:

  • Collect or delete statistics about an index or index partition, table or table partition, index-organized table, cluster, or scalar object attribute.
  • Validate the structure of an index or index partition, table or table partition, index-organized table, cluster, or object reference (REF).
  • Identify migrated and chained rows of a table or cluster.

    Note:

    Oracle Corporation strongly recommends that you use the DBMS_STATS package rather than ANALYZE to collect optimizer statistics. That package lets you collect statistics in parallel, collect global statistics for partitioned objects, and fine tune your statistics collection in other ways. Further, the cost-based optimizer, which depends upon statistics, will eventually use only statistics that have been collected by DBMS_STATS. See Oracle9i Supplied PL/SQL Packages and Types Reference for more information on this package.

    However, you must use the ANALYZE statement (rather than DBMS_STATS) for statistics collection not related to the cost-based optimizer, such as:

    • To use the VALIDATE or LIST CHAINED ROWS clauses
    • To collect information on freelist blocks

Prerequisites

The schema object to be analyzed must be local, and it must be in your own schema or you must have the ANALYZE ANY system privilege.

If you want to list chained rows of a table or cluster into a list table, then the list table must be in your own schema, or you must have INSERT privilege on the list table, or you must have INSERT ANY TABLE system privilege.

If you want to validate a partitioned table, then you must have INSERT privilege on the table into which you list analyzed rowids, or you must have INSERT ANY TABLE system privilege.

Syntax

analyze::=

Text description of statements_428.gif follows
Text description of analyze

compute_statistics_clause::=

Text description of statements_423.gif follows
Text description of compute_statistics_clause

estimate_statistics_clause::=

Text description of statements_410.gif follows
Text description of estimate_statistics_clause

validation_clauses::=

Text description of statements_414.gif follows
Text description of validation_clauses

for_clause::=

Text description of statements_415.gif follows
Text description of for_clause

into_clause::=

Text description of statements_422.gif follows
Text description of into_clause

Semantics

schema

Specify the schema containing the index, table, or cluster. If you omit schema, then Oracle assumes the index, table, or cluster is in your own schema.

INDEX index

Specify an index to be analyzed (if no for_clause is used).

Oracle collects the following statistics for an index. Statistics marked with an asterisk are always computed exactly. For conventional indexes, the statistics appear in the data dictionary views USER_INDEXES, ALL_INDEXES, and DBA_INDEXES in the columns in parentheses.

  • *Depth of the index from its root block to its leaf blocks (BLEVEL)
  • Number of leaf blocks (LEAF_BLOCKS)
  • Number of distinct index values (DISTINCT_KEYS)
  • Average number of leaf blocks for each index value (AVG_LEAF_BLOCKS_PER_KEY)
  • Average number of data blocks for each index value (for an index on a table) (AVG_DATA_BLOCKS_PER_KEY)
  • Clustering factor (how well ordered the rows are about the indexed values) (CLUSTERING_FACTOR)

For domain indexes, this statement invokes the user-defined statistics collection function specified in the statistics type associated with the index (see ASSOCIATE STATISTICS ). If no statistics type is associated with the domain index, then the statistics type associated with its indextype is used. If no statistics type exists for either the index or its indextype, then no user-defined statistics are collected. User-defined index statistics appear in the STATISTICS column of the data dictionary views USER_USTATS, ALL_USTATS, and DBA_USTATS.

Restriction on Analyzing Indexes

You cannot analyze a domain index that is marked IN_PROGRESS or FAILED.

See Also:
  • CREATE INDEX for more information on domain indexes
  • Oracle9i Database Reference for information on the data dictionary views
  • "Analyzing an Index: Example"

TABLE table

Specify a table to be analyzed. When you collect statistics for a table, Oracle also automatically collects the statistics for each of the table's indexes and domain indexes, as long as no for_clauses are used.

When you analyze a table, Oracle collects statistics about expressions occurring in any function-based indexes as well. Therefore, be sure to create function-based indexes on the table before analyzing the table.

See Also:

CREATE INDEX for more information about function-based indexes

When analyzing a table, Oracle skips all domain indexes marked LOADING or FAILED.

For an index-organized table, Oracle also analyzes any mapping table and calculates its PCT_ACCESSS_DIRECT statistics. These statistics estimate the accuracy of "guess" data block addresses stored as part of the local rowids in the mapping table.

Oracle collects the following statistics for a table. Statistics marked with an asterisk are always computed exactly. Table statistics, including the status of domain indexes, appear in the data dictionary views USER_TABLES, ALL_TABLES, and DBA_TABLES in the columns shown in parentheses.

  • Number of rows (NUM_ROWS)
  • * Number of data blocks below the high water mark (that is, the number of data blocks that have been formatted to receive data, regardless whether they currently contain data or are empty) (BLOCKS)
  • * Number of data blocks allocated to the table that have never been used (EMPTY_BLOCKS)
  • Average available free space in each data block in bytes (AVG_SPACE)
  • Number of chained rows (CHAIN_COUNT)
  • Average row length, including the row's overhead, in bytes (AVG_ROW_LEN)
Restrictions on Analyzing Tables
  • You cannot use ANALYZE to collect statistics on data dictionary tables.
  • You cannot use ANALYZE to collect statistics on an external table. However, you can use the DBMS_STATS package for this purpose.
  • You cannot use ANALYZE to collect default statistics on a temporary table. However, if you have created an association between one or more columns of a temporary table and a user-defined statistics type, then you can use ANALYZE to collect the user-defined statistics on the temporary table. (The association must already exist.)
  • You cannot compute or estimate statistics for the following column types: REFs, varrays, nested tables, LOBs (LOBs are not analyzed, they are skipped), LONGs, or object types. However, if a statistics type is associated with such a column, then user-defined statistics are collected.

    See Also:
    • ASSOCIATE STATISTICS
    • Oracle9i Database Reference for information on the data dictionary views

PARTITION | SUBPARTITION

Specify the partition or subpartition on which you want statistics to be gathered. You cannot use this clause when analyzing clusters.

If you specify PARTITION and table is composite-partitioned, then Oracle analyzes all the subpartitions within the specified partition.

CLUSTER cluster

Specify a cluster to be analyzed. When you collect statistics for a cluster, Oracle also automatically collects the statistics for all the cluster's tables and all their indexes, including the cluster index.

For both indexed and hash clusters, Oracle collects the average number of data blocks taken up by a single cluster key (AVG_BLOCKS_PER_KEY). These statistics appear in the data dictionary views ALL_CLUSTERS, USER_CLUSTERS and DBA_CLUSTERS.

See Also:

Oracle9i Database Reference for information on the data dictionary views and "Analyzing a Cluster: Example"

compute_statistics_clause

COMPUTE STATISTICS instructs Oracle to compute exact statistics about the analyzed object and store them in the data dictionary. When you analyze a table, both table and column statistics are collected.

Both computed and estimated statistics are used by the Oracle optimizer to choose the execution plan for SQL statements that access analyzed objects. These statistics may also be useful to application developers who write such statements.

Specify SYSTEM if you want Oracle to compute only system (not user-defined statistics). If you omit SYSTEM, then Oracle collects both system-generated statistics and statistics generated by the collection functions declared in a statistics type.

See Also:
  • Oracle9i Data Cartridge Developer's Guide for information on creating statistics collection functions
  • Oracle9i Database Performance Tuning Guide and Reference for information on how these statistics are used
  • "Computing Statistics: Examples"
for_clause

The for_clause lets you specify whether an entire table or index, or just particular columns, will be analyzed. The following clauses apply only to the ANALYZE TABLE version of this statement.

FOR TABLE

Specify FOR TABLE to restrict the statistics collected to only table statistics rather than table and column statistics.

FOR COLUMNS

Specify FOR COLUMNS to restrict the statistics collected to only column statistics for the specified columns and scalar object attributes, rather than for all columns and attributes; attribute specifies the qualified column name of an item in an object.

FOR ALL COLUMNS

Specify FOR ALL COLUMNS to collect column statistics for all columns and scalar object attributes.

FOR ALL INDEXED COLUMNS

Specify FOR ALL INDEXED COLUMNS to collect column statistics for all indexed columns in the table.

Column statistics can be based on the entire column or can use a histogram by specifying SIZE.

Oracle collects the following column statistics:

  • Number of distinct values in the column as a whole
  • Maximum and minimum values in each band

    See Also:

    Oracle9i Database Performance Tuning Guide and Reference and "Creating Histograms: Examples" for more information on histograms

Column statistics appear in the data dictionary views USER_TAB_COLUMNS, ALL_TAB_COLUMNS, and DBA_TAB_COLUMNS. Histograms appear in the data dictionary views USER_TAB_HISTOGRAMS, DBA_TAB_HISTOGRAMS, and ALL_TAB_HISTOGRAMS; USER_PART_HISTOGRAMS, DBA_PART_HISTOGRAMS, and ALL_PART_HISTOGRAMS; and USER_SUBPART_HISTOGRAMS, DBA_SUBPART_HISTOGRAMS, and ALL_SUBPART_HISTOGRAMS.

Note:

MAXVALUE and MINVALUE columns of USER_, DBA_, and ALL_TAB_COLUMNS have a length of 32 bytes. If you analyze columns with a length >32 bytes, and if the columns are padded with leading blanks, then Oracle may take into account only the leading blanks and return unexpected statistics.

If a user-defined statistics type has been associated with any columns, then the for_clause collects user-defined statistics using that statistics type. If no statistics type is associated with a column, then Oracle checks to see if any statistics type has been associated with the type of the column, and uses that statistics type. If no statistics type has been associated with either the column or its user-defined type, then no user-defined statistics are collected. User-defined column statistics appear in the STATISTICS column of the data dictionary views USER_USTATS, ALL_USTATS, and DBA_USTATS.

If you want to collect statistics on both the table as a whole and on one or more columns, then be sure to generate the statistics for the table first, and then for the columns. Otherwise, the table-only ANALYZE will overwrite the histograms generated by the column ANALYZE. For example, issue the following statements:

ANALYZE TABLE emp ESTIMATE STATISTICS;
ANALYZE TABLE emp ESTIMATE STATISTICS
   FOR ALL COLUMNS;
FOR ALL INDEXES

Specify FOR ALL INDEXES if you want all indexes associated with the table to be analyzed.

FOR ALL LOCAL INDEXES

Specify FOR ALL LOCAL INDEXES if you want all local index partitions to be analyzed. You must specify the keyword LOCAL if the PARTITION clause and INDEX are specified.

SIZE

Specify the maximum number of buckets in the histogram. The default value is 75, minimum value is 1, and maximum value is 254.

Note:

Oracle 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, then Oracle creates the specified number of buckets, but the value indicated by the NUM_BUCKETS column of the ALL_, DBA_, and USER_TAB_COLUMNS views may be smaller because of an internal compression algorithm.
See Also:

"Creating Histograms: Examples"

estimate_statistics_clause

ESTIMATE STATISTICS instructs Oracle to estimate statistics about the analyzed object and store them in the data dictionary.

Both computed and estimated statistics are used by the Oracle optimizer to choose the execution plan for SQL statements that access analyzed objects. These statistics may also be useful to application developers who write such statements.

Specify SYSTEM if you want Oracle to estimate only system (not user-defined statistics). If you omit SYSTEM, then Oracle estimates both system-generated statistics and statistics generated by the collection functions declared in a statistics type.

See Also:

Oracle9i Data Cartridge Developer's Guide for information on creating statistics collection functions and "Estimating Statistics: Example"

for_clause

See the description under compute_statistics_clause

SAMPLE

Specify the amount of data from the analyzed object Oracle should sample to estimate statistics. If you omit this parameter, then Oracle samples 1064 rows.

The default sample value is adequate for tables up to a few thousand rows. If your tables are larger, specify a higher value for SAMPLE. If you specify more than half of the data, then Oracle reads all the data and computes the statistics.

  • ROWS causes Oracle to sample integer rows of the table or cluster or integer entries from the index. The integer must be at least 1.
  • PERCENT causes Oracle to sample integer percent of the rows from the table or cluster or integer percent of the index entries. The integer can range from 1 to 99.

    See Also:

    Oracle9i Database Performance Tuning Guide and Reference for information on how these statistics are used

validation_clauses

The validation clauses let you validate REFs and the structure of the analyzed object.

VALIDATE REF UPDATE Clause

Specify VALIDATE REF UPDATE to validate the REFs in the specified table, check the rowid portion in each REF, compare it with the true rowid, and correct, if necessary. You can use this clause only when analyzing a table.

SET DANGLING TO NULL

SET DANGLING TO NULL sets to NULL any REFs (whether or not scoped) in the specified table that are found to point to an invalid or nonexistent object.

Note:

If the owner of the table does not have SELECT object privilege on the referenced objects, then Oracle will consider them invalid and set them to NULL. Subsequently these REFs will not be available in a query, even if it is issued by a user with appropriate privileges on the objects.
VALIDATE STRUCTURE

Specify VALIDATE STRUCTURE to validate the structure of the analyzed object. The statistics collected by this clause are not used by the Oracle optimizer, as are statistics collected by the COMPUTE STATISTICS and ESTIMATE STATISTICS clauses.

See Also:

"Validating a Table: Example"

  • For a table, Oracle verifies the integrity of each of the table's data blocks and rows. For an index-organized table, Oracle also generates compression statistics (optimal prefix compression count) for the primary key index on the table.
  • For a cluster, Oracle automatically validates the structure of the cluster's tables.
  • For a partitioned table, Oracle also verifies that each row belongs to the correct partition. If a row does not collate correctly, then its rowid is inserted into the INVALID_ROWS table.
  • For a temporary table, Oracle validates the structure of the table and its indexes during the current session.
  • For an index, Oracle verifies the integrity of each data block in the index and checks for block corruption. This clause does not confirm that each row in the table has an index entry or that each index entry points to a row in the table. You can perform these operations by validating the structure of the table with the CASCADE clause.

    Oracle also computes compression statistics (optimal prefix compression count) for all normal indexes

    Oracle stores statistics about the index in the data dictionary views INDEX_STATS and INDEX_HISTOGRAM.

    See Also:

    Oracle9i Database Reference for information on these views

If Oracle encounters corruption in the structure of the object, then an error message is returned to you. In this case, drop and re-create the object.

INTO

The INTO clause of VALIDATE STRUCTURE is valid only for partitioned tables. Specify a table into which Oracle lists the rowids of the partitions whose rows do not collate correctly. If you omit schema, then Oracle assumes the list is in your own schema. If you omit this clause altogether, then Oracle assumes that the table is named INVALID_ROWS. The SQL script used to create this table is UTLVALID.SQL.

CASCADE

Specify CASCADE if you want Oracle to validate the structure of the indexes associated with the table or cluster. If you use this clause when validating a table, then Oracle also validates the table's indexes. If you use this clause when validating a cluster, then Oracle also validates all the clustered tables' indexes, including the cluster index.

If you use this clause to validate an enabled (but previously disabled) function-based index, then validation errors may result. In this case, you must rebuild the index.

ONLINE | OFFLINE

Specify ONLINE to enable Oracle to run the validation while DML operations are ongoing within the object. Oracle reduces the amount of validation performed to allow for concurrency.

Note:

When you validate the structure of an object ONLINE, Oracle does not collect any statistics, as it does when you validate the structure of the object OFFLINE.

Specify OFFLINE, to maximize the amount of validation performed. This setting prevents INSERT, UPDATE, and DELETE statements from concurrently accessing the object during validation but allows queries. This is the default.

Restriction on ONLINE

You cannot specify ONLINE when analyzing a clustered object.

LIST CHAINED ROWS

LIST CHAINED ROWS lets you identify migrated and chained rows of the analyzed table or cluster. You cannot use this clause when analyzing an index.

In the INTO clause, specify a table into which Oracle lists the migrated and chained rows. If you omit schema, then Oracle assumes the list table is in your own schema. If you omit this clause altogether, then Oracle assumes that the table is named CHAINED_ROWS. The list table must be on your local database.

You can create the CHAINED_ROWS table using one of these scripts:

  • UTLCHAIN.SQL uses physical rowids. Therefore it can accommodate rows from conventional tables but not from index-organized tables. (See the Note that follows.)
  • UTLCHN1.SQL uses universal rowids, so it can accommodate rows from both conventional and index-organized tables.

If you create your own chained-rows table, then it must follow the format prescribed by one of these two scripts.

Note:

If you are analyzing index-organized tables based on primary keys (rather than universal rowids), then you must create a separate chained-rows table for each index-organized table to accommodate its primary-key storage. Use the SQL scripts DBMSIOTC.SQL and PRVTIOTC.PLB to define the BUILD_CHAIN_ROWS_TABLE procedure, and then execute this procedure to create an IOT_CHAINED_ROWS table for each such index-organized table.
See Also:
  • Oracle9i Database Migration Guide for compatibility issues related to the use of the UTL* scripts
  • The DBMS_IOT package in Oracle9i Supplied PL/SQL Packages and Types Reference for information on the packaged SQL scripts
  • Oracle9i Database Administrator's Guide for information on eliminating migrated and chained rows
  • "Listing Chained Rows: Example"
DELETE STATISTICS

Specify DELETE STATISTICS to delete any statistics about the analyzed object that are currently stored in the data dictionary. Use this statement when you no longer want Oracle to use the statistics.

When you use this clause on a table, Oracle also automatically removes statistics for all the table's indexes. When you use this clause on a cluster, Oracle also automatically removes statistics for all the cluster's tables and all their indexes, including the cluster index.

Specify SYSTEM if you want Oracle to delete only system (not user-defined statistics). If you omit SYSTEM, and if user-defined column or index statistics were collected for an object, then Oracle also removes the user-defined statistics by invoking the statistics deletion function specified in the statistics type that was used to collect the statistics.

See Also:

"Deleting Statistics: Example"

Examples

Computing Statistics: Examples

The following statement computes statistics for the sample table oe.orders:

ANALYZE TABLE orders COMPUTE STATISTICS;

The following statement computes only system statistics on the sample table oe.orders:

ANALYZE TABLE orders COMPUTE SYSTEM STATISTICS;

The following statement calculates statistics for a scalar object attribute: ANALYZE
TABLE customers COMPUTE STATISTICS
   FOR COLUMNS cust_address.postal_code;
Estimating Statistics: Example

The following statement estimates statistics for the sample table oe.orders and all of its indexes:

ANALYZE TABLE orders ESTIMATE STATISTICS;
Deleting Statistics: Example

The following statement deletes statistics about the sample table oe.orders and all its indexes from the data dictionary:

ANALYZE TABLE orders DELETE STATISTICS;
Creating Histograms: Examples

The following statement creates a 10-band histogram on the location_id column of the sample table hr.locations:

ANALYZE TABLE locations
   COMPUTE STATISTICS FOR COLUMNS country_id SIZE 10;

You can then query the USER_TAB_COLUMNS data dictionary view to retrieve statistics:

SELECT NUM_DISTINCT, NUM_BUCKETS, SAMPLE_SIZE
   FROM USER_TAB_COLUMNS
   WHERE TABLE_NAME = 'LOCATIONS' AND COLUMN_NAME = 'COUNTRY_ID';

NUM_DISTINCT NUM_BUCKETS SAMPLE_SIZE
------------ ----------- -----------
          14           7          23

Depending on the size of your table, even though the ANALYZE statement specified 10 buckets, Oracle may create fewer buckets that you specify in the ANALYZE statement. For an explanation, see the note on SIZE .

You can also collect histograms for a single partition of a table. The following statement analyzes partition sales_q2_2000 of the sample table sh.sales:

ANALYZE TABLE sales PARTITION (sales_q2_2000) COMPUTE STATISTICS;
Analyzing an Index: Example

The following statement validates the structure of the sample index oe.inv_product_ix:

ANALYZE INDEX inv_product_ix VALIDATE STRUCTURE;
Validating a Table: Example

The following statement analyzes the sample table hr.employees and all of its indexes:

ANALYZE TABLE employees VALIDATE STRUCTURE CASCADE;

For a table, the VALIDATE REF UPDATE clause verifies the REFs in the specified table, checks the rowid portion of each REF, and then compares it with the true rowid. If the result is an incorrect rowid, then the REF is updated so that the rowid portion is correct.

The following statement validates the REFs in the sample table oe.customers:

ANALYZE TABLE customers VALIDATE REF UPDATE;

The following statements validates the structure of the sample table oe.customers while allowing simultaneous DML:

ANALYZE TABLE customers VALIDATE STRUCTURE ONLINE;
Analyzing a Cluster: Example

The following statement analyzes the personnel cluster (created in "Creating a Cluster: Example" ), all of its tables, and all of their indexes, including the cluster index:

ANALYZE CLUSTER personnel
    VALIDATE STRUCTURE CASCADE;
Listing Chained Rows: Example

The following statement collects information about all the chained rows of the table orders:

ANALYZE TABLE orders
   LIST CHAINED ROWS INTO chained_rows;

The preceding statement places the information into the table chained_rows. You can then examine the rows with this query (no rows will be returned if the table contains no chained rows):

SELECT owner_name, table_name, head_rowid, analyze_timestamp
    FROM chained_rows;

OWNER_NAME  TABLE_NAME  HEAD_ROWID         ANALYZE_TIMESTAMP
----------  ----------  ------------------ -----------------
OE          ORDERS      AAAAZzAABAAABrXAAA 25-SEP-2000
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 7 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ASSOCIATE STATISTICS

Purpose

Use the ASSOCIATE STATISTICS statement to associate a statistics type (or default statistics) containing functions relevant to statistics collection, selectivity, or cost with one or more columns, standalone functions, packages, types, domain indexes, or indextypes.

For a listing of all current statistics type associations, query the USER_ASSOCIATIONS data dictionary view. If you analyze the object with which you are associating statistics, then you can also query the associations in the USER_USTATS view.

See Also:

ANALYZE for information on the order of precedence with which ANALYZE uses associations

Prerequisites

To issue this statement, you must have the appropriate privileges to alter the base object (table, function, package, type, domain index, or indextype). In addition, unless you are associating only default statistics, you must have execute privilege on the statistics type. The statistics type must already have been defined.

See Also:

CREATE TYPE for information on defining types

Syntax

associate_statistics::=

Text description of statements_429.gif follows
Text description of associate_statistics

column_association::=

Text description of statements_430.gif follows
Text description of column_association

function_association::=

Text description of statements_431.gif follows
Text description of function_association

using_statistics_type::=

Text description of statements_432.gif follows
Text description of using_statistics_type

default_cost_clause::=

Text description of statements_433.gif follows
Text description of default_cost_clause

default_selectivity_clause::=

Text description of statements_434.gif follows
Text description of default_selectivity_clause

Semantics

column_association

Specify one or more table columns. If you do not specify schema, then Oracle assumes the table is in your own schema.

function_association

Specify one or more standalone functions, packages, user-defined datatypes, domain indexes, or indextypes. If you do not specify schema, then Oracle assumes the object is in your own schema.

  • FUNCTIONS refers only to standalone functions, not to method types or to built-in functions.
  • TYPES refers only to user-defined types, not to built-in SQL datatypes.
Restriction on function_association

You cannot specify an object for which you have already defined an association. You must first disassociate the statistics from this object.

See Also:

DISASSOCIATE STATISTICS "Associating Statistics: Example"

using_statistics_type

Specify the statistics type (or a synonym for the type) being associated with column, function, package, type, domain index, or indextype. The statistics_type must already have been created.

The NULL keyword is valid only when you are associating statistics with a column or an index. When you associate a statistics type with an object type, columns of that object type inherit the statistics type. Likewise, when you associate a statistics type with an indextype, index instances of the indextype inherit the statistics type.You can override this inheritance by associating a different statistics type for the column or index. Alternatively, if you do not want to associate any statistics type for the column or index, then you can specify NULL in the using_statistics_type clause.

Restriction on Specifying Statistics Type

You cannot specify NULL for functions, packages, types, or indextypes.

See Also:

Oracle9i Data Cartridge Developer's Guide for information on creating statistics collection functions

default_cost_clause

Specify default costs for standalone functions, packages, types, domain indexes, or indextypes. If you specify this clause, then you must include one number each for CPU cost, I/O cost, and network cost, in that order. Each cost is for a single execution of the function or method or for a single domain index access. Accepted values are integers of zero or greater.

default_selectivity_clause

Specify as a percent the default selectivity for predicates with standalone functions, types, packages, or user-defined operators. The default_selectivity must be a number between 0 and 100. Values outside this range are ignored.

Restriction on the default_selectivity_clause

You cannot specify DEFAULT SELECTIVITY for domain indexes or indextypes.

See Also:

"Specifying Default Cost: Example"

Examples

Associating Statistics: Example

This statement creates an association for the standalone package emp_mgmt (created in "Creating a Package: Example" ):

ASSOCIATE STATISTICS WITH PACKAGES emp_mgmt DEFAULT SELECTIVITY 10;
Specifying Default Cost: Example

This statement specifies that using the domain index t_a to implement a given predicate always has a CPU cost of 100, I/O of 5, and network cost of 0.

ASSOCIATE STATISTICS WITH INDEXES t_a DEFAULT COST (100,5,0);

The optimizer will simply use these default costs instead of calling a cost function.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 8 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AUDIT

Purpose

Use the AUDIT statement to:

  • Track the occurrence of SQL statements in subsequent user sessions. You can track the occurrence of a specific SQL statement or of all SQL statements authorized by a particular system privilege. Auditing operations on SQL statements apply only to subsequent sessions, not to current sessions.
  • Track operations on a specific schema object. Auditing operations on schema objects apply to current sessions as well as to subsequent sessions.

    See Also:
    • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_FGA package, which lets you create and administer value-based auditing policies
    • NOAUDIT for information on disabling auditing of SQL statement

Prerequisites

To audit occurrences of a SQL statement, you must have AUDIT SYSTEM system privilege.

To audit operations on a schema object, the object you choose for auditing must be in your own schema or you must have AUDIT ANY system privilege. In addition, if the object you choose for auditing is a directory object, even if you created it, then you must have AUDIT ANY system privilege.

To collect auditing results, you must set the initialization parameter AUDIT_TRAIL to DB. You can specify auditing options regardless of whether auditing is enabled. However, Oracle does not generate audit records until you enable auditing.

See Also:

Oracle9i Database Reference for information on the AUDIT_TRAIL parameter

Syntax

audit::=

Text description of statements_411.gif follows
Text description of audit

sql_statement_clause::=

Text description of statements_412.gif follows
Text description of sql_statement_clause

auditing_by_clause::=

Text description of statements_435.gif follows
Text description of auditing_by_clause

schema_object_clause::=

Text description of statements_436.gif follows
Text description of schema_object_clause

auditing_on_clause::=

Text description of statements_437.gif follows
Text description of auditing_on_clause

Semantics

sql_statement_clause

Use the sql_statement_clause to audit SQL statements.

statement_option

Specify a statement option to audit specific SQL statements.

For each audited operation, Oracle produces an audit record containing this information:

  • The user performing the operation
  • The type of operation
  • The object involved in the operation
  • The date and time of the operation

Oracle writes audit records to the audit trail, which is a database table containing audit records. You can review database activity by examining the audit trail through data dictionary views.

See Also:
  • Table 12-1 and Table 12-2 for a list of statement options and the SQL statements they audit
  • Oracle9i Database Administrator's Guidefor a listing of the audit trail data dictionary views
  • Oracle9i Database Reference for detailed descriptions of the data dictionary views
  • "Auditing SQL Statements Relating to Roles: Example"
system_privilege

Specify a system privilege to audit SQL statements that are authorized by the specified system privilege.

Rather than specifying many individual system privileges, you can specify the roles CONNECT, RESOURCE, and DBA. Doing so is equivalent to auditing all of the system privileges granted to those roles.

Oracle also provides two shortcuts for specifying groups of system privileges and statement options at once:

ALL

Specify ALL to audit all statements options shown in Table 12-1 but not the additional statement options shown in Table 12-2.

ALL PRIVILEGES

Specify ALL PRIVILEGES to audit system privileges.

Note:

Oracle Corporation recommends that you specify individual system privileges and statement options for auditing rather than roles or shortcuts. The specific system privileges and statement options encompassed by roles and shortcuts change from one release to the next and may not be supported in future versions of Oracle.
See Also:
  • Table 17-1, " System Privileges" for a list of all system privileges and the SQL statements that they authorize
  • GRANT for more information on the CONNECT, RESOURCE, and DBA roles
  • "Auditing Query and Update SQL Statements: Example" , "Auditing Deletions: Example" , "Auditing Statements Relating to Directories: Examples"
auditing_by_clause

Specify the auditing_by_clause to audit only those SQL statements issued by particular users. If you omit this clause, then Oracle audits all users' statements.

BY user

Use this clause to restrict auditing to only SQL statements issued by the specified users.

BY proxy

Use this clause to restrict auditing to only SQL statements issued by the specified proxies.

See Also:

Oracle9i Database Concepts for more information on proxies and their use of the database
ON BEHALF OF

Specify user to indicate auditing of statements executed on behalf of a particular user. ANY indicates auditing of statements executed on behalf of any user.

schema_object_clause

Use the schema_object_clause to audit operations on schema objects.

object_option

Specify the particular operation for auditing. Table 12-3 shows each object option and the types of objects to which it applies. The name of each object option specifies a SQL statement to be audited. For example, if you choose to audit a table with the ALTER option, then Oracle audits all ALTER TABLE statements issued against the table. If you choose to audit a sequence with the SELECT option, then Oracle audits all statements that use any of the sequence's values.

ALL

Specify ALL as a shortcut equivalent to specifying all object options applicable for the type of object.

auditing_on_clause

The auditing_on_clause lets you specify the particular schema object to be audited.

See Also:

"Auditing Queries on a Table: Example" , "Auditing Inserts and Updates on a Table: Example" , and "Auditing Operations on a Sequence: Example"

schema

Specify the schema containing the object chosen for auditing. If you omit schema, then Oracle assumes the object is in your own schema.

object

Specify the name of the object to be audited. The object must be a table, view, sequence, stored procedure, function, package, materialized view, or library.

You can also specify a synonym for a table, view, sequence, procedure, stored function, package materialized view, or user-defined type.

ON DEFAULT

Specify ON DEFAULT to establish the specified object options as default object options for subsequently created objects. Once you have established these default auditing options, any subsequently created object is automatically audited with those options. The default auditing options for a view are always the union of the auditing options for the view's base tables. You can see the current default auditing options by querying the ALL_DEF_AUDIT_OPTS data dictionary view.

If you change the default auditing options, then the auditing options for previously created objects remain the same. You can change the auditing options for an existing object only by specifying the object in the ON clause of the AUDIT statement.

See Also:

"Setting Default Auditing Options: Example"

ON DIRECTORY directory_name

The ON DIRECTORY clause lets you specify the name of a directory chosen for auditing.

BY SESSION

Specify BY SESSION if you want Oracle to write a single record for all SQL statements of the same type issued and operations of the same type executed on the same schema objects in the same session.

Note:

Oracle can write to an operating system audit file but cannot read it to detect whether an entry has already been written for a particular operation. Therefore, if you are using an operating system file for the audit trail (that is, the AUDIT_FILE_DEST initialization parameter is set to OS), then Oracle may write multiple records to the audit trail file even if you specify BY SESSION.
BY ACCESS

Specify BY ACCESS if you want Oracle to write one record for each audited statement and operation.

If you specify statement options or system privileges that audit data definition language (DDL) statements, then Oracle automatically audits by access regardless of whether you specify the BY SESSION clause or BY ACCESS clause.

For statement options and system privileges that audit SQL statements other than DDL, you can specify either BY SESSION or BY ACCESS. BY SESSION is the default.

WHENEVER [NOT] SUCCESSFUL

Specify WHENEVER SUCCESSFUL to audit only SQL statements and operations that succeed.

Specify WHENEVER NOT SUCCESSFUL to audit only statements and operations that fail or result in errors.

If you omit this clause, then Oracle performs the audit regardless of success or failure.

Tables of Auditing Options

Table 12-1 Statement Auditing Options for Database Objects
Statement Option | SQL Statements and Operations
CLUSTER | CREATE CLUSTER AUDIT CLUSTER DROP CLUSTER TRUNCATE CLUSTER
CONTEXT | CREATE CONTEXT DROP CONTEXT
DATABASE LINK | CREATE DATABASE LINK DROP DATABASE LINK
DIMENSION | CREATE DIMENSION ALTER DIMENSION DROP DIMENSION
DIRECTORY | CREATE DIRECTORY DROP DIRECTORY
INDEX | CREATE INDEX ALTER INDEX DROP INDEX
NOT EXISTS | All SQL statements that fail because a specified object does not exist.
PROCEDUREa | CREATE FUNCTION CREATE LIBRARY CREATE PACKAGE CREATE PACKAGE BODY CREATE PROCEDURE DROP FUNCTION DROP LIBRARY DROP PACKAGE DROP PROCEDURE
PROFILE | CREATE PROFILE ALTER PROFILE DROP PROFILE
PUBLIC DATABASE LINK | CREATE PUBLIC DATABASE LINK DROP PUBLIC DATABASE LINK
PUBLIC SYNONYM | CREATE PUBLIC SYNONYM DROP PUBLIC SYNONYM
ROLE | CREATE ROLE ALTER ROLE DROP ROLE SET ROLE
ROLLBACK SEGMENT | CREATE ROLLBACK SEGMENT ALTER ROLLBACK SEGMENT DROP ROLLBACK SEGMENT
SEQUENCE | CREATE SEQUENCE DROP SEQUENCE
SESSION | Logons
SYNONYM | CREATE SYNONYM DROP SYNONYM
SYSTEM AUDIT | AUDIT sql_statements NOAUDIT sql_statements
SYSTEM GRANT | GRANT system_privileges_and_roles REVOKE system_privileges_and_roles
TABLE | CREATE TABLE DROP TABLE TRUNCATE TABLE
TABLESPACE | CREATE TABLESPACE ALTER TABLESPACE DROP TABLESPACE
TRIGGER | CREATE TRIGGER ALTER TRIGGER with ENABLE and DISABLE clauses DROP TRIGGER ALTER TABLE with ENABLE ALL TRIGGERS clause and DISABLE ALL TRIGGERS clause
TYPE | CREATE TYPE CREATE TYPE BODY ALTER TYPE DROP TYPE DROP TYPE BODY
USER | CREATE USER ALTER USER DROP USER
VIEW | CREATE VIEW DROP VIEW
aJava schema objects (sources, classes, and resources) are considered the same as procedures for purposes of auditing SQL statements.
Table 12-2 Additional Statement Auditing Options for SQL Statements
Statement Option | SQL Statements and Operations
ALTER SEQUENCE | ALTER SEQUENCE
ALTER TABLE | ALTER TABLE
COMMENT TABLE | COMMENT ON TABLE table, view, materialized view COMMENT ON COLUMN table.column, view.column, materialized view.column
DELETE TABLE | DELETE FROM table, view
EXECUTE PROCEDURE | CALL Execution of any procedure or function or access to any variable, library, or cursor inside a package.
GRANT DIRECTORY | GRANT privilege ON directory REVOKE privilege ON directory
GRANT PROCEDURE | GRANT privilege ON procedure, function, package REVOKE privilege ON procedure, function, package
GRANT SEQUENCE | GRANT privilege ON sequence REVOKE privilege ON sequence
GRANT TABLE | GRANT privilege ON table, view, materialized view. REVOKE privilege ON table, view, materialized view
GRANT TYPE | GRANT privilege ON TYPE REVOKE privilege ON TYPE
INSERT TABLE | INSERT INTO table, view
LOCK TABLE | LOCK TABLE table, view
SELECT SEQUENCE | Any statement containing sequence.CURRVAL or sequence.NEXTVAL
SELECT TABLE | SELECT FROM table, view, materialized view
UPDATE TABLE | UPDATE table, view
Table 12-3 Object Auditing Options
Object Option | Table | View | Sequence | Procedure, Function, Packagea | Materialized View | Directory | Library | Object Type | Context
ALTER | X | -- | X | -- | X | -- | -- | X | --
AUDIT | X | X | X | X | X | X | -- | X | X
COMMENT | X | X | -- | -- | X | -- | -- | -- | --
DELETE | X | X | -- | -- | X | -- | -- | -- | --
EXECUTE | -- | -- | -- | X | -- | -- | X | -- | --
GRANT | X | X | X | X | -- | X | X | X | X
INDEX | X | -- | -- | -- | X | -- | -- | -- | --
INSERT | X | X | -- | -- | X | -- | -- | -- | --
LOCK | X | X | -- | -- | X | -- | -- | -- | --
READ | -- | -- | -- | -- | -- | X | -- | -- | --
RENAME | X | X | -- | X | X | -- | -- | -- | --
SELECT | X | X | X | -- | X | -- | -- | -- | --
UPDATE | X | X | -- | -- | X | -- | -- | -- | --
a Java schema objects (sources, classes, and resources) are considered the same as procedures, functions, and packages for purposes of auditing options.

Examples

Auditing SQL Statements Relating to Roles: Example

To choose auditing for every SQL statement that creates, alters, drops, or sets a role, regardless of whether the statement completes successfully, issue the following statement:

AUDIT ROLE;

To choose auditing for every statement that successfully creates, alters, drops, or sets a role, issue the following statement:

AUDIT ROLE
    WHENEVER SUCCESSFUL;

To choose auditing for every CREATE ROLE, ALTER ROLE, DROP ROLE, or SET ROLE statement that results in an Oracle error, issue the following statement:

AUDIT ROLE
    WHENEVER NOT SUCCESSFUL;
Auditing Query and Update SQL Statements: Example

To choose auditing for any statement that queries or updates any table, issue the following statement:

AUDIT SELECT TABLE, UPDATE TABLE;

To choose auditing for statements issued by the users hr and oe that query or update a table or view, issue the following statement:

AUDIT SELECT TABLE, UPDATE TABLE
    BY hr, oe;
Auditing Deletions: Example

To choose auditing for statements issued using the DELETE ANY TABLE system privilege, issue the following statement:

AUDIT DELETE ANY TABLE;
Auditing Statements Relating to Directories: Examples

To choose auditing for statements issued using the CREATE ANY DIRECTORY system privilege, issue the following statement:

AUDIT CREATE ANY DIRECTORY;

To choose auditing for CREATE DIRECTORY (and DROP DIRECTORY) statements that do not use the CREATE ANY DIRECTORY system privilege, issue the following statement:

AUDIT DIRECTORY;

To choose auditing for every statement that reads files from the bfile_dir directory, issue the following statement:

AUDIT READ ON DIRECTORY bfile_dir;
Auditing Queries on a Table: Example

To choose auditing for every SQL statement that queries the employees table in the schema hr, issue the following statement:

AUDIT SELECT
    ON hr.employees;

To choose auditing for every statement that successfully queries the employees table in the schema hr, issue the following statement:

AUDIT SELECT
    ON hr.employees
    WHENEVER SUCCESSFUL;

To choose auditing for every statement that queries the employees table in the schema hr and results in an Oracle error, issue the following statement:

AUDIT SELECT
    ON hr.employees
    WHENEVER NOT SUCCESSFUL;
Auditing Inserts and Updates on a Table: Example

To choose auditing for every statement that inserts or updates a row in the customers table in the schema oe, issue the following statement:

AUDIT INSERT, UPDATE
    ON oe.customers;
Auditing Operations on a Sequence: Example

To choose auditing for every statement that performs any operation on the employees_seq sequence in the schema hr, issue the following statement:

AUDIT ALL
    ON hr.employees_seq;

The preceding statement uses the ALL shortcut to choose auditing for the following statements that operate on the sequence:

  • ALTER SEQUENCE
  • AUDIT
  • GRANT
  • any statement that accesses the sequence's values using the pseudocolumns CURRVAL or NEXTVAL
Setting Default Auditing Options: Example

The following statement specifies default auditing options for objects created in the future:

AUDIT ALTER, GRANT, INSERT, UPDATE, DELETE
    ON DEFAULT;

Any objects created later are automatically audited with the specified options that apply to them, if auditing has been enabled:

  • If you create a table, then Oracle automatically audits any ALTER, GRANT, INSERT, UPDATE, or DELETE statements issued against the table.
  • If you create a view, then Oracle automatically audits any GRANT, INSERT, UPDATE, or DELETE statements issued against the view.
  • If you create a sequence, then Oracle automatically audits any ALTER or GRANT statements issued against the sequence.
  • If you create a procedure, package, or function, then Oracle automatically audits any ALTER or GRANT statements issued against it.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 9 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CALL

Purpose

Use the CALL statement to execute a routine (a standalone procedure or function, or a procedure or function defined within a type or package) from within SQL.

See Also:

PL/SQL User's Guide and Reference for information on creating such routine

Prerequisites

You must have EXECUTE privilege on the standalone routine or on the type or package in which the routine is defined.

Syntax

call::=

Text description of statements_419.gif follows
Text description of call

Semantics

schema

Specify the schema in which the standalone routine (or the package or type containing the routine) resides. If you do not specify schema, then Oracle assumes the routine is in your own schema.

type or package

Specify the type or package in which the routine is defined.

function | procedure | method

Specify the name of the function or procedure being called, or a synonym that translates to a function or procedure.

When you call a type's member function or procedure, if the first argument (SELF) is a null IN OUT argument, then Oracle returns an error. If SELF is a null IN argument, then Oracle returns null. In both cases, the function or procedure is not invoked.

Restriction on Functions

If the routine is a function, then the INTO clause is mandatory.

@dblink

In a distributed database system, specify the name of the database containing the standalone routine (or the package or function containing the routine). If you omit dblink, then Oracle looks in your local database.

See Also:

"Calling a Procedure: Example" for an example of calling a routine directly
object_access_expression

If you have an expression of an object type, such as a type constructor or a bind variable, you can use the object_access_expression syntax to call a routine defined within the type.

The syntax permitted in this context is a subset of object access expressions (see "Object Access Expressions" ). Used within the CALL statement, you can invoke only methods (not attributes), and object_expr must be a literal (not a column name or other nonliteral expression). Therefore, the syntax allowed is:

expression.method

where expression is the literal expression of the object type and method is a member method of the object type.

See Also:

"Calling a Procedure Using an Expression of an Object Type: Example" for an example of calling a routine using an expression of an object type

argument

Specify one or more arguments to the routine, if the routine takes arguments.

Restrictions on Arguments to the Routine
  • An argument cannot be a pseudocolumn or either of the object reference functions VALUE or REF.
  • Any argument that is an IN OUT or OUT argument of the routine must correspond to a host variable expression.

INTO :host_variable

The INTO clause applies only to calls to functions. Specify which host variable will store the return value of the function.

:indicator_variable

Specify the value or condition of the host variable.

See Also:

Pro*C/C++ Precompiler Programmer's Guide for more information on host variables and indicator variables

Example

Calling a Procedure: Example

The following statement uses the remove_dept procedure (created in "Creating a Package Body: Example" ) to remove the Entertainment department (created in "Inserting Sequence Values: Example" ):

CALL remove_dept(162);
Calling a Procedure Using an Expression of an Object Type: Example

The following examples show how call a procedure by using an expression of an object type in the CALL statement. The example uses the warehouse_typ object type in the order entry sample schema OE:

ALTER TYPE warehouse_typ
      ADD MEMBER FUNCTION ret_name
      RETURN VARCHAR2
      CASCADE;

CREATE OR REPLACE TYPE BODY warehouse_typ
      AS MEMBER FUNCTION ret_name
      RETURN VARCHAR2
      IS
         BEGIN
            RETURN self.warehouse_name;
         END;
      END;
/
VARIABLE x VARCHAR2(25);

CALL warehouse_typ(456, 'Warehouse 456', 2236).ret_name()
   INTO :x;

PRINT x;
X
--------------------------------
Warehouse 456

The next example shows how to use an external function to achieve the same thing:

CREATE OR REPLACE FUNCTION ret_warehouse_typ(x warehouse_typ)
  RETURN warehouse_typ
  IS
    BEGIN
      RETURN x;
    END;
/
CALL ret_warehouse_typ(warehouse_typ(234, 'Warehouse 234',
   2235)).ret_name()
   INTO :x;

PRINT x;

X
--------------------------------
Warehouse 234
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 10 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COMMENT

Purpose

Use the COMMENT statement to add a comment about a table, view, materialized view, or column into the data dictionary.

You can view the comments on a particular table or column by querying the data dictionary views USER_TAB_COMMENTS, DBA_TAB_COMMENTS, or ALL_TAB_COMMENTS or USER_COL_COMMENTS, DBA_COL_COMMENTS, or ALL_COL_COMMENTS.

To drop a comment from the database, set it to the empty string ' '.

See Also:
  • "Comments" for more information on associating comments with SQL statements and schema objects
  • Oracle9i Database Reference for information on the data dictionary views

Prerequisites

The object about which you are adding a comment must be in your own schema or:

  • You must have COMMENT ANY TABLE system privilege to add a comment to a table, view, or materialized view.
  • You must have the COMMENT ANY INDEXTYPE system privilege to add a comment to an indextype.
  • You must have the COMMENT ANY OPERATOR system privilege to add a comment to an operator.

Syntax

comment::=

Text description of statements_420.gif follows
Text description of comment

Semantics

TABLE Clause

Specify the schema and name of the table, view, or materialized view to be commented. If you omit schema, then Oracle assumes the table, view, or materialized view is in your own schema.

COLUMN Clause

Specify the name of the column of a table, view, or materialized view to be commented. If you omit schema, then Oracle assumes the table, view, or materialized view is in your own schema.

IS 'text'

Specify the text of the comment.

See Also:

"Text Literals" for a syntax description of 'text'

OPERATOR Clause

Specify the name of the operator to be commented. If you omit schema, then Oracle assumes the operator is in your own schema.

INDEXTYPE Clause

Specify the name of the indextype to be commented. If you omit schema, then Oracle assumes the indextype is in your own schema.

Example

Creating Comments: Example

To insert an explanatory remark on the job_id column of the employees table, you might issue the following statement:

COMMENT ON COLUMN employees.job_id
   IS 'abbreviated job title';

To drop this comment from the database, issue the following statement:

COMMENT ON COLUMN employees.job_id IS ' ';
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: ALTER TRIGGER to COMMIT , 11 of 11

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COMMIT

Purpose

Use the COMMIT statement to end your current transaction and make permanent all changes performed in the transaction. A transaction is a sequence of SQL statements that Oracle treats as a single unit. This statement also erases all savepoints in the transaction and releases the transaction's locks.

Note:

Oracle issues an implicit COMMIT before and after any data definition language (DDL) statement.

You can also use this statement to

  • Commit an in-doubt distributed transaction manually
  • Terminate a read-only transaction begun by a SET TRANSACTION statement.

Oracle Corporation recommends that you explicitly end every transaction in your application programs with a COMMIT or ROLLBACK statement, including the last transaction, before disconnecting from Oracle. If you do not explicitly commit the transaction and the program terminates abnormally, then the last uncommitted transaction is automatically rolled back.

A normal exit from most Oracle utilities and tools causes the current transaction to be committed. A normal exit from an Oracle precompiler program does not commit the transaction and relies on Oracle to roll back the current transaction.

See Also:
  • Oracle9i Database Concepts for more information on transactions
  • SET TRANSACTION for more information on specifying characteristics of a transaction

Prerequisites

You need no privileges to commit your current transaction.

To manually commit a distributed in-doubt transaction that you originally committed, you must have FORCE TRANSACTION system privilege. To manually commit a distributed in-doubt transaction that was originally committed by another user, you must have FORCE ANY TRANSACTION system privilege.

Syntax

commit::=

Text description of statements_421.gif follows
Text description of commit

Semantics

WORK

The WORK keyword is supported for compliance with standard SQL. The statements COMMIT and COMMIT WORK are equivalent.

COMMENT Clause

Specify a comment to be associated with the current transaction. The 'text' is a quoted literal of up to 255 bytes that Oracle stores in the data dictionary view DBA_2PC_PENDING along with the transaction ID if the transaction becomes in doubt.

See Also:

COMMENT for more information on adding comments to SQL statements

FORCE Clause

In a distributed database system, the FORCE clause lets you manually commit an in-doubt distributed transaction. The transaction is identified by the 'text' containing its local or global transaction ID. To find the IDs of such transactions, query the data dictionary view DBA_2PC_PENDING. You can use integer to specifically assign the transaction a system change number (SCN). If you omit integer, then the transaction is committed using the current SCN.

Note:

A COMMIT statement with a FORCE clause commits only the specified transaction. Such a statement does not affect your current transaction.
Restriction on FORCE

COMMIT statements using the FORCE clause are not supported in PL/SQL.

See Also:

Oracle9i Heterogeneous Connectivity Administrator's Guide for more information on these topics

Examples

Committing an Insert: Example

This statement inserts a row into the hr.regions table and commits this change:

INSERT INTO regions VALUES (5, 'Antarctica');

COMMIT WORK;
Commenting on COMMIT: Example

The following statement commits the current transaction and associates a comment with it:

COMMIT
    COMMENT 'In-doubt transaction Code 36, Call (415) 555-2637';

If a network or machine failure prevents this distributed transaction from committing properly, then Oracle stores the comment in the data dictionary along with the transaction ID. The comment indicates the part of the application in which the failure occurred and provides information for contacting the administrator of the database where the transaction was committed.

Forcing an In-Doubt Transaction: Example

The following statement manually commits an in-doubt distributed transaction:

COMMIT FORCE '22.57.53';
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 1 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

13
SQL Statements: CREATE CLUSTER to CREATE JAVA

This chapter contains the following SQL statements:

  • CREATE CLUSTER
  • CREATE CONTEXT
  • CREATE CONTROLFILE
  • CREATE DATABASE
  • CREATE DATABASE LINK
  • CREATE DIMENSION
  • CREATE DIRECTORY
  • CREATE FUNCTION
  • CREATE INDEX
  • CREATE INDEXTYPE
  • CREATE JAVA
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 2 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE CLUSTER

Purpose

Use the CREATE CLUSTER statement to create a cluster. A cluster is a schema object that contains data from one or more tables, all of which have one or more columns in common. Oracle stores together all the rows (from all the tables) that share the same cluster key.

For information on existing clusters, query the USER_CLUSTERS, ALL_CLUSTERS, and DBA_CLUSTERS data dictionary views.

See Also:
  • Oracle9i Database Concepts for general information on clusters
  • Oracle9i Application Developer's Guide - Fundamentals for information on performance considerations of clusters
  • Oracle9i Database Performance Tuning Guide and Reference for suggestions on when to use clusters
  • Oracle9i Database Reference for information on the data dictionary views

Prerequisites

To create a cluster in your own schema, you must have CREATE CLUSTER system privilege. To create a cluster in another user's schema, you must have CREATE ANY CLUSTER system privilege. Also, the owner of the schema to contain the cluster must have either space quota on the tablespace containing the cluster or the UNLIMITED TABLESPACE system privilege.

Oracle does not automatically create an index for a cluster when the cluster is initially created. Data manipulation language (DML) statements cannot be issued against clustered tables until you create a cluster index.

Syntax

create_cluster::=

Text description of statements_543.gif follows
Text description of create_cluster

(physical_attributes_clause::= )

physical_attributes_clause::=

Text description of statements_526.gif follows
Text description of physical_attributes_clause

(storage_clause )

parallel_clause::=

Text description of statements_544.gif follows
Text description of parallel_clause

Semantics

schema

Specify the schema to contain the cluster. If you omit schema, Oracle creates the cluster in your current schema.

cluster

Specify is the name of the cluster to be created.

After you create a cluster, you add tables to it. A cluster can contain a maximum of 32 tables. After you create a cluster and add tables to it, the cluster is transparent. You can access clustered tables with SQL statements just as you can access nonclustered tables.

See Also:

CREATE TABLE for information on adding tables to a cluster, Creating a Cluster: Example , and "Adding Tables to a Cluster: Example"

column

Specify one or more names of columns in the cluster key. You can specify up to 16 cluster key columns. These columns must correspond in both datatype and size to columns in each of the clustered tables, although they need not correspond in name.

You cannot specify integrity constraints as part of the definition of a cluster key column. Instead, you can associate integrity constraints with the tables that belong to the cluster.

See Also:

"Cluster Keys: Example"

datatype

Specify the datatype of each cluster key column.

Restrictions on Cluster Datatypes
  • You cannot specify a cluster key column of datatype LONG, LONG RAW, REF, nested table, varray, BLOB, CLOB, BFILE, or user-defined object type.
  • You cannot use the HASH IS clause if any column datatype is not INTEGER or NUMBER with scale 0.
  • You can specify a column of type ROWID, but Oracle does not guarantee that the values in such columns are valid rowids.

    See Also:

    "Datatypes" for information on datatypes

physical_attributes_clause

The physical_attributes_clause lets you specify the storage characteristics of the cluster. Each table in the cluster uses these storage characteristics as well. If you do not specify values for these parameters, Oracle uses the following defaults:

  • PCTFREE: 10
  • PCTUSED: 40
  • INITRANS: 2 or the default value of the cluster's tablespace, whichever is greater
  • MAXTRANS: the default value for the cluster's tablespace

    See Also:
    • physical_attributes_clause for a complete description of the parameters of the physical_attributes_clause
    • storage_clause for a complete description of the storage_clause, including default values

SIZE

Specify the amount of space in bytes reserved to store all rows with the same cluster key value or the same hash value. Use K or M to specify this space in kilobytes or megabytes. This space determines the maximum number of cluster or hash values stored in a data block. If SIZE is not a divisor of the data block size, Oracle uses the next largest divisor. If SIZE is larger than the data block size, Oracle uses the operating system block size, reserving at least one data block for each cluster or hash value.

Oracle also considers the length of the cluster key when determining how much space to reserve for the rows having a cluster key value. Larger cluster keys require larger sizes. To see the actual size, query the KEY_SIZE column of the USER_CLUSTERS data dictionary view. (This does not apply to hash clusters, because hash values are not actually stored in the cluster.)

If you omit this parameter, Oracle reserves one data block for each cluster key value or hash value.

TABLESPACE

Specify the tablespace in which the cluster is created.

INDEX Clause

Specify INDEX to create an indexed cluster. In an indexed cluster, Oracle stores together rows having the same cluster key value. Each distinct cluster key value is stored only once in each data block, regardless of the number of tables and rows in which it occurs.

After you create an indexed cluster, you must create an index on the cluster key before you can issue any data manipulation language (DML) statements against a table in the cluster. This index is called the cluster index.

Note:

You cannot create a cluster index for a hash cluster, and you need not create an index on a hash cluster key. If you specify neither INDEX nor HASHKEYS, Oracle creates an indexed cluster by default.
See Also:

CREATE INDEX for information on creating a cluster index and Oracle9i Database Concepts for general information in indexed clusters

HASHKEYS Clause

Specify the HASHKEYS clause to create a hash cluster and specify the number of hash values for a hash cluster. In a hash cluster, Oracle stores together rows that have the same hash key value. The hash value for a row is the value returned by the cluster's hash function.

Oracle rounds up the HASHKEYS value to the nearest prime number to obtain the actual number of hash values. The minimum value for this parameter is 2. If you omit both the INDEX clause and the HASHKEYS parameter, Oracle creates an indexed cluster by default.

When you create a hash cluster, Oracle immediately allocates space for the cluster based on the values of the SIZE and HASHKEYS parameters.

See Also:

Oracle9i Database Concepts for more information on how Oracle allocates space for clusters and "Hash Clusters: Examples"

SINGLE TABLE

SINGLE TABLE indicates that the cluster is a type of hash cluster containing only one table. This clause can provide faster access to rows than would result if the table were not part of a cluster.

Restriction on Single Table Clusters

Only one table can be present in the cluster at a time. However, you can drop the table and create a different table in the same cluster.

See Also:

"Single-Table Hash Clusters: Example"

HASH IS expr

Specify an expression to be used as the hash function for the hash cluster. The expression:

  • Must evaluate to a positive value
  • Must contain at least one column with referenced columns of any datatype as long as the entire expression evaluates to a number of scale 0. For example: NUM_COLUMN * length(VARCHAR2_COLUMN)
  • Cannot reference user-defined PL/SQL functions
  • Cannot reference the pseudocolumns LEVEL or ROWNUM
  • Cannot reference the user-related functions USERENV, UID, or USER or the datetime functions CURRENT_DATE, CURRENT_TIMESTAMP, DBTIMEZONE, EXTRACT (datetime), FROM_TZ, LOCALTIMESTAMP, NUMTODSINTERVAL, NUMTOYMINTERVAL, SESSIONTIMEZONE, SYSDATE, SYSTIMESTAMP, TO_DSINTERVAL, TO_TIMESTAMP, TO_DATE, TO_TIMESTAMP_TZ, TO_YMINTERVAL, and TZ_OFFSET.
  • Cannot evaluate to a constant
  • Cannot be a scalar subquery expression
  • Cannot contain columns qualified with a schema or object name (other than the cluster name)

If you omit the HASH IS clause, Oracle uses an internal hash function for the hash cluster.

For information on existing hash functions, query the USER_, ALL_, and DBA_CLUSTER_HASH_EXPRESSIONS data dictionary tables.

The cluster key of a hash column can have one or more columns of any datatype. Hash clusters with composite cluster keys or cluster keys made up of noninteger columns must use the internal hash function.

See Also:

Oracle9i Database Reference for information on the data dictionary views

parallel_clause

The parallel_clause lets you parallelize the creation of the cluster.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

Restriction on Parallelizing Cluster Creation

If the tables in cluster contain any columns of LOB or user-defined object type, this statement as well as subsequent INSERT, UPDATE, or DELETE operations on cluster are executed serially without notification.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

NOROWDEPENDENCIES | ROWDEPENDENCIES

This clause lets you specify whether cluster will use row-level dependency tracking. With this feature, each row in the tables that make up the cluster has a system change number (SCN) that represents a time greater than or equal to the commit time of the last transaction that modified the row. You cannot change this setting after cluster is created.

ROWDEPENDENCIES

Specify ROWDEPENDENCIES if you want to enable row-level dependency tracking. This setting is useful primarily to allow for parallel propagation in replication environments. It increases the size of each row by 6 bytes.

NOROWDEPENDENCIES

Specify NOROWDEPENDENCIES if you do not want to use the row level dependency tracking feature. This is the default.

See Also:

Oracle9i Advanced Replication for information about the use of row-level dependency tracking in replication environments

CACHE | NOCACHE

CACHE

Specify CACHE if you want the blocks retrieved for this cluster to be placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This clause is useful for small lookup tables.

NOCACHE

Specify NOCACHE if you want the blocks retrieved for this cluster to be placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed. This is the default behavior.

Note:

NOCACHE has no effect on clusters for which you specify KEEP in the storage_clause.

Examples

Creating a Cluster: Example

The following statement creates a cluster named personnel with the cluster key column department, a cluster size of 512 bytes, and storage parameter values:

CREATE CLUSTER personnel
   (department NUMBER(4))
SIZE 512
STORAGE (initial 100K next 50K);
Cluster Keys: Example

The following statement creates the cluster index on the cluster key of personnel:

CREATE INDEX idx_personnel ON CLUSTER personnel;

After creating the cluster index, you can add tables to the index and perform DML operations on those tables.

Adding Tables to a Cluster: Example

The following statements create some departmental tables from the sample hr.employees table and add them to the personnel cluster created in the earlier example:

CREATE TABLE dept_10
   CLUSTER personnel (department_id)
   AS SELECT * FROM employees WHERE department_id = 10;

CREATE TABLE dept_20
   CLUSTER personnel (department_id)
   AS SELECT * FROM employees WHERE department_id = 20;
Hash Clusters: Examples

The following statement creates a hash cluster named language with the cluster key column cust_language, a maximum of 10 hash key values, each of which is allocated 512 bytes, and storage parameter values:

CREATE CLUSTER language (cust_language VARCHAR2(3))
   SIZE 512 HASHKEYS 10
   STORAGE (INITIAL 100k next 50k);

Because the preceding statement omits the HASH IS clause, Oracle uses the internal hash function for the cluster.

The following statement creates a hash cluster named address with the cluster key made up of the columns postal_code and country_id, and uses a SQL expression containing these columns for the hash function:

CREATE CLUSTER address
   (postal_code NUMBER, country_id CHAR(2))
   HASHKEYS 20
   HASH IS MOD(postal_code + country_id, 101);
Single-Table Hash Clusters: Example

The following statement creates a single-table hash cluster named cust_orders with the cluster key customer_id and a maximum of 100 hash key values, each of which is allocated 512 bytes:

CREATE CLUSTER cust_orders (customer_id NUMBER(6))
   SIZE 512 SINGLE TABLE HASHKEYS 100;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 3 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE CONTEXT

Purpose

Use the CREATE CONTEXT statement to:

  • Create a namespace for a context (a set of application-defined attributes that validates and secures an application) and
  • Associate the namespace with the externally created package that sets the context.

You can use the DBMS_SESSION.set_context procedure in your designated package to set or reset the attributes of the context.

See Also:
  • Oracle9i Database Concepts for a definition and discussion of contexts
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_SESSION.set_context procedure

Prerequisites

To create a context namespace, you must have CREATE ANY CONTEXT system privilege.

Syntax

create_context::=

Text description of statements_5a.gif follows
Text description of create_context

Semantics

OR REPLACE

Specify OR REPLACE to redefine an existing context namespace using a different package.

namespace

Specify the name of the context namespace to create or modify. Context namespaces are always stored in the schema SYS.

schema

Specify the schema owning package. If you omit schema, Oracle uses the current schema.

package

Specify the PL/SQL package that sets or resets the context attributes under the namespace for a user session.

Note:

To provide some design flexibility, Oracle does not verify the existence of the schema or the validity of the package at the time you create the context.
See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for more information on setting the package

INITIALIZED Clause

The INITIALIZED clause lets you specify an entity other than Oracle that can initialize the context namespace.

EXTERNALLY

EXTERNALLY indicates that the namespace can be initialized using an OCI interface when establishing a session.

See Also:

Oracle Call Interface Programmer's Guide for information on using OCI to establish a session
GLOBALLY

GLOBALLY indicates that the namespace can be initialized by the LDAP directory when a global user connects to the database.

After the session is established, only the designated PL/SQL package can issue commands to write to any attributes inside the namespace.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for information on establishing globally initialized contexts
  • Oracle Internet Directory Administrator's Guide for information on the connecting to the database through the LDAP directory

ACCESSED GLOBALLY

This clause indicates that any application context set in namespace is accessible throughout the entire instance. This setting lets multiple sessions share application attributes.

Examples

Creating an Application Context: Example

This example uses the PL/SQL package emp_mgmt, created in "Creating a Package: Example" , which validates and secures the hr application. The following statement creates the context namespace hr_context and associates it with the package emp_mgmt:

CREATE CONTEXT hr_context USING emp_mgmt;

You can control data access based on this context using the SYS_CONTEXT function. For example, suppose your emp_mgmt package has defined an attribute new_empno as a particular employee identifier. You can secure the base table employees by creating a view that restricts access based on the value of new_empno, as follows:

CREATE VIEW hr_org_secure_view AS
   SELECT * FROM employees
   WHERE employee_id = SYS_CONTEXT('hr_context', 'new_empno');
See Also:

SYS_CONTEXT

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 4 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE CONTROLFILE

Caution:

Oracle recommends that you perform a full backup of all files in the database before using this statement. For more information, see Oracle9i User-Managed Backup and Recovery Guide.

Purpose

Use the CREATE CONTROLFILE statement to re-create a control file in one of the following cases:

  • All copies of your existing control files have been lost through media failure.
  • You want to change the name of the database.
  • You want to change the maximum number of redo log file groups, redo log file members, archived redo log files, datafiles, or instances that can concurrently have the database mounted and open.

    Note:

    If it is necessary to use the CREATE CONTROLFILE statement, do not include in the DATAFILE clause any datafiles in temporary or read-only tablespaces. You can add these types of files to the database later.

    An alternative to the CREATE CONTROLFILE statement is ALTER DATABASE BACKUP CONTROLFILE TO TRACE, which generates a SQL script in the trace file to re-create the controlfile. If your database contains any read-only or temporary tablespaces, that SQL script will also contain all the necessary SQL statements to add those files back into the database.
    See Also:

    "BACKUP CONTROLFILE Clause" of ALTER DATABASE for information creating a script based on an existing database controlfile

When you issue a CREATE CONTROLFILE statement, Oracle creates a new control file based on the information you specify in the statement. If you omit any clauses, Oracle uses the default values rather than the values for the previous control file. After successfully creating the control file, Oracle mounts the database in the mode specified by the initialization parameter CLUSTER_DATABASE. You then must perform media recovery before opening the database. It is recommended that you then shut down the instance and take a full backup of all files in the database.

See Also:

Oracle9i User-Managed Backup and Recovery Guide

Prerequisites

To create a control file, you must have the SYSDBA system privilege.

The database must not be mounted by any instance. Oracle leaves the database mounted in EXCLUSIVE state after successful creation of the control file. If you are using Oracle with Real Application Clusters, the DBA must then shut down and remount the database in SHARED mode (which is the default if the value of the CLUSTER_DATABASE initialization parameter is TRUE) before other instances can start up.

If the REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to EXCLUSIVE, Oracle returns an error when you attempt to re-create the control file. To avoid this message, either set the parameter to SHARED, or re-create your password file before re-creating the control file.

See Also:

Oracle9i Database Reference for more information about the REMOTE_LOGIN_PASSWORDFILE parameter

Syntax

create_controlfile::=

Text description of statements_52.gif follows
Text description of create_controlfile

(datafile_tempfile_spec::= --part of file_specification syntax)

logfile_clause::=

Text description of statements_53.gif follows
Text description of logfile_clause

(redo_log_file_spec::= --part of file_specification syntax)

character_set_clause::=

Text description of statements_55.gif follows
Text description of character_set_clause

Semantics

REUSE

Specify REUSE to indicate that existing control files identified by the initialization parameter CONTROL_FILES can be reused, thus ignoring and overwriting any information they may currently contain. If you omit this clause and any of these control files already exists, Oracle returns an error.

DATABASE Clause

Specify the name of the database. The value of this parameter must be the existing database name established by the previous CREATE DATABASE statement or CREATE CONTROLFILE statement.

SET DATABASE Clause

Use SET DATABASE to change the name of the database. The name of a database can be as long as eight bytes.

logfile_clause

Use the logfile_clause to specify the redo log files for your database. You must list all members of all redo log file groups.

GROUP integer

Specify the logfile group number. If you specify GROUP values, Oracle verifies these values with the GROUP values when the database was last open.

If you omit this clause, Oracle creates logfiles using system default values. In addition, if either the DB_CREATE_ONLINE_LOG_DEST_n or DB_CREATE_FILE_DEST initialization parameter (or both) has been set, and if you have specified RESETLOGS, then Oracle creates two logs in the default logfile destination specified in the DB_CREATE_ONLINE_LOG_DEST_n parameter, and if it is not set, then in the DB_CREATE_FILE_DEST parameter.

See Also:

file_specification for a full description of this clause
RESETLOGS

Specify RESETLOGS if you want Oracle to ignore the contents of the files listed in the LOGFILE clause. These files do not have to exist. Each redo_log_file_spec in the LOGFILE clause must specify the SIZE parameter. Oracle assigns all online redo log file groups to thread 1 and enables this thread for public use by any instance. After using this clause, you must open the database using the RESETLOGS clause of the ALTER DATABASE statement.

NORESETLOGS

Specify NORESETLOGS if you want Oracle to use all files in the LOGFILE clause as they were when the database was last open. These files must exist and must be the current online redo log files rather than restored backups. Oracle reassigns the redo log file groups to the threads to which they were previously assigned and reenables the threads as they were previously enabled.

DATAFILE Clause

Specify the datafiles of the database. You must list all datafiles. These files must all exist, although they may be restored backups that require media recovery. See the syntax description in file_specification .

Note:

You should list only datafiles in this clause, not temporary datafiles (tempfiles). Please refer to Oracle9i User-Managed Backup and Recovery Guide for more information on handling tempfiles.
Restriction on DATAFILE

You cannot specify the autoextend_clause of data_file_spec in this DATAFILE clause.

MAXLOGFILES Clause

Specify the maximum number of online redo log file groups that can ever be created for the database. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The default and maximum values depend on your operating system. The value that you specify should not be less than the greatest GROUP value for any redo log file group.

MAXLOGMEMBERS Clause

Specify the maximum number of members, or identical copies, for a redo log file group. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The minimum value is 1. The maximum and default values depend on your operating system.

MAXLOGHISTORY Clause

This parameter is useful only if you are using Oracle in ARCHIVELOG mode with Real Application Clusters. Specify the maximum number of archived redo log file groups for automatic media recovery of Real Application Clusters. Oracle uses this value to determine how much space in the control file to allocate for the names of archived redo log files. The minimum value is 0. The default value is a multiple of the MAXINSTANCES value and depends on your operating system. The maximum value is limited only by the maximum size of the control file.

MAXDATAFILES Clause

Specify the initial sizing of the datafiles section of the control file at CREATE DATABASE or CREATE CONTROLFILE time. An attempt to add a file whose number is greater than MAXDATAFILES, but less than or equal to DB_FILES, causes the control file to expand automatically so that the datafiles section can accommodate more files.

The number of datafiles accessible to your instance is also limited by the initialization parameter DB_FILES.

MAXINSTANCES Clause

Specify the maximum number of instances that can simultaneously have the database mounted and open. This value takes precedence over the value of the initialization parameter INSTANCES. The minimum value is 1. The maximum and default values depend on your operating system.

ARCHIVELOG | NOARCHIVELOG

Specify ARCHIVELOG to archive the contents of redo log files before reusing them. This clause prepares for the possibility of media recovery as well as instance or system failure recovery.

If you omit both the ARCHIVELOG clause and NOARCHIVELOG clause, Oracle chooses NOARCHIVELOG mode by default. After creating the control file, you can change between ARCHIVELOG mode and NOARCHIVELOG mode with the ALTER DATABASE statement.

FORCE LOGGING

Use this clause to put the database into FORCE LOGGING mode after control file creation. When the database is in this mode, Oracle logs all changes in the database except changes to temporary tablespaces and temporary segments. This setting takes precedence over and is independent of any NOLOGGING or FORCE LOGGING settings you specify for individual tablespaces and any NOLOGGING settings you specify for individual database objects. If you omit this clause, the database will not be in FORCE LOGGING mode after the controlfile is created.

Note:

FORCE LOGGING mode can have performance effects. Please refer to Oracle9i Database Administrator's Guide for information on when to use this setting.

character_set_clause

If you specify a character set, Oracle reconstructs character set information in the control file. In case media recovery of the database is required, this information will be available before the database is open, so that tablespace names can be correctly interpreted during recovery. This clause is required only if you are using a character set other than the default US7ASCII. Oracle prints the current database character set to the "alert" log in $ORACLE_HOME/log during startup.

If you are re-creating your control file and you are using Recovery Manager for tablespace recovery, and if you specify a different character set from the one stored in the data dictionary, then tablespace recovery will not succeed. (However, at database open, the control file character set will be updated with the correct character set from the data dictionary.)

Note:

You cannot modify the character set of the database with this clause.
See Also:

Oracle9i Recovery Manager User's Guide for more information on tablespace recovery

Example

Creating a Controlfile: Example

This statement re-creates a control file. In this statement, database demo was created with the WE8DEC character set. The example uses the word path where you would normally insert the path on your system to the appropriate Oracle directories.

STARTUP NOMOUNT

CREATE CONTROLFILE REUSE DATABASE "demo" NORESETLOGS NOARCHIVELOG
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 32
    MAXINSTANCES 1
    MAXLOGHISTORY 449
LOGFILE
  GROUP 1 '/path/oracle/dbs/t_log1.f'  SIZE 500K,
  GROUP 2 '/path/oracle/dbs/t_log2.f'  SIZE 500K
# STANDBY LOGFILE
DATAFILE
  '/path/oracle/dbs/t_db1.f',
  '/path/oracle/dbs/dbu19i.dbf',
  '/path/oracle/dbs/tbs_11.f',
  '/path/oracle/dbs/smundo.dbf',
  '/path/oracle/dbs/demo.dbf'
CHARACTER SET WE8DEC
;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 5 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE DATABASE

Caution:

This statement prepares a database for initial use and erases any data currently in the specified files. Use this statement only when you understand its ramifications.
Note Regarding Security Enhancements:

In this release of Oracle and in subsequent releases, several enhancements are being made to ensure the security of default database user accounts.

To provide guidance for configuring Oracle9i in a secure manner, Oracle Corporation provides a security checklist. Oracle Corporation recommends that you read this checklist and configure your database accordingly. The security checklist can be found at the following URL:

http://otn.oracle.com/deploy/security/oracle9i/pdf/9iR2_checklist.pdf

Purpose

Use the CREATE DATABASE statement to create a database, making it available for general use.

This statement erases all data in any specified datafiles that already exist in order to prepare them for initial database use. If you use the statement on an existing database, all data in the datafiles is lost.

After creating the database, this statement mounts it in either exclusive or parallel mode (depending on the value of the CLUSTER_DATABASE initialization parameter) and opens it, making it available for normal use. You can then create tablespaces and rollback segments for the database.

See Also:
  • ALTER DATABASE for information on modifying a database
  • Oracle9i Java Developer's Guide for information on creating an Oracle9i Java virtual machine
  • CREATE ROLLBACK SEGMENT and CREATE TABLESPACE for information on creating rollback segments and tablespaces

Prerequisites

To create a database, you must have the SYSDBA system privilege.

If the REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to EXCLUSIVE, Oracle returns an error when you attempt to re-create the database. To avoid this message, either set the parameter to SHARED, or re-create your password file before re-creating the database.

See Also:

Oracle9i Database Reference for more information about the REMOTE_LOGIN_PASSWORDFILE parameter

Syntax

create_database::=

Text description of statements_546a.gif follows
Text description of create_database

(redo_log_file_spec::= , datafile_tempfile_spec::= , default_temp_tablespace::= , undo_tablespace_clause::= , set_time_zone_clause::= )

default_temp_tablespace::=

Text description of statements_58.gif follows
Text description of default_temp_tablespace

(datafile_tempfile_spec::= --part of file_specification)

temp_tablespace_extent::=

Text description of statements_545.gif follows
Text description of temp_tablespace_extent

undo_tablespace_clause::=

Text description of statements_546.gif follows
Text description of undo_tablespace_clause

(datafile_tempfile_spec::= --part of file_specification)

set_time_zone_clause::=

Text description of statements_56.gif follows
Text description of set_time_zone_clause

Keyword and Parameters

database

Specify the name of the database to be created. The name can be up to 8 bytes long. The database name can contain only ASCII characters. Oracle writes this name into the control file. If you subsequently issue an ALTER DATABASE statement that explicitly specifies a database name, Oracle verifies that name with the name in the control file.

Note:

You cannot use special characters from European or Asian character sets in a database name. For example, characters with umlauts are not allowed.

If you omit the database name from a CREATE DATABASE statement, Oracle uses the name specified by the initialization parameter DB_NAME. If the DB_NAME initialization parameter has been set, and you specify a different name from the value of that parameter, Oracle returns an error.

See Also:

"Schema Object Naming Guidelines" for additional rules to which database names should adhere

USER SYS ..., USER SYSTEM ...

Use these clauses to establish passwords for the SYS and SYSTEM users. These clauses are not mandatory in this release of Oracle9i. However, if you specify either clause, you must specify both clauses.

If you do not specify these clauses, Oracle creates default passwords "change_on_install" for user SYS and "manager" for user SYSTEM. You can subsequently change these passwords using the ALTER USER statement. You can also use ALTER USER to add password management attributes after database creation.

See Also:

ALTER USER

CONTROLFILE REUSE Clause

Specify CONTROLFILE REUSE to reuse existing control files identified by the initialization parameter CONTROL_FILES, thus ignoring and overwriting any information they currently contain. Normally you use this clause only when you are re-creating a database, rather than creating one for the first time. You cannot use this clause if you also specify a parameter value that requires that the control file be larger than the existing files. These parameters are MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES, and MAXINSTANCES.

If you omit this clause and any of the files specified by CONTROL_FILES already exist, Oracle returns an error.

LOGFILE Clause

Specify one or more files to be used as redo log files. Each redo_log_file_spec specifies a redo log file group containing one or more redo log file members (copies). All redo log files specified in a CREATE DATABASE statement are added to redo log thread number 1.

See Also:

file_specification for a full description
GROUP integer

Specify the number that identifies the redo log file group. The value of integer can range from 1 to the value of the MAXLOGFILES parameter. A database must have at least two redo log file groups. You cannot specify multiple redo log file groups having the same GROUP value. If you omit this parameter, Oracle generates its value automatically. You can examine the GROUP value for a redo log file group through the dynamic performance view V$LOG.

If you omit the LOGFILE clause:

  • If either the DB_CREATE_ONLINE_LOG_DEST_n or DB_CREATE_FILE_DEST initialization parameter (or both) is set, then Oracle creates two Oracle-managed logfiles with system-generated names, 100 MB in size, in the default logfile directory specified in the DB_CREATE_ONLINE_LOG_DEST_n parameter, and if it is not set, then in the DB_CREATE_FILE_DEST parameter.
  • If neither of these parameters is set, Oracle creates two redo log file groups. The names and sizes of the default files depend on your operating system.

MAXLOGFILES Clause

Specify the maximum number of redo log file groups that can ever be created for the database. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The default, minimum, and maximum values depend on your operating system.

MAXLOGMEMBERS Clause

Specify the maximum number of members, or copies, for a redo log file group. Oracle uses this value to determine how much space in the control file to allocate for the names of redo log files. The minimum value is 1. The maximum and default values depend on your operating system.

MAXLOGHISTORY Clause

This parameter is useful only if you are using Oracle in ARCHIVELOG mode with Real Application Clusters. Specify the maximum number of archived redo log files for automatic media recovery Real Application Clusters. Oracle uses this value to determine how much space in the control file to allocate for the names of archived redo log files. The minimum value is 0. The default value is a multiple of the MAXINSTANCES value and depends on your operating system. The maximum value is limited only by the maximum size of the control file.

MAXDATAFILES Clause

Specify the initial sizing of the datafiles section of the control file at CREATE DATABASE or CREATE CONTROLFILE time. An attempt to add a file whose number is greater than MAXDATAFILES, but less than or equal to DB_FILES, causes the Oracle control file to expand automatically so that the datafiles section can accommodate more files.

The number of datafiles accessible to your instance is also limited by the initialization parameter DB_FILES.

MAXINSTANCES Clause

Specify the maximum number of instances that can simultaneously have this database mounted and open. This value takes precedence over the value of initialization parameter INSTANCES. The minimum value is 1. The maximum and default values depend on your operating system.

ARCHIVELOG | NOARCHIVELOG

ARCHIVELOG

Specify ARCHIVELOG if you want the contents of a redo log file group to be archived before the group can be reused. This clause prepares for the possibility of media recovery.

NOARCHIVELOG

Specify NOARCHIVELOG if the contents of a redo log file group need not be archived before the group can be reused. This clause does not allow for the possibility of media recovery.

The default is NOARCHIVELOG mode. After creating the database, you can change between ARCHIVELOG mode and NOARCHIVELOG mode with the ALTER DATABASE statement.

FORCE LOGGING

Use this clause to put the database into FORCE LOGGING mode. Oracle will log all changes in the database except for changes in temporary tablespaces and temporary segments. This setting takes precedence over and is independent of any NOLOGGING or FORCE LOGGING settings you specify for individual tablespaces and any NOLOGGING settings you specify for individual database objects.

FORCE LOGGING mode is persistent across instances of the database. That is, if you shut down and restart the database, the database is still in FORCE LOGGING mode. However, if you re-create the control file, Oracle will take the database out of FORCE LOGGING mode unless you specify FORCE LOGGING in the CREATE CONTROLFILE statement.

Note:

FORCE LOGGING mode can have performance effects. Please refer to Oracle9i Database Administrator's Guide for information on when to use this setting.
See Also:

CREATE CONTROLFILE

CHARACTER SET Clause

Specify the character set the database uses to store data. The supported character sets and default value of this parameter depend on your operating system.

Restriction on CHARACTER SET

You cannot specify the AL16UTF16 character set as the database character set.

See Also:

Oracle9i Database Globalization Support Guide for more information about choosing a character set

NATIONAL CHARACTER SET Clause

Specify the national character set used to store data in columns specifically defined as NCHAR, NCLOB, or NVARCHAR2 (either AF16UTF16 or UTF8). The default is 'AL16UTF16'.

See Also:

Oracle9i Database Globalization Support Guide for information on Unicode datatype support.

DATAFILE Clause

Specify one or more files to be used as datafiles. All these files become part of the SYSTEM tablespace.

Caution:

This clause is optional, as is the DATAFILE clause of the undo_tablespace_clause. Therefore, to avoid ambiguity, if your intention is to specify a datafile for the SYSTEM tablespace with this clause, do not specify it immediately after an undo_tablespace_clause that does not include the optional DATAFILE clause. If you do so, Oracle will interpret the DATAFILE clause to be part of the undo_tablespace_clause.

If you are running the database in automatic undo mode and you specify a datafile name for the SYSTEM tablespace, then Oracle expects to generate datafiles for all tablespaces. Oracle does this automatically if you are using Oracle-managed files (that is, you have set values for the DB_CREATE_FILE_DEST or DB_CREATE_ONLINE_LOG_DEST_n initialization parameter). However, if you are not using Oracle-managed files and you specify this clause, then you must also specify the undo_tablespace_clause and the default_temp_tablespace clause.

If you omit this clause:

  • If the DB_CREATE_FILE_DEST initialization parameter is set, Oracle creates a 100 MB Oracle-managed datafile with a system-generated name in the default file destination specified in the parameter.
  • If the DB_CREATE_FILE_DEST initialization parameter is not set, Oracle creates one datafile whose name and size depend on your operating system.

    Note:

    Oracle recommends that the total initial space allocated for the SYSTEM tablespace be a minimum of 5 megabytes.
    See Also:

    file_specification for syntax

EXTENT MANAGEMENT LOCAL

Use this clause to create a locally managed SYSTEM tablespace. If you omit this clause, the SYSTEM tablespace will be dictionary managed.

Caution:

Once you create a locally managed SYSTEM tablespace, you cannot change it to be dictionary managed, nor can you create any other dictionary-managed tablespaces in this database.

If you specify this clause, the database must have a default temporary tablespace, because a locally managed SYSTEM tablespace cannot store temporary segments.

  • If you specify EXTENT MANAGEMENT LOCAL but you do not specify the DATAFILE clause, you can omit the default_temp_tablespace clause. Oracle will create a default temporary tablespace called TEMP with one datafile of size 10M with autoextend disabled.
  • If you specify both EXTENT MANAGEMENT LOCAL and the DATAFILE clause, then you must also specify the default_temp_tablespace clause and explicitly specify a datafile for that tablespace.

If you have opened the instance in Automatic Undo Management mode, similar requirements exist for the database undo tablespace:

  • If you specify EXTENT MANAGEMENT LOCAL but you do not specify the DATAFILE clause, you can omit the undo_tablespace_clause. Oracle will create an undo tablespace named SYS_UNDOTBS.
  • If you specify both EXTENT MANAGEMENT LOCAL and the DATAFILE clause, then you must also specify the undo_tablespace_clause and explicitly specify a datafile for that tablespace.

    See Also:

    Oracle9i Database Administrator's Guide for more information on locally managed and dictionary-managed tablespaces

default_temp_tablespace

Specify this clause to create a default temporary tablespace for the database. Oracle will assign to this temporary tablespace any users for whom you do not specify a different temporary tablespace. If you do not specify this clause, the SYSTEM tablespace is the default temporary tablespace.

The TEMPFILE clause part of this clause is optional if you have enabled Oracle-managed files by setting the DB_CREATE_FILE_DEST initialization parameter. If you have not specified a value for this parameter, the TEMPFILE clause is required.

Note:

On some operating systems, Oracle does not allocate space for the tempfile until the tempfile blocks are actually accessed. This delay in space allocation results in faster creation and resizing of tempfiles, but it requires that sufficient disk space is available when the tempfiles are later used. To avoid potential problems, before you create or resize a tempfile, ensure that the available disk space exceeds the size of the new tempfile or the increased size of a resized tempfile. The excess space should allow for anticipated increases in disk space use by unrelated operations as well. Then proceed with the creation or resizing operation.
Restrictions on Default Temporary Tablespaces
  • You cannot specify the SYSTEM tablespace in this clause.
  • The default temporary tablespace must have a standard block size.

The temp_tablespace_extent clause lets you specify how the tablespace is managed.

EXTENT MANAGEMENT LOCAL

This clause indicates that some part of the tablespace is set aside for a bitmap. All temporary tablespaces have locally managed extents, so this clause is optional.

UNIFORM integer

Specify the size of the extents of the temporary tablespace in bytes. All extents of temporary tablespaces are the same size (uniform). If you do not specify this clause, Oracle uses uniform extents of 1M.

SIZE integer

Specify in bytes the size of the tablespace extents. Use K or M to specify the size in kilobytes or megabytes.

If you do not specify SIZE, Oracle uses the default extent size of 1M.

See Also:

Oracle9i Database Concepts for a discussion of locally managed tablespaces

undo_tablespace_clause

If you have opened the instance in automatic undo mode (that is, the UNDO_MANAGEMENT initialization parameter is set to AUTO), you can specify the undo_tablespace_clause to create a tablespace to be used for undo data. If you want undo space management to be handled by way of rollback segments, omit this clause. You can also omit this clause if you have set a value for the UNDO_TABLESPACE initialization parameter. If that parameter has been set, and if you specify this clause, then tablespace must be the same as that parameter value.

The DATAFILE clause part of this clause is optional if you have enabled Oracle-managed files by setting the DB_CREATE_FILE_DEST initialization parameter. If you have not specified a value for this parameter, the DATAFILE clause is required.

  • If you specify this clause, Oracle creates an undo tablespace named tablespace, creates the specified datafiles as part of the undo tablespace, and assigns this tablespace as the undo tablespace of the instance. Oracle will handle management of undo data using this undo tablespace. The DATAFILE clause of this clause has the same behavior as described in "DATAFILE Clause" .

    Note:

    If you have specified a value for the UNDO_TABLESPACE initialization parameter in your initialization parameter file before mounting the database, be sure you specify the same name in this clause. If these names differ, Oracle will return an error when you open the database.
  • If you omit this clause, Oracle creates a default database with a default undo tablespace named SYS_UNDOTBS and assigns this default tablespace as the undo tablespace of the instance. This undo tablespace allocates disk space from the default files used by the CREATE DATABASE statement, and has an initial extent of 10M. Oracle handles the system-generated datafile as described in "DATAFILE Clause" . If Oracle is unable to create the undo tablespace, the entire CREATE DATABASE operation fails.

    See Also:
    • Oracle9i Database Reference for information on opening a database instance in Automatic Undo Management mode using the UNDO_MANAGEMENT parameter
    • Oracle9i Database Administrator's Guide for information on Automatic Undo Management and undo tablespaces
    • CREATE TABLESPACE for information on creating an undo tablespace after database creation

set_time_zone_clause

Use the SET TIME_ZONE clause to set the time zone of the database. You can specify the time zone in two ways:

  • By specifying a displacement from UTC (Coordinated Universal Time--formerly Greenwich Mean Time). The valid range of hh:mm is -12:00 to +14:00.
  • By specifying a time zone region. To see a listing of valid region names, query the TZNAME column of the V$TIMEZONE_NAMES dynamic performance view.

    Note:

    Oracle Corporation recommends that you set the database time zone to UTC ("0:00"). Doing so can improve performance, especially across databases, as no conversion of time zones will be required.
    See Also:

    Oracle9i Database Reference for information on the dynamic performance views

Oracle normalizes all TIMESTAMP WITH LOCAL TIME ZONE data to the time zone of the database when the data is stored on disk. If you do not specify the SET TIME_ZONE clause, Oracle uses the operating system's time zone of the server. If the operating system time zone is not a valid Oracle time zone, the database time zone defaults to UTC.

Examples

Creating a Database: Example

The following statement creates a database and fully specifies each argument:

CREATE DATABASE sample
   CONTROLFILE REUSE
   LOGFILE
      GROUP 1 ('diskx:log1.log', 'disky:log1.log') SIZE 50K,
      GROUP 2 ('diskx:log2.log', 'disky:log2.log') SIZE 50K
   MAXLOGFILES 5
   MAXLOGHISTORY 100
   MAXDATAFILES 10
   MAXINSTANCES 2
   ARCHIVELOG
   CHARACTER SET AL32UTF8
   NATIONAL CHARACTER SET AL16UTF16
   DATAFILE
      'disk1:df1.dbf' AUTOEXTEND ON,
      'disk2:df2.dbf' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
   DEFAULT TEMPORARY TABLESPACE temp_ts
   UNDO TABLESPACE undo_ts
   SET TIME_ZONE = '+02:00';

This example assumes that you have enabled Oracle-managed files by specifying a value for the DB_CREATE_FILE_DEST parameter in your initialization parameter file. Therefore no file specification is needed for the DEFAULT TEMPORARY TABLESPACE and UNDO TABLESPACE clauses.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 6 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE DATABASE LINK

Purpose

Use the CREATE DATABASE LINK statement to create a database link. A database link is a schema object in one database that enables you to access objects on another database. The other database need not be an Oracle system. However, to access non-Oracle systems you must use Oracle Heterogeneous Services.

Once you have created a database link, you can use it to refer to tables and views on the other database. In SQL statements, you can refer to a table or view on the other database in by appending @dblink to the table or view name. You can query a table or view on the other database with the SELECT statement. You can also access remote tables and views using any INSERT, UPDATE, DELETE, or LOCK TABLE statement.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for information about accessing remote tables or views with PL/SQL functions, procedures, packages, and datatypes
  • Oracle9i Database Administrator's Guide for information on distributed database systems
  • Oracle9i Database Reference for descriptions of existing database links in the ALL_DB_LINKS, DBA_DB_LINKS, and USER_DB_LINKS data dictionary views and to monitor the performance of existing links through the V$DBLINK dynamic performance view
  • DROP DATABASE LINK for information on dropping existing database links
  • INSERT , UPDATE , DELETE , and LOCK TABLE for using links in DML operations

Prerequisites

To create a private database link, you must have CREATE DATABASE LINK system privilege. To create a public database link, you must have CREATE PUBLIC DATABASE LINK system privilege. Also, you must have CREATE SESSION privilege on the remote Oracle database.

Oracle Net must be installed on both the local and remote Oracle databases.

Syntax

create_database_link::=

Text description of statements_59.gif follows
Text description of create_database_link

authenticated_clause::=

Text description of statements_510.gif follows
Text description of authenticated_clause

Keyword and Parameters

SHARED

Specify SHARED to use a single network connection to create a public database link that can be shared among multiple users.

See Also:

Oracle9i Heterogeneous Connectivity Administrator's Guide for more information about shared database links

PUBLIC

Specify PUBLIC to create a public database link available to all users. If you omit this clause, the database link is private and is available only to you.

See Also:

"Defining a Public Database Link: Example"

dblink

Specify the complete or partial name of the database link. If you specify only the database name, Oracle will implicitly append the database domain of the local database.

If the value of the GLOBAL_NAMES initialization parameter is TRUE, then the database link must have the same name as the database to which it connects. If the value of GLOBAL_NAMES is FALSE, and if you have changed the global name of the database, then you can specify the global name.

The maximum number of database links that can be open in one session or one instance of a Real Application Clusters configuration depends on the value of the OPEN_LINKS and OPEN_LINKS_PER_INSTANCE initialization parameters.

Restriction on Creating Database Links

You cannot create a database link in another user's schema, and you cannot qualify dblink with the name of a schema. (Periods are permitted in names of database links, so Oracle interprets the entire name, such as ralph.linktosales, as the name of a database link in your schema rather than as a database link named linktosales in the schema ralph.)

See Also:
  • "Referring to Objects in Remote Databases" for guidelines for naming database links
  • Oracle9i Database Reference for information on the GLOBAL_NAMES, OPEN_LINKS, and OPEN_LINKS_PER_INSTANCE initialization parameters
  • "RENAME GLOBAL_NAME Clause" (an ALTER DATABASE clause) for information on changing the database global name

CONNECT TO Clause

The CONNECT TO clause lets you enable a connection to the remote database.

CURRENT_USER Clause

Specify CURRENT_USER to create a current user database link. The current user must be a global user with a valid account on the remote database for the link to succeed.

If the database link is used directly, that is, not from within a stored object, then the current user is the same as the connected user.

When executing a stored object (such as a procedure, view, or trigger) that initiates a database link, CURRENT_USER is the username that owns the stored object, and not the username that called the object. For example, if the database link appears inside procedure scott.p (created by scott), and user jane calls procedure scott.p, the current user is scott.

However, if the stored object is an invoker-rights function, procedure, or package, the invoker's authorization ID is used to connect as a remote user. For example, if the privileged database link appears inside procedure scott.p (an invoker-rights procedure created by scott), and user Jane calls procedure scott.p, then CURRENT_USER is jane and the procedure executes with Jane's privileges.

See Also:
  • CREATE FUNCTION for more information on invoker-rights functions
  • "FOR oe.employees@remote.us.oracle.com;"
user IDENTIFIED BY password

Specify the username and password used to connect to the remote database using a fixed user database link. If you omit this clause, the database link uses the username and password of each user who is connected to the database. This is called a connected user database link.

See Also:

"Defining a Fixed-User Database Link: Example"

authenticated_clause

Specify the username and password on the target instance. This clause authenticates the user to the remote server and is required for security. The specified username and password must be a valid username and password on the remote instance. The username and password are used only for authentication. No other operations are performed on behalf of this user.

You must specify this clause when using the SHARED clause.

USING 'connect string'

Specify the service name of a remote database. If you specify only the database name, then Oracle implicitly appends the database domain to the connect string to create a complete service name. Therefore, if the database domain of the remote database is different from that of the current database, you must specify the complete service name.

See Also:

Oracle9i Database Administrator's Guide for information on specifying remote databases

Examples

The examples that follow assume two databases, one with the database name "local" and the other with the database name "remote". The examples use the Oracle domain. Your database domain will be different.

Defining a Public Database Link: Example

The following statement defines a shared public database link named remote that refers to the database specified by the service name 'sales':

CREATE PUBLIC DATABASE LINK remote
   USING 'remote';

This database link allows user hr on the local database to update a table on the remote database (assuming hr has appropriate privileges):

UPDATE employees@remote
   SET salary=salary*1.1
   WHERE last_name = 'Baer';
Defining a Fixed-User Database Link: Example

In the following statement, user hr on the remote database defines a fixed-user database link named local to the hr schema on the local database:

CREATE DATABASE LINK local
   CONNECT TO hr IDENTIFIED BY hr
   USING 'local';

Once this database link is created, hr can query tables in the schema hr on the local database in this manner:

SELECT * FROM employees@local;

User hr can also use DML statements to modify data on the local database:

INSERT INTO employees@local
   (employee_id, last_name, email, hire_date, job_id)
   VALUES (999, 'Claus', 'sclaus@oracle.com', SYSDATE, 'SH_CLERK');

UPDATE jobs@local SET min_salary = 3000
   WHERE job_id = 'SH_CLERK';

DELETE FROM employees@local
   WHERE employee_id = 999;

Using this fixed database link, user hr on the remote database can also access tables owned by other users on the same database. This statement assumes that user hr has SELECT privileges on the oe.customers table. The statement connects to the user hr on the local database and then queries oe's customers table. :

SELECT * FROM oe.customers@local;
Defining a CURRENT_USER Database Link: Example

The following statement defines a current-user database link using the to the remote database, using the entire service name as the link name:

CREATE DATABASE LINK remote.us.oracle.com
   CONNECT TO CURRENT_USER
   USING 'remote';

The user who issues this statement must be a global user registered with the LDAP directory service.

You can create a synonym to hide the fact that a particular table is on the remote database. The following statement causes all future references to emp_table to access the employees table owned by hr on the remote database:

CREATE SYNONYM emp_table
   FOR oe.employees@remote.us.oracle.com;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 7 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE DIMENSION

Purpose

Use the CREATE DIMENSION statement to create a dimension. A dimension defines a parent-child relationship between pairs of column sets, where all the columns of a column set must come from the same table. However, columns in one column set (or "level") can come from a different table than columns in another set. The optimizer uses these relationships with materialized views to perform query rewrite. The Summary Advisor uses these relationships to recommend creation of specific materialized views.

Note:

Oracle does not automatically validate the relationships you declare when creating a dimension. To validate the relationships specified in the hierarchy_clause and the join_clause of CREATE DIMENSION, you must run the DBMS_OLAP.validate_dimension procedure.
See Also:
  • CREATE MATERIALIZED VIEW for more information on materialized views
  • Oracle9i Data Warehousing Guide for more information on query rewrite, the optimizer and the Summary Advisor
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_OLAP.validate_dimension procedure

Prerequisites

To create a dimension in your own schema, you must have the CREATE DIMENSION system privilege. To create a dimension in another user's schema, you must have the CREATE ANY DIMENSION system privilege. In either case, you must have the SELECT object privilege on any objects referenced in the dimension.

Syntax

create_dimension::=

Text description of statements_512.gif follows
Text description of create_dimension

level_clause::=

Text description of statements_513.gif follows
Text description of level_clause

hierarchy_clause::=

Text description of statements_514.gif follows
Text description of hierarchy_clause

join_clause::=

Text description of statements_515.gif follows
Text description of join_clause

attribute_clause::=

Text description of statements_516.gif follows
Text description of attribute_clause

Semantics

schema

Specify the schema in which the dimension will be created. If you do not specify schema, Oracle creates the dimension in your own schema.

dimension

Specify the name of the dimension. The name must be unique within its schema.

level_clause

The level_clause defines a level in the dimension. A level defines dimension hierarchies and attributes.

level

Specify the name of the level

level_table . level_column

Specify the columns in the level. You can specify up to 32 columns. The tables you specify in this clause must already exist.

Restrictions on Level Columns
  • All of the columns in a level must come from the same table.
  • If columns in different levels come from different tables, then you must specify the join_clause.
  • The set of columns you specify must be unique to this level.
  • The columns you specify cannot be specified in any other dimension.
  • Each level_column must be non-null. (However, these columns need not have NOT NULL constraints.)

hierarchy_clause

The hierarchy_clause defines a linear hierarchy of levels in the dimension. Each hierarchy forms a chain of parent-child relationships among the levels in the dimension. Hierarchies in a dimension are independent of each other. They may (but need not) have columns in common.

Each level in the dimension should be specified at most once in this clause, and each level must already have been named in the level_clause.

hierarchy

Specify the name of the hierarchy. This name must be unique in the dimension.

child_level

Specify the name of a level that has an n:1 relationship with a parent level: the level_columns of child_level cannot be null, and each child_level value uniquely determines the value of the next named parent_level.

If the child level_table is different from the parent level_table, you must specify a join relationship between them in the join_clause.

parent_level

Specify the name of a level.

join_clause

The join_clause lets you specify an inner equijoin relationship for a dimension whose columns are contained in multiple tables. This clause is required and permitted only when the columns specified in the hierarchy are not all in the same table.

child_key_column

Specify one or more columns that are join-compatible with columns in the parent level.

If you do not specify the schema and table of each child_column, the schema and table are inferred from the CHILD OF relationship in the hierarchy_clause. If you do specify the schema and column of a child_key_column, the schema and table must match the schema and table of columns in the child of parent_level in the hierarchy_clause.

parent_level

Specify the name of a level.

Restrictions on Join Dimensions
  • You can specify only one join_clause for a given pair of levels in the same hierarchy.
  • The child_key_columns must be non-null and the parent key must be unique and non-null. You need not define constraints to enforce these conditions, but queries may return incorrect results if these conditions are not true.
  • Each child key must join with a key in the parent_level table.
  • Self-joins are not permitted. That is, the child_key_columns cannot be in the same table as parent_level.
  • All of the child-key columns must come from the same table.
  • The number of child-key columns must match the number of columns in parent_level, and the columns must be joinable.
  • Do not specify multiple child key columns unless the parent level consists of multiple columns.

attribute_clause

The attribute_clause lets you specify the columns that are uniquely determined by a hierarchy level. The columns in level must all come from the same table as the dependent_columns. The dependent_columns need not have been specified in the level_clause.

For example, if the hierarchy levels are city, state, and country, then city might determine mayor, state might determine governor, and country might determine president.

Examples

Creating a Dimension: Example

This statement was used to create the customers_dim dimension in the sample schema sh:

CREATE DIMENSION customers_dim
   LEVEL customer   IS (customers.cust_id)
   LEVEL city       IS (customers.cust_city)
   LEVEL state      IS (customers.cust_state_province)
   LEVEL country    IS (countries.country_id)
   LEVEL subregion  IS (countries.country_subregion)
   LEVEL region     IS (countries.country_region)
   HIERARCHY geog_rollup (
      customer      CHILD OF
      city          CHILD OF
      state         CHILD OF
      country       CHILD OF
      subregion     CHILD OF
      region
   JOIN KEY (customers.country_id) REFERENCES country
   )
   ATTRIBUTE customer DETERMINES
   (cust_first_name, cust_last_name, cust_gender,
    cust_marital_status, cust_year_of_birth,
    cust_income_level, cust_credit_limit)
   ATTRIBUTE country DETERMINES (countries.country_name)
;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 8 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE DIRECTORY

Purpose

Use the CREATE DIRECTORY statement to create a directory object. A directory object specifies an alias for a directory on the server's file system where external binary file LOBs (BFILEs) and external table data are located. You can use directory names when referring to BFILEs in your PL/SQL code and OCI calls, rather than hard coding the operating system path name, thereby providing greater file management flexibility.

All directories are created in a single namespace and are not owned by an individual's schema. You can secure access to the BFILEs stored within the directory structure by granting object privileges on the directories to specific users.

See Also:
  • "Large Object (LOB) Datatypes" for more information on BFILE objects
  • GRANT for more information on granting object privileges
  • external_table_clause of CREATE TABLE

Prerequisites

You must have CREATE ANY DIRECTORY system privileges to create directories.

When you create a directory, you are automatically granted the READ and WRITE object privileges on the directory, and you can grant these privileges to other users and roles. The DBA can also grant these privileges to other users and roles.

WRITE privileges on a directory are useful in connection with external tables. They let the grantee determine whether the external table agent can write a log file or a bad file to the directory.

You must also create a corresponding operating system directory for file storage. Your system or database administrator must ensure that the operating system directory has the correct read and write permissions for Oracle processes.

Privileges granted for the directory are created independently of the permissions defined for the operating system directory. Therefore, the two may or may not correspond exactly. For example, an error occurs if sample user hr is granted READ privilege on the directory schema object but the corresponding operating system directory does not have READ permission defined for Oracle processes.

Syntax

create_directory::=

Text description of statements_517.gif follows
Text description of create_directory

Semantics

OR REPLACE

Specify OR REPLACE to re-create the directory database object if it already exists. You can use this clause to change the definition of an existing directory without dropping, re-creating, and regranting database object privileges previously granted on the directory.

Users who had previously been granted privileges on a redefined directory can still access the directory without being regranted the privileges.

See Also:

DROP DIRECTORY for information on removing a directory from the database

directory

Specify the name of the directory object to be created. The maximum length of directory is 30 bytes. You cannot qualify a directory object with a schema name.

Note:

Oracle does not verify that the directory you specify actually exists. Therefore, take care that you specify a valid directory in your operating system. In addition, if your operating system uses case-sensitive path names, be sure you specify the directory in the correct format. (However, you need not include a trailing slash at the end of the path name.)

'path_name'

Specify the full path name of the operating system directory on the server where the files are located. The single quotes are required, with the result that the path name is case sensitive.

Example

Creating a Directory: Examples

The following statement creates a directory database object that points to a directory on the server:

CREATE DIRECTORY admin AS 'oracle/admin';

The following statement redefines directory database object bfile_dir to enable access to BFILEs stored in the operating system directory /private1/lob/files:

CREATE OR REPLACE DIRECTORY bfile_dir AS '/private1/LOB/files';
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 9 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE FUNCTION

Purpose

Use the CREATE FUNCTION statement to create a standalone stored function or a call specification. (You can also create a function as part of a package using the CREATE PACKAGE statement.)

A stored function (also called a user function) is a set of PL/SQL statements you can call by name. Stored functions are very similar to procedures, except that a function returns a value to the environment in which it is called. User functions can be used as part of a SQL expression.

A call specification declares a Java method or a third-generation language (3GL) routine so that it can be called from SQL and PL/SQL. The call specification tells Oracle which Java method, or which named function in which shared library, to invoke when a call is made. It also tells Oracle what type conversions to make for the arguments and return value.

See Also:
  • CREATE PROCEDURE for a general discussion of procedures and functions
  • "Examples" for examples of creating functions
  • CREATE PACKAGE for information on creating packages
  • ALTER FUNCTION for information on modifying a function
  • CREATE LIBRARY for information on shared libraries
  • DROP FUNCTION for information on dropping a standalone function
  • Oracle9i Application Developer's Guide - Fundamentals for more information about registering external functions

Prerequisites

Before a stored function can be created, the user SYS must run a SQL script that is commonly called DBMSSTDX.SQL. The exact name and location of this script depend on your operating system.

To create a function in your own schema, you must have the CREATE PROCEDURE system privilege. To create a function in another user's schema, you must have the CREATE ANY PROCEDURE system privilege. To replace a function in another user's schema, you must have the ALTER ANY PROCEDURE system privilege.

To invoke a call specification, you may need additional privileges (for example, EXECUTE privileges on C library for a C call specification).

To embed a CREATE FUNCTION statement inside an Oracle precompiler program, you must terminate the statement with the keyword END-EXEC followed by the embedded SQL statement terminator for the specific language.

See Also:

PL/SQL User's Guide and Reference or Oracle9i Java Stored Procedures Developer's Guide for more information on such prerequisites

Syntax

create_function::=

Text description of statements_518.gif follows
Text description of create_function

(invoker_rights_clause::= , parallel_enable_clause::=)

invoker_rights_clause::=

Text description of statements_519.gif follows
Text description of invoker_rights_clause

parallel_enable_clause::=

Text description of statements_547.gif follows
Text description of parallel_enable_clause

streaming_clause::=

Text description of statements_548.gif follows
Text description of streaming_clause

call_spec::=

Text description of statements_523.gif follows
Text description of call_spec

Java_declaration::=

Text description of statements_521.gif follows
Text description of Java_declaration

C_declaration::=

Text description of statements_522.gif follows
Text description of C_declaration

Semantics

OR REPLACE

Specify OR REPLACE to re-create the function if it already exists. Use this clause to change the definition of an existing function without dropping, re-creating, and regranting object privileges previously granted on the function. If you redefine a function, Oracle recompiles it.

Users who had previously been granted privileges on a redefined function can still access the function without being regranted the privileges.

If any function-based indexes depend on the function, Oracle marks the indexes DISABLED.

See Also:

ALTER FUNCTION for information on recompiling functions

schema

Specify the schema to contain the function. If you omit schema, Oracle creates the function in your current schema.

function

Specify the name of the function to be created. If creating the function results in compilation errors, Oracle returns an error. You can see the associated compiler error messages with the SHOW ERRORS command.

Restrictions on User-defined Functions

User-defined functions cannot be used in situations that require an unchanging definition. Thus, you cannot use user-defined functions:

  • In a CHECK constraint clause of a CREATE TABLE or ALTER TABLE statement
  • In a DEFAULT clause of a CREATE TABLE or ALTER TABLE statement

In addition, when a function is called from within a query or DML statement, the function cannot:

  • Have OUT or IN OUT parameters
  • Commit or roll back the current transaction, create a savepoint or roll back to a savepoint, or alter the session or the system. DDL statements implicitly commit the current transaction, so a user-defined function cannot execute any DDL statements.
  • Write to the database, if the function is being called from a SELECT statement. However, a function called from a subquery in a DML statement can write to the database.
  • Write to the same table that is being modified by the statement from which the function is called, if the function is called from a DML statement.

Except for the restriction on OUT and IN OUT parameters, Oracle enforces these restrictions not only for the function called directly from the SQL statement, but also for any functions that function calls, and on any functions called from the SQL statements executed by that function or any function it calls.

See Also:

"Creating a Function: Examples"

argument

Specify the name of an argument to the function. If the function does not accept arguments, you can omit the parentheses following the function name.

Restriction on Function Arguments

If you are creating an aggregate function, you can specify only one argument.

IN

Specify IN to indicate that you must supply a value for the argument when calling the function. This is the default.

OUT

Specify OUT to indicate that the function will set the value of the argument.

IN OUT

Specify IN OUT to indicate that a value for the argument can be supplied by you and may be set by the function.

NOCOPY

Specify NOCOPY to instruct Oracle to pass this argument as fast as possible. This clause can significantly enhance performance when passing a large value like a record, an index-by table, or a varray to an OUT or IN OUT parameter. (IN parameter values are always passed NOCOPY.)

  • When you specify NOCOPY, assignments made to a package variable may show immediately in this parameter (or assignments made to this parameter may show immediately in a package variable) if the package variable is passed as the actual assignment corresponding to this parameter.
  • Similarly, changes made either to this parameter or to another parameter may be visible immediately through both names if the same variable is passed to both.
  • If the procedure is exited with an unhandled exception, any assignment made to this parameter may be visible in the caller's variable.

These effects may or may not occur on any particular call. You should use NOCOPY only when these effects would not matter.

RETURN Clause

For datatype, specify the datatype of the function's return value. Because every function must return a value, this clause is required. The return value can have any datatype supported by PL/SQL.

Note:

Oracle SQL does not support calling of functions with boolean parameters or returns. Therefore, if your user-defined functions will be called from SQL statements, you must design them to return numbers (0 or 1) or character strings ('TRUE' or 'FALSE').

The datatype cannot specify a length, precision, or scale. Oracle derives the length, precision, or scale of the return value from the environment from which the function is called.

If the return type is SYS.AnyDataSet and you intend to use the function in the FROM clause of a query, then you must also specify the PIPELINED clause and define a describe method (ODCITableDescribe) as part of the implementation type of the function.

See Also:
  • PL/SQL User's Guide and Reference for information on PL/SQL datatypes
  • Oracle9i Data Cartridge Developer's Guide for information on defining the ODCITableDescribe function

invoker_rights_clause

The invoker_rights_clause lets you specify whether the function executes with the privileges and in the schema of the user who owns it or with the privileges and in the schema of CURRENT_USER.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the function.

AUTHID Clause
  • Specify CURRENT_USER if you want the function to execute with the privileges of CURRENT_USER. This clause creates an invoker-rights function.

    This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the function resides.

  • Specify DEFINER if you want the function to execute with the privileges of the owner of the schema in which the function resides, and that external names resolve in the schema where the function resides. This is the default and creates a defined-rights function.

    See Also:
    • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined
    • PL/SQL User's Guide and Reference

DETERMINISTIC Clause

Specify DETERMINISTIC to indicate that the function returns the same result value whenever it is called with the same values for its arguments.

You must specify this keyword if you intend to call the function in the expression of a function-based index or from the query of a materialized view that is marked REFRESH FAST or ENABLE QUERY REWRITE. When Oracle encounters a deterministic function in one of these contexts, it attempts to use previously calculated results when possible rather than re-executing the function.

Do not specify this clause to define a function that uses package variables or that accesses the database in any way that might affect the function's return result. The results of doing so will not be captured if Oracle chooses not to reexecute the function.

The following semantic rules govern the use of the DETERMINISTIC clause:

  • You can declare a top-level subprogram DETERMINISTIC.
  • You can declare a package-level subprogram DETERMINISTIC in the package specification, but not in the package body.
  • You cannot declare DETERMINISTIC a private subprogram (declared inside another subprogram or inside a package body).
  • A DETERMINISTIC subprogram can call another subprogram whether the called program is declared DETERMINISTIC or not.

    See Also:
    • Oracle9i Data Warehousing Guide for information on materialized views
    • CREATE INDEX for information on function-based indexes

parallel_enable_clause

PARALLEL_ENABLE is an optimization hint indicating that the function can be executed from a parallel execution server of a parallel query operation. The function should not use session state, such as package variables, as those variables may not be shared among the parallel execution servers.

  • The optional PARTITION argument BY clause is used only with functions that have a REF CURSOR argument type. It lets you define the partitioning of the inputs to the function from the REF CURSOR argument.

    Partitioning the inputs to the function affects the way the query is parallelized when the function is used as a table function (that is, in the FROM clause of the query). ANY indicates that the data can be partitioned randomly among the parallel execution servers. Alternatively, you can specify RANGE or HASH partitioning on a specified column list.

  • The optional streaming_clause lets you order or cluster the parallel processing by a specified column list.
    • ORDER BY indicates that the rows on a parallel execution server must be locally ordered.
    • CLUSTER BY indicates that the rows on a parallel execution server must have the same key values as specified by the column_list.

The columns specified in all of these optional clauses refer to columns that are returned by the REF CURSOR argument of the function.

See Also:

Oracle9i Application Developer's Guide - Fundamentals, Oracle9i Data Cartridge Developer's Guide, and PL/SQL User's Guide and Reference for more information on user-defined aggregate functions

PIPELINED Clause

Use PIPELINED to instruct Oracle to return the results of a table function iteratively. A table function returns a collection type (a nested table or varray). You query table functions by using the TABLE keyword before the function name in the FROM clause of the query. For example:

SELECT * FROM TABLE(function_name(...))

Oracle then returns rows as they are produced by the function.

  • If you specify the keyword PIPELINED alone (PIPELINED IS ...), the PL/SQL function body should use the PIPE keyword. This keyword instructs Oracle to return single elements of the collection out of the function, instead of returning the whole collection as a single value.
  • You can specify PIPELINED USING implementation_type clause if you want to predefine an interface containing the start, fetch, and close operations. The implementation type must implement the ODCITable interface, and must exist at the time the table function is created. This clause is useful for table functions that will be implemented in external languages such as C++ and Java.

    If the return type of the function is SYS.AnyDataSet, then you must also define a describe method (ODCITableDescribe) as part of the implementation type of the function.

    See Also:
    • PL/SQL User's Guide and Reference and Oracle9i Application Developer's Guide - Fundamentals for more information on table functions
    • Oracle9i Data Cartridge Developer's Guide for information on ODCI routines

AGGREGATE USING Clause

Specify AGGREGATE USING to identify this function as an aggregate function, or one that evaluates a group of rows and returns a single row. You can specify aggregate functions in the SELECT list, HAVING clause, and ORDER BY clause.

Note:

When you specify a user-defined aggregate function in a query, you can treat it as an analytic function (one that operates on a query result set). To do so, use the OVER analytic_clause syntax available for built-in analytic functions. See "Analytic Functions" for syntax and semantics.

In the USING clause, specify the name of the implementation type of the function. The implementation type must be an object type containing the implementation of the ODCIAggregate routines. If you do not specify schema, Oracle assumes that the implementation type is in your own schema.

Restriction on Creating Aggregate Functions

If you specify this clause, you can specify only one input argument for the function.

See Also:

Oracle9i Data Cartridge Developer's Guide for information on ODCI routines and "Creating Aggregate Functions: Example"

IS | AS Clause

Use the appropriate part of this clause to declare the body of the function.

pl/sql_subprogram_body

Use the pl/sql_subprogram_body to declare the function in a PL/SQL subprogram body.

See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information on PL/SQL subprograms and "Using a Packaged Procedure in a Function: Example"

call_spec

Use the call_spec to map a Java or C method name, parameter types, and return type to their SQL counterparts. In Java_declaration, 'string' identifies the Java implementation of the method.

See Also:
  • Oracle9i Java Stored Procedures Developer's Guide
  • Oracle9i Application Developer's Guide - Fundamentals for an explanation of the parameters and semantics of theC_declaration
AS EXTERNAL

AS EXTERNAL is an alternative way of declaring a C method. This clause has been deprecated and is supported for backward compatibility only. Oracle Corporation recommends that you use the AS LANGUAGE C syntax.

Examples

Creating a Function: Examples

The following statement creates the function get_bal on the sample table oe.orders (the PL/SQL is in italics):

CREATE FUNCTION get_bal(acc_no IN NUMBER)
   RETURN NUMBER
   IS acc_bal NUMBER(11,2);
 BEGIN
    SELECT order_total
    INTO acc_bal
    FROM orders
    WHERE customer_id = acc_no;
    RETURN(acc_bal);
  END;
/

The get_bal function returns the balance of a specified account.

When you call the function, you must specify the argument acc_no, the number of the account whose balance is sought. The datatype of acc_no is NUMBER.

The function returns the account balance. The RETURN clause of the CREATE FUNCTION statement specifies the datatype of the return value to be NUMBER.

The function uses a SELECT statement to select the balance column from the row identified by the argument acc_no in the orders table. The function uses a RETURN statement to return this value to the environment in which the function is called.

The function created in the preceding example can be used in a SQL statement. For example:

SELECT get_bal(165) FROM DUAL;

GET_BAL(165)
------------
        2519

The following statement creates PL/SQL standalone function get_val that registers the C routine c_get_val as an external function. (The parameters have been omitted from this example; the PL/SQL is in italics.)

CREATE FUNCTION get_val
   ( x_val IN NUMBER,
    y_val IN NUMBER,
    image IN LONG RAW )
   RETURN BINARY_INTEGER AS LANGUAGE C
     NAME "c_get_val"
    LIBRARY c_utils
    PARAMETERS (...);
Creating Aggregate Functions: Example

The next statement creates an aggregate function called SecondMax to aggregate over number values. It assumes that the object type SecondMaxImpl routines contains the implementations of the ODCIAggregate routines:

CREATE FUNCTION SecondMax (input NUMBER) RETURN NUMBER
    PARALLEL_ENABLE AGGREGATE USING SecondMaxImpl;
See Also:

Oracle9i Data Cartridge Developer's Guide for the complete implementation of type and type body for SecondMaxImpl

You would use such an aggregate function in a query like the following statement, which queries the sample table hr.employees:

SELECT SecondMax(salary), department_id
      FROM employees
      GROUP BY department_id
      HAVING SecondMax(salary) > 9000;

SECONDMAX(SALARY) DEPARTMENT_ID
----------------- -------------
            13500            80
            17000            90
Using a Packaged Procedure in a Function: Example

The following statement creates a function that uses a DBMS_LOB procedure to return the length of a CLOB column:

CREATE OR REPLACE FUNCTION text_length(a CLOB)
   RETURN NUMBER DETERMINISTIC IS
BEGIN
  RETURN DBMS_LOB.GETLENGTH(a);
END;
See Also:

"Creating a Function-Based Index on a LOB Column: Example" to see how to use this function to create a function-based index
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 10 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE INDEX

Purpose

Use the CREATE INDEX statement to create an index on

  • One or more columns of a table, a partitioned table, an index-organized table, or a cluster
  • One or more scalar typed object attributes of a table or a cluster
  • A nested table storage table for indexing a nested table column

An index is a schema object that contains an entry for each value that appears in the indexed column(s) of the table or cluster and provides direct, fast access to rows. Oracle supports several types of index:

  • Normal indexes (by default, Oracle creates B-tree indexes)
  • Bitmap indexes, which store rowids associated with a key value as a bitmap
  • Partitioned indexes, which consist of partitions containing an entry for each value that appears in the indexed column(s) of the table
  • Function-based indexes, which are based on expressions. They enable you to construct queries that evaluate the value returned by an expression, which in turn may include functions (built-in or user-defined).
  • Domain indexes, which are instances of an application-specific index of type indextype

    See Also:
    • Oracle9i Database Concepts for a discussion of indexes
    • ALTER INDEX
    • DROP INDEX

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

To create an index in your own schema, one of the following conditions must be true:

  • The table or cluster to be indexed must be in your own schema.
  • You must have INDEX object privilege on the table to be indexed.
  • You must have CREATE ANY INDEX system privilege.

To create an index in another schema, you must have CREATE ANY INDEX system privilege. Also, the owner of the schema to contain the index must have either the UNLIMITED TABLESPACE system privilege or space quota on the tablespaces to contain the index or index partitions.

To create a domain index in your own schema, in addition to the prerequisites for creating a conventional index, you must also have EXECUTE privilege on the indextype. If you are creating a domain index in another user's schema, the index owner also must have EXECUTE privilege on the indextype and its underlying implementation type. Before creating a domain index, you should first define the indextype.

To create a function-based index in your own schema on your own table, in addition to the prerequisites for creating a conventional index, you must have the QUERY REWRITE system privilege. To create the index in another schema or on another schema's table, you must have the GLOBAL QUERY REWRITE privilege. In both cases, the table owner must also have the EXECUTE object privilege on the function(s) used in the function-based index. In addition, in order for Oracle to use function-based indexes in queries, the QUERY_REWRITE_ENABLED parameter must be set to TRUE, and the QUERY_REWRITE_INTEGRITY parameter must be set to TRUSTED.

See Also:

CREATE INDEXTYPE

Syntax

create_index::=

Text description of statements_527.gif follows
Text description of create_index

cluster_index_clause::=

Text description of statements_528.gif follows
Text description of cluster_index_clause

(index_attributes::= )

table_index_clause::=

Text description of statements_529.gif follows
Text description of table_index_clause

(global_partitioned_index::= , local_partitioned_index::= , index_attributes::= , domain_index_clause::= )

bitmap_join_index_clause::=

Text description of statements_525.gif follows
Text description of bitmap_join_index_clause

(local_partitioned_index::= , index_attributes::= )

index_expr::=

Text description of statements_530.gif follows
Text description of index_expr

index_attributes::=

Text description of statements_531.gif follows
Text description of index_attributes

(physical_attributes_clause::= , logging_clause::= , key_compression::= , parallel_clause::= )

physical_attributes_clause::=

Text description of statements_524.gif follows
Text description of physical_attributes_clause

(storage_clause::= )

logging_clause::=

Text description of statements_549.gif follows
Text description of logging_clause

key_compression::=

Text description of statements_550.gif follows
Text description of key_compression

domain_index_clause::=

Text description of statements_520.gif follows
Text description of domain_index_clause

(parallel_clause::= )

global_partitioned_index::=

Text description of statements_532.gif follows
Text description of global_partitioned_index

(index_partitioning_clause::= )

index_partitioning_clause::=

Text description of statements_533.gif follows
Text description of index_partitioning_clause

(segment_attributes_clause::= )

local_partitioned_index::=

Text description of statements_534.gif follows
Text description of local_partitioned_index

(on_range_partitioned_table::= , on_list_partitioned_table::= , on_hash_partitioned_table::= , on_comp_partitioned_table::= )

on_range_partitioned_table::=

Text description of statements_535.gif follows
Text description of on_range_partitioned_table

(segment_attributes_clause::= )

on_list_partitioned_table::=

Text description of statements_54.gif follows
Text description of on_list_partitioned_table

(segment_attributes_clause::= )

segment_attributes_clause::=

Text description of statements_536.gif follows
Text description of segment_attributes_clause

(physical_attributes_clause::= , logging_clause::=

on_hash_partitioned_table::=

Text description of statements_537.gif follows
Text description of on_hash_partitioned_table

on_comp_partitioned_table::=

Text description of statements_538.gif follows
Text description of on_comp_partitioned_table

(segment_attributes_clause::= , index_subpartition_clause::= )

index_subpartition_clause::=

Text description of statements_539.gif follows
Text description of index_subpartition_clause

parallel_clause::=

Text description of statements_540.gif follows
Text description of parallel_clause

(storage_clause )

Semantics

UNIQUE

Specify UNIQUE to indicate that the value of the column (or columns) upon which the index is based must be unique. If the index is local nonprefixed (see local_partitioned_index), then the index key must contain the partitioning key.

Restrictions on Unique Indexes
  • You cannot specify both UNIQUE and BITMAP.
  • You cannot specify UNIQUE for a domain index.

    See Also:

    constraints for information on integrity constraints

BITMAP

Specify BITMAP to indicate that index is to be created with a bitmap for each distinct key, rather than indexing each row separately. Bitmap indexes store the rowids associated with a key value as a bitmap. Each bit in the bitmap corresponds to a possible rowid, and if the bit is set, it means that the row with the corresponding rowid contains the key value. The internal representation of bitmaps is best suited for applications with low levels of concurrent transactions, such as data warehousing.

Note:

Oracle does not index table rows in which all key columns are null except in the case of bitmap indexes. Therefore, if you want an index on all rows of a table, you must either specify NOT NULL constraints for the index key columns or create a bitmap index.
Restrictions on Bitmap Indexes
  • You cannot specify BITMAP when creating a global partitioned index.
  • You cannot create a bitmap secondary index on an index-organized table unless the index-organized table has a mapping table associated with it.
  • You cannot specify both UNIQUE and BITMAP.
  • You cannot specify BITMAP for a domain index.

    See Also:
    • Oracle9i Database Concepts and Oracle9i Database Performance Tuning Guide and Reference for more information about using bitmap indexes
    • CREATE TABLE for information on mapping tables
    • "Bitmap Index Example"

schema

Specify the schema to contain the index. If you omit schema, Oracle creates the index in your own schema.

index

Specify the name of the index to be created.

See Also:

"Creating an Index: Example" and "Create an Index on an XMLType Table: Example"

cluster_index_clause

Use the cluster_index_clause to identify the cluster for which a cluster index is to be created. If you do not qualify cluster with schema, Oracle assumes the cluster is in your current schema. You cannot create a cluster index for a hash cluster.

See Also:

CREATE CLUSTER and "Creating a Cluster Index: Example"

table_index_clause

Specify the table (and its attributes) on which you are defining the index. If you do not qualify table with schema, Oracle assumes the table is contained in your own schema.

You create an index on a nested table column by creating the index on the nested table storage table. Include the NESTED_TABLE_ID pseudocolumn of the storage table to create a UNIQUE index, which effectively ensures that the rows of a nested table value are distinct.

See Also:

"Indexes on Nested Tables: Example"

Restrictions on the table_index_clause
  • If the index is locally partitioned, then table must be partitioned.
  • If the table is index-organized, this statement creates a secondary index. You cannot specify REVERSE for this secondary index, and the combined size of the index key and the logical rowid should be less than half the block size.
  • If table is a temporary table, the index will also be temporary with the same scope (session or transaction) as table. The following restrictions apply to indexes on temporary table:
    • The index cannot be a partitioned index or a domain index.
    • You cannot specify the physical_attributes_clause or the parallel_clause.
    • You cannot specify LOGGING, NOLOGGING, or TABLESPACE.

      Note:

      You can perform DDL operations (such as ALTER TABLE, DROP TABLE, CREATE INDEX) on a temporary table only when no session is bound to it. A session becomes bound to a temporary table by performing an INSERT operation on the table. A session becomes unbound to the temporary table by issuing a TRUNCATE statement or at session termination, or, for a transaction-specific temporary table, by issuing a COMMIT or ABORT statement.
      See Also:

      CREATE TABLE and Oracle9i Database Concepts for more information on temporary tables
t_alias

Specify a correlation name (alias) for the table upon which you are building the index.

Note:

This alias is required if the index_expr references any object type attributes or object type methods. See "Creating a Function-based Index on a Type Method: Example" and "Indexing on Substitutable Columns: Examples" .

index_expr

For index_expr, specify the column or column expression upon which the index is based.

column

Specify the name of a column in the table. A bitmap index can have a maximum of 30 columns. Other indexes can have as many as 32 columns.

You can create an index on a scalar object attribute column or on the system-defined NESTED_TABLE_ID column of the nested table storage table. If you specify an object attribute column, the column name must be qualified with the table name. If you specify a nested table column attribute, it must be qualified with the outermost table name, the containing column name, and all intermediate attribute names leading to the nested table column attribute.

Restriction on Index Columns

You cannot create an index on columns or attributes whose type is user-defined, LONG, LONG RAW, LOB, or REF, except that Oracle supports an index on REF type columns or attributes that have been defined with a SCOPE clause.

column_expression

Specify an expression built from columns of table, constants, SQL functions, and user-defined functions. When you specify column_expression, you create a function-based index.

See Also:

"Notes on Function-Based Indexes" , "Restrictions on Function-based Indexes" , and "Function-Based Index Examples"

Name resolution of the function is based on the schema of the index creator. User-defined functions used in column_expression are fully name resolved during the CREATE INDEX operation.

After creating a function-based index, collect statistics on both the index and its base table using the ANALYZE statement. Oracle cannot use the function-based index until these statistics have been generated.

See Also:

ANALYZE

Notes on Function-Based Indexes
  • When you subsequently query a table that uses a function-based index, you must ensure in the query that column_expression is not null. However, Oracle will use a function-based index in a query even if the columns specified in the WHERE clause are in a different order than their order in the column_expression that defined the function-based index.

    See Also:

    "Function-Based Index Examples"

  • If the function on which the index is based becomes invalid or is dropped, Oracle marks the index DISABLED. Queries on a DISABLED index fail if the optimizer chooses to use the index. DML operations on a DISABLED index fail unless the index is also marked UNUSABLE and the parameter SKIP_UNUSABLE_INDEXES is set to true.

    See Also:

    ALTER SESSION for more information on this parameter
  • Oracle's use of function-based indexes is also affected by the setting of the QUERY_REWRITE_ENABLED session parameter.

    See Also:

    ALTER SESSION

  • If a public synonym for a function, package, or type is used in column_expression, and later an actual object with the same name is created in the table owner's schema, then Oracle will disable the function-based index. When you subsequently enable the function-based index using ALTER INDEX ... ENABLE or ALTER INDEX ... REBUILD, the function, package, or type used in the column_expression will continue to resolve to the function, package, or type to which the public synonym originally pointed. It will not resolve to the new function, package, or type.
  • If the definition of a function-based index generates internal conversion to character data, use caution when changing NLS parameter settings. Function-based indexes use the current database settings for NLS parameters. If you reset these parameters at the session level, queries using the function-based index may return incorrect results. Two exceptions are the collation parameters (NLS_SORT and NLS_COMP). Oracle handles the conversions correctly even if these have been reset at the session level.
Restrictions on Function-based Indexes
  • Any user-defined function referenced in column_expression must be DETERMINISTIC.
  • For a function-based globally partitioned index, the column_expression cannot be the partitioning key.
  • column_expression can be any form of expression except a scalar subquery expression
  • All functions must be specified with parentheses, even if they have no parameters. Otherwise Oracle interprets them as column names.
  • Any function you specify in column_expression must return a repeatable value. For example, you cannot specify the SYSDATE or USER function or the ROWNUM pseudocolumn.
  • The column_expression cannot contain any aggregate functions.
  • You cannot create a function-based index on a nested table.

    See Also:

    CREATE FUNCTION and PL/SQL User's Guide and Reference
ASC | DESC

Use ASC or DESC to indicate whether the index should be created in ascending or descending order. Indexes on character data are created in ascending or descending order of the character values in the database character set.

Oracle treats descending indexes as if they were function-based indexes. You do not need the QUERY REWRITE or GLOBAL QUERY REWRITE privileges to create them, as you do with other function-based indexes. However, as with other function-based indexes, Oracle does not use descending indexes until you first analyze the index and the table on which the index is defined. See the column_expression clause of this statement.

Restriction on Ascending and Descending Indexes

You cannot specify either of these clauses for a domain index. You cannot specify DESC for a reverse index. Oracle ignores DESC if index is bitmapped or if the COMPATIBLE initialization parameter is set to a value less than 8.1.0.

index_attributes

Specify the index attributes using the clauses of index_attributes.

physical_attributes_clause

Use the physical_attributes_clause to establish values for physical and storage characteristics for the index.

If you omit this clause, Oracle uses the following default values:

  • PCTFREE: 10
  • INITRANS: 2
  • MAXTRANS: Depends on data block size
Restriction on Index Physical Attributes

You cannot specify the PCTUSED parameter for an index.

See Also:
  • physical_attributes_clause for a complete description of the parameters of this clause
  • storage_clause for a complete description of storage parameters, including default values
TABLESPACE

For tablespace, specify the name of the tablespace to hold the index, index partition, or index subpartition. If you omit this clause, Oracle creates the index in the default tablespace of the owner of the schema containing the index.

For a local index, you can specify the keyword DEFAULT in place of tablespace. New partitions or subpartitions added to the local index will be created in the same tablespace(s) as the corresponding partitions or subpartitions of the underlying table.

COMPRESS

Specify COMPRESS to enable key compression, which eliminates repeated occurrence of key column values and may substantially reduce storage. Use integer to specify the prefix length (number of prefix columns to compress).

  • For unique indexes, the valid range of prefix length values is from 1 to the number of key columns minus 1. The default prefix length is the number of key columns minus 1.
  • For nonunique indexes, the valid range of prefix length values is from 1 to the number of key columns. The default prefix length is the number of key columns.

    Oracle compresses only nonpartitioned indexes that are nonunique or unique indexes of at least two columns.

Restriction on Key Compression

You cannot specify COMPRESS for a bitmap index.

See Also:

"Compressing an Index: Example"

NOCOMPRESS

Specify NOCOMPRESS to disable key compression. This is the default.

SORT | NOSORT

By default, Oracle sorts indexes in ascending order when it creates the index. You can specify NOSORT to indicate to Oracle that the rows are already stored in the database in ascending order, so that Oracle does not have to sort the rows when creating the index. If the rows of the indexed column or columns are not stored in ascending order, Oracle returns an error. For greatest savings of sort time and space, use this clause immediately after the initial load of rows into a table. If you specify neither of these keywords, SORT is the default.

Restrictions on NOSORT
  • You cannot specify REVERSE with this clause.
  • You cannot use this clause to create a cluster, partitioned, or bitmap index.
  • You cannot specify this clause for a secondary index on an index-organized table.
REVERSE

Specify REVERSE to store the bytes of the index block in reverse order, excluding the rowid.

Restrictions on Reverse Indexes
  • You cannot specify NOSORT with this clause.
  • You cannot reverse a bitmap index or an index-organized table.
logging_clause

Specify whether the creation of the index will be logged (LOGGING) or not logged (NOLOGGING) in the redo log file. This setting also determines whether subsequent Direct Loader (SQL*Loader) and direct-path INSERT operations against the index are logged or not logged. LOGGING is the default.

If index is nonpartitioned, this clause specifies the logging attribute of the index.

If index is partitioned, this clause determines:

  • The default value of all partitions specified in the CREATE statement (unless you specify the logging_clause in the PARTITION description clause)
  • The default value for the segments associated with the index partitions
  • The default value for local index partitions or subpartitions added implicitly during subsequent ALTER TABLE ... ADD PARTITION operations

The logging attribute of the index is independent of that of its base table.

If you omit this clause, the logging attribute is that of the tablespace in which it resides.

See Also:
  • logging_clause for a full description of this clause
  • Oracle9i Database Concepts and Oracle9i Data Warehousing Guide for more information about logging and parallel DML
  • "Creating an Index in NOLOGGING Mode: Example"
ONLINE

Specify ONLINE to indicate that DML operations on the table will be allowed during creation of the index.

Restrictions on Online Index Building
  • Parallel DML is not supported during online index building. If you specify ONLINE and then issue parallel DML statements, Oracle returns an error.
  • You cannot specify ONLINE for a bitmap index or a cluster index.
  • You cannot specify ONLINE for a conventional index on a UROWID column.
  • For a unique index on an index-organized table, the number of index key columns plus the number of primary key columns in the index-organized table cannot exceed 32.

    See Also:

    Oracle9i Database Concepts for a description of online index building and rebuilding
COMPUTE STATISTICS

Specify COMPUTE STATISTICS to collect statistics at relatively little cost during the creation of an index. These statistics are stored in the data dictionary for ongoing use by the optimizer in choosing a plan of execution for SQL statements.

The types of statistics collected depend on the type of index you are creating.

Note:

If you create an index using another index (instead of a table), the original index might not provide adequate statistical information. Therefore, Oracle generally uses the base table to compute the statistics, which will improve the statistics but may negatively affect performance.

Additional methods of collecting statistics are available in PL/SQL packages and procedures.

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference and "Computing Index Statistics: Example"

parallel_clause

Specify the parallel_clause if you want creation of the index to be parallelized.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

Index Partitioning Clauses

Use the global_partitioned_index clause and the local_partitioned_index clauses to partition index.

Note:

The storage of partitioned database entities in tablespaces of different block sizes is subject to several restrictions. Please refer to Oracle9i Database Administrator's Guide for a discussion of these restrictions.
See Also:

"Partitioned Index Examples"

global_partitioned_index

The global_partitioned_index clause lets you specify that the partitioning of the index is user defined and is not equipartitioned with the underlying table. By default, nonpartitioned indexes are global indexes. Oracle will partition the global index on the ranges of values from the table columns you specify in column_list. You cannot specify this clause for a local index.

The column_list must specify a left prefix of the index column list. That is, if the index is defined on columns a, b, and c, then for column_list you can specify (a, b, c), or (a, b), or (a, c), but you cannot specify (b, c) or (c) or (b, a).

Restrictions on the Global Partitioned Index Key
  • You cannot specify more than 32 columns in column_list.
  • The columns cannot contain the ROWID pseudocolumn or a column of type ROWID.

    Note:

    If your enterprise has or will have databases using different character sets, use caution when partitioning on character columns. The sort sequence of characters is not identical in all character sets.
    See Also:

    Oracle9i Database Globalization Support Guide for more information on character set support
index_partitioning_clause

Use this clause to describe the individual index partitions. The number of repetitions of this clause determines the number of partitions. If you omit partition, Oracle generates a name with the form SYS_P n.

For VALUES LESS THAN (value_list), specify the (noninclusive) upper bound for the current partition in a global index. The value list is a comma-delimited, ordered list of literal values corresponding to the column list in the global_partitioned_index clause. Always specify MAXVALUE as the value of the last partition.

Note:

If the index is partitioned on a DATE column, and if the date format does not specify the first two digits of the year, you must use the TO_DATE function with a 4-character format mask for the year. The date format is determined implicitly by NLS_TERRITORY or explicitly by NLS_DATE_FORMAT.
See Also:
  • Oracle9i Database Globalization Support Guide for more information on these initialization parameters
  • "Range Partitioning Example"
local_partitioned_index

The local_partitioned_index clauses let you specify that the index is partitioned on the same columns, with the same number of partitions and the same partition bounds as table. Oracle automatically maintains LOCAL index partitioning as the underlying table is repartitioned.

on_range_partitioned_table

This clause lets you specify the names and attributes of index partitions on a range-partitioned table. If you specify this clause, then the number of PARTITION clauses must be equal to the number of table partitions, and in the same order. If you omit partition, then Oracle generates a name that is consistent with the corresponding table partition. If the name conflicts with an existing index partition name, then Oracle uses the form SYS_Pn.

on_list_partitioned_table

The on_list_partitioned_table clause is identical to on_range_partitioned_table .

on_hash_partitioned_table

This clause lets you specify names and tablespace storage for index partitions on a hash-partitioned table.

If you specify any PARTITION clauses, then the number of these clauses must be equal to the number of table partitions. If you omit partition, then Oracle generates a name that is consistent with the corresponding table partition. If the name conflicts with an existing index partition name, then Oracle uses the form SYS_Pn. You can optionally specify tablespace storage for one or more individual partitions. If you do not specify tablespace storage either here or in the STORE IN clause, then Oracle stores each index partition in the same tablespace as the corresponding table partition.

The STORE IN clause lets you specify one or more tablespaces across which Oracle will distribute all the index hash partitions. The number of tablespaces does not have to equal the number of index partitions. If the number of index partitions is greater than the number of tablespaces, Oracle cycles through the names of the tablespaces.

on_comp_partitioned_table

This clause lets you specify the name and tablespace storage of index partitions on a composite-partitioned table.

The STORE IN clause is valid only for range-hash composite-partitioned tables. It lets you specify one or more default tablespaces across which Oracle will distribute all index hash subpartitions. You can override this storage by specifying different tablespace storage for the subpartitions of an individual partition in the second STORE IN clause in the index_subpartition_clause.

For range-list composite-partitioned tables, you can specify default tablespace storage for the list subpartitions in the PARTITION clause. You can override this storage by specifying different tablespace storage for the list subpartitions of an individual partition in the SUBPARTITION clause of the index_subpartition_clause

index_subpartition_clause

This clause lets you specify names and tablespace storage for index hash subpartitions in a composite-partitioned table.

The STORE IN clause is valid only for hash subpartitions of a range-hash composite-partitioned table. It lets you specify one or more tablespaces across which Oracle will distribute all the index hash subpartitions. The SUBPARTITION clause is valid for subpartitions of both range-hash and range-list composite-partitioned tables.

If you specify any SUBPARTITION clauses, then the number of those clauses must be equal to the number of table subpartitions. If you omit subpartition, then Oracle generates a name that is consistent with the corresponding table subpartition. If the name conflicts with an existing index subpartition name, then Oracle uses the form SYS_SUBP n.

The number of tablespaces does not have to equal the number of index subpartitions. If the number of index subpartitions is greater than the number of tablespaces, Oracle cycles through the names of the tablespaces.

If you do not specify tablespace storage for subpartitions either in the on_comp_partitioned_table clause or in the index_subpartition_clause, then Oracle uses the tablespace specified for index. If you also do not specify tablespace storage for index, then Oracle stores the subpartition in the same tablespace as the corresponding table subpartition.

domain_index_clause

Use the domain_index_clause to indicate that index is a domain index, which is an instance of an application-specific index of type indextype.

Note:

Creating a domain index requires a number of preceding operations. You must first create an implementation type for an indextype. You must also create a functional implementation and then create an operator that uses the function. Next you create an indextype, which associates the implementation type with the operator. Finally, you create the domain index using this clause.

Appendix D, "Examples", contains an example of a simple domain index, including all of these operations. The examples are collected in one appendix because they would be difficult to follow if scattered throughout this reference under their appropriate SQL statements.

In the index_expr (in table_index_clause), specify the table columns or object attributes on which the index is defined. You can define multiple domain indexes on a single column only if the underlying indextypes are different and the indextypes support a disjoint set of user-defined operators.

Restrictions on Domain Indexes
  • The index_expr (in table_index_clause) can specify only a single column, and the column cannot be of datatype REF, varray, nested table, LONG, or LONG RAW.
  • You cannot specify a bitmap or unique domain index.
indextype

For indextype, specify the name of the indextype. This name should be a valid schema object that you have already defined.

Note:

If you have installed Oracle Text, you can use various built-in indextypes to create Oracle Text domain indexes. For more information on Oracle Text and the indexes it uses, please refer to Oracle Text Reference.
See Also:

CREATE INDEXTYPE

parallel_clause

Use the parallel_clause to parallelize creation of the domain index. For a nonpartitioned domain index, Oracle passes the explicit or default degree of parallelism to the ODCIIndexCreate cartridge routine, which in turn establishes parallelism for the index.

See Also:

Oracle9i Data Cartridge Developer's Guide for complete information on the ODCI routines
PARAMETERS

In the PARAMETERS clause, specify the parameter string that is passed uninterpreted to the appropriate ODCI indextype routine. The maximum length of the parameter string is 1000 characters.

When you specify this clause at the top level of the syntax, the parameters become the default parameters for the index partitions. If you specify this clause as part of the LOCAL [PARTITION] clause, you override any default parameters with parameters for the individual partition.

Once the domain index is created, Oracle invokes the appropriate ODCI routine. If the routine does not return successfully, the domain index is marked FAILED. The only operations supported on an failed domain index are DROP INDEX and (for non-local indexes) REBUILD INDEX.

See Also:

Oracle9i Data Cartridge Developer's Guide for information on these routines

bitmap_join_index_clause

Use the bitmap_join_index_clause to define a bitmap join index. A bitmap join index is defined on a single table. For an index key made up of dimension table columns, it stores the fact table rowids corresponding to that key. In a data warehousing environment, the table on which the index is defined is commonly referred to as a fact table, and the tables with which this table is joined are commonly referred to as dimension tables. However, a star schema is not a requirement for creating a join index.

ON

In the ON clause, first specify the fact table, and then inside the parentheses specify the columns of the dimension tables on which the index is defined.

FROM

In the FROM clause, specify the joined tables.

WHERE

In the WHERE clause, specify the join condition.

If the underlying fact table is partitioned, you must also specify one of the local_partitioned_index clauses (see local_partitioned_index ).

Restrictions on Bitmap Join Indexes

In addition to the restrictions on bitmap indexes in general (see BITMAP ), the following restrictions apply to bitmap join indexes:

  • You cannot create a bitmap join index on an index-organized table or a temporary table.
  • No table may appear twice in the FROM clause.
  • You cannot create a function-based join index.
  • The dimension table columns must be either primary key columns or have unique constraints.
  • If a dimension table has a composite primary key, each column in the primary key must be part of the join.
  • You cannot specify the local_index_clauses unless the fact table is partitioned.

    See Also:

    Oracle9i Data Warehousing Guide for information on fact and dimension tables and on using bitmap indexes in a data warehousing environment

Examples

General Index Examples
Creating an Index: Example

The following statement shows how the sample index ord_customer_ix on the customer_id column of the sample table oe.orders was created:

CREATE INDEX ord_customer_ix
   ON orders (customer_id);
Compressing an Index: Example

To create the ord_customer_ix index with the COMPRESS clause, you might issue the following statement:

CREATE INDEX ord_customer_ix_demo
   ON orders (customer_id, sales_rep_id)
   COMPRESS 1;

The index will compress repeated occurrences of customer_id column values.

Computing Index Statistics: Example

The following statement collects statistics on the ord_customer_ix_demo index during its creation:

CREATE INDEX ord_customer_ix_demo
   ON orders(customer_id, sales_rep_id)
   COMPUTE STATISTICS;

The type of statistics collected depends on the type of index you are creating.

Creating an Index in NOLOGGING Mode: Example

If the sample table orders had been created using a fast parallel load (so all rows were already sorted), you could issue the following statement to quickly create an index.

/* Unless you first sort the table oe.orders, this example fails
   because you cannot specify NOSORT unless the base table is
   already sorted.
*/
CREATE INDEX ord_customer_ix_demo
   ON orders (order_mode)
   NOSORT
   NOLOGGING;
Creating a Cluster Index: Example

To create an index for the personnel cluster, which was created in "Creating a Cluster: Example" , issue the following statement:

CREATE INDEX idx_personnel ON CLUSTER personnel;

No index columns are specified, because the index is automatically built on all the columns of the cluster key. For cluster indexes, all rows are indexed.

Create an Index on an XMLType Table: Example

The following example creates an index on the area element of the xwarehouses table (created in "XMLType Table Examples" ):

CREATE INDEX area_index ON xwarehouses e
   (EXTRACTVALUE(VALUE(e),'/Warehouse/Area'));

Such an index would greatly improve the performance of queries that select from the table based on, for example, the square footage of a warehouse, as shown in this statement:

SELECT e.getClobVal() AS warehouse
   FROM xwarehouses e
   WHERE EXISTSNODE(VALUE(e),'/Warehouse[Area>50000]') = 1;
See Also:

EXISTSNODE and VALUE

Function-Based Index Examples
Creating a Function-Based Index: Example

The following statement creates a function-based index on the employees table based on an uppercase evaluation of the last_name column:

CREATE INDEX upper_ix ON employees (UPPER(last_name));

See the "Prerequisites" for the privileges and parameter settings required when creating function-based indexes.

To ensure that Oracle will use the index rather than performing a full table scan, be sure that the value of the function is not null in subsequent queries. For example, this statement is guaranteed to use the index:

SELECT first_name, last_name
   FROM employees WHERE UPPER(last_name) IS NOT NULL
   ORDER BY UPPER(last_name);

However, without the WHERE clause, Oracle may perform a full table scan.

In the next statements showing index creation and subsequent query, Oracle will use index income_ix even though the columns are in reverse order in the query:

CREATE INDEX income_ix
   ON employees(salary + (salary*commission_pct));

SELECT first_name||' '||last_name "Name"
   FROM employees
   WHERE (salary*commission_pct) + salary > 15000;
Creating a Function-Based Index on a LOB Column: Example

The following statement uses the function created in "Using a Packaged Procedure in a Function: Example" to create a function-based index on a LOB column in the sample pm schema. The example then collects statistics on the function-based index and selects rows from the sample table print_media where that CLOB column has fewer than 1000 characters.

CREATE INDEX src_idx ON print_media(text_length(ad_sourcetext));

ANALYZE INDEX src_idx COMPUTE STATISTICS;

SELECT product_id FROM print_media
   WHERE text_length(ad_sourcetext) < 1000;

PRODUCT_ID
----------
      3060
      2056
      3106
      2268
Creating a Function-based Index on a Type Method: Example

This example entails an object type rectangle containing two number attributes: length and width. The area() method computes the area of the rectangle.

CREATE TYPE rectangle AS OBJECT
( length   NUMBER,
  width    NUMBER,
  MEMBER FUNCTION area RETURN NUMBER DETERMINISTIC
);

CREATE OR REPLACE TYPE BODY rectangle AS
  MEMBER FUNCTION area RETURN NUMBER IS
  BEGIN
 RETURN (length*width);
 END;
END;

Now, if you create a table rect_tab of type rectangle, you can create a function-based index on the area() method as follows:

CREATE TABLE rect_tab OF rectangle;
CREATE INDEX area_idx ON rect_tab x (x.area());

You can use this index efficiently to evaluate a query of the form:

SELECT * FROM rect_tab x WHERE x.area() > 100;
Partitioned Index Examples
Creating a Global Partitioned Index: Example

The following statement creates a global prefixed index amount_sold on the sample table sh.sales with three partitions that divide the range of costs into three groups:

CREATE INDEX cost_ix ON sales (amount_sold)
   GLOBAL PARTITION BY RANGE (amount_sold)
      (PARTITION p1 VALUES LESS THAN (1000),
       PARTITION p2 VALUES LESS THAN (2500),
       PARTITION p3 VALUES LESS THAN (MAXVALUE));
Creating an Index on a Hash-Partitioned Table: Example.

The following statement creates a local index on the product_id column of the product_information_part partitioned table (which was created in"Hash Partitioning Example" ) . The STORE IN clause immediately following LOCAL indicates that product_information_part is hash partitioned. Oracle will distribute the hash partitions between the tbs1 and tbs2 tablespaces:

CREATE INDEX prod_idx ON product_information_part(product_id) LOCAL
   STORE IN (tbs_1, tbs_2);
Note:

The creator of the index needs quote on the tablespaces specified. See CREATE TABLESPACE for the examples that created these tablespaces.
Creating an Index on a Composite-Partitioned Table: Example.

The following statement creates a local index on the composite_sales table, which was created in "Composite-Partitioned Table Examples" . The STORAGE clause specifies default storage attributes for the index. However, this default is overridden for the five subpartitions of partitions q3_2000 and q4_2000, because separate TABLESPACE storage is specified.

Note:

The creator of the index must have quota on the tablespaces specified. See CREATE TABLESPACE for the creation of tablespaces tbs_1 and tbs_2.

CREATE INDEX sales_ix ON composite_sales(time_id, prod_id)
   STORAGE (INITIAL 1M MAXEXTENTS UNLIMITED)
   LOCAL
   (PARTITION q1_1998,
    PARTITION q2_1998,
    PARTITION q3_1998,
    PARTITION q4_1998,
    PARTITION q1_1999,
    PARTITION q2_1999,
    PARTITION q3_1999,
    PARTITION q4_1999,
    PARTITION q1_2000,
    PARTITION q2_2000
      (SUBPARTITION pq2001, SUBPARTITION pq2002,
       SUBPARTITION pq2003, SUBPARTITION pq2004,
       SUBPARTITION pq2005, SUBPARTITION pq2006,
       SUBPARTITION pq2007, SUBPARTITION pq2008),
    PARTITION q3_2000
      (SUBPARTITION c1 TABLESPACE tbs_1,
       SUBPARTITION c2 TABLESPACE tbs_1,
       SUBPARTITION c3 TABLESPACE tbs_1,
       SUBPARTITION c4 TABLESPACE tbs_1,
       SUBPARTITION c5 TABLESPACE tbs_1),
    PARTITION q4_2000
      (SUBPARTITION pq4001 TABLESPACE tbs_2,
       SUBPARTITION pq4002 TABLESPACE tbs_2,
       SUBPARTITION pq4003 TABLESPACE tbs_2,
       SUBPARTITION pq4004 TABLESPACE tbs_2)
);
Bitmap Index Example

The following creates a bitmap join index on the table oe.product_information_part, which was created in "Hash Partitioning Example" :

CREATE BITMAP INDEX product_bm_ix
   ON product_information_part(list_price)
   TABLESPACE tbs_1
   LOCAL(PARTITION ix_p1 TABLESPACE tbs_2,
         PARTITION ix_p2,
         PARTITION ix_p3 TABLESPACE tbs_3,
         PARTITION ix_p4,
         PARTITION ix_p5 TABLESPACE tbs_4 );

Because product_information_part is a partitioned table, the bitmap join index must be locally partitioned.

Note:

In this example, the user must have quota on tablespaces specified. See CREATE TABLESPACE for examples that create tablespaces tbs_2, tbs_3, and tbs_4.
Indexes on Nested Tables: Example

The sample table pm.print_media contains a nested table column ad_textdocs_ntab, which is stored in storage table textdocs_nestedtab. The following example creates a unique index on storage table textdocs_nestedtab:

CREATE UNIQUE INDEX nested_tab_ix
      ON textdocs_nestedtab(NESTED_TABLE_ID, document_typ);

Including pseudocolumn NESTED_TABLE_ID ensures distinct rows in nested table column ad_textdocs_ntab.

Indexing on Substitutable Columns: Examples

You can build an index on attributes of the declared type of a substitutable column. In addition, you can reference the subtype attributes by using the appropriate TREAT function. The following example uses the table books, which is created in "Substitutable Table and Column Examples" . The statement creates an index on the salary attribute of all employee authors in the books table:

CREATE INDEX salary_i
   ON books (TREAT(author AS employee_t).salary);

The target type in the argument of the TREAT function must be the type that added the attribute being referenced. In the example, the target of TREAT is employee_t, which is the type that added the salary attribute.

If this condition is not satisfied, Oracle interprets the TREAT function as any functional expression and creates the index as a function-based index. For example, the following statement creates a function-based index on the salary attribute of part-time employees, assigning nulls to instances of all other types in the type hierarchy.

CREATE INDEX salary_func_i ON persons p
   (TREAT(VALUE(P) AS part_time_emp_t).salary);

You can also build an index on the type-discriminant column underlying a substitutable column by using the SYS_TYPEID function.

Note:

Oracle uses the type-discriminant column to evaluate queries that involve the IS OF type condition. The cardinality of the typeid column is normally low, so Oracle Corporation recommends that you build a bitmap index in this situation.

The following statement creates a bitmap index on the typeid of the author column of the books table:

CREATE BITMAP INDEX typeid_i ON books (SYS_TYPEID(author));
See Also:
  • "Type Hierarchy Example" to see the creation of the type hierarchy underlying the books table
  • TREAT
  • SYS_TYPEID
  • "IS OF type Conditions"
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 11 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE INDEXTYPE

Purpose

Use the CREATE INDEXTYPE statement to create an indextype, which is an object that specifies the routines that manage a domain (application-specific) index. Indextypes reside in the same namespace as tables, views, and other schema objects. This statement binds the indextype name to an implementation type, which in turn specifies and refers to user-defined index functions and procedures that implement the indextype.

See Also:

Oracle9i Data Cartridge Developer's Guide and Oracle9i Database Concepts for more information on implementing indextypes

Prerequisites

To create an indextype in your own schema, you must have the CREATE INDEXTYPE system privilege. To create an indextype in another schema, you must have CREATE ANY INDEXTYPE system privilege. In either case, you must have the EXECUTE object privilege on the implementation type and the supported operators.

An indextype supports one or more operators, so before creating an indextype, you should first design the operator or operators to be supported and provide functional implementation for those operators.

See Also:

CREATE OPERATOR

Syntax

create_indextype::=

Text description of statements_541.gif follows
Text description of create_indextype

Semantics

schema

Specify the name of the schema in which the indextype resides. If you omit schema, Oracle creates the indextype in your own schema.

indextype

Specify the name of the indextype to be created.

FOR Clause

Use the FOR clause to specify the list of operators supported by the indextype.

  • For schema, specify the schema containing the operator. If you omit schema, Oracle assumes the operator is in your own schema.
  • For operator, specify the name of the operator supported by the indextype.

    All the operators listed in this clause should be valid operators.

  • For parameter_type, list the types of parameters to the operator.

USING Clause

The USING clause lets you specify the type that provides the implementation for the new indextype.

For implementation_type, specify the name of the type that implements the appropriate Oracle Data Cartridge interface (ODCI).

  • You must specify a valid type that implements the routines in the ODCI interface.
  • The implementation type must reside in the same schema as the indextype.

    See Also:

    Oracle9i Data Cartridge Developer's Guide for additional information on this interface

Example

Creating an Indextype: Example

The following statement creates an indextype named position_indextype and specifies the position_between operator that is supported by the indextype and the position_im type that implements the index interface. Please refer to "Using Extensible Indexing" for an extensible indexing scenario that uses this indextype:

CREATE INDEXTYPE position_indextype
   FOR position_between(NUMBER, NUMBER, NUMBER)
   USING position_im;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: CREATE CLUSTER to CREATE JAVA, 12 of 12

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE JAVA

Purpose

Use the CREATE JAVA statement to create a schema object containing a Java source, class, or resource.

See Also:
  • Oracle9i Java Developer's Guide for Java concepts
  • Oracle9i Java Stored Procedures Developer's Guide for Java stored procedures
  • Oracle9i SQLJ Developer's Guide and Reference for SQLJ
  • Oracle9i JDBC Developer's Guide and Reference for JDBC
  • Oracle9iAS Containers for J2EE User's Guide for iAS Java support

Prerequisites

To create or replace a schema object containing a Java source, class, or resource in your own schema, you must have CREATE PROCEDURE system privilege. To create such a schema object in another user's schema, you must have CREATE ANY PROCEDURE system privilege. To replace such a schema object in another user's schema, you must also have ALTER ANY PROCEDURE system privilege.

Syntax

create_java::=

Text description of statements_511.gif follows
Text description of create_java

invoker_rights_clause::=

Text description of statements_542.gif follows
Text description of invoker_rights_clause

Semantics

OR REPLACE

Specify OR REPLACE to re-create the schema object containing the Java class, source, or resource if it already exists. Use this clause to change the definition of an existing object without dropping, re-creating, and regranting object privileges previously granted.

If you redefine a Java schema object and specify RESOLVE or COMPILE, Oracle recompiles or resolves the object. Whether or not the resolution or compilation is successful, Oracle invalidates classes that reference the Java schema object.

Users who had previously been granted privileges on a redefined function can still access the function without being regranted the privileges.

See Also:

ALTER JAVA for additional information

RESOLVE | COMPILE

RESOLVE and COMPILE are synonymous keywords. They specify that Oracle should attempt to resolve the Java schema object that is created if this statement succeeds.

  • When applied to a class, resolution of referenced names to other class schema objects occurs.
  • When applied to a source, source compilation occurs.
Restriction on RESOLVE and COMPILE

You cannot specify this clause for a Java resource.

NOFORCE

Specify NOFORCE to roll back the results of this CREATE command if you have specified either RESOLVE or COMPILE, and the resolution or compilation fails. If you do not specify this option, Oracle takes no action if the resolution or compilation fails (that is, the created schema object remains).

JAVA SOURCE Clause

Specify JAVA SOURCE to load a Java source file.

JAVA CLASS Clause

Specify JAVA CLASS to load a Java class file.

JAVA RESOURCE Clause

Specify JAVA RESOURCE to load a Java resource file.

NAMED Clause

The NAMED clause is required for a Java source or resource. The primary_name must be enclosed in double quotation marks.

  • For a Java source, this clause specifies the name of the schema object in which the source code is held. A successful CREATE JAVA SOURCE statement will also create additional schema objects to hold each of the Java classes defined by the source.
  • For a Java resource, this clause specifies the name of the schema object to hold the Java resource.

Use double quotation marks to preserve a lower- or mixed-case primary_name.

If you do not specify schema, Oracle creates the object in your own schema.

Restrictions on NAMED
  • You cannot specify NAMED for a Java class.
  • The primary_name cannot contain a database link.

SCHEMA Clause

The SCHEMA clause applies only to a Java class. This optional clause specifies the schema in which the object containing the Java file will reside. If you do not specify this clause, Oracle creates the object in your own schema.

invoker_rights_clause

Use the invoker_rights_clause to indicate whether the methods of the class execute with the privileges and in the schema of the user who owns the class or with the privileges and in the schema of CURRENT_USER.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the member functions and procedures of the type.

AUTHID CURRENT_USER

CURRENT_USER indicates that the methods of the class execute with the privileges of CURRENT_USER. This clause is the default and creates an invoker-rights class.

This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the methods reside.

AUTHID DEFINER

DEFINER indicates that the methods of the class execute with the privileges of the owner of the schema in which the class resides, and that external names resolve in the schema where the class resides. This clause creates a definer-rights class.

See Also:
  • Oracle9i Java Stored Procedures Developer's Guide
  • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined

RESOLVER Clause

The RESOLVER clause lets you specify a mapping of the fully qualified Java name to a Java schema object, where

  • match_string is either a fully qualified Java name, a wildcard that can match such a Java name, or a wildcard that can match any name.
  • schema_name designates a schema to be searched for the corresponding Java schema object.
  • A dash (-) as an alternative to schema_name indicates that if match_string matches a valid Java name, Oracle can leave the name unresolved. The resolution succeeds, but the name cannot be used at run time by the class.

This mapping is stored with the definition of the schema objects created in this command for use in later resolutions (either implicit or in explicit ALTER ... RESOLVE statements).

USING Clause

The USING clause determines a sequence of character (CLOB or BFILE) or binary (BLOB or BFILE) data for the Java class or resource. Oracle uses the sequence of characters to define one file for a Java class or resource, or one source file and one or more derived classes for a Java source.

BFILE Clause

Specify the directory and filename of a previously created file on the operating system (directory_object_name) and server file (server_file_name) containing the sequence. BFILE is usually interpreted as a character sequence by CREATE JAVA SOURCE and as a binary sequence by CREATE JAVA CLASS or CREATE JAVA RESOURCE.

CLOB | BLOB | BFILE subquery

Specify a query that selects a single row and column of the type specified (CLOB, BLOB, or BFILE). The value of the column makes up the sequence of characters.

Note:

In earlier releases, the USING clause implicitly supplied the keyword SELECT. This is no longer the case. However, the subquery without the keyword SELECT is still supported for backward compatibility.
key_for_BLOB

The key_for_BLOB clause supplies the following implicit query:

SELECT LOB FROM CREATE$JAVA$LOB$TABLE
   WHERE NAME = 'key_for_BLOB';
Restriction on the key_for_BLOB Clause

To use this case, the table CREATE$JAVA$LOB$TABLE must exist in the current schema and must have a column LOB of type BLOB and a column NAME of type VARCHAR2.

AS source_text

Specify a sequence of characters for a Java or SQLJ source.

Examples

Creating a Java Class Object: Example

The following statement creates a schema object containing a Java class using the name found in a Java binary file:

CREATE JAVA CLASS USING BFILE (bfile_dir, 'Agent.class');

This example assumes the directory object bfile_dir, which points to the operating system directory containing the Java class Agent.class, already exists. In this example, the name of the class determines the name of the Java class schema object.

Creating a Java Source Object: Example

The following statement creates a Java source schema object:

CREATE JAVA SOURCE NAMED "Hello" AS
   public class Hello {
      public static String hello() {
         return "Hello World";   } };
Creating a Java Resource Object: Example

The following statement creates a Java resource schema object named apptext from a bfile:

CREATE JAVA RESOURCE NAMED "appText"
   USING BFILE (bfile_dir, 'textBundle.dat');
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 1 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

14
SQL Statements: CREATE LIBRARY to CREATE SPFILE

This chapter contains the following SQL statements:

  • CREATE LIBRARY
  • CREATE MATERIALIZED VIEW
  • CREATE MATERIALIZED VIEW LOG
  • CREATE OPERATOR
  • CREATE OUTLINE
  • CREATE PACKAGE
  • CREATE PACKAGE BODY
  • CREATE PFILE
  • CREATE PROCEDURE
  • CREATE PROFILE
  • CREATE ROLE
  • CREATE ROLLBACK SEGMENT
  • CREATE SCHEMA
  • CREATE SEQUENCE
  • CREATE SPFILE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 2 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE LIBRARY

Purpose

Use the CREATE LIBRARY statement to create a schema object associated with an operating-system shared library. The name of this schema object can then be used in the call_spec of CREATE FUNCTION or CREATE PROCEDURE statements, or when declaring a function or procedure in a package or type, so that SQL and PL/SQL can call to third-generation-language (3GL) functions and procedures.

See Also:

CREATE FUNCTION and PL/SQL User's Guide and Reference for more information on functions and procedures

Prerequisites

To create a library in your own schema, you must have the CREATE LIBRARY system privilege. To create a library in another user's schema, you must have the CREATE ANY LIBRARY system privilege. To use the procedures and functions stored in the library, you must have EXECUTE object privileges on the library.

The CREATE LIBRARY statement is valid only on platforms that support shared libraries and dynamic linking.

Syntax

create_library::=

Text description of statements_6a.gif follows
Text description of create_library

Semantics

OR REPLACE

Specify OR REPLACE to re-create the library if it already exists. Use this clause to change the definition of an existing library without dropping, re-creating, and regranting schema object privileges granted on it.

Users who had previously been granted privileges on a redefined library can still access the library without being regranted the privileges.

libname

Specify the name you wish to represent this library when declaring a function or procedure with a call_spec.

'filename'

Specify a string literal, enclosed in single quotes. This string should be the path or filename your operating system recognizes as naming the shared library.

The 'filename' is not interpreted during execution of the CREATE LIBRARY statement. The existence of the library file is not checked until an attempt is made to execute a routine from it.

AGENT Clause

Specify the AGENT clause if you want external procedures to be run from a database link other than the server. Oracle will use the database link specified by agent_dblink to run external procedures. If you omit this clause, the default agent on the server (extproc) will run external procedures.

Examples

Creating a Library: Examples

The following statement creates library ext_lib:

CREATE LIBRARY ext_lib AS '/OR/lib/ext_lib.so';
/

The following statement re-creates library ext_lib:

CREATE OR REPLACE LIBRARY ext_lib IS '/OR/newlib/ext_lib.so';
/
Specifying an External Procedure Agent: Example

The following example creates a library app_lib and specifies that external procedures will be run from the public database sales.hq.acme.com:

CREATE LIBRARY app_lib as '${ORACLE_HOME}/lib/app_lib.so'
   AGENT 'sales.hq.acme.com';
/
See Also:

"Defining a Public Database Link: Example" for information on creating database links
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 3 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE MATERIALIZED VIEW

Purpose

Use the CREATE MATERIALIZED VIEW statement to create a materialized view. A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views. Collectively these are called master tables (a replication term) or detail tables (a data warehouse term). This reference uses "master tables" for consistency. The databases containing the master tables are called the master databases.

Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.

For replication purposes, materialized views allow you to maintain copies of remote data on your local node. The copies can be updatable with the Advanced Replication feature and are read-only without this feature. You can select data from a materialized view as you would from a table or view. In replication environments, the materialized views commonly created are primary key, rowid, object, and subquery materialized views.

See Also:

Oracle9i Advanced Replication for information on the types of materialized views used to support replication

For data warehousing purposes, the materialized views commonly created are materialized aggregate views, single-table materialized aggregate views, and materialized join views. All three types of materialized views can be used by query rewrite, an optimization technique that transforms a user request written in terms of master tables into a semantically equivalent request that includes one or more materialized views.

See Also:
  • ALTER MATERIALIZED VIEW
  • Oracle9i Data Warehousing Guide for information on the types of materialized views used to support data warehousing

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

The privileges required to create a materialized view should be granted directly rather than through a role.

To create a materialized view in your own schema:

  • You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
  • You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.

To create a materialized view in another user's schema:

  • You must have the CREATE ANY MATERIALIZED VIEW system privilege.
  • The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database), and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.

To create a refresh-on-commit materialized view (ON COMMIT REFRESH clause), in addition to the preceding privileges, you must have the ON COMMIT REFRESH object privilege on any master tables that you do not own or you must have the ON COMMIT REFRESH system privilege.

To create the materialized view with query rewrite enabled, in addition to the preceding privileges:

  • The owner of the master tables must have the QUERY REWRITE system privilege.
  • If you are not the owner of the master tables, you must have the GLOBAL QUERY REWRITE system privilege or the QUERY REWRITE object privilege on each table outside your schema.
  • If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
  • If you are defining the materialized view on a prebuilt container (ON PREBUILT TABLE), you must have the SELECT privilege WITH GRANT OPTION on the container table.

The user whose schema contains the materialized view must have sufficient quota in the target tablespace to store the materialized view's master table and index or must have the UNLIMITED TABLESPACE system privilege.

When you create a materialized view, Oracle creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle uses these objects to maintain the materialized view's data. You must have the privileges necessary to create these objects.

See Also:
  • CREATE TABLE , CREATE VIEW , and CREATE INDEX for information on these privileges
  • Oracle9i Advanced Replication for information about the prerequisites that apply to creating replication materialized views
  • Oracle9i Data Warehousing Guide for information about the prerequisites that apply to creating data warehousing materialized views

Syntax

create_materialized_view::=

Text description of statements_614.gif follows
Text description of create_materialized_view

(scoped_table_ref_constraint::= , index_org_table_clause::= , materialized_view_props::= , physical_attributes_clause::= , create_mv_refresh::= , subquery::= )

physical_properties::=

Text description of physical_properties.gif follows
Text description of physical_properties

(segment_attributes_clause::= , data_segment_compression::= )

materialized_view_props::=

Text description of statements_640.gif follows
Text description of materialized_view_props

(column_properties::= , table_partitioning_clauses --part of CREATE TABLE syntax, parallel_clause::= , build_clause::= )

scoped_table_ref_constraint::=

Text description of statements_64.gif follows
Text description of scoped_table_ref_constraint

index_org_table_clause::=

Text description of statements_611.gif follows
Text description of index_org_table_clause

(mapping_table_clause: not supported with materialized views, key_compression::= , index_org_overflow_clause::= )

key_compression::=

Text description of statements_613.gif follows
Text description of key_compression

index_org_overflow_clause::=

Text description of statements_612.gif follows
Text description of index_org_overflow_clause

(segment_attributes_clause::= )

create_mv_refresh::=

Text description of statements_616.gif follows
Text description of create_mv_refresh

segment_attributes_clause::=

Text description of statements_644a.gif follows
Text description of segment_attributes_clause

(physical_attributes_clause::= , logging_clause::= )

physical_attributes_clause::=

Text description of statements_67.gif follows
Text description of physical_attributes_clause

(logging_clause::= )

logging_clause::=

Text description of statements_641.gif follows
Text description of logging_clause

data_segment_compression::=

Text description of statements_651.gif follows
Text description of data_segment_compression

column_properties::=

Text description of statements_66.gif follows
Text description of column_properties

(object_type_col_properties::= , nested_table_col_properties::= , varray_col_properties::= , LOB_partition_storage::= , LOB_storage_clause::= , XMLType_column_properties: not supported for materialized views)

object_type_col_properties::=

Text description of statements_643.gif follows
Text description of object_type_col_properties

(substitutable_column_clause::= )

substitutable_column_clause::=

Text description of statements_644.gif follows
Text description of substitutable_column_clause

nested_table_col_properties::=

Text description of statements_645.gif follows
Text description of nested_table_col_properties

(substitutable_column_clause::= , object_properties::= , physical_properties::= --part of CREATE TABLE syntax, column_properties::= )

varray_col_properties::=

Text description of statements_648.gif follows
Text description of varray_col_properties

(substitutable_column_clause::= , LOB_parameters::= )

LOB_storage_clause::=

Text description of statements_650b.gif follows
Text description of LOB_storage_clause

(LOB_parameters::= )

LOB_parameters::=

Text description of statements_649.gif follows
Text description of LOB_parameters

(storage_clause::=, logging_clause::= )

LOB_partition_storage::=

Text description of statements_650a.gif follows
Text description of LOB_partition_storage

(LOB_storage_clause::= , varray_col_properties::= )

parallel_clause::=

Text description of statements_645a.gif follows
Text description of parallel_clause

build_clause::=

Text description of statements_618.gif follows
Text description of build_clause

Semantics

schema

Specify the schema to contain the materialized view. If you omit schema, Oracle creates the materialized view in your schema.

materialized_view

Specify the name of the materialized view to be created. Oracle generates names for the table and indexes used to maintain the materialized view by adding a prefix or suffix to the materialized view name.

OF object_type

The OF type_name clause lets you explicitly create an object materialized view of type object_type.

See Also:

See the object_table clause of CREATE TABLE for more information on the OF type_name clause

scoped_table_ref_constraint

Use the SCOPE FOR clause to restrict the scope of references to a single table, scope_table_name. The values in the REF column or attribute point to objects in scope_table_name, in which object instances (of the same type as the REF column) are stored.

See Also:

"SCOPE REF Constraints" for more information

ON PREBUILT TABLE Clause

The ON PREBUILT TABLE clause lets you register an existing table as a preinitialized materialized view. This is particularly useful for registering large materialized views in a data warehousing environment. The table must have the same name and be in the same schema as the resulting materialized view.

If the materialized view is dropped, the preexisting table reverts to its identity as a table.

Caution:

This clause assumes that the table object reflects the materialization of a subquery. Oracle Corporation strongly recommends that you ensure that this assumption is true in order to ensure that the materialized view correctly reflects the data in its master tables.
WITH REDUCED PRECISION

Specify WITH REDUCED PRECISION to authorize the loss of precision that will result if the precision of the table or materialized view columns do not exactly match the precision returned by subquery.

WITHOUT REDUCED PRECISION

Specify WITHOUT REDUCED PRECISION to require that the precision of the table or materialized view columns match exactly the precision returned by subquery, or the create operation will fail. This is the default.

Restrictions on prebuilt_table_clause
  • Each column alias in subquery must correspond to a column in table_name, and corresponding columns must have matching datatypes.
  • If you specify this clause, you cannot specify a NOT NULL constraint for any column that is unmanaged (that is, not referenced in subquery) unless you also specify a default value for that column.

    See Also:

    "Creating Prebuilt Materialized Views: Example"

physical_properties_clause

The components of the physical_properties_clause have the same semantics for materialized views that they have for tables, with exceptions and additions described in the sections that follow.

Restriction on the physical_properties_clause

You cannot specify ORGANIZATION EXTERNAL for a materialized view.

segment_attributes_clause

Use the segment_attributes_clause to establish values for the PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters (or, when used in the USING INDEX clause, for the INITRANS and MAXTRANS parameters only), the storage characteristics for the materialized view, to assign a tablespace, and to specify whether logging is to occur.

TABLESPACE Clause

Specify the tablespace in which the materialized view is to be created. If you omit this clause, Oracle creates the materialized view in the default tablespace of the schema containing the materialized view.

See Also:
  • physical_attributes_clause for a complete description of the parameters of the physical_attributes_clause, including default values
  • storage_clause for a complete description of the storage_clause, including default values
logging_clause

Specify LOGGING or NOLOGGING to establish the logging characteristics for the materialized view. The default is the logging characteristic of the tablespace in which the materialized view resides.

See Also:

logging_clause for a full description of this clause
data_segment_compression

Use the data_segment_compression clause to instruct Oracle whether to compress data segments to reduce disk and memory use. The COMPRESS keyword enables data segment compression. The NOCOMPRESS keyword disables data segment compression.

See Also:

data_segment_compression clause of CREATE TABLE for more information on data segment compression
index_org_table_clause

The ORGANIZATION INDEX clause lets you create an index-organized materialized view. In such a materialized view, data rows are stored in an index defined on the primary key of the materialized view. You can specify index organization for the following types of materialized views:

  • Read-only and updatable object materialized views. You must ensure that the master table has a primary key.
  • Read-only and updatable primary key based materialized views
  • Read-only rowid materialized views.

The keywords and parameters of the index_org_table_clause have the same semantics as described in CREATE TABLE, with the restrictions that follow.

See Also:

the index_org_table_clause of CREATE TABLE

Restrictions on Index-organized Materialized Views
  • You cannot specify the following CREATE MATERIALIZED VIEW clauses: CACHE or NOCACHE, CLUSTER, or ON PREBUILT TABLE.
  • In the index_org_table_clause:
    • You cannot specify the mapping_table_clause.
    • You can specify COMPRESS only for a materialized view based on a composite primary key. You can specify NOCOMPRESS for a materialized view based on either a simple or composite primary key.
CLUSTER Clause

The ORGANIZATION CLUSTER clause lets you create the materialized view as part of the specified cluster. A clustered materialized view uses the cluster's space allocation. Therefore, you do not specify physical attributes or the TABLESPACE clause with the CLUSTER clause.

Restriction on clustered materialized views

If you specify ORGANIZATION CLUSTER, you cannot specify the table_partitioning_clauses (in materialized_view_props).

materialized_view_props

Use these property clauses to describe a materialized view that is not based on an existing table. To create a materialized view that is based on an existing table, use the ON PREBUILT TABLE clause.

column_properties

The column_properties clause lets you specify the storage characteristics of a LOB, nested table, varray, or XMLType column.

Restriction on Materialized View Columns

The object_type_col_properties are not relevant for a materialized view.

See Also:

CREATE TABLE for detailed information about specifying the parameters of this clause
table_partitioning_clauses

The table_partitioning_clauses let you specify that the materialized view is partitioned on specified ranges of values or on a hash function. Partitioning of materialized views is the same as partitioning of tables.

See Also:

table_partitioning_clauses of CREATE TABLE

CACHE | NOCACHE

For data that will be accessed frequently, CACHE specifies that the blocks retrieved for this table are placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables. NOCACHE specifies that the blocks are placed at the least recently used end of the LRU list.

Note:

NOCACHE has no effect on materialized views for which you specify KEEP in the storage_clause.
See Also:

CREATE TABLE for information about specifying CACHE or NOCACHE
parallel_clause

The parallel_clause lets you indicate whether parallel operations will be supported for the materialized view and sets the default degree of parallelism for queries and DML on the materialized view after creation.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

build_clause

The build_clause lets you specify when to populate the materialized view.

IMMEDIATE

Specify IMMEDIATE to indicate that the materialized view is populated immediately. This is the default.

DEFERRED

Specify DEFERRED to indicate that the materialized view will be populated by the next REFRESH operation. The first (deferred) refresh must always be a complete refresh. Until then, the materialized view has a staleness value of UNUSABLE, so it cannot be used for query rewrite.

USING INDEX Clause

The USING INDEX clause lets you establish the value of INITRANS, MAXTRANS, and STORAGE parameters for the default index Oracle uses to maintain the materialized view's data. If USING INDEX is not specified, then default values are used for the index. Oracle uses the default index to speed up incremental ("fast") refresh of the materialized view.

Restriction on USING INDEX clause

You cannot specify the PCTUSED parameter in this clause.

USING NO INDEX Clause

Specify USING NO INDEX to suppress the creation of the default index. You can create an alternative index explicitly by using the CREATE INDEX statement. You should create such an index if you specify USING NO INDEX and you are creating the materialized view with the incremental refresh method (REFRESH FAST).

create_mv_refresh

Use the create_mv_refresh to specify the default methods, modes, and times for Oracle to refresh the materialized view. If the master tables of a materialized view are modified, the data in the materialized view must be updated to make the materialized view accurately reflect the data currently in its master tables. This clause lets you schedule the times and specify the method and mode for Oracle to refresh the materialized view.

Note:

This clause only sets the default refresh options. For instructions on actually implementing the refresh, refer to Oracle9i Advanced Replication and Oracle9i Data Warehousing Guide.
See Also:

"Periodic Refresh of Materialized Views: Example" and "Automatic Refresh Times for Materialized Views: Example"

FAST Clause

Specify FAST to indicate the incremental refresh method, which performs the refresh according to the changes that have occurred to the master tables. The changes are stored either in the materialized view log associated with the master table (for conventional DML changes) or in the direct loader log (for direct-path INSERT operations).

If you specify REFRESH FAST, the CREATE statement will fail unless materialized view logs already exist for the materialized view's master tables. (Oracle creates the direct loader log automatically when a direct-path INSERT takes place. No user intervention is needed.)

For both conventional DML changes and for direct-path INSERT operations, other conditions may restrict the eligibility of a materialized view for fast refresh.

Materialized views are not eligible for fast refresh if the defining subquery contains an analytic function.

See Also:
  • Oracle9i Advanced Replication for restrictions on fast refresh in replication environments
  • Oracle9i Data Warehousing Guide for restrictions on fast refresh in data warehouse environments
  • "Analytic Functions"
  • "Creating a Fast Refreshable Materialized View: Example"
COMPLETE Clause

Specify COMPLETE to indicate the complete refresh method, which is implemented by executing the materialized view's defining subquery. If you request a complete refresh, Oracle performs a complete refresh even if a fast refresh is possible.

FORCE Clause

Specify FORCE to indicate that when a refresh occurs, Oracle will perform a fast refresh if one is possible or a complete refresh otherwise. If you do not specify a refresh method (FAST, COMPLETE, or FORCE), FORCE is the default.

ON COMMIT Clause

Specify ON COMMIT to indicate that a fast refresh is to occur whenever Oracle commits a transaction that operates on a master table of the materialized view. This clause may increase the time taken to complete the commit, because Oracle performs the refresh operation as part of the commit process.

Restriction on Refreshing ON COMMIT

This clause is not supported for materialized views containing object types.

See Also:

Oracle9i Advanced Replication and Oracle9i Data Warehousing Guide
ON DEMAND Clause

Specify ON DEMAND to indicate that the materialized view will be refreshed on demand by calling one of the three DBMS_MVIEW refresh procedures. If you omit both ON COMMIT and ON DEMAND, ON DEMAND is the default.

See Also:
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on these procedures
  • Oracle9i Data Warehousing Guide on the types of materialized views you can create by specifying REFRESH ON DEMAND

If you specify ON COMMIT or ON DEMAND, you cannot also specify START WITH or NEXT.

START WITH Clause

Specify a date expression for the first automatic refresh time.

NEXT Clause

Specify a date expression for calculating the interval between automatic refreshes.

Both the START WITH and NEXT values must evaluate to a time in the future. If you omit the START WITH value, Oracle determines the first automatic refresh time by evaluating the NEXT expression with respect to the creation time of the materialized view. If you specify a START WITH value but omit the NEXT value, Oracle refreshes the materialized view only once. If you omit both the START WITH and NEXT values, or if you omit the create_mv_refresh entirely, Oracle does not automatically refresh the materialized view.

WITH PRIMARY KEY Clause

Specify WITH PRIMARY KEY to create a primary key materialized view. This is the default, and should be used in all cases except those described for WITH ROWID. Primary key materialized views allow materialized view master tables to be reorganized without affecting the eligibility of the materialized view for fast refresh. The master table must contain an enabled primary key constraint.

Restriction on Primary Key Materialized Views

You cannot specify this clause for an object materialized view. Oracle implicitly refreshes object materialized WITH OBJECT ID.

See Also:

Oracle9i Advanced Replication for detailed information about primary key materialized views and "Creating Primary Key Materialized Views: Example"

WITH ROWID Clause

Specify WITH ROWID to create a rowid materialized view. Rowid materialized views provide compatibility with master tables in releases of Oracle prior to 8.0.

You can also use rowid materialized views if the materialized view does not include all primary key columns of the master tables. Rowid materialized views must be based on a single table and cannot contain any of the following:

  • Distinct or aggregate functions
  • GROUP BY or CONNECT BY clauses
  • Subqueries
  • Joins
  • Set operations

Rowid materialized views are not eligible for fast refreshed after a master table reorganization until a complete refresh has been performed.

Restriction on Rowid Materialized Views

You cannot specify this clause for an object materialized view. Oracle implicitly refreshes object materialized WITH OBJECT ID.

See Also:

"Creating Materialized Aggregate Views: Example" and "Creating Rowid Materialized Views: Example"

USING ROLLBACK SEGMENT Clause

Specify the remote rollback segment to be used during materialized view refresh, where rollback_segment is the name of the rollback segment to be used.

This clause is invalid if your database is in Automatic Undo Mode, because in that mode Oracle uses undo tablespaces instead of rollback segments.

DEFAULT

DEFAULT specifies that Oracle will choose automatically which rollback segment to use. If you specify DEFAULT, you cannot specify rollback_segment.

DEFAULT is most useful when modifying (rather than creating) a materialized view.

See Also:

ALTER MATERIALIZED VIEW

MASTER

MASTER specifies the remote rollback segment to be used at the remote master site for the individual materialized view.

LOCAL

LOCAL specifies the remote rollback segment to be used for the local refresh group that contains the materialized view.

See Also:

Oracle9i Advanced Replication for information on specifying the local materialized view rollback segment using the DBMS_REFRESH package

If you do not specify MASTER or LOCAL, Oracle uses LOCAL by default. If you do not specify rollback_segment, Oracle automatically chooses the rollback segment to be used.

One master rollback segment is stored for each materialized view and is validated during materialized view creation and refresh. If the materialized view is complex, the master rollback segment, if specified, is ignored.

See Also:

"Specifying Rollback Segments for Materialized Views: Example"

NEVER REFRESH Clause

Specify NEVER REFRESH to prevent the materialized view from being refreshed with any Oracle refresh mechanism or packaged procedure. Oracle will ignore any REFRESH statement on the materialized view issued from such a procedure. To reverse this clause, you must issue an ALTER MATERIALIZED VIEW ... REFRESH statement.

FOR UPDATE Clause

Specify FOR UPDATE to allow a subquery, primary key, object, or rowid materialized view to be updated. When used in conjunction with Advanced Replication, these updates will be propagated to the master.

See Also:

Oracle9i Advanced Replication

QUERY REWRITE Clause

The QUERY REWRITE clause lets you specify whether the materialized view is eligible to be used for query rewrite.

ENABLE Clause

Specify ENABLE to enable the materialized view for query rewrite.

Restrictions on Enabling Query Rewrite
  • You can enable query rewrite only if all user-defined functions in the materialized view are DETERMINISTIC.
  • You can enable query rewrite only if expressions in the statement are repeatable. For example, you cannot include CURRENT_TIME or USER, sequence values (such as the CURRVAL or NEXTVAL pseudocolumns), or the SAMPLE clause (which may sample different rows as the contents of the materialized view change).

    Notes:
    • Query rewrite is disabled by default, so you must specify this clause to make materialized views eligible for query rewrite.
    • Be sure to analyze the materialized view after you create it. Oracle needs the statistics generated by the ANALYZE operation to optimize query rewrite.
    See Also:
    • Oracle9i Data Warehousing Guide for more information on query rewrite
    • CREATE FUNCTION
DISABLE Clause

Specify DISABLE to indicate that the materialized view is not eligible for use by query rewrite. However, a disabled materialized view can be refreshed.

AS subquery

Specify the defining subquery of the materialized view. When you create the materialized view, Oracle executes this subquery and places the results in the materialized view. This subquery is any valid SQL subquery. However, not all queries are fast refreshable, nor are all subqueries eligible for query rewrite.

Notes on the Defining Query of a Materialized View
  • Oracle does not execute the defining subquery immediately if you specify BUILD DEFERRED.
  • Oracle recommends that you qualify each table and view in the FROM clause of the defining subquery of the materialized view with the schema containing it.

    See Also:

    "AS subquery" clause of CREATE TABLE for some additional caveats
Restrictions on the Defining Subquery of a Materialized View
  • The defining subquery of a materialized view can select from tables, views, or materialized views owned by the user SYS, but you cannot enable QUERY REWRITE on such a materialized view.
  • Materialized join views and materialized aggregate views with a GROUP BY clause cannot select from an index-organized table.
  • Materialized views cannot contain columns of datatype LONG.
  • You cannot create a materialized view log on a temporary table. Therefore, if the defining subquery references a temporary table, this materialized view will not be eligible for FAST refresh, nor can you specify the QUERY REWRITE clause in this statement.
  • If the FROM clause of the defining subquery references another materialized view, then you must always refresh the materialized view referenced in the defining subquery before refreshing the materialized view you are creating in this statement.

If you are creating a materialized view enabled for query rewrite:

  • The defining subquery cannot contain (either directly or through a view) references to ROWNUM, USER, SYSDATE, remote tables, sequences, or PL/SQL functions that write or read database or package state.
  • Neither the materialized view nor the master tables of the materialized view can be remote.

If you want the materialized view to be eligible for fast refresh using a materialized view log, some additional restrictions may apply.

See Also:
  • Oracle9i Data Warehousing Guide for more information on restrictions relating to data warehousing
  • Oracle9i Advanced Replication for more information on restrictions relating to replication
  • "Creating Materialized Join Views: Example" , "Creating Subquery Materialized Views: Example" and "Creating a Nested Materialized View: Example"

Examples

The following examples require the materialized logs that are created in the "Examples" section of CREATE MATERIALIZED VIEW .

Creating Materialized Aggregate Views: Example

The following statement creates and populates a materialized aggregate view on the sample sh.sales table and specifies the default refresh method, mode, and time. It uses the materialized view log created in "Creating a Materialized View Log: Examples" , as well as the two additional logs shown here:

CREATE MATERIALIZED VIEW LOG ON times
   WITH ROWID, SEQUENCE (time_id, calendar_year)
   INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW LOG ON products
   WITH ROWID, SEQUENCE (prod_id)
   INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW sales_mv
   BUILD IMMEDIATE
   REFRESH FAST ON COMMIT
   AS SELECT t.calendar_year, p.prod_id,
      SUM(s.amount_sold) AS sum_sales
      FROM times t, products p, sales s
      WHERE t.time_id = s.time_id AND p.prod_id = s.prod_id
      GROUP BY t.calendar_year, p.prod_id;
Creating Materialized Join Views: Example

The following statement creates and populates the materialized aggregate view sales_by_month_by_state using tables in the sample sh schema. The materialized view will be populated with data as soon as the statement executes successfully. By default, subsequent refreshes will be accomplished by reexecuting the materialized view's query:

CREATE MATERIALIZED VIEW sales_by_month_by_state
     TABLESPACE example
     PARALLEL 4
     BUILD IMMEDIATE
     REFRESH COMPLETE
     ENABLE QUERY REWRITE
     AS SELECT t.calendar_month_desc, c.cust_state_province,
        SUM(s.amount_sold) AS sum_sales
        FROM times t, sales s, customers c
        WHERE s.time_id = t.time_id AND s.cust_id = c.cust_id
        GROUP BY t.calendar_month_desc, c.cust_state_province;
Creating Prebuilt Materialized Views: Example

The following statement creates a materialized aggregate view for the preexisting summary table, sales_sum_table:

CREATE TABLE sales_sum_table
   (month VARCHAR2(8), state VARCHAR2(40), sales NUMBER(10,2));

CREATE MATERIALIZED VIEW sales_sum_table
   ON PREBUILT TABLE WITH REDUCED PRECISION
   ENABLE QUERY REWRITE
   AS SELECT t.calendar_month_desc AS month,
             c.cust_state_province AS state,
             SUM(s.amount_sold) AS sales
      FROM times t, customers c, sales s
      WHERE s.time_id = t.time_id AND s.cust_id = c.cust_id
      GROUP BY t.calendar_month_desc, c.cust_state_province;

In this example, the materialized view has the same name as the prebuilt table and also has the same number of columns with the same datatypes as the prebuilt table. The WITH REDUCED PRECISION clause allows for between the precision of the materialized view columns and the precision of the values returned by the subquery.

Creating Subquery Materialized Views: Example

The following statement creates a subquery materialized view based on the customers and countries tables in the sh schema at the remote database:

CREATE MATERIALIZED VIEW foreign_customers FOR UPDATE
   AS SELECT * FROM sh.customers@remote cu
   WHERE EXISTS
     (SELECT * FROM sh.countries@remote co
      WHERE co.country_id = cu.country_id);
Creating Primary Key Materialized Views: Example

The following statement creates the primary-key materialized view catalog on the sample table oe.product_information:

CREATE MATERIALIZED VIEW catalog
   REFRESH FAST START WITH SYSDATE NEXT  SYSDATE + 1/4096
   WITH PRIMARY KEY
   AS SELECT * FROM product_information;
Creating Rowid Materialized Views: Example

The following statement creates a rowid materialized view on the sample table oe.orders:

CREATE MATERIALIZED VIEW order_data REFRESH WITH ROWID
   AS SELECT * FROM orders;
Periodic Refresh of Materialized Views: Example

The following statement creates the primary key materialized view emp_data and populates it with data from the sample table hr.employees:

CREATE MATERIALIZED VIEW LOG ON employees
   WITH PRIMARY KEY
   INCLUDING NEW VALUES;

CREATE MATERIALIZED VIEW emp_data
   PCTFREE 5 PCTUSED 60
   TABLESPACE example
   STORAGE (INITIAL 50K NEXT 50K)
   REFRESH FAST NEXT sysdate + 7
   AS SELECT * FROM employees;

The statement does not include a START WITH parameter, so Oracle determines the first automatic refresh time by evaluating the NEXT value using the current SYSDATE. A materialized view log was created for the employee table, so Oracle performs a fast refresh of the materialized view every 7 days, beginning 7 days after the materialized view is created.

Because the materialized view conforms to the conditions for fast refresh, Oracle will perform a fast refresh. The preceding statement also establishes storage characteristics that Oracle uses to maintain the materialized view.

Automatic Refresh Times for Materialized Views: Example

The following statement creates the complex materialized view all_customers that queries the employee tables on the remote and local databases:

CREATE MATERIALIZED VIEW all_customers
   PCTFREE 5 PCTUSED 60
   TABLESPACE example
   STORAGE (INITIAL 50K NEXT 50K)
   USING INDEX STORAGE (INITIAL 25K NEXT 25K)
   REFRESH START WITH ROUND(SYSDATE + 1) + 11/24
   NEXT NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 15/24
   AS SELECT * FROM sh.customers@remote
         UNION
      SELECT * FROM sh.customers@local;

Oracle automatically refreshes this materialized view tomorrow at 11:00 a.m. and subsequently every Monday at 3:00 p.m.. The default refresh method is FORCE. all_emps contains a UNION operator, which is not supported for fast refresh, so Oracle will automatically perform a complete refresh.

The preceding statement also establishes storage characteristics for both the materialized view and the index that Oracle uses to maintain it:

  • The first establishes the sizes of the first and second extents of the materialized view as 50 kilobytes each.
  • The second (appearing with the USING INDEX clause) establishes the sizes of the first and second extents of the index as 25 kilobytes each.
Specifying Rollback Segments for Materialized Views: Example

The following statement creates the primary key materialized view sales_emp with rollback segment master_seg at the remote master and rollback segment snap_seg for the local refresh group that contains the materialized view.

Note:

This example is not relevant if your database is in Automatic Undo Mode, because in that mode Oracle uses undo tablespaces instead of rollback segments.

CREATE MATERIALIZED VIEW sales_emp
   REFRESH FAST START WITH SYSDATE NEXT SYSDATE + 7
   USING MASTER ROLLBACK SEGMENT master_seg
   LOCAL ROLLBACK SEGMENT snap_seg
   AS SELECT * FROM bar;

The following statement is incorrect and generates an error because it specifies a segment name with a DEFAULT rollback segment:

/* The following statement is invalid. */
CREATE MATERIALIZED VIEW order_mv
   REFRESH FAST START WITH SYSDATE NEXT SYSDATE + 7
   USING DEFAULT ROLLBACK SEGMENT mv_seg
   AS SELECT * FROM orders;
Creating a Fast Refreshable Materialized View: Example

The following statement creates a fast-refreshable materialized view that selects columns from the order_items table in the sample oe schema, using the UNION set operator to restrict the rows returned from the product_information and inventories tables using WHERE conditions. The materialized view logs for order_items and product_information were created in the "Examples" section of CREATE MATERIALIZED VIEW LOG . This example requires a materialized view log on oe.inventories.

CREATE MATERIALIZED VIEW LOG ON inventories
   WITH (quantity_on_hand);

CREATE MATERIALIZED VIEW warranty_orders REFRESH FAST AS
  SELECT order_id, line_item_id, product_id FROM order_items o
    WHERE EXISTS
    (SELECT * FROM inventories i WHERE o.product_id = i.product_id
      AND i.quantity_on_hand IS NOT NULL)
  UNION
    SELECT order_id, line_item_id, product_id FROM order_items
    WHERE quantity > 5;

This materialized view requires that materialized view logs be defined on order_items (with product_id as a join column) and on inventories (with quantity_on_hand as a filter column). See "Specifying Filter Columns for Materialized View Logs: Example" and "Specifying Join Columns for Materialized View Logs: Example" .

Creating a Nested Materialized View: Example

The following example uses the materialized view from the preceding example as a master table to create a materialized view tailored for a particular sales representative in the sample oe schema:

CREATE MATERIALIZED VIEW my_warranty_orders
   AS SELECT w.order_id, w.line_item_id, o.order_date
   FROM warranty_orders w, orders o
   WHERE o.order_id = o.order_id
   AND o.sales_rep_id = 165;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 4 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE MATERIALIZED VIEW LOG

Purpose

Use the CREATE MATERIALIZED VIEW LOG statement to create a materialized view log, which is a table associated with the master table of a materialized view.

Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.

When DML changes are made to the master table's data, Oracle stores rows describing those changes in the materialized view log and then uses the materialized view log to refresh materialized views based on the master table. This process is called an incremental or fast refresh. Without a materialized view log, Oracle must reexecute the materialized view query to refresh the materialized view. This process is called a complete refresh. Usually, a fast refresh takes less time than a complete refresh.

A materialized view log is located in the master database in the same schema as the master table. A master table can have only one materialized view log defined on it. Oracle can use this materialized view log to perform fast refreshes for all fast-refreshable materialized views based on the master table.

To fast refresh a materialized join view (a materialized view containing a join), you must create a materialized view log for each of the tables referenced by the materialized view.

See Also:
  • CREATE MATERIALIZED VIEW , ALTER MATERIALIZED VIEW , Oracle9i Database Concepts, Oracle9i Data Warehousing Guide, and Oracle9i Advanced Replication for information on materialized views in general
  • ALTER MATERIALIZED VIEW LOG for information on modifying a materialized view log
  • DROP MATERIALIZED VIEW LOG for information on dropping a materialized view log
  • Oracle9i Database Concepts and Oracle9i Database Utilities for information on using direct loader logs

Prerequisites

The privileges required to create a materialized view log directly relate to the privileges necessary to create the underlying objects associated with a materialized view log.

  • If you own the master table, you can create an associated materialized view log if you have the CREATE TABLE privilege.
  • If you are creating a materialized view log for a table in another user's schema, you must have the CREATE ANY TABLE and COMMENT ANY TABLE privileges, as well as either the SELECT privilege for the master table or SELECT ANY TABLE.

In either case, the owner of the materialized view log must have sufficient quota in the tablespace intended to hold the materialized view log or must have the UNLIMITED TABLESPACE system privilege.

See Also:

Oracle9i Data Warehousing Guide for more information about the prerequisites for creating a materialized view log

Syntax

create_materialized_vw_log::=

Text description of statements_620.gif follows
Text description of create_materialized_vw_log

(physical_attributes_clause::= , logging_clause::= , parallel_clause::= , table_partitioning_clauses (in CREATE TABLE), new_values_clause::= )

physical_attributes_clause::=

Text description of statements_621.gif follows
Text description of physical_attributes_clause

(storage_clause )

logging_clause::=

Text description of statements_642.gif follows
Text description of logging_clause

parallel_clause::=

Text description of statements_62.gif follows
Text description of parallel_clause

new_values_clause::=

Text description of statements_650.gif follows
Text description of new_values_clause

Semantics

schema

Specify the schema containing the materialized view log's master table. If you omit schema, Oracle assumes the master table is contained in your own schema. Oracle creates the materialized view log in the schema of its master table. You cannot create a materialized view log for a table in the schema of the user SYS.

table

Specify the name of the master table for which the materialized view log is to be created.

Restriction on Master Tables of Materialized View Logs

You cannot create a materialized view log for a temporary table or for a view.

See Also:

"Creating a Materialized View Log: Examples"

physical_attributes_clause

Use the physical_attributes_clause to establish values for physical and storage characteristics for the materialized view log.

See Also:
  • physical_attributes_clause for a complete description of the parameters of the physical_attributes_clause
  • storage_clause for a complete description of the storage_clause, including default values

TABLESPACE Clause

Specify the tablespace in which the materialized view log is to be created. If you omit this clause, Oracle creates the materialized view log in the default tablespace of the schema of the materialized view log.

logging_clause

Specify either LOGGING or NOLOGGING to establish the logging characteristics for the materialized view log. The default is the logging characteristic of the tablespace in which the materialized view log resides.

See Also:

logging_clause for a full description of this clause

CACHE | NOCACHE

For data that will be accessed frequently, CACHE specifies that the blocks retrieved for this log are placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables.

NOCACHE specifies that the blocks are placed at the least recently used end of the LRU list. The default is NOCACHE.

Note:

NOCACHE has no effect on materialized view logs for which you specify KEEP in the storage_clause.
See Also:

CREATE TABLE for information about specifying CACHE or NOCACHE

parallel_clause

The parallel_clause lets you indicate whether parallel operations will be supported for the materialized view log.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

See Also:

"Notes on the parallel_clause" for CREATE TABLE

table_partitioning_clauses

Use the table_partitioning_clauses to indicate that the materialized view log is partitioned on specified ranges of values or on a hash function. Partitioning of materialized view logs is the same as partitioning of tables.

See Also:

table_partitioning_clauses of CREATE TABLE

WITH Clause

Use the WITH clause to indicate whether the materialized view log should record the primary key, the rowid, object ID, or a combination of these row identifiers when rows in the master are changed. You can also use this clause to add a sequence to the materialized view log to provide additional ordering information for its records.

This clause also specifies whether the materialized view log records additional columns that might be referenced as filter columns (non-primary-key columns referenced by subquery materialized views) or join columns (non-primary-key columns that define a join in the subquery WHERE clause).

If you omit this clause, or if you specify the clause without PRIMARY KEY, ROWID, or OBJECT ID, then Oracle stores primary key values by default. However, Oracle does not store primary key values implicitly if you specify only OBJECT ID or ROWID at create time. A primary key log, created either explicitly or by default, performs additional checking on the primary key constraint.

OBJECT ID

Specify OBJECT ID to indicate that the system-generated or user-defined object identifier of every modified row should be recorded in the materialized view log.

Restriction on OBJECT ID

You can specify OBJECT ID only when creating a log on an object table, and you cannot specify it for storage tables.

PRIMARY KEY

Specify PRIMARY KEY to indicate that the primary key of all rows changed should be recorded in the materialized view log.

ROWID

Specify ROWID to indicate that the rowid of all rows changed should be recorded in the materialized view log.

SEQUENCE

Specify SEQUENCE to indicate that a sequence value providing additional ordering information should be recorded in the materialized view log. Sequence numbers are necessary to support fast refresh after some update scenarios.

See Also:

Oracle9i Data Warehousing Guide for more information on the use of sequence numbers in materialized view logs and for examples that use this clause
column

Specify the columns whose values you want to be recorded in the materialized view log for all rows that are changed. Typically these columns are filter columns (non-primary-key columns referenced by materialized views) and join columns (non-primary-key columns that define a join in the WHERE clause of the subquery).

Restrictions on the WITH Clause
  • You can specify only one PRIMARY KEY, one ROWID, one OBJECT ID, and one column list for each materialized view log.
  • Primary key columns are implicitly recorded in the materialized view log. Therefore, you cannot specify either of the following combinations if column contains one of the primary key columns:
    WITH ... PRIMARY KEY ... (column)
WITH ... (column) ... PRIMARY KEY
WITH (column)
    See Also:
    • CREATE MATERIALIZED VIEW for information on explicit and implicit inclusion of materialized view log values
    • Oracle9i Advanced Replication for more information about filter columns and join columns
    • "Specifying Filter Columns for Materialized View Logs: Example" and "Specifying Join Columns for Materialized View Logs: Example"

NEW VALUES Clause

The NEW VALUES clause lets you indicate whether Oracle saves both old and new values in the materialized view log.

See Also:

"Including New Values in Materialized View Logs: Example"

INCLUDING

Specify INCLUDING to save both new and old values in the log. If this log is for a table on which you have a single-table materialized aggregate view, and if you want the materialized view to be eligible for fast refresh, you must specify INCLUDING.

EXCLUDING

Specify EXCLUDING to disable the recording of new values in the log. This is the default. You can use this clause to avoid the overhead of recording new values. However, do not use this clause if you have a fast-refreshable single-table materialized aggregate view defined on this table.

Examples

Creating a Materialized View Log: Examples

The following statement creates a materialized view log on the oe.customers table that specifies physical and storage characteristics:

CREATE MATERIALIZED VIEW LOG ON customers
   PCTFREE 5
   TABLESPACE example
   STORAGE (INITIAL 10K NEXT 10K);

This materialized view log supports fast refresh for primary key materialized views only. The following statement creates another version of the materialized view log with the ROWID clause, which enables fast refresh for more types of materialized views:

CREATE MATERIALIZED VIEW LOG ON customers WITH PRIMARY KEY, ROWID;

This materialized view log makes fast refresh possible for rowid materialized views and for materialized join views. To provide for fast refresh of materialized aggregate views, you must also specify the SEQUENCE and INCLUDING NEW VALUES clauses, as shown in the next statement.

Specifying Filter Columns for Materialized View Logs: Example

The following statement creates a materialized view log on the sh.sales table, and is used in "Creating Materialized Aggregate Views: Example" . It specifies as filter columns all of the columns of the table referenced in that materialized view.

CREATE MATERIALIZED VIEW LOG ON sales
   WITH ROWID, SEQUENCE(amount_sold, time_id, prod_id)
   INCLUDNG NEW VALUES;
Specifying Join Columns for Materialized View Logs: Example

The following statement creates a materialized view log on the order_items table of the sample oe schema. The log records primary keys and product_id, which is used as a join column in "Creating a Fast Refreshable Materialized View: Example" .

CREATE MATERIALIZED VIEW LOG ON order_items WITH (product_id);
Including New Values in Materialized View Logs: Example

The following example creates a materialized view log on the oe.product_information table that specifies INCLUDING NEW VALUES:

CREATE MATERIALIZED VIEW LOG ON product_information
   WITH ROWID, (list_price, min_price, category_id)
   INCLUDING NEW VALUES;

You could create the following materialized aggregate view to use the product_information log:

CREATE MATERIALIZED VIEW products_mv
   REFRESH FAST ON COMMIT
   AS SELECT SUM(list_price - min_price), category_id
         FROM product_information
         GROUP BY category_id;

This materialized view is eligible for fast refresh because the log it uses includes both old and new values.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 5 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE OPERATOR

Purpose

Use the CREATE OPERATOR statement to create a new operator and define its bindings.

Operators can be referenced by indextypes and by DML and query SQL statements. The operators, in turn, reference functions, packages, types, and other user-defined objects.

See Also:

Oracle9i Data Cartridge Developer's Guide and Oracle9i Database Concepts for a discussion of these dependencies and of operators in general

Prerequisites

To create an operator in your own schema, you must have CREATE OPERATOR system privilege. To create an operator in another schema, you must have the CREATE ANY OPERATOR system privilege. In either case, you must also have EXECUTE privilege on the functions and operators referenced.

Syntax

create_operator::=

Text description of statements_623.gif follows
Text description of create_operator

binding_clause::=

Text description of statements_69.gif follows
Text description of binding_clause

implementation_clause::=

Text description of statements_624.gif follows
Text description of implementation_clause

context_clause::=

Text description of statements_625.gif follows
Text description of context_clause

using_function_clause::=

Text description of statements_626.gif follows
Text description of using_function_clause

Semantics

OR REPLACE

Specify OR REPLACE to replace the definition of the operator schema object.

Restriction on Replacing an Operator

You can replace the definition only if the operator has no dependent objects (for example, indextypes supporting the operator).

schema

Specify the schema containing the operator. If you omit schema, Oracle creates the operator in your own schema.

operator

Specify the name of the operator to be created.

binding_clause

Use the binding_clause to specify one or more parameter datatypes (parameter_type) for binding the operator to a function. The signature of each binding (that is, the sequence of the datatypes of the arguments to the corresponding function) must be unique according to the rules of overloading.

The parameter_type can itself be an object type. If it is, you can optionally qualify it with its schema.

Restriction on Binding Operators

You cannot specify a parameter_type of REF, LONG, or LONG RAW.

See Also:

PL/SQL User's Guide and Reference for more information about overloading
RETURN Clause

Specify the return datatype for the binding.

The return_type can itself be an object type. If so, you can optionally qualify it with its schema.

Restriction on Binding Return Datatype

You cannot specify a return_type of REF, LONG, or LONG RAW.

implementation_clause

ANCILLARY TO Clause

Use the ANCILLARY TO clause to indicate that the operator binding is ancillary to the specified primary operator binding (primary_operator). If you specify this clause, do not specify a previous binding with just one number parameter.

context_clause

Use the context_clause to specify the name of the implementation type used by the functional implementation of the operator as a scan context.

COMPUTE ANCILLARY DATA

Specify COMPUTE ANCILLARY DATA to indicate that the operator binding computes ancillary data.

using_function_clause

The using_function_clause lets you specify the function that provides the implementation for the binding. function_name can be a standalone function, packaged function, type method, or a synonym for any of these.

Example

Creating User-Defined Operators: Example

This example creates a very simple functional implementation of equality and then creates an operator that uses the function:

CREATE FUNCTION eq_f(a VARCHAR2, b VARCHAR2) RETURN NUMBER AS
BEGIN
   IF a = b THEN RETURN 1;
   ELSE RETURN 0;
   END IF;
END;
/

CREATE OPERATOR eq_op
   BINDING (VARCHAR2, VARCHAR2)
   RETURN NUMBER
   USING eq_f;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 6 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE OUTLINE

Purpose

Use the CREATE OUTLINE statement to create a stored outline, which is a set of attributes used by the optimizer to generate an execution plan. You can then instruct the optimizer to use a set of outlines to influence the generation of execution plans whenever a particular SQL statement is issued, regardless of changes in factors that can affect optimization. You can also modify an outline so that it takes into account changes in these factors.

Note:

The SQL statement issued subsequently must be an exact string match of the statement specified when creating the outline.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for information on execution plans
  • ALTER OUTLINE for information on modifying an outline
  • ALTER SESSION and ALTER SYSTEM for information on the USE_STORED_OUTLINES and USE_PRIVATE_OUTLINES parameters

Prerequisites

To create a public or private outline, you must have the CREATE ANY OUTLINE system privilege.

If you are creating a clone outline from a source outline, you must also have the SELECT_CATALOG_ROLE role.

To create a private outline, you must provide an outline editing table to hold the outline data in your schema by executing the DBMS_OUTLN_EDIT.CREATE_EDIT_TABLES procedure. You must have the EXECUTE privilege on the DBMS_OUTLN_EDIT package to execute this procedure.

You enable or disable the use of stored outlines dynamically for an individual session or for the system:

  • Enable the USE_STORED_OUTLINES parameter to use public outlines
  • Enable the USE_PRIVATE_OUTLINES parameter to use private stored outlines.

    See Also:
    • Oracle9i Database Performance Tuning Guide and Reference for information on using outlines for performance tuning
    • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_OUTLN_EDIT package

Syntax

create_outline::=

Text description of statements_627.gif follows
Text description of create_outline

Semantics

OR REPLACE

Specify OR REPLACE to replace an existing outline with a new outline of the same name.

PUBLIC | PRIVATE

Specify PUBLIC if you are creating an outline for use by PUBLIC. This is the default.

Specify PRIVATE to create an outline for private use by the current session only. The data of this outline is stored in the current schema.

Note:

Before first creating a private outline, you must run the OUTLN_PKG.CREATE_EDIT_TABLES procedure to create the required outline tables and indexes in your schema.

outline

Specify the unique name to be assigned to the stored outline. If you do not specify outline, the system generates an outline name.

See Also:

"Creating an Outline: Example"

FROM ... source_outline Clause

Use the FROM clause to create a new outline by copying an existing one. By default, Oracle looks for source_category in the public area. If you specify PRIVATE, Oracle will look for the outline in the current schema.

Restriction on Copying an Outline

If you specify the FROM clause, you cannot specify the ON clause.

See Also:

"Creating a Private Clone Outline: Example" and "Publicizing a Private Outline to the Public Area: Example"

FOR CATEGORY Clause

Specify an optional name used to group stored outlines. For example, you could specify a category of outlines for end-of-week use and another for end-of-quarter use. If you do not specify category, the outline is stored in the DEFAULT category.

ON Clause

Specify the SQL statement for which Oracle will create an outline when the statement is compiled. This clause is optional only if you are creating a copy of an existing outline using the FROM clause.

You can specify any one of the following statements:

  • SELECT
  • DELETE
  • UPDATE
  • INSERT ... SELECT
  • CREATE TABLE ... AS SELECT
Restrictions on the Outline SQL Statement
  • If you specify the ON clause, you cannot specify the FROM clause.
  • You cannot create an outline on a multitable INSERT statement.

    Note:

    You can specify multiple outlines for a single statement, but each outline for the same statement must be in a different category.

Example

Creating an Outline: Example

The following statement creates a stored outline by compiling the ON statement. The outline is called salaries and is stored in the category special.

CREATE OUTLINE salaries FOR CATEGORY special
   ON SELECT last_name, salary FROM employees;

When this same SELECT statement is subsequently compiled, if the USE_STORED_OUTLINES parameter is set to special, Oracle generates the same execution plan as was generated when the outline salaries was created.

Creating a Private Clone Outline: Example

The following statement creates a stored private outline my_salaries based on the public category salaries created in the preceding example. In order to create a private outline, the user creating the private outline must have the EXECUTE privilege on the DBMS_OUTLN_EDIT package, and must execute the CREATE_EDIT_TABLES procedure of that package.

EXECUTE DBMS_OUTLN_EDIT.CREATE_EDIT_TABLES;

CREATE OR REPLACE PRIVATE OUTLINE my_salaries
   FROM salaries;
Publicizing a Private Outline to the Public Area: Example

The following statement copies back (or publicizes) a private outline to the public area after private editing:

CREATE OR REPLACE OUTLINE public_salaries
   FROM PRIVATE my_salaries;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 7 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE PACKAGE

Purpose

Use the CREATE PACKAGE statement to create the specification for a stored package, which is an encapsulated collection of related procedures, functions, and other program objects stored together in the database. The specification declares these objects.

See Also:
  • CREATE PACKAGE BODY for information on specifying the implementation of the package
  • CREATE FUNCTION and CREATE PROCEDURE for information on creating standalone functions and procedures
  • ALTER PACKAGE for information on modifying a package
  • DROP PACKAGE for information on dropping a package
  • Oracle9i Application Developer's Guide - Fundamentals and Oracle9i Supplied PL/SQL Packages and Types Reference for detailed discussions of packages and how to use them

Prerequisites

Before a package can be created, the user SYS must run a SQL script commonly called DBMSSTDX.SQL. The exact name and location of this script depend on your operating system.

To create a package in your own schema, you must have the CREATE PROCEDURE system privilege. To create a package in another user's schema, you must have the CREATE ANY PROCEDURE system privilege.

To embed a CREATE PACKAGE statement inside an Oracle precompiler program, you must terminate the statement with the keyword END-EXEC followed by the embedded SQL statement terminator for the specific language.

See Also:

PL/SQL User's Guide and Reference

Syntax

create_package::=

Text description of statements_65.gif follows
Text description of create_package

invoker_rights_clause::=

Text description of statements_68.gif follows
Text description of invoker_rights_clause

Semantics

OR REPLACE

Specify OR REPLACE to re-create the package specification if it already exists. Use this clause to change the specification of an existing package without dropping, re-creating, and regranting object privileges previously granted on the package. If you change a package specification, Oracle recompiles it.

Users who had previously been granted privileges on a redefined package can still access the package without being regranted the privileges.

If any function-based indexes depend on the package, Oracle marks the indexes DISABLED.

See Also:

ALTER PACKAGE for information on recompiling package specifications

schema

Specify the schema to contain the package. If you omit schema, Oracle creates the package in your own schema.

package

Specify the name of the package to be created.

If creating the package results in compilation errors, Oracle returns an error. You can see the associated compiler error messages with the SQL*PLUS command SHOW ERRORS.

invoker_rights_clause

The invoker_rights_clause lets you specify whether the functions and procedures in the package execute with the privileges and in the schema of the user who owns it or with the privileges and in the schema of CURRENT_USER. This specification applies to the corresponding package body as well.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the package.

AUTHID CURRENT_USER

Specify CURRENT_USER to indicate that the package executes with the privileges of CURRENT_USER. This clause creates an invoker-rights package.

This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the package resides.

AUTHID DEFINER

Specify DEFINER to indicate that the package executes with the privileges of the owner of the schema in which the package resides and that external names resolve in the schema where the package resides. This is the default and creates a definer-rights package.

See Also:
  • PL/SQL User's Guide and Reference
  • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined

pl/sql_package_spec

Specify the package specification, which can contain type definitions, cursor declarations, variable declarations, constant declarations, exception declarations, PL/SQL subprogram specifications, and call specifications (declarations of a C or Java routine expressed in PL/SQL).

See Also:
  • PL/SQL User's Guide and Reference for more information on PL/SQL package program units
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on Oracle supplied packages
  • "Restrictions on User-defined Functions" for a list of restrictions on user-defined functions in a package

Example

Creating a Package: Example

The following SQL statement creates the specification of the emp_mgmt package (PL/SQL is show in italics):

CREATE OR REPLACE PACKAGE emp_mgmt AS
 FUNCTION hire (last_name VARCHAR2, job_id VARCHAR2,
    manager_id NUMBER, salary NUMBER,
    commission_pct NUMBER, department_id NUMBER)
    RETURN NUMBER;
 FUNCTION create_dept(department_id NUMBER, location_id NUMBER)
    RETURN NUMBER;
 PROCEDURE remove_emp(employee_id NUMBER);
 PROCEDURE remove_dept(department_id NUMBER);
 PROCEDURE increase_sal(employee_id NUMBER, salary_incr NUMBER);
 PROCEDURE increase_comm(employee_id NUMBER, comm_incr NUMBER);
 no_comm EXCEPTION;
 no_sal EXCEPTION;
END emp_mgmt;
/

The specification for the emp_mgmt package declares the following public program objects:

  • The functions hire and create_dept
  • The procedures remove_emp, remove_dept, increase_sal, and increase_comm
  • The exceptions no_comm and no_sal

All of these objects are available to users who have access to the package. After creating the package, you can develop applications that call any of the package's public procedures or functions or raise any of the package's public exceptions.

Before you can call this package's procedures and functions, you must define these procedures and functions in the package body. For an example of a CREATE PACKAGE BODY statement that creates the body of the emp_mgmt package, see CREATE PACKAGE BODY .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 8 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE PACKAGE BODY

Purpose

Use the CREATE PACKAGE BODY statement to create the body of a stored package, which is an encapsulated collection of related procedures, stored functions, and other program objects stored together in the database. The body defines these objects.

Packages are an alternative to creating procedures and functions as standalone schema objects.

See Also:
  • CREATE FUNCTION and CREATE PROCEDURE for information on creating standalone functions and procedures
  • CREATE PACKAGE for a discussion of packages, including how to create packages
  • "Examples" for some illustrations
  • ALTER PACKAGE for information on modifying a package
  • DROP PACKAGE for information on removing a package from the database

Prerequisites

Before a package can be created, the user SYS must run a SQL script commonly called DBMSSTDX.SQL. The exact name and location of this script depend on your operating system.

To create a package in your own schema, you must have CREATE PROCEDURE system privilege. To create a package in another user's schema, you must have CREATE ANY PROCEDURE system privilege.

To embed a CREATE PACKAGE BODY statement inside an Oracle precompiler program, you must terminate the statement with the keyword END-EXEC followed by the embedded SQL statement terminator for the specific language.

See Also:

PL/SQL User's Guide and Reference

Syntax

create_package_body::=

Text description of statements_628.gif follows
Text description of create_package_body

Semantics

OR REPLACE

Specify OR REPLACE to re-create the package body if it already exists. Use this clause to change the body of an existing package without dropping, re-creating, and regranting object privileges previously granted on it. If you change a package body, Oracle recompiles it.

Users who had previously been granted privileges on a redefined package can still access the package without being regranted the privileges.

See Also:

ALTER PACKAGE for information on recompiling package bodies

schema

Specify the schema to contain the package. If you omit schema, Oracle creates the package in your current schema.

package

Specify the name of the package to be created.

pl/sql_package_body

Specify the package body, which can contain PL/SQL subprogram bodies or call specifications (declarations of a C or Java routine expressed in PL/SQL).

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for more information on writing PL/SQL or C package program units
  • Oracle9i Java Stored Procedures Developer's Guide for information on Java package program units
  • "Restrictions on User-defined Functions" for a list of restrictions on user-defined functions in a package

Examples

Creating a Package Body: Example

This SQL statement creates the body of the emp_mgmt package created in "Creating a Package: Example" (PL/SQL is shown in italics):

CREATE OR REPLACE PACKAGE BODY emp_mgmt AS
   tot_emps NUMBER;
 tot_depts NUMBER;
FUNCTION hire
 (last_name VARCHAR2, job_id VARCHAR2,
  manager_id NUMBER, salary NUMBER,
  commission_pct NUMBER, department_id NUMBER)
 RETURN NUMBER IS new_empno NUMBER;
BEGIN
 SELECT employees_seq.NEXTVAL
    INTO new_empno
    FROM DUAL;
 INSERT INTO employees
    VALUES (new_empno, 'First', 'Last','first.last@oracle.com',
            '(123)123-1234','18-JUN-02','IT_PROG',90000000,00,
            100,110);
    tot_emps := tot_emps + 1;
 RETURN(new_empno);
END;
FUNCTION create_dept(department_id NUMBER, location_id NUMBER)
 RETURN NUMBER IS
    new_deptno NUMBER;
 BEGIN
    SELECT departments_seq.NEXTVAL
       INTO new_deptno
       FROM dual;
    INSERT INTO departments
       VALUES (new_deptno, 'department name', 100, 1700);
    tot_depts := tot_depts + 1;
    RETURN(new_deptno);
 END;
PROCEDURE remove_emp (employee_id NUMBER) IS
 BEGIN
    DELETE FROM employees
    WHERE employees.employee_id = remove_emp.employee_id;
    tot_emps := tot_emps - 1;
 END;
PROCEDURE remove_dept(department_id NUMBER) IS
 BEGIN
    DELETE FROM departments
    WHERE departments.department_id = remove_dept.department_id;
    tot_depts := tot_depts - 1;
    SELECT COUNT(*) INTO tot_emps FROM employees;
 END;
PROCEDURE increase_sal(employee_id NUMBER, salary_incr NUMBER) IS
 curr_sal NUMBER;
 BEGIN
    SELECT salary INTO curr_sal FROM employees
    WHERE employees.employee_id = increase_sal.employee_id;
    IF curr_sal IS NULL
       THEN RAISE no_sal;
    ELSE
       UPDATE employees
       SET salary = salary + salary_incr
       WHERE employee_id = employee_id;
    END IF;
 END;
PROCEDURE increase_comm(employee_id NUMBER, comm_incr NUMBER) IS
 curr_comm NUMBER;
 BEGIN
    SELECT commission_pct
    INTO curr_comm
    FROM employees
    WHERE employees.employee_id = increase_comm.employee_id;
    IF curr_comm IS NULL
       THEN RAISE no_comm;
    ELSE
       UPDATE employees
       SET commission_pct = commission_pct + comm_incr;
    END IF;
 END;
END emp_mgmt;
/

The package body defines the public program objects declared in the package specification:

  • The functions hire and create_dept
  • The procedures remove_emp, remove_dept, increase_sal, and increase_comm

These objects are declared in the package specification, so they can be called by application programs, procedures, and functions outside the package. For example, if you have access to the package, you can create a procedure increase_all_comms separate from the emp_mgmt package that calls the increase_comm procedure.

These objects are defined in the package body, so you can change their definitions without causing Oracle to invalidate dependent schema objects. For example, if you subsequently change the definition of hire, Oracle need not recompile increase_all_comms before executing it.

The package body in this example also declares private program objects, the variables tot_emps and tot_depts. These objects are declared in the package body rather than the package specification, so they are accessible to other objects in the package, but they are not accessible outside the package. For example, you cannot develop an application that explicitly changes the value of the variable tot_depts. However, the function create_dept is part of the package, so create_dept can change the value of tot_depts.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 9 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE PFILE

Purpose

Use the CREATE PFILE statement to export a binary server parameter file into a text initialization parameter file. Creating a text parameter file is a convenient way to get a listing of the current parameter settings being used by the database, and it lets you edit the file easily in a text editor and then convert it back into a server parameter file using the CREATE SPFILE statement.

Upon successful execution of this statement, Oracle creates a text parameter file on the server. In a Real Application Clusters environment, it will contain all parameter settings of all instances. It will also contain any comments that appeared on the same line with a parameter setting in the server parameter file.

See Also:
  • CREATE SPFILE for information on server parameter files
  • Oracle9i Database Administrator's Guide for information on pre-Oracle9i text initialization parameter files and Oracle9i binary server parameter files
  • Oracle9i Real Application Clusters Administration for information on using server parameter files in a Real Application Clusters environment

Prerequisites

You must have the SYSDBA or the SYSOPER role to execute this statement. You can execute this statement either before or after instance startup.

Syntax

create_pfile::=

Text description of statements_646.gif follows
Text description of create_pfile

Semantics

pfile_name

Specify the name of the text parameter file you want to create. If you do not specify pfile_name, Oracle uses the platform-specific default initialization parameter file name.

spfile_name

Specify the name of the binary server parameter from which you want to create a text file.

  • If you specify spfile_name, the file must exist on the server. If the file does not reside in the default directory for server parameter files on your operating system, you must specify the full path.
  • If you do not specify spfile_name, Oracle looks in the default directory for server parameter files on your operating system, for the platform-specific default server parameter file name, and uses that file. If that file does not exist in the expected directory, Oracle returns an error.

    See Also:

    Oracle9i Database Administrator's Guide for Windows (or other appropriate operating system specific documentation) for default parameter file names

Examples

Creating a Parameter File: Example

The following example creates a text parameter file my_init.ora from a binary server parameter file production.ora:

CREATE PFILE = 'my_init.ora' FROM SPFILE = 's_params.ora';
Note:

Typically you will need to specify the full path and filename for parameter files on your operating system. Please refer to your Oracle operating system documentation for path information.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 10 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE PROCEDURE

Purpose

Use the CREATE PROCEDURE statement to create a standalone stored procedure or a call specification.

A procedure is a group of PL/SQL statements that you can call by name. A call specification ("call spec") declares a Java method or a third-generation language (3GL) routine so that it can be called from SQL and PL/SQL. The call spec tells Oracle which Java method to invoke when a call is made. It also tells Oracle what type conversions to make for the arguments and return value.

Stored procedures offer advantages in the areas of development, integrity, security, performance, and memory allocation.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals for more information on stored procedures, including how to call stored procedures and for information about registering external procedures
  • CREATE FUNCTION for information specific to functions, which are similar to procedures in many ways
  • CREATE PACKAGE for information on creating packages. (The CREATE PROCEDURE statement creates a procedure as a standalone schema object. You can also create a procedure as part of a package.)
  • ALTER PROCEDURE and DROP PROCEDURE for information on modifying and dropping a standalone procedure
  • CREATE LIBRARY for more information about shared libraries

Prerequisites

Before creating a procedure, the user SYS must run a SQL script commonly called DBMSSTDX.SQL. The exact name and location of this script depends on your operating system.

To create a procedure in your own schema, you must have the CREATE PROCEDURE system privilege. To create a procedure in another user's schema, you must have CREATE ANY PROCEDURE system privilege. To replace a procedure in another schema, you must have the ALTER ANY PROCEDURE system privilege.

To invoke a call spec, you may need additional privileges (for example, EXECUTE privileges on the C library for a C call spec).

To embed a CREATE PROCEDURE statement inside an Oracle precompiler program, you must terminate the statement with the keyword END-EXEC followed by the embedded SQL statement terminator for the specific language.

See Also:

PL/SQL User's Guide and Reference or Oracle9i Java Stored Procedures Developer's Guide for more information

Syntax

create_procedure::=

Text description of statements_629.gif follows
Text description of create_procedure

invoker_rights_clause::=

Text description of statements_630.gif follows
Text description of invoker_rights_clause

call_spec::=

Text description of statements_631.gif follows
Text description of call_spec

Java_declaration::=

Text description of statements_610.gif follows
Text description of Java_declaration

C_declaration::=

Text description of statements_632.gif follows
Text description of C_declaration

Semantics

OR REPLACE

Specify OR REPLACE to re-create the procedure if it already exists. Use this clause to change the definition of an existing procedure without dropping, re-creating, and regranting object privileges previously granted on it. If you redefine a procedure, Oracle recompiles it.

Users who had previously been granted privileges on a redefined procedure can still access the procedure without being regranted the privileges.

If any function-based indexes depend on the package, Oracle marks the indexes DISABLED.

See Also:

ALTER PROCEDURE for information on recompiling procedures

schema

Specify the schema to contain the procedure. If you omit schema, Oracle creates the procedure in your current schema.

procedure

Specify the name of the procedure to be created.

If creating the procedure results in compilation errors, Oracle returns an error. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

argument

Specify the name of an argument to the procedure. If the procedure does not accept arguments, you can omit the parentheses following the procedure name.

IN

Specify IN to indicate that you must specify a value for the argument when calling the procedure.

OUT

Specify OUT to indicate that the procedure passes a value for this argument back to its calling environment after execution.

IN OUT

Specify IN OUT to indicate that you must specify a value for the argument when calling the procedure and that the procedure passes a value back to its calling environment after execution.

If you omit IN, OUT, and IN OUT, the argument defaults to IN.

NOCOPY

Specify NOCOPY to instruct Oracle to pass this argument as fast as possible. This clause can significantly enhance performance when passing a large value like a record, an index-by table, or a varray to an OUT or IN OUT parameter. (IN parameter values are always passed NOCOPY.)

  • When you specify NOCOPY, assignments made to a package variable may show immediately in this parameter (or assignments made to this parameter may show immediately in a package variable) if the package variable is passed as the actual assignment corresponding to this parameter.
  • Similarly, changes made either to this parameter or to another parameter may be visible immediately through both names if the same variable is passed to both.
  • If the procedure is exited with an unhandled exception, any assignment made to this parameter may be visible in the caller's variable.

These effects may or may not occur on any particular call. You should use NOCOPY only when these effects would not matter.

datatype

Specify the datatype of the argument. An argument can have any datatype supported by PL/SQL.

Datatypes cannot specify length, precision, or scale. For example, VARCHAR2(10) is not valid, but VARCHAR2 is valid. Oracle derives the length, precision, and scale of an argument from the environment from which the procedure is called.

invoker_rights_clause

The invoker_rights_clause lets you specify whether the procedure executes with the privileges and in the schema of the user who owns it or with the privileges and in the schema of CURRENT_USER.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the procedure.

AUTHID CURRENT_USER

Specify CURRENT_USER to indicate that the procedure executes with the privileges of CURRENT_USER. This clause creates an invoker-rights procedure.

This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the procedure resides.

AUTHID DEFINER

Specify DEFINER to indicate that the procedure executes with the privileges of the owner of the schema in which the procedure resides, and that external names resolve in the schema where the procedure resides. This is the default and creates a definer-rights procedure.

See Also:
  • PL/SQL User's Guide and Reference
  • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined

IS | AS Clause

pl/sql_subprogram_body

Declare the procedure in a PL/SQL subprogram body.

See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information on PL/SQL subprograms
call_spec

Use the call_spec to map a Java or C method name, parameter types, and return type to their SQL counterparts.

In Java_declaration, 'string' identifies the Java implementation of the method.

See Also:
  • Oracle9i Java Stored Procedures Developer's Guide for an explanation of the parameters and semantics of the Java_declaration
  • Oracle9i Application Developer's Guide - Fundamentals for an explanation of the parameters and semantics of the C_declaration
AS EXTERNAL

The AS EXTERNAL clause is an alternative way of declaring a C method. This clause has been deprecated and is supported for backward compatibility only. Oracle Corporation recommends that you use the AS LANGUAGE C syntax.

Examples

Creating a Procedure: Example

The following statement creates the procedure remove_emp in the schema hr (PL/SQL is shown in italics):

CREATE PROCEDURE remove_emp (employee_id NUMBER) AS
   tot_emps NUMBER;
 BEGIN
    DELETE FROM employees
    WHERE employees.employee_id = remove_emp.employee_id;
 tot_emps := tot_emps - 1;
 END;
/

The remove_emp procedure removes a specified employee. When you call the procedure, you must specify the employee_id of the employee to be removed. The argument's datatype is NUMBER.

The procedure uses a DELETE statement to remove from the employees table the row of employee_id.

See Also:

"Creating a Package Body: Example" to see how to incorporate this procedure into a package

In the following example, external procedure c_find_root expects a pointer as a parameter. Procedure find_root passes the parameter by reference using the BY REFERENCE phrase (PL/SQL is shown in italics):

CREATE PROCEDURE find_root
   ( x IN REAL )
   IS LANGUAGE C
    NAME c_find_root
    LIBRARY c_utils
    PARAMETERS ( x BY REFERENCE );
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 11 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE PROFILE

Purpose

Use the CREATE PROFILE statement to create a profile, which is a set of limits on database resources. If you assign the profile to a user, that user cannot exceed these limits.

See Also:

Oracle9i Database Administrator's Guide for a detailed description and explanation of how to use password management and protection

Prerequisites

To create a profile, you must have CREATE PROFILE system privilege.

To specify resource limits for a user, you must:

  • Enable resource limits dynamically with the ALTER SYSTEM statement or with the initialization parameter RESOURCE_LIMIT. (This parameter does not apply to password resources. Password resources are always enabled.)
  • Create a profile that defines the limits using the CREATE PROFILE statement
  • Assign the profile to the user using the CREATE USER or ALTER USER statement

    See Also:
    • ALTER SYSTEM for information on enabling resource limits dynamically
    • Oracle9i Database Reference for information on the RESOURCE_LIMIT parameter
    • CREATE USER and ALTER USER for information on profiles

Syntax

create_profile::=

Text description of statements_633.gif follows
Text description of create_profile

resource_parameters::=

Text description of statements_634.gif follows
Text description of resource_parameters

password_parameters::=

Text description of statements_635.gif follows
Text description of password_parameters

Semantics

profile

Specify the name of the profile to be created. Use profiles to limit the database resources available to a user for a single call or a single session.

Oracle enforces resource limits in the following ways:

  • If a user exceeds the CONNECT_TIME or IDLE_TIME session resource limit, Oracle rolls back the current transaction and ends the session. When the user process next issues a call, Oracle returns an error.
  • If a user attempts to perform an operation that exceeds the limit for other session resources, Oracle aborts the operation, rolls back the current statement, and immediately returns an error. The user can then commit or roll back the current transaction, and must then end the session.
  • If a user attempts to perform an operation that exceeds the limit for a single call, Oracle aborts the operation, rolls back the current statement, and returns an error, leaving the current transaction intact.

    Notes:
    • You can use fractions of days for all parameters that limit time, with days as units. For example, 1 hour is 1/24 and 1 minute is 1/1440.
    • You can specify resource limits for users regardless of whether the resource limits are enabled. However, Oracle does not enforce the limits until you enable them.
    See Also:

    "Creating a Profile: Example"

UNLIMITED

When specified with a resource parameter, UNLIMITED indicates that a user assigned this profile can use an unlimited amount of this resource. When specified with a password parameter, UNLIMITED indicates that no limit has been set for the parameter.

DEFAULT

Specify DEFAULT if you want to omit a limit for this resource in this profile. A user assigned this profile is subject to the limit for this resource specified in the DEFAULT profile. The DEFAULT profile initially defines unlimited resources. You can change those limits with the ALTER PROFILE statement.

Any user who is not explicitly assigned a profile is subject to the limits defined in the DEFAULT profile. Also, if the profile that is explicitly assigned to a user omits limits for some resources or specifies DEFAULT for some limits, the user is subject to the limits on those resources defined by the DEFAULT profile.

resource_parameters

SESSIONS_PER_USER

Specify the number of concurrent sessions to which you want to limit the user.

CPU_PER_SESSION

Specify the CPU time limit for a session, expressed in hundredth of seconds.

CPU_PER_CALL

Specify the CPU time limit for a call (a parse, execute, or fetch), expressed in hundredths of seconds.

CONNECT_TIME

Specify the total elapsed time limit for a session, expressed in minutes.

IDLE_TIME

Specify the permitted periods of continuous inactive time during a session, expressed in minutes. Long-running queries and other operations are not subject to this limit.

LOGICAL_READS_PER_SESSION

Specify the permitted number of data blocks read in a session, including blocks read from memory and disk.

LOGICAL_READS_PER_CALL

Specify the permitted the number of data blocks read for a call to process a SQL statement (a parse, execute, or fetch).

PRIVATE_SGA

Specify the amount of private space a session can allocate in the shared pool of the system global area (SGA), expressed in bytes. Use K or M to specify this limit in kilobytes or megabytes.

Note:

This limit applies only if you are using Shared Server architecture. The private space for a session in the SGA includes private SQL and PL/SQL areas, but not shared SQL and PL/SQL areas.
COMPOSITE_LIMIT

Specify the total resource cost for a session, expressed in service units. Oracle calculates the total service units as a weighted sum of CPU_PER_SESSION, CONNECT_TIME, LOGICAL_READS_PER_SESSION, and PRIVATE_SGA.

See Also:

ALTER RESOURCE COST for information on how to specify the weight for each session resource

If you specify expr for any of these parameters, the expression can be of any form except scalar subquery expression.

See Also:

"Setting Profile Resource Limits: Example"

password_parameters

FAILED_LOGIN_ATTEMPTS

Specify the number of failed attempts to log in to the user account before the account is locked.

PASSWORD_LIFE_TIME

Specify the number of days the same password can be used for authentication. The password expires if it is not changed within this period, and further connections are rejected.

PASSWORD_REUSE_TIME

Specify the number of days before which a password cannot be reused. If you set PASSWORD_REUSE_TIME to an integer value, then you must set PASSWORD_REUSE_MAX to UNLIMITED.

PASSWORD_REUSE_MAX

Specify the number of password changes required before the current password can be reused. If you set PASSWORD_REUSE_MAX to an integer value, then you must set PASSWORD_REUSE_TIME to UNLIMITED.

PASSWORD_LOCK_TIME

Specify the number of days an account will be locked after the specified number of consecutive failed login attempts.

PASSWORD_GRACE_TIME

Specify the number of days after the grace period begins during which a warning is issued and login is allowed. If the password is not changed during the grace period, the password expires.

PASSWORD_VERIFY_FUNCTION

The PASSWORD_VERIFY_FUNCTION clause lets a PL/SQL password complexity verification script be passed as an argument to the CREATE PROFILE statement. Oracle provides a default script, but you can create your own routine or use third-party software instead.

  • For function, specify the name of the password complexity verification routine.
  • Specify NULL to indicate that no password verification is performed.
Restrictions on Password Parameters
  • If PASSWORD_REUSE_TIME is set to an integer value, PASSWORD_REUSE_MAX must be set to UNLIMITED. If PASSWORD_REUSE_MAX is set to an integer value, PASSWORD_REUSE_TIME must be set to UNLIMITED.
  • If both PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX are set to UNLIMITED, then Oracle uses neither of these password resources.
  • If PASSWORD_REUSE_MAX is set to DEFAULT and PASSWORD_REUSE_TIME is set to UNLIMITED, then Oracle uses the PASSWORD_REUSE_MAX value defined in the DEFAULT profile.
  • If PASSWORD_REUSE_TIME is set to DEFAULT and PASSWORD_REUSE_MAX is set to UNLIMITED, then Oracle uses the PASSWORD_REUSE_TIME value defined in the DEFAULT profile.
  • If both PASSWORD_REUSE_TIME and PASSWORD_REUSE_MAX are set to DEFAULT, then Oracle uses whichever value is defined in the DEFAULT profile.

    See Also:

    "Setting Profile Password Limits: Example"

Examples

Creating a Profile: Example

The following statement creates the profile new_profile:

CREATE PROFILE new_profile
  LIMIT PASSWORD_REUSE_MAX DEFAULT
        PASSWORD_REUSE_TIME UNLIMITED;
Setting Profile Resource Limits: Example

The following statement creates the profile app_user:

CREATE PROFILE app_user LIMIT
   SESSIONS_PER_USER          UNLIMITED
   CPU_PER_SESSION            UNLIMITED
   CPU_PER_CALL               3000
   CONNECT_TIME               45
   LOGICAL_READS_PER_SESSION  DEFAULT
   LOGICAL_READS_PER_CALL     1000
   PRIVATE_SGA                15K
   COMPOSITE_LIMIT            5000000;

If you then assign the app_user profile to a user, the user is subject to the following limits in subsequent sessions:

  • The user can have any number of concurrent sessions.
  • In a single session, the user can consume an unlimited amount of CPU time.
  • A single call made by the user cannot consume more than 30 seconds of CPU time.
  • A single session cannot last for more than 45 minutes.
  • In a single session, the number of data blocks read from memory and disk is subject to the limit specified in the DEFAULT profile.
  • A single call made by the user cannot read more than 1000 data blocks from memory and disk.
  • A single session cannot allocate more than 15 kilobytes of memory in the SGA.
  • In a single session, the total resource cost cannot exceed 5 million service units. The formula for calculating the total resource cost is specified by the ALTER RESOURCE COST statement.
  • Since the system_manager profile omits a limit for IDLE_TIME and for password limits, the user is subject to the limits on these resources specified in the DEFAULT profile.
Setting Profile Password Limits: Example

The following statement creates the same app_user2 profile with password limits values set:

CREATE PROFILE app_user2 LIMIT
   FAILED_LOGIN_ATTEMPTS 5
   PASSWORD_LIFE_TIME 60
   PASSWORD_REUSE_TIME 60
   PASSWORD_REUSE_MAX UNLIMITED
   PASSWORD_VERIFY_FUNCTION verify_function
   PASSWORD_LOCK_TIME 1/24
   PASSWORD_GRACE_TIME 10;

This example uses Oracle's password verification function, verify_function. Please refer to Oracle9i Database Administrator's Guide for information on using this verification function provided by Oracle or designing your own verification function.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 12 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE ROLE

Purpose

Use the CREATE ROLE statement to create a role, which is a set of privileges that can be granted to users or to other roles. You can use roles to administer database privileges. You can add privileges to a role and then grant the role to a user. The user can then enable the role and exercise the privileges granted by the role.

A role contains all privileges granted to the role and all privileges of other roles granted to it. A new role is initially empty. You add privileges to a role with the GRANT statement.

When you create a role that is NOT IDENTIFIED or is IDENTIFIED EXTERNALLY or BY password, Oracle grants you the role with ADMIN OPTION. However, when you create a role IDENTIFIED GLOBALLY, Oracle does not grant you the role.

See Also:
  • GRANT for information on granting roles
  • ALTER USER for information on enabling roles
  • ALTER ROLE for information on modifying a role
  • DROP ROLE for information on removing a role from the database
  • SET ROLE for information on enabling and disabling roles for the current session
  • Oracle9i Heterogeneous Connectivity Administrator's Guide for a detailed description and explanation of using global roles

Prerequisites

You must have CREATE ROLE system privilege.

Syntax

create_role::=

Text description of statements_636.gif follows
Text description of create_role

Semantics

role

Specify the name of the role to be created. Oracle recommends that the role contain at least one single-byte character regardless of whether the database character set also contains multibyte characters.

Some roles are defined by SQL scripts provided on your distribution media.

See Also:

GRANT for a list of these predefined roles

NOT IDENTIFIED Clause

Specify NOT IDENTIFIED to indicate that this role is authorized by the database and that no password is required to enable the role.

IDENTIFIED Clause

Use the IDENTIFIED clause to indicate that a user must be authorized by the specified method before the role is enabled with the SET ROLE statement.

BY password

The BY password clause lets you create a local role and indicates that the user must specify the password to Oracle when enabling the role. The password can contain only single-byte characters from your database character set regardless of whether this character set also contains multibyte characters.

USING package

The USING package clause lets you create an application role, which is a role that can be enabled only by applications using an authorized package. If you do not specify schema, Oracle assumes the package is in your own schema.

EXTERNALLY

Specify EXTERNALLY to create an external role. An external user must be authorized by an external service (such as an operating system or third-party service) before enabling the role.

Depending on the operating system, the user may have to specify a password to the operating system before the role is enabled.

GLOBALLY

Specify GLOBALLY to create a global role. A global user must be authorized to use the role by the enterprise directory service before the role is enabled with the SET ROLE statement, or at login.

If you omit both the NOT IDENTIFIED clause and the IDENTIFIED clause, the role defaults to NOT IDENTIFIED.

Examples

Creating a Role: Example

The following statement creates the role dw_manager:

CREATE ROLE dw_manager;

Users who are subsequently granted the dw_manager will inherit all of the privileges that have been granted to this role.

You can add a layer of security to roles by specifying a password, as in the following example:

CREATE ROLE dw_manager
   IDENTIFIED BY warehouse;

Users who are subsequently granted the dw_manager role must specify the password warehouse to enable the role with the SET ROLE statement.

The following statement creates global role warehouse_user:

CREATE ROLE warehouse_user IDENTIFIED GLOBALLY;

The following statement creates the same role as an external role:

CREATE ROLE warehouse_user IDENTIFIED EXTERNALLY;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 13 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE ROLLBACK SEGMENT

Purpose

Use the CREATE ROLLBACK SEGMENT statement to create a rollback segment, which is an object that Oracle uses to store data necessary to reverse, or undo, changes made by transactions.

The information in this section assumes that your database is running in rollback undo mode (the UNDO_MANAGEMENT initialization parameter is set to MANUAL or not set at all).

If your database is running in Automatic Undo Management mode (the UNDO_MANAGEMENT initialization parameter is set to AUTO), then user-created rollback segments are irrelevant. In this case, Oracle returns an error in response to any CREATE ROLLBACK SEGMENT or ALTER ROLLBACK SEGMENT statement. To suppress these errors, set the UNDO_SUPPRESS_ERRORS parameter to TRUE.

Further, if your database has a locally managed SYSTEM tablespace, then you cannot create rollback segments in any dictionary-managed tablespace. Instead, you must

  • Use the Automatic Undo Management feature, which uses undo tablespaces instead of rollback segments to hold undo data, or
  • Create locally managed tablespaces to hold the rollback segments.

Oracle Corporation recommends that you use Automatic Undo Management.

Notes:
  • A tablespace can have multiple rollback segments. Generally, multiple rollback segments improve performance.
  • The tablespace must be online for you to add a rollback segment to it.
  • When you create a rollback segment, it is initially offline. To make it available for transactions by your Oracle instance, bring it online using the ALTER ROLLBACK SEGMENT statement. To bring it online automatically whenever you start up the database, add the segment's name to the value of the ROLLBACK_SEGMENTS initialization parameter.

To use objects in a tablespace other than the SYSTEM tablespace:

  • If you are running the database in rollback undo mode, at least one rollback segment (other than the SYSTEM rollback segment) must be online.
  • If you are running the database in Automatic Undo Management mode, at least one UNDO tablespace must be online.

    See Also:
    • ALTER ROLLBACK SEGMENT for information on altering a rollback segment
    • DROP ROLLBACK SEGMENT for information on removing a rollback segment
    • Oracle9i Database Reference for information on the UNDO_MANAGEMENT and UNDO_SUPPRESS_ERRORS parameters
    • Oracle9i Database Administrator's Guide for information on Automatic Undo Management mode

Prerequisites

To create a rollback segment, you must have CREATE ROLLBACK SEGMENT system privilege.

Syntax

create_rollback_segment::=

Text description of statements_637.gif follows
Text description of create_rollback_segment

(storage_clause::= )

Keyword and Parameters

PUBLIC

Specify PUBLIC to indicate that the rollback segment is public and is available to any instance. If you omit this clause, the rollback segment is private and is available only to the instance naming it in its initialization parameter ROLLBACK_SEGMENTS.

rollback_segment

Specify the name of the rollback segment to be created.

TABLESPACE

Use the TABLESPACE clause to identify the tablespace in which the rollback segment is created. If you omit this clause, Oracle creates the rollback segment in the SYSTEM tablespace.

Note:

Oracle must access rollback segments frequently. Therefore, Oracle Corporation strongly recommends that you do not create rollback segments in the SYSTEM tablespace, either explicitly or implicitly (by omitting this clause). In addition, to avoid high contention for the tablespace containing the rollback segment, it should not contain other objects such as tables and indexes, and it should require minimal extent allocation and deallocation.

To achieve these goals, create rollback segments in locally managed tablespaces with autoallocation disabled--that is, in tablespaces created with the EXTENT MANAGEMENT LOCAL clause with the UNIFORM setting. (The AUTOALLOCATE setting is not supported.)
See Also:
  • CREATE TABLESPACE
  • Oracle9i Database Administrator's Guide for more information on creating rollback segments and making them available

storage_clause

The storage_clause lets you specify storage characteristics for the rollback segment.

Notes:
  • The OPTIMAL parameter of the storage_clause is of particular interest, because it applies only to rollback segments.
  • You cannot specify the PCTINCREASE parameter of the storage_clause with CREATE ROLLBACK SEGMENT.
See Also:

storage_clause

Examples

Creating a Rollback Segment: Example

The following statement creates a rollback segment with default storage values in an appropriately configured tablespace:

CREATE TABLESPACE rbs_ts
   DATAFILE 'rbs01.dbf' SIZE 10M
   EXTENT MANAGEMENT LOCAL UNIFORM SIZE 100K;

/* This example and the next will fail if your database is in
   Automatic Undo Mode.
*/
CREATE ROLLBACK SEGMENT rbs_one
   TABLESPACE rbs_ts;

The preceding statement is equivalent to the following:

CREATE ROLLBACK SEGMENT rbs_one
   TABLESPACE rbs_ts
   STORAGE
   ( INITIAL 10K
     NEXT 10K
     MAXEXTENTS UNLIMITED);
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 14 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE SCHEMA

Purpose

Use the CREATE SCHEMA to create multiple tables and views and perform multiple grants in a single transaction.

To execute a CREATE SCHEMA statement, Oracle executes each included statement. If all statements execute successfully, Oracle commits the transaction. If any statement results in an error, Oracle rolls back all the statements.

Note:

This statement does not actually create a schema. Oracle automatically creates a schema when you create a user (see CREATE USER ). This statement lets you populate your schema with tables and views and grant privileges on those objects without having to issue multiple SQL statements in multiple transactions.

Prerequisites

The CREATE SCHEMA statement can include CREATE TABLE, CREATE VIEW, and GRANT statements. To issue a CREATE SCHEMA statement, you must have the privileges necessary to issue the included statements.

Syntax

create_schema::=

Text description of statements_638.gif follows
Text description of create_schema

Keyword and Parameters

schema

Specify the name of the schema. The schema name must be the same as your Oracle username.

create_table_statement

Specify a CREATE TABLE statement to be issued as part of this CREATE SCHEMA statement. Do not end this statement with a semicolon (or other terminator character).

See Also:

CREATE TABLE

create_view_statement

Specify a CREATE VIEW statement to be issued as part of this CREATE SCHEMA statement. Do not end this statement with a semicolon (or other terminator character).

See Also:

CREATE VIEW

grant_statement

Specify a GRANT object_privileges statement to be issued as part of this CREATE SCHEMA statement. Do not end this statement with a semicolon (or other terminator character).

See Also:

GRANT

The CREATE SCHEMA statement supports the syntax of these statements only as defined by standard SQL, rather than the complete syntax supported by Oracle.

The order in which you list the CREATE TABLE, CREATE VIEW, and GRANT statements is unimportant. The statements within a CREATE SCHEMA statement can reference existing objects or objects you create in other statements within the same CREATE SCHEMA statement.

Restriction on Granting Privileges to a Schema

The syntax of the parallel_clause is allowed for a CREATE TABLE statement in CREATE SCHEMA, but parallelism is not used when creating the objects.

See Also:

the parallel_clause of CREATE TABLE

Example

Creating a Schema: Example

The following statement creates a schema named oe for the sample order-entry user oe, creates the table new_product, creates the view new_product_view, and grants SELECT privilege on new_product_view to the sample human resources user hr.

CREATE SCHEMA AUTHORIZATION oe
   CREATE TABLE new_product
      (color VARCHAR2(10)  PRIMARY KEY, quantity NUMBER)
   CREATE VIEW new_product_view
      AS SELECT color, quantity FROM new_product WHERE color = 'RED'
   GRANT select ON new_product_view TO hr;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 15 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE SEQUENCE

Purpose

Use the CREATE SEQUENCE statement to create a sequence, which is a database object from which multiple users may generate unique integers. You can use sequences to automatically generate primary key values.

When a sequence number is generated, the sequence is incremented, independent of the transaction committing or rolling back. If two users concurrently increment the same sequence, the sequence numbers each user acquires may have gaps because sequence numbers are being generated by the other user. One user can never acquire the sequence number generated by another user. Once a sequence value is generated by one user, that user can continue to access that value regardless of whether the sequence is incremented by another user.

Sequence numbers are generated independently of tables, so the same sequence can be used for one or for multiple tables. It is possible that individual sequence numbers will appear to be skipped, because they were generated and used in a transaction that ultimately rolled back. Additionally, a single user may not realize that other users are drawing from the same sequence.

Once a sequence is created, you can access its values in SQL statements with the CURRVAL pseudocolumn (which returns the current value of the sequence) or the NEXTVAL pseudocolumn (which increments the sequence and returns the new value).

See Also:
  • "Pseudocolumns" for more information on using the CURRVAL and NEXTVAL
  • "How to Use Sequence Values" for information on using sequences
  • ALTER SEQUENCE or DROP SEQUENCE for information on modifying or dropping a sequence

Prerequisites

To create a sequence in your own schema, you must have CREATE SEQUENCE privilege.

To create a sequence in another user's schema, you must have CREATE ANY SEQUENCE privilege.

Syntax

create_sequence::=

Text description of statements_639.gif follows
Text description of create_sequence

Semantics

schema

Specify the schema to contain the sequence. If you omit schema, Oracle creates the sequence in your own schema.

sequence

Specify the name of the sequence to be created.

If you specify none of the following clauses, you create an ascending sequence that starts with 1 and increases by 1 with no upper limit. Specifying only INCREMENT BY -1 creates a descending sequence that starts with -1 and decreases with no lower limit.

  • To create a sequence that increments without bound, for ascending sequences, omit the MAXVALUE parameter or specify NOMAXVALUE. For descending sequences, omit the MINVALUE parameter or specify the NOMINVALUE.
  • To create a sequence that stops at a predefined limit, for an ascending sequence, specify a value for the MAXVALUE parameter. For a descending sequence, specify a value for the MINVALUE parameter. Also specify the NOCYCLE. Any attempt to generate a sequence number once the sequence has reached its limit results in an error.
  • To create a sequence that restarts after reaching a predefined limit, specify values for both the MAXVALUE and MINVALUE parameters. Also specify the CYCLE. If you do not specify MINVALUE, then it defaults to NOMINVALUE (that is, the value 1).

Sequence Parameters

INCREMENT BY

Specify the interval between sequence numbers. This integer value can be any positive or negative integer, but it cannot be 0. This value can have 28 or fewer digits. The absolute of this value must be less than the difference of MAXVALUE and MINVALUE. If this value is negative, then the sequence descends. If the increment is positive, then the sequence ascends. If you omit this clause, the interval defaults to 1.

START WITH

Specify the first sequence number to be generated. Use this clause to start an ascending sequence at a value greater than its minimum or to start a descending sequence at a value less than its maximum. For ascending sequences, the default value is the minimum value of the sequence. For descending sequences, the default value is the maximum value of the sequence. This integer value can have 28 or fewer digits.

Note:

This value is not necessarily the value to which an ascending cycling sequence cycles after reaching its maximum or minimum value.
MAXVALUE

Specify the maximum value the sequence can generate. This integer value can have 28 or fewer digits. MAXVALUE must be equal to or greater than START WITH and must be greater than MINVALUE.

NOMAXVALUE

Specify NOMAXVALUE to indicate a maximum value of 1027 for an ascending sequence or -1 for a descending sequence. This is the default.

MINVALUE

Specify the minimum value of the sequence. This integer value can have 28 or fewer digits. MINVALUE must be less than or equal to START WITH and must be less than MAXVALUE.

NOMINVALUE

Specify NOMINVALUE to indicate a minimum value of 1 for an ascending sequence or -1026 for a descending sequence. This is the default.

CYCLE

Specify CYCLE to indicate that the sequence continues to generate values after reaching either its maximum or minimum value. After an ascending sequence reaches its maximum value, it generates its minimum value. After a descending sequence reaches its minimum, it generates its maximum.

NOCYCLE

Specify NOCYCLE to indicate that the sequence cannot generate more values after reaching its maximum or minimum value. This is the default.

CACHE

Specify how many values of the sequence Oracle preallocates and keeps in memory for faster access. This integer value can have 28 or fewer digits. The minimum value for this parameter is 2. For sequences that cycle, this value must be less than the number of values in the cycle. You cannot cache more values than will fit in a given cycle of sequence numbers. Therefore, the maximum value allowed for CACHE must be less than the value determined by the following formula:

(CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT)

If a system failure occurs, all cached sequence values that have not been used in committed DML statements are lost. The potential number of lost values is equal to the value of the CACHE parameter.

Note:

Oracle Corporation recommends using the CACHE setting to enhance performance if you are using sequences in a Real Application Clusters environment.
NOCACHE

Specify NOCACHE to indicate that values of the sequence are not preallocated.

If you omit both CACHE and NOCACHE, Oracle caches 20 sequence numbers by default.

ORDER

Specify ORDER to guarantee that sequence numbers are generated in order of request. You may want to use this clause if you are using the sequence numbers as timestamps. Guaranteeing order is usually not important for sequences used to generate primary keys.

ORDER is necessary only to guarantee ordered generation if you are using Oracle with Real Application Clusters. If you are using exclusive mode, sequence numbers are always generated in order.

NOORDER

Specify NOORDER if you do not want to guarantee sequence numbers are generated in order of request. This is the default.

Example

Creating a Sequence: Example

The following statement creates the sequence customers_seq in the sample schema oe. This sequence could be used to provide customer ID numbers when rows are added to the customers table.

CREATE SEQUENCE customers_seq
 START WITH     1000
 INCREMENT BY   1
 NOCACHE
 NOCYCLE;

The first reference to customers_seq.nextval returns 1000. The second returns 1001. Each subsequent reference will return a value 1 greater than the previous reference.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: CREATE LIBRARY to CREATE SPFILE, 16 of 16

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE SPFILE

Purpose

Use the CREATE SPFILE statement to create a server parameter file from a client-side initialization parameter file. Server parameter files are binary files that exist only on the server and are called from client locations to start up the database.

Server parameter files let you make persistent changes to individual parameters. When you use a server parameter file, you can specify in an ALTER SYSTEM SET parameter statement that the new parameter value should be persistent. This means that the new value applies not only in the current instance, but also to any instances that are started up subsequently. Traditional client-side parameter files do not let you make persistent changes to parameter values. Because they are located on the server, these files allow for automatic database tuning by Oracle and for backup by Recovery Manager (RMAN).

To use a server parameter file when starting up the database, you must create it from a traditional text initialization parameter file using the CREATE SPFILE statement.

All instances in an Real Application Clusters environment must use the same server parameter file. However, when otherwise permitted, individual instances can have different settings of the same parameter within this one file. Instance-specific parameter definitions are specified as SID.parameter = value, where SID is the instance identifier.

The method of starting up the database with a server parameter file depends on whether you create a default or nondefault server parameter file. Please refer to "Creating a Server Parameter File: Examples" for examples of how to use server parameter files.

See Also:
  • CREATE PFILE for information on creating a regular text parameter file from a binary server parameter file
  • Oracle9i Database Administrator's Guide for information on pre-Oracle9i initialization parameter files and Oracle9i server parameter files
  • Oracle9i Real Application Clusters Administration for information on using server parameter files in a Real Application Clusters environment

Prerequisites

You must have the SYSDBA or the SYSOPER system privilege to execute this statement. You can execute this statement before or after instance startup. However, if you have already started an instance using spfile_name, you cannot specify the same spfile_name in this statement.

Syntax

create_spfile::=

Text description of statements_619.gif follows
Text description of create_spfile

Semantics

spfile_name

This clause lets you specify a name for the server parameter file you are creating.

  • If you do not specify spfile_name, Oracle uses the platform-specific default server parameter filename. If spfile_name already exists on the server, this statement will overwrite it. When using a default server parameter file, you start up the database without referring to the file by name.
  • If you do specify spfile_name, you are creating a nondefault server parameter file. In this case, to start up the database, you must first create a single-line traditional parameter file that points to the server parameter file, and then name the single-line file in your STARTUP command.

    See Also:
    • "Creating a Server Parameter File: Examples" for information on starting up the database with default and nondefault server parameter files
    • Oracle9i Database Administrator's Guide for Windows (or other appropriate operating system specific documentation) for default parameter file names

pfile_name

Specify the traditional initialization parameter file from which you want to create a server parameter file.

  • If you specify pfile_name, the parameter file must reside on the server. If it does not reside in the default directory for parameter files on your operating system, you must specify the full path.
  • If you do not specify pfile_name, Oracle looks in the default directory for parameter files on your operating system for the default parameter filename, and uses that file. If that file does not exist in the expected directory, Oracle returns an error.

    Note:

    In a Real Application Clusters environment, you must first combine all instance parameter files into one file before specifying it in this statement to create a server parameter file. For information on accomplishing this step, see Oracle9i Real Application Clusters Setup and Configuration.

Examples

Creating a Server Parameter File: Examples

The following example creates a default server parameter file from a client initialization parameter file named t_init1.ora:

CREATE SPFILE
   FROM PFILE = '$ORACLE_HOME/work/t_init1.ora';
Note:

Typically you will need to specify the full path and filename for parameter files on your operating system. Please refer to your Oracle operating system documentation for path information.

When you create a default server parameter file, you subsequently start up the database using that server parameter file by using the SQL*Plus command STARTUP without the PFILE parameter, as follows:

STARTUP

The following example creates a nondefault server parameter file s_params.ora from a client initialization file named t_init1.ora:

CREATE SPFILE = 's_params.ora'
   FROM PFILE = '$ORACLE_HOME/work/t_init1.ora';

When you create a nondefault server parameter file, you subsequently start up the database by first creating a traditional parameter file containing the following single line:

spfile = 's_params.ora'

The name of this parameter file must comply with the naming conventions of your operating system. You then use the single-line parameter file in the STARTUP command. The following example shows how to start up the database, assuming that the single-line parameter file is named new_param.ora:

STARTUP PFILE=new_param.ora
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE SYNONYM to CREATE TRIGGER, 1 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

15
SQL Statements: CREATE SYNONYM to CREATE TRIGGER

This chapter contains the following SQL statements:

  • CREATE SYNONYM
  • CREATE TABLE
  • CREATE TABLESPACE
  • CREATE TEMPORARY TABLESPACE
  • CREATE TRIGGER
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE SYNONYM to CREATE TRIGGER, 2 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE SYNONYM

Purpose

Use the CREATE SYNONYM statement to create a synonym, which is an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym.

Synonyms provide both data independence and location transparency. Synonyms permit applications to function without modification regardless of which user owns the table or view and regardless of which database holds the table or view. However, synonyms are not a substitute for privileges on database objects. Such privileges must be granted to a user before the user can use the synonym.

You can refer to synonyms in the following DML statements: SELECT, INSERT, UPDATE, DELETE, EXPLAIN PLAN, and LOCK TABLE.

You can refer to synonyms in the following DDL statements: AUDIT, NOAUDIT, GRANT, REVOKE, and COMMENT.

See Also:

Oracle9i Database Concepts for general information on synonyms

Prerequisites

To create a private synonym in your own schema, you must have CREATE SYNONYM system privilege.

To create a private synonym in another user's schema, you must have CREATE ANY SYNONYM system privilege.

To create a PUBLIC synonym, you must have CREATE PUBLIC SYNONYM system privilege.

Syntax

create_synonym::=

Text description of statements_74.gif follows
Text description of create_synonym

Semantics

OR REPLACE

Specify OR REPLACE to re-create the synonym if it already exists. Use this clause to change the definition of an existing synonym without first dropping it.

Restriction on Replacing a Synonym

You cannot use the OR REPLACE clause for a type synonym that has any dependent tables or valid user-defined object types.

PUBLIC

Specify PUBLIC to create a public synonym. Public synonyms are accessible to all users. However each user must have appropriate privileges on the underlying object in order to use the synonym.

Oracle uses a public synonym only when resolving references to an object if the object is not prefaced by a schema and the object is not followed by a database link.

If you omit this clause, then the synonym is private and is accessible only within its schema. A private synonym name must be unique in its schema.

Notes on Creating Public Synonyms
  • If you create a public synonym and it subsequently has dependent tables or dependent valid user-defined object types, then you cannot subsequently create another database object of the same name as the synonym in the same schema as the dependent objects.
  • Take care not to create a public synonym with the same name as an existing schema. If you do so, then all PL/SQL units that use that name will be invalidated.

schema

Specify the schema to contain the synonym. If you omit schema, then Oracle creates the synonym in your own schema. You cannot specify a schema for the synonym if you have specified PUBLIC.

synonym

Specify the name of the synonym to be created.

Caution:

The functional maximum length of the synonym name is 32 bytes. Names longer than 30 bytes are permitted for Java functionality only. If you specify a name longer than 30 bytes, then Oracle encrypts the name and places a representation of the encryption in the data dictionary. The actual encryption is not accessible, and you cannot use either your original specification or the data dictionary representation as the synonym name.
See Also:

"CREATE SYNONYM Examples" and "Resolution of Synonyms Example"

FOR Clause

Specify the object for which the synonym is created. The schema object for which you are creating the synonym can be of the following types:

  • Table or object table
  • View or object view
  • Sequence
  • Stored procedure, function, or package
  • Materialized view
  • Java class schema object
  • User-defined object type
  • Synonym

The schema object need not currently exist and you need not have privileges to access the object.

Restriction on the FOR Clause

The schema object cannot be contained in a package.

schema

Specify the schema in which the object resides. If you do not qualify object with schema, then Oracle assumes that the schema object is in your own schema.

Note:

If you are creating a synonym for a procedure or function on a remote database, then you must specify schema in this CREATE statement. Alternatively, you can create a local public synonym on the database where the object resides. However, the database link must then be included in all subsequent calls to the procedure or function.
dblink

You can specify a complete or partial database link to create a synonym for a schema object on a remote database where the object is located. If you specify dblink and omit schema, then the synonym refers to an object in the schema specified by the database link. Oracle Corporation recommends that you specify the schema containing the object in the remote database.

If you omit dblink, then Oracle assumes the object is located on the local database.

Restriction on Database Links

You cannot specify dblink for a Java class synonym.

See Also:
  • "Referring to Objects in Remote Databases" for more information on referring to database links
  • CREATE DATABASE LINK for more information on creating database links

Examples

CREATE SYNONYM Examples

To define the synonym offices for the table locations in the schema hr, issue the following statement:

CREATE SYNONYM offices
   FOR hr.locations;

To create a PUBLIC synonym for the employees table in the schema hr on the remote database, you could issue the following statement:

CREATE PUBLIC SYNONYM emp_table
   FOR oe.employees@remote.us.oracle.com;

A synonym may have the same name as the base table, provided the base table is contained in another schema.

Resolution of Synonyms Example

Oracle attempts to resolve references to objects at the schema level before resolving them at the PUBLIC synonym level. For example, the schemas oe and sh both contain tables named customers. In the next example, user SYSTEM creates a PUBLIC synonym named customers for oe.customers:

CREATE PUBLIC SYNONYM customers FOR oe.customers;

If the user sh then issues the following statement, then Oracle returns the count of rows from sh.customers:

SELECT COUNT(*) FROM customers;

To retrieve the count of rows from oe.customers, the user sh must preface customers with the schema name. (The user sh must have select permission on oe.customers as well.)

SELECT COUNT(*) FROM oe.customers;

If the user hr's schema does not contain an object named customers, and if hr has select permission on oe.customers, then hr can access the customers table in oe's schema by using the public synonym customers:

SELECT COUNT(*) FROM customers;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: CREATE SYNONYM to CREATE TRIGGER, 3 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE TABLE

Purpose

Use the CREATE TABLE statement to create one of the following types of tables:

  • A relational table is the basic structure to hold user data.
  • An object table is a table that uses an object type for a column definition. An object table is explicitly defined to hold object instances of a particular type.

You can also create an object type and then use it in a column when creating a relational table.

Tables are created with no data unless a query is specified. You can add rows to a table with the INSERT statement. After creating a table, you can define additional columns, partitions, and integrity constraints with the ADD clause of the ALTER TABLE statement. You can change the definition of an existing column or partition with the MODIFY clause of the ALTER TABLE statement.

See Also:
  • Oracle9i Application Developer's Guide - Fundamentals, Oracle9i Database Administrator's Guide, and CREATE TYPE for more information about creating objects
  • ALTER TABLE

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

To create a relational table in your own schema, you must have the CREATE TABLE system privilege. To create a table in another user's schema, you must have CREATE ANY TABLE system privilege. Also, the owner of the schema to contain the table must have either space quota on the tablespace to contain the table or UNLIMITED TABLESPACE system privilege.

In addition to these table privileges, to create an object table (or a relational table with an object type column), the owner of the table must have the EXECUTE object privilege in order to access all types referenced by the table, or you must have the EXECUTE ANY TYPE system privilege. These privileges must be granted explicitly and not acquired through a role.

Additionally, if the table owner intends to grant access to the table to other users, then the owner must have been granted the EXECUTE privileges on the referenced types with the GRANT OPTION, or have the EXECUTE ANY TYPE system privilege with the ADMIN OPTION. Without these privileges, the table owner has insufficient privileges to grant access to the table to other users.

To enable a unique or primary key constraint, you must have the privileges necessary to create an index on the table. You need these privileges because Oracle creates an index on the columns of the unique or primary key in the schema containing the table.

To create an external table, you must have the READ object privilege on the directory in which the external data resides.

See Also:
  • CREATE INDEX
  • Oracle9i Application Developer's Guide - Fundamentals for more information about the privileges required to create tables using types

Syntax

create_table::=

Text description of statements_748.gif follows
Text description of create_table

(relational_table::= , object_table::= , XMLType_table::= )

relational_table::=

Text description of statements_76.gif follows
Text description of relational_table

(relational_properties::= , physical_properties::= , table_properties::= )

object_table::=

Text description of statements_710.gif follows
Text description of object_table

(object_table_substitution::= , object_properties::= , OID_clause::= , OID_index_clause::= , physical_properties::= , table_properties::= )

XMLType_table::=

Text description of statements_723a.gif follows
Text description of XMLType_table

(XMLType_storage::= , XMLSchema_spec::= )

relational_properties::=

Text description of statements_78.gif follows
Text description of relational_properties

(constraints::= )

object_table_substitution::=

Text description of statements_72.gif follows
Text description of object_table_substitution

object_properties::=

Text description of statements_712.gif follows
Text description of object_properties

(constraints::= , supplemental_logging_props::= )

OID_clause::=

Text description of statements_763a.gif follows
Text description of OID_clause

OID_index_clause::=

Text description of statements_720.gif follows
Text description of OID_index_clause

(physical_attributes_clause::= )

physical_properties::=

Text description of statements_714.gif follows
Text description of physical_properties

(segment_attributes_clause::= , data_segment_compression::= , index_org_table_clause::= , external_table_clause::= )

segment_attributes_clause::=

Text description of statements_722.gif follows
Text description of segment_attributes_clause

(physical_attributes_clause::= , logging_clause::= )

physical_attributes_clause::=

Text description of statements_724.gif follows
Text description of physical_attributes_clause

(storage_clause )

data_segment_compression::=

Text description of statements_762a.gif follows
Text description of data_segment_compression

table_properties::=

Text description of statements_716.gif follows
Text description of table_properties

(table_partitioning_clauses::= , parallel_clause::= , enable_disable_clause::= , subquery::= )

column_properties::=

Text description of statements_761b.gif follows
Text description of column_properties

(object_type_col_properties::= , nested_table_col_properties::= , varray_col_properties::= , LOB_storage_clause::= , LOB_partition_storage::= , XMLType_column_properties::= )

object_type_col_properties::=

Text description of statements_750.gif follows
Text description of object_type_col_properties

substitutable_column_clause::=

Text description of statements_751.gif follows
Text description of substitutable_column_clause

nested_table_col_properties::=

Text description of statements_732.gif follows
Text description of nested_table_col_properties

(substitutable_column_clause::= , object_properties::= , physical_properties::= , column_properties::= )

varray_col_properties::=

Text description of statements_766.gif follows
Text description of varray_col_properties

(substitutable_column_clause::= , LOB_parameters::= )

LOB_storage_clause::=

Text description of statements_764a.gif follows
Text description of LOB_storage_clause

(LOB_parameters::= )

LOB_parameters::=

Text description of statements_765a.gif follows
Text description of LOB_parameters

(storage_clause::= )

logging_clause::=

Text description of statements_758.gif follows
Text description of logging_clause

LOB_partition_storage::=

Text description of statements_77a.gif follows
Text description of LOB_partition_storage

(LOB_storage_clause::= , varray_col_properties::=)

XMLType_column_properties::=

Text description of statements_731.gif follows
Text description of XMLType_column_properties

(XMLType_storage::= , XMLSchema_spec::= )

XMLType_storage::=

Text description of statements_757.gif follows
Text description of XMLType_storage

(LOB_parameters::= )

XMLSchema_spec::=

Text description of statements_758a.gif follows
Text description of XMLSchema_spec

row_movement_clause::=

Text description of statements_723.gif follows
Text description of row_movement_clause

index_org_table_clause::=

Text description of statements_761a.gif follows
Text description of index_org_table_clause

(mapping_table_clause::= , key_compression::= , index_org_overflow_clause::= )

mapping_table_clause::=

Text description of statements_755.gif follows
Text description of mapping_table_clause

key_compression::=

Text description of statements_726.gif follows
Text description of key_compression

index_org_overflow_clause::=

Text description of statements_727.gif follows
Text description of index_org_overflow_clause

(segment_attributes_clause::= )

supplemental_logging_props::=

Text description of statements_754.gif follows
Text description of supplemental_logging_props

external_table_clause::=

Text description of statements_761.gif follows
Text description of external_table_clause

(external_data_properties::= )

external_data_properties::=

Text description of statements_75.gif follows
Text description of external_data_properties

(opaque_format_spec: See Oracle9i Database Utilities for information on how to specify values for the opaque_format_spec.)

table_partitioning_clauses::=

Text description of statements_756.gif follows
Text description of table_partitioning_clauses

(range_partitioning::= , hash_partitioning::= , list_partitioning::= , composite_partitioning::= )

range_partitioning::=

Text description of statements_733.gif follows
Text description of range_partitioning

(range_values_clause::= , table_partition_description::=)

hash_partitioning::=

Text description of statements_740.gif follows
Text description of hash_partitioning

(individual_hash_partitions::= , hash_partitions_by_quantity::= )

list_partitioning::=

Text description of statements_735.gif follows
Text description of list_partitioning

(list_values_clause::= , table_partition_description::=)

composite_partitioning::=

Text description of statements_734.gif follows
Text description of composite_partitioning

(subpartition_by_list::= , subpartition_by_hash::= , range_values_clause::= , table_partition_description::=)

subpartition_by_hash::=

Text description of statements_77.gif follows
Text description of subpartition_by_hash

(subpartition_template::= )

individual_hash_partitions::=

Text description of statements_741.gif follows
Text description of individual_hash_partitions

(partitioning_storage_clause::= )

hash_partitions_by_quantity::=

Text description of statements_742.gif follows
Text description of hash_partitions_by_quantity

subpartition_by_list::=

Text description of statements_759a.gif follows
Text description of subpartition_by_list

(subpartition_template::= )

subpartition_template::=

Text description of statements_738.gif follows
Text description of subpartition_template

(list_values_clause::= , partitioning_storage_clause::= )

range_values_clause::=

Text description of statements_736.gif follows
Text description of range_values_clause

list_values_clause::=

Text description of statements_760a.gif follows
Text description of list_values_clause

table_partition_description::=

Text description of statements_753.gif follows
Text description of table_partition_description

(segment_attributes_clause::= , data_segment_compression::= , LOB_storage_clause::= , varray_col_properties::= , partition_level_subpartition::= )

partition_level_subpartition::=

Text description of statements_739.gif follows
Text description of partition_level_subpartition

(subpartition_spec::= )

subpartition_spec::=

Text description of statements_765b.gif follows
Text description of subpartition_spec

(list_values_clause::= , partitioning_storage_clause::= )

partitioning_storage_clause::=

Text description of statements_752.gif follows
Text description of partitioning_storage_clause

parallel_clause::=

Text description of statements_743.gif follows
Text description of parallel_clause

enable_disable_clause::=

Text description of statements_744.gif follows
Text description of enable_disable_clause

(using_index_clause::= , exceptions_clause not supported in CREATE TABLE statements)

using_index_clause::=

Text description of statements_745.gif follows
Text description of using_index_clause

(create_index::= , logging_clause::= , global_partitioned_index::= )

global_partitioned_index::=

Text description of statements_746.gif follows
Text description of global_partitioned_index

(index_partitioning_clause::= )

index_partitioning_clause::=

Text description of statements_747.gif follows
Text description of index_partitioning_clause

(segment_attributes_clause::= )

Semantics

relational_table

GLOBAL TEMPORARY

Specify GLOBAL TEMPORARY to indicate that the table is temporary and that its definition is visible to all sessions. The data in a temporary table is visible only to the session that inserts the data into the table.

A temporary table has a definition that persists the same as the definitions of regular tables, but it contains either session-specific or transaction-specific data. You specify whether the data is session- or transaction-specific with the ON COMMIT keywords.

Note:

You can perform DDL operations (such as ALTER TABLE, DROP TABLE, CREATE INDEX) on a temporary table only when no session is bound to it. A session becomes bound to a temporary table by performing an INSERT operation on the table. A session becomes unbound to the temporary table by issuing a TRUNCATE statement or at session termination, or, for a transaction-specific temporary table, by issuing a COMMIT or ABORT statement.
See Also:

Oracle9i Database Concepts for information on temporary tables and "Temporary Table Example"

Restrictions on Temporary Tables
  • Temporary tables cannot be partitioned, clustered, or index organized.
  • You cannot specify any foreign key constraints on temporary tables.
  • Temporary tables cannot contain columns of nested table or varray type.
  • You cannot specify the following clauses of the LOB_storage_clause: TABLESPACE, storage_clause, logging_clause, MONITORING or NOMONITORING, or LOB_index_clause.
  • Parallel DML and parallel queries are not supported for temporary tables. (Parallel hints are ignored. Specification of the parallel_clause returns an error.)
  • You cannot specify the segment_attributes_clause, nested_table_col_properties, or parallel_clause.
  • Distributed transactions are not supported for temporary tables.

schema

Specify the schema to contain the table. If you omit schema, then Oracle creates the table in your own schema.

table

Specify the name of the table (or object table) to be created.

See Also:

"General Examples"

relational_properties

The relational properties describe the components of a relational table.

column

Specify the name of a column of the table.

If you also specify AS subquery, then you can omit column and datatype unless you are creating an index-organized table. If you specify AS subquery when creating an index-organized table, then you must specify column, and you must omit datatype.

The absolute maximum number of columns in a table is 1000. However, when you create an object table (or a relational table with columns of object, nested table, varray, or REF type), Oracle maps the columns of the user-defined types to relational columns, creating in effect "hidden columns" that count toward the 1000-column limit.

datatype

Specify the datatype of a column.

Note:

You can omit datatype under these conditions:

  • If you also specify AS subquery. (If you are creating an index-organized table and you specify AS subquery, you must omit the datatype.)
  • If the statement also designates the column as part of a foreign key in a referential integrity constraint. (Oracle automatically assigns to the column the datatype of the corresponding column of the referenced key of the referential integrity constraint.)
Restriction on Table Column Datatypes

You can specify a column of type ROWID, but Oracle does not guarantee that the values in such columns are valid rowids.

See Also:

"Datatypes" for information on Oracle-supplied datatypes

DEFAULT

The DEFAULT clause lets you specify a value to be assigned to the column if a subsequent INSERT statement omits a value for the column. The datatype of the expression must match the datatype of the column. The column must also be long enough to hold this expression.

The DEFAULT expression can include any SQL function as long as the function does not return a literal argument, a column reference, or a nested function invocation.

Restriction on Default Column Values

A DEFAULT expression cannot contain references to PL/SQL functions or to other columns, the pseudocolumns LEVEL, PRIOR, and ROWNUM, or date constants that are not fully specified.

See Also:

"About SQL Expressions" for the syntax of expr

inline_ref_constraint and out_of_line_ref_constraint

These clauses let you describe a column of type REF. The only difference between these clauses is that you specify out_of_line_ref_constraint from the table level, so you must identify the REF column or attribute you are defining. You specify inline_ref_constraint after you have already identified the REF column or attribute.

See Also:

constraints for syntax and description of these constraints, as well as examples

inline_constraint

Use the inline_constraint to define an integrity constraint as part of the column definition.

You can create UNIQUE, PRIMARY KEY, and REFERENCES constraints on scalar attributes of object type columns. You can also create NOT NULL constraints on object type columns, and CHECK constraints that reference object type columns or any attribute of an object type column.

See Also:

constraints for syntax and description of these constraints, as well as examples

out_of_line_constraint

Use the out_of_line_constraint syntax to define an integrity constraint as part of the table definition.

Note:

You must specify a PRIMARY KEY constraint for an index-organized table, and it cannot be DEFERRABLE.
See Also:

the syntax description of out_of_line_constraint in the constraints

supplemental_logging_props

The supplemental_logging_props clause lets you instruct Oracle to put additional data into the log stream to support log-based tools.

ON COMMIT

The ON COMMIT clause is relevant only if you are creating a temporary table. This clause specifies whether the data in the temporary table persists for the duration of a transaction or a session.

DELETE ROWS

Specify DELETE ROWS for a transaction-specific temporary table (this is the default). Oracle will truncate the table (delete all its rows) after each commit.

PRESERVE ROWS

Specify PRESERVE ROWS for a session-specific temporary table. Oracle will truncate the table (delete all its rows) when you terminate the session.

physical_properties

The physical properties relate to the treatment of extents and segments and to the storage characteristics of the table.

segment_attributes_clause
physical_attributes_clause

The physical_attributes_clause lets you specify the value of the PCTFREE, PCTUSED, INITRANS, and MAXTRANS parameters and the storage characteristics of the table.

  • For a nonpartitioned table, each parameter and storage characteristic you specify determines the actual physical attribute of the segment associated with the table.
  • For partitioned tables, the value you specify for the parameter or storage characteristic is the default physical attribute of the segments associated with all partitions specified in this CREATE statement (and in subsequent ALTER TABLE ... ADD PARTITION statements), unless you explicitly override that value in the PARTITION clause of the statement that creates the partition.

If you omit this clause, then Oracle uses the following default values:

  • PCTFREE: 10
  • PCTUSED: 40
  • INITRANS: 1
  • MAXTRANS: Depends on data block size

    See Also:
    • physical_attributes_clause for a full description of the physical attribute parameters
    • storage_clause for a description of storage parameters
    • "Storage Example"
TABLESPACE

Specify the tablespace in which Oracle creates the table, object table OID index, partition, LOB data segment, LOB index segment, or index-organized table overflow data segment. If you omit TABLESPACE, then Oracle creates that item in the default tablespace of the owner of the schema containing the table.

For heap-organized tables with one or more LOB columns, if you omit the TABLESPACE clause for LOB storage, then Oracle creates the LOB data and index segments in the tablespace where the table is created.

However, for an index-organized table with one or more LOB columns, if you omit TABLESPACE, then the LOB data and index segments are created in the tablespace in which the primary key index segment of the index-organized table is created.

For nonpartitioned tables, the value specified for TABLESPACE is the actual physical attribute of the segment associated with the table. For partitioned tables, the value specified for TABLESPACE is the default physical attribute of the segments associated with all partitions specified in the CREATE statement (and on subsequent ALTER TABLE ... ADD PARTITION statements), unless you specify TABLESPACE in the PARTITION description.

See Also:

CREATE TABLESPACE for more information on tablespaces
logging_clause

Specify whether the creation of the table (and any indexes required because of constraints), partition, or LOB storage characteristics will be logged in the redo log file (LOGGING) or not (NOLOGGING).The logging attribute of the table is independent of that of its indexes.

This attribute also specifies whether subsequent Direct Loader (SQL*Loader) and direct-path INSERT operations against the table, partition, or LOB storage are logged (LOGGING) or not logged (NOLOGGING).

See Also:

logging_clause for a full description of this clause
data_segment_compression

The data_segment_compression clause is valid only for heap-organized tables. Use this clause to instruct Oracle whether to compress data segments to reduce disk use. The COMPRESS keyword enables data segment compression. The NOCOMPRESS keyword disables data segment compression. NOCOMPRESS is the default.

When you enable data segment compression, Oracle attempts to compress data when it is productive to do so. LOB data segments are not compressed. This clause is especially useful in environments such as data warehouses, where the amount of insert and update operations is small. You can specify data segment compression for the following portions of a heap-organized table:

  • For an entire table (in the physical_properties clause of relational_table or object_table)
  • For a range partition (in the table_partition_description of the range_partitioning clause)
  • For a list partition (in the table_partition_description of the list_partitioning clause)
  • For the storage table of a nested table (in the nested_table_col_properties clause)

    See Also:

    Oracle9i Database Performance Tuning Guide and Reference for information on calculating the compression ratio and to Oracle9i Data Warehousing Guide for information on data compression usage scenarios
Restrictions on Data Segment Compression
  • You cannot specify data segment compression for an index-organized table, for any overflow segment or partition of an overflow segment, or for any mapping table segment of an index-organized table.
  • You cannot specify data segment compression for hash partitions or for either hash or list subpartitions.
  • You cannot specify data segment compression for an external table.
RECOVERABLE | UNRECOVERABLE

These keywords are deprecated and have been replaced with LOGGING and NOLOGGING, respectively. Although RECOVERABLE and UNRECOVERABLE are supported for backward compatibility, Oracle Corporation strongly recommends that you use the LOGGING and NOLOGGING keywords.

Restrictions on [UN]RECOVERABLE
  • You cannot specify RECOVERABLE for partitioned tables or LOB storage characteristics.
  • You cannot specify UNRECOVERABLE for a partitioned or index-organized tables.
  • You can specify UNRECOVERABLE only with AS subquery.
ORGANIZATION

The ORGANIZATION clause lets you specify the order in which the data rows of the table are stored.

HEAP

HEAP indicates that the data rows of table are stored in no particular order. This is the default.

INDEX

INDEX indicates that table is created as an index-organized table. In an index-organized table, the data rows are held in an index defined on the primary key for the table.

EXTERNAL

EXTERNAL indicates that table is a read-only table located outside the database.

See Also:

"External Table Example"

index_org_table_clause

Use the index_org_table_clause to create an index-organized table. Oracle maintains the table rows (both primary key column values and nonkey column values) in an index built on the primary key. Index-organized tables are therefore best suited for primary key-based access and manipulation. An index-organized table is an alternative to:

  • A nonclustered table indexed on the primary key by using the CREATE INDEX statement
  • A clustered table stored in an indexed cluster that has been created using the CREATE CLUSTER statement that maps the primary key for the table to the cluster key

You must specify a primary key for an index-organized table, because the primary key uniquely identifies a row. The primary key cannot be DEFERRABLE. Use the primary key instead of the rowid for directly accessing index-organized rows.

If an index-organized table is partitioned and contains LOB columns, then you should specify the index_org_table_clause first, then the LOB_storage_clause, and then the appropriate table_partitioning_clauses.

See Also:

"Index-Organized Table Example"

Note:

You cannot use the TO_LOB function to convert a LONG column to a LOB column in the subquery of a CREATE TABLE ...AS SELECT statement if you are creating an index-organized table. Instead, create the index-organized table without the LONG column, and then use the TO_LOB function in an INSERT ... AS SELECT statement.
Restrictions on Index-organized Tables
  • You cannot specify a column of type ROWID for an index-organized table.
  • You cannot specify the composite_partitioning_clause for an index-organized table.

PCTTHRESHOLD integer

Specify the percentage of space reserved in the index block for an index-organized table row. PCTTHRESHOLD must be large enough to hold the primary key. All trailing columns of a row, starting with the column that causes the specified threshold to be exceeded, are stored in the overflow segment. PCTTHRESHOLD must be a value from 1 to 50. If you do not specify PCTTHRESHOLD, the default is 50.

Restriction on PCTTHRESHOLD

You cannot specify PCTTHRESHOLD for individual partitions of an index-organized table.

mapping_table_clause

Specify MAPPING TABLE to instruct Oracle to create a mapping of local to physical ROWIDs and store them in a heap-organized table. This mapping is needed in order to create a bitmap index on the index-organized table.

Oracle creates the mapping table in the same tablespace as its parent index-organized table. You cannot query, perform DML operations on, or modify the storage characteristics of the mapping table.

Restriction on Mapping Tables

You cannot specify the mapping_table_clause for a partitioned index-organized table.

key_compression

The key_compression clauses let you enable or disable key compression for index-organized tables.

  • Specify COMPRESS to enable key compression, which eliminates repeated occurrence of primary key column values in index-organized tables. Use integer to specify the prefix length (number of prefix columns to compress).

    The valid range of prefix length values is from 1 to the number of primary key columns minus 1. The default prefix length is the number of primary key columns minus 1.

  • Specify NOCOMPRESS to disable key compression in index-organized tables. This is the default.
Restriction on Key Compression of Index-organized Tables

At the partition level, you can specify COMPRESS, but you cannot specify the prefix length with integer.

index_org_overflow_clause

The index_org_overflow_clause lets you instruct Oracle that index-organized table data rows exceeding the specified threshold are placed in the data segment specified in this clause.

  • When you create an index-organized table, Oracle evaluates the maximum size of each column to estimate the largest possible row. If an overflow segment is needed but you have not specified OVERFLOW, then Oracle raises an error and does not execute the CREATE TABLE statement. This checking function guarantees that subsequent DML operations on the index-organized table will not fail because an overflow segment is lacking.
  • All physical attributes and storage characteristics you specify in this clause after the OVERFLOW keyword apply only to the overflow segment of the table. Physical attributes and storage characteristics for the index-organized table itself, default values for all its partitions, and values for individual partitions must be specified before this keyword.
  • If the index-organized table contains one or more LOB columns, then the LOBs will be stored out-of-line unless you specify OVERFLOW, even if they would otherwise be small enough be to stored inline.
  • If table is partitioned, then Oracle equipartitions the overflow data segments with the primary key index segments.
INCLUDING column_name

Specify a column at which to divide an index-organized table row into index and overflow portions. The primary key columns are always stored in the index. column_name can be either the last primary-key column or any non-primary-key column. All non-primary-key columns that follow column_name are stored in the overflow data segment.

Restriction on the INCLUDING Clause

You cannot specify this clause for individual partitions of an index-organized table.

Note:

If an attempt to divide a row at column_name causes the size of the index portion of the row to exceed the PCTTHRESHOLD value (either specified or default), Oracle breaks up the row based on the PCTTHRESHOLD value.

external_table_clause

Use the external_table_clause to create an external table, which is a read-only table whose metadata is stored in the database but whose data in stored outside database. External tables let you query data without first loading it into the database, among other capabilities.

See Also:

Oracle9i Data Warehousing Guide, Oracle9i Database Administrator's Guide, and Oracle9i Database Utilities for information on the uses for external tables

Because external tables have no data in the database, you define them with a small subset of the clauses normally available when creating tables.

  • Within the relational_properties clause, you can specify only column, datatype, and inline_constraint.
  • Within the physical_properties_clause, you can specify only the organization of the table (ORGANIZATION EXTERNAL external_table_clause).
  • Within the table_properties clause, you can specify only the parallel_clause. The parallel_clause lets you parallelize subsequent queries on the external data.

    See Also:

    "External Table Example"

Restrictions on External Tables
  • No other clauses are permitted in the same CREATE TABLE statement if you specify the external_table_clause.
  • An external table cannot be a temporary table.
  • You cannot specify constraints on an external table.
  • An external table cannot have object type columns, LOB columns, or LONG columns.
TYPE

TYPE access_driver_type indicates the access driver of the external table. The access driver is the API that interprets the external data for the database. If you do not specify TYPE, then Oracle uses the default access driver, ORACLE_LOADER.

See Also:

Oracle9i Database Utilities for information about the ORACLE_LOADER access driver
DEFAULT DIRECTORY

DEFAULT DIRECTORY lets you specify a default directory object corresponding to a directory on the file system where the external data sources may reside. The default directory can also be used by the access driver to store auxiliary files such as error logs.

ACCESS PARAMETERS

The optional ACCESS PARAMETERS clause lets you assign values to the parameters of the specific access driver for this external table:

  • The opaque_format_spec lets you list the parameters and their values. Please refer to Oracle9i Database Utilities for information on how to specify values for the opaque_format_spec.

    Field names specified in the opaque_format_spec must match columns in the table definition. Oracle ignores any field in the opaque_format_spec that is not matched by a column in the table definition.

  • USING CLOB subquery lets you derive the parameters and their values through a subquery. The subquery cannot contain any set operators or an ORDER BY clause. It must return one row containing a single item of datatype CLOB.

Whether you specify the parameters in an opaque_format_spec or derive them using a subquery, Oracle does not interpret anything in this clause. It is up to the access driver to interpret this information in the context of the external data.

LOCATION

The LOCATION clause lets you specify one or more external data sources. Usually the location_specifier is a file, but it need not be. Oracle does not interpret this clause. It is up to the access driver to interpret this information in the context of the external data.

REJECT LIMIT

The REJECT LIMIT clause lets you specify how many conversion errors can occur during a query of the external data before an Oracle error is returned and the query is aborted. The default value is 0.

CLUSTER Clause

The CLUSTER clause indicates that the table is to be part of cluster. The columns listed in this clause are the table columns that correspond to the cluster's columns. Generally, the cluster columns of a table are the column or columns that make up its primary key or a portion of its primary key.

See Also:

CREATE CLUSTER

Specify one column from the table for each column in the cluster key. The columns are matched by position, not by name.

A clustered table uses the cluster's space allocation. Therefore, do not use the PCTFREE, PCTUSED, INITRANS, or MAXTRANS parameters, the TABLESPACE clause, or the storage_clause with the CLUSTER clause.

Restrictions on Clustered Tables
  • Object tables and tables containing LOB columns cannot be part of a cluster.
  • You cannot specify CLUSTER with either ROWDEPENDENCIES or NOROWDEPENDENCIES unless the cluster has been created with the same ROWDEPENDENCIES or NOROWDEPENDENCIES setting.

table_properties

column_properties

Use the column_properties clauses to specify the storage attributes of a column.

object_type_col_properties

The object_type_col_properties determine storage characteristics of an object column or attribute or an element of a collection column or attribute.

column

For column, specify an object column or attribute.

substitutable_column_clause

The substitutable_column_clause indicates whether object columns or attributes in the same hierarchy are substitutable for each other. You can specify that a column is of a particular type, or whether it can contain instances of its subtypes, or both.

  • If you specify ELEMENT, you constrain the element type of a collection column or attribute to a subtype of its declared type.
  • The IS OF [TYPE] (ONLY type) clause constrains the type of the object column to a subtype of its declared type.
  • NOT SUBSTITUTABLE AT ALL LEVELS indicates that the object column cannot hold instances corresponding to any of its subtypes. Also, substitution is disabled for any embedded object attributes and elements of embedded nested tables and varrays. The default is SUBSTITUTABLE AT ALL LEVELS.
Restrictions on the substitutable_column_clause
  • You cannot specify this clause for an attribute of an object column. However, you can specify this clause for a object type column of a relational table, and for an object column of an object table if the substitutability of the object table itself has not been set.
  • For a collection type column, the only part of this clause you can specify is [NOT] SUBSTITUTABLE AT ALL LEVELS.
LOB_storage_clause

The LOB_storage_clause lets you specify the storage attributes of LOB data segments.

For a nonpartitioned table (that is, when specified in the physical_properties clause without any of the partitioning clauses), this clause specifies the table's storage attributes of LOB data segments.

For a partitioned table, Oracle implements this clause depending on where it is specified:

  • For a partitioned table specified at the table level (that is, when specified in the physical_properties clause along with one of the partitioning clauses), this clause specifies the default storage attributes for LOB data segments associated with each partition or subpartition. These storage attributes apply to all partitions or subpartitions unless overridden by a LOB_storage_clause at the partition or subpartition level.
  • For an individual partition of a partitioned table (that is, when specified as part of a table_partition_description), this clause specifies the storage attributes of the data segments of the partition or the default storage attributes of any subpartitions of the partition. A partition-level LOB_storage_clause overrides a table-level LOB_storage_clause.
  • For an individual subpartition of a partitioned table (that is, when specified as part of subpartition_by_hash or subpartition_by_list), this clause specifies the storage attributes of the data segments of the subpartition. A subpartition-level LOB_storage_clause overrides both partition-level and table-level LOB_storage_clauses.
Restriction on LOB Storage in Partitioned Tables

You cannot specify the LOB_index_clause if table is partitioned.

LOB_item

Specify the LOB column name or LOB object attribute for which you are explicitly defining tablespace and storage characteristics that are different from those of the table. Oracle automatically creates a system-managed index for each LOB_item you create.

LOB_segname

Specify the name of the LOB data segment. You cannot use LOB_segname if you specify more than one LOB_item.

LOB_parameters

The LOB_parameters clause lets you specify various elements of LOB storage.

ENABLE STORAGE IN ROW

If you enable storage in row, then the LOB value is stored in the row (inline) if its length is less than approximately 4000 bytes minus system control information. This is the default.

Restriction on Enabling Storage in Row

For an index-organized table, you cannot specify this parameter unless you have specified an OVERFLOW segment in the index_org_table_clause.

DISABLE STORAGE IN ROW

If you disable storage in row, then the LOB value is stored out of line (outside of the row) regardless of the length of the LOB value.

Note:

The LOB locator is always stored inline (inside the row) regardless of where the LOB value is stored. You cannot change the value of STORAGE IN ROW once it is set except by moving the table. See the move_table_clause of ALTER TABLE .
CHUNK integer

Specify the number of bytes to be allocated for LOB manipulation. If integer is not a multiple of the database block size, then Oracle rounds up (in bytes) to the next multiple. For example, if the database block size is 2048 and integer is 2050, then Oracle allocates 4096 bytes (2 blocks). The maximum value is 32768 (32K), which is the largest Oracle block size allowed. The default CHUNK size is one Oracle database block.

You cannot change the value of CHUNK once it is set.

Note:

The value of CHUNK must be less than or equal to the value of NEXT (either the default value or that specified in the storage_clause). If CHUNK exceeds the value of NEXT, then Oracle returns an error.
PCTVERSION integer

Specify the maximum percentage of overall LOB storage space used for maintaining old versions of the LOB. The default value is 10, meaning that older versions of the LOB data are not overwritten until they consume 10% of the overall LOB storage space.

You can specify the PCTVERSION parameter whether the database is running in manual or automatic undo mode. PCTVERSION is the default in manual undo mode. RETENTION is the default in automatic undo mode.

Restriction on PCTVERSION

You cannot specify both PCTVERSION and RETENTION.

RETENTION

Use this clause to indicate that Oracle should retain old versions of this LOB column. Oracle uses the value of the UNDO_RETENTION initialization parameter to determine the amount (in time) of committed undo data to retain in the database.

You can specify the RETENTION parameter only if the database is running in automatic undo mode. In this mode, RETENTION is the default value unless you specify PCTVERSION.

Restriction on RETENTION

You cannot specify both PCTVERSION and RETENTION.

FREEPOOLS integer

Specify the number of groups of free lists for the LOB segment. Normally integer will be the number of instances in a Real Application Clusters environment or 1 for a single-instance database.

You can specify this parameter only if the database is running in automatic undo mode. In this mode, FREEPOOLS is the default unless you specify the FREELIST GROUPS parameter of the storage_clause. If you specify neither FREEPOOLS nor FREELIST GROUPS, then Oracle uses a default of FREEPOOLS 1 if the database is in automatic undo management mode and a default of FREELIST GROUPS 1 if the database is in manual undo management mode.

Restriction on FREEPOOLS

You cannot specify both FREEPOOLS and the FREELIST GROUPS parameter of the storage_clause.

LOB_index_clause

This clause has been deprecated. If you specify this clause, then Oracle ignores it. Oracle automatically generates an index for each LOB column and names and manages the LOB indexes internally.

See Also:
  • Oracle9i Application Developer's Guide - Large Objects (LOBs) for detailed information about LOBs, including guidelines for creating gigabyte LOBs
  • "LOB Column Example"
  • Oracle9i Database Migration Guide for information on how Oracle manages LOB indexes in tables migrated from earlier versions
varray_col_properties

The varray_col_properties let you specify separate storage characteristics for the LOB in which a varray will be stored. If varray_item is a multilevel collection, then Oracle stores all collection items nested within varray_item in the same LOB in which varray_item is stored.

  • For a nonpartitioned table (that is, when specified in the physical_properties clause without any of the partitioning clauses), this clause specifies the storage attributes of the LOB data segments of the varray.
  • For a partitioned table specified at the table level (that is, when specified in the physical_properties clause along with one of the partitioning clauses), this clause specifies the default storage attributes for the varray's LOB data segments associated with each partition (or its subpartitions, if any).
  • For an individual partition of a partitioned table (that is, when specified as part of a table_partition_description), this clause specifies the storage attributes of the varray's LOB data segments of that partition or the default storage attributes of the varray's LOB data segments of any subpartitions of this partition. A partition-level varray_col_properties overrides a table-level varray_col_properties.
  • For an individual subpartition of a partitioned table (that is, when specified as part of subpartition_by_hash or subpartition_by_list), this clause specifies the storage attributes of the varray's data segments of this subpartition. A subpartition-level varray_col_properties overrides both partition-level and table-level varray_col_properties.
STORE AS LOB Clause

If you specify STORE AS LOB,

  • If the maximum varray size is less than 4000 bytes and you have not disabled storage in row, then Oracle stores the varray inline.
  • If the maximum varray size is greater than 4000 bytes or if you have disabled storage in row, then Oracle stores in the varray out of line.

If you do not specify STORE AS LOB, then Oracle handles varray storage differently from other LOBs. Storage is based on the maximum possible size of the varray (that is the number of elements times the element size, plus a small amount for system control information) rather than on the actual size of a varray column.

  • If you do not specify this clause, and the maximum size of the varray is less than 4000 bytes, then Oracle does not store the varray as a LOB at all, but as inline raw data.
  • If you do not specify this clause, and the maximum size is greater than 4000 bytes, then Oracle always stores the varray as a LOB. If the actual size is less than 4000 bytes, then it will be stored as an inline LOB, and if the actual size is greater than 4000 bytes, then it will be stored as an out-of-line LOB, as is true for other LOB columns.
Restriction on Storing Varrays as LOBs

You cannot specify the TABLESPACE parameter of LOB_parameters as part of this clause. The LOB tablespace for a varray defaults to the containing table's tablespace.

substitutable_column_clause

The substitutable_column_clause has the same behavior as described for object_type_col_properties .

See Also:

"Substitutable Table and Column Examples"

nested_table_col_properties

The nested_table_col_properties let you specify separate storage characteristics for a nested table, which in turn enables you to define the nested table as an index-organized table. The storage table is created in the same tablespace as its parent table (using the default storage characteristics) and stores the nested table values of the column for which it was created.

You must include this clause when creating a table with columns or column attributes whose type is a nested table. Clauses within nested_table_col_properties that function the same way they function for parent object tables are not repeated here.

nested_item

Specify the name of a column (or a top-level attribute of the table's object type) whose type is a nested table.

COLUMN_VALUE

If the nested table is a multilevel collection, then the inner nested table or varray may not have a name. In this case, specify COLUMN_VALUE in place of the nested_item name.

See Also:

"Multi-level Collection Example" for examples using nested_item and COLUMN_VALUE
storage_table

Specify the name of the table where the rows of nested_item reside. For a nonpartitioned table, the storage table is created in the same schema and the same tablespace as the parent table. For a partitioned table, the storage table is created in the default tablespace of the schema.

Restrictions on the Storage Table
  • You cannot partition the storage table of a nested table.
  • You cannot query or perform DML statements on storage_table directly, but you can modify its storage characteristics by specifying its name in an ALTER TABLE statement.

    See Also:

    ALTER TABLE for information about modifying nested table column storage characteristics
RETURN AS

Specify what Oracle returns as the result of a query.

  • VALUE returns a copy of the nested table itself.
  • LOCATOR returns a collection locator to the copy of the nested table.

    Note:

    The locator is scoped to the session and cannot be used across sessions. Unlike a LOB locator, the collection locator cannot be used to modify the collection instance.

If you do not specify the segment_attributes_clause or the LOB_storage_clause, then the nested table is heap organized and is created with default storage characteristics.

Restrictions on Nested Table Column Properties
  • You cannot specify this clause for a temporary table.
  • You cannot specify the OID_clause.
  • You cannot specify TABLESPACE (as part of the segment_attributes_clause) for a nested table. The tablespace is always that of the parent table.
  • At create time, you cannot specify (as part of object_properties) an out_of_line_ref_constraint, inline_ref_constraint, or foreign key constraint for the attributes of a nested table. However, you can modify a nested table to add such constraints using ALTER TABLE.
  • You cannot query or perform DML statements on the storage table directly, but you can modify the nested table column storage characteristics by using the name of storage table in an ALTER TABLE statement.

    See Also:
    • ALTER TABLE for information about modifying nested table column storage characteristics
    • "Nested Table Example" and "Multi-level Collection Example"
XMLType_column_properties

The XMLType_column_properties let you specify storage attributes for an XMLTYPE column.

XMLType_storage

XMLType columns can be stored either in LOB or object-relational columns.

  • Specify STORE AS OBJECT RELATIONAL if you want Oracle to store the XMLType data in object-relational columns. Storing data object relationally lets you define indexes on the relational columns and enhances query performance.

    If you specify object-relational storage, you must also specify the XMLSchema_spec clause.

  • Specify STORE AS CLOB if you want Oracle to store the XMLType data in a CLOB column. Storing data in a CLOB column preserves the original content and enhances retrieval time.

    If you specify LOB storage, you can specify either LOB parameters or the XMLSchema_spec clause, but not both. Specify the XMLSchema_spec clause if you want to restrict the table or column to particular schema-based XML instances.

XMLSchema_spec

This clause lets you specify the URL of a registered XMLSchema (in the XMLSCHEMA clause or as part of the ELEMENT clause) and an XML element name. You must specify an element, although the XMLSchema URL is optional. If you do specify an XMLSchema URL, you must already have registered the XMLSchema using the DBMS_XMLSCHEMA package.

See Also:
  • LOB_storage_clause for information on the LOB_segname and LOB_parameters clauses
  • "XMLType Column Examples" for examples of XMLType columns in object-relational tables and "Using XML in SQL Statements" for an example of creating an XMLSchema
  • Oracle9i XML Database Developer's Guide - Oracle XML DB for more information on XMLType columns and tables and on creating XMLSchemas

table_partitioning_clauses

Use the table_partitioning_clauses to create a partitioned table.

Restrictions on Partitioning in General
  • You cannot partition a table that is part of a cluster.
  • You cannot partition a table containing any LONG or LONG RAW columns.

    Note:

    The storage of partitioned database entities in tablespaces of different block sizes is subject to several restrictions. Please refer to Oracle9i Database Administrator's Guide for a discussion of these restrictions.
    See Also:

    "Partitioning Examples"

range_partitioning

Use the range_partitioning clause to partition the table on ranges of values from the column list. For an index-organized table, the column list must be a subset of the primary key columns of the table.

column

Specify an ordered list of columns used to determine into which partition a row belongs (the partitioning key).

Restriction on Partitioning Key Columns

The columns in the column list can be of any built-in datatype except ROWID, LONG, LOB, or TIMESTAMP WITH TIME ZONE.

PARTITION partition

The name partition must conform to the rules for naming schema objects and their part as described in "Schema Object Naming Rules" . If you omit partition, then Oracle generates a name with the form SYS_P n.

Notes:
  • You can specify up to 64K-1 partitions and 64K-1 subpartitions. For a discussion of factors that might impose practical limits less than this number, please refer to Oracle9i Database Administrator's Guide.
  • You can create a partitioned table with just one partition. However, this is different from a nonpartitioned table. For instance, you cannot add a partition to a nonpartitioned table.
range_values_clause

Specify the noninclusive upper bound for the current partition. The value list is an ordered list of literal values corresponding to the column list in the range_partitioning clause. You can substitute the keyword MAXVALUE for any literal in in the value list. MAXVALUE specifies a maximum value that will always sort higher than any other value, including NULL.

Specifying a value other than MAXVALUE for the highest partition bound imposes an implicit integrity constraint on the table.

Note:

If table is partitioned on a DATE column, and if the date format does not specify the first two digits of the year, then you must use the TO_DATE function with the YYYY 4-character format mask for the year. (The RRRR format mask is not supported.) The date format is determined implicitly by NLS_TERRITORY or explicitly by NLS_DATE_FORMAT.
See Also:
  • Oracle9i Database Concepts for more information about partition bounds
  • Oracle9i Database Globalization Support Guide for more information on these initialization parameters
  • "Range Partitioning Example"
table_partition_description

Use the table_partition_description to define the physical and storage characteristics of the table.

The segment_attributes_clause and data_segment_compression clause have the same function as described for the table_properties of the table as a whole.

The key_compression clause and OVERFLOW clause have the same function as described for the index_org_table_clause.

LOB_storage_clause

The LOB_storage_clause lets you specify LOB storage characteristics for one or more LOB items in this partition or in any list subpartitions of this partition. If you do not specify the LOB_storage_clause for a LOB item, then Oracle generates a name for each LOB data partition. The system-generated names for LOB data and LOB index partitions take the form SYS_LOB_P n and SYS_IL_P n, respectively, where P stands for "partition" and n is a system-generated number. The corresponding system-generated names for LOB subpartitions are SYS_LOB_SUBP n and SYS_IL_SUBP n.

varray_col_properties

The varray_col_properties lets you specify storage characteristics for one or more varray items in this partition or in any list subpartitions of this partition.

Restriction on table_partition_description

The partition_level_subpartition clause is valid only for composite-partitioned tables. See partition_level_subpartition .

hash_partitioning

Use the hash_partitioning clause to specify that the table is to be partitioned using the hash method.

column

Specify an ordered list of columns used to determine into which partition a row belongs (the partitioning key).

Oracle assigns rows to partitions using a hash function on values found in columns designated as the partitioning key. You can specify hash partitioning in one of two ways:

  • individual_hash_partitions: Use this clause to specify individual partitions by name. If you omit the partition name, then Oracle assigns partition names of the form SYS_P n.
Restriction on Specifying Individual Hash Partitions

The only clause you can specify in the partitioning_storage_clause is the TABLESPACE clause.

Note:

If your enterprise has or will have databases using different character sets, use caution when partitioning on character columns. The sort sequence of characters is not identical in all character sets.
  • hash_partitions_by_quantity: Alternatively, you can specify the number of partitions. In this case, Oracle assigns partition names of the form SYS_P n. The STORE IN clause specifies one or more tablespaces where the hash partitions are to be stored. The number of tablespaces does not have to equal the number of partitions. If the number of partitions is greater than the number of tablespaces, then Oracle cycles through the names of the tablespaces.

For both methods of hash partitioning, for optimal load balancing you should specify a number of partitions that is a power of 2. Also for both methods of hash partitioning, the only attribute you can specify for hash partitions is TABLESPACE. Hash partitions inherit all other attributes from table-level defaults.

Tablespace storage specified at the table level is overridden by tablespace storage specified at the partition level, which in turn is overridden by tablespace storage specified at the subpartition level.

If you specify tablespace storage in both the STORE IN clause of the hash_partitions_by_quantity clause and the TABLESPACE clause of the partitioning_storage_clause, then the STORE IN clause determines placement of partitions as the table is being created. The TABLESPACE clause determines the default tablespace at the table level for subsequent operations.

See Also:

Oracle9i Database Concepts for more information on hash partitioning
Restrictions on Hash Partitioning
  • You cannot specify more than 16 columns in column_list.
  • The column list cannot contain the ROWID or UROWID pseudocolumns.
  • The column list can be of any built-in datatype except ROWID, LONG, or LOB.

    See Also:

    Oracle9i Database Globalization Support Guide for more information on character set support

list_partitioning

Use the list_partitioning clause to partition the table on lists of literal values from column. List partitioning is useful for controlling how individual rows map to specific partitions.

If you omit the partition name, then Oracle assigns partition names of the form SYS_P n.

list_values_clause

The list_values_clause of each partition must have at least one value. No value (including NULL) can appear in more than one partition. List partitions are not ordered.

Note:

If you specify the literal NULL for a partition value in the VALUES clause, then to access data in that partition in subsequent queries, you must use an IS NULL condition in the WHERE clause, rather than a comparison condition.

The DEFAULT keyword creates a partition into which Oracle will insert any row that does not map to another partition. Therefore, you can specify DEFAULT for only one partition, and you cannot specify any other values for that partition. Further, the default partition must be the last partition you define (similar to the use of MAXVALUE for range partitions).

The string comprising the list of values for each partition can be up to 4K bytes. The total number of values for all partitions cannot exceed 64K-1.

Restrictions on List Partitioning
  • You cannot subpartition a list partition.
  • You can specify only one partitioning key in column_list, and it cannot be a LOB column.
  • If the partitioning key is an object type column, then you can partition on only one attribute of the column type.
  • Each value in the list_values_clause must be unique among all partitions of table.
  • You cannot list partition an index-organized table.

composite_partitioning

Use the composite_partitioning clause to first partition table by range, and then partition the partitions further into hash or list subpartitions. This combination of range partitioning and hash or list subpartitioning is called composite partitioning.

After establishing the type of subpartitioning you want for each composite partition (using the subpartition_by_hash or subpartition_by_list clause), you must define each of the range partitions.

  • You must specify the range_values_clause, which has the same requirements as for noncomposite range partitions.
  • Use the table_partition_description to define the physical and storage characteristics of the each partition. Within the table_partition_description, you can use the partition_level_subpartition clause to define the properties of individual subpartitions.
  • If you omit the partition name, then Oracle generates a name with the form SYS_P n.
  • The only characteristic you can specify for a hash or list subpartition or a LOB subpartition is TABLESPACE.
Restriction on Composite Partitioning

You cannot specify composite partitioning for an index-organized table. Therefore, the OVERFLOW clause of the table_partition_description is not valid for composite-partitioned tables.

subpartition_template

The subpartition_template is a common optional element of both range-hash and range-list composite partitioning. The template lets you define default subpartitions for each table partition. Oracle will create these default subpartitions in any partition for which you do not explicitly define subpartitions. This clause is useful for creating symmetric partitions. You can override this clause by explicitly defining subpartitions at the partition level (in the partition_level_subpartition clause).

When defining subpartitions with a template, you must specify a name for each subpartition.

Restrictions on the Subpartition Template
  • The only clause of partitioning_storage_clause you can specify is the TABLESPACE clause.
  • If you specify TABLESPACE for one LOB subpartition, then you must specify TABLESPACE for all of the LOB subpartitions of that LOB column. You can specify the same tablespace for more than one subpartition.
  • If you specify separate LOB storage for list subpartitions using the partitioning_storage_clause, either in the subpartition_template or when defining individual subpartitions, then you must specify LOB_segname (for both LOB and varray columns).
subpartition_by_hash

Use the subpartition_by_hash clause to indicate that Oracle should subpartition by hash each partition in table. The subpartitioning column list is unrelated to the partitioning key, but is subject to the same restrictions (see column ).

You can define the subpartitions using the subpartition_template or the SUBPARTITIONS quantity clause. See subpartition_template . In either case, for optimal load balancing you should specify a number of partitions that is a power of 2.

SUBPARTITIONS quantity

Specify the default number of subpartitions in each partition of table, and optionally one or more tablespaces in which they are to be stored.

The default value is 1. If you omit both this clause and subpartition_template, then Oracle will create each partition with one hash subpartition unless you subsequently specify the partition_level_subpartition clause.

Restriction on Hash Subpartitioning

In addition to the restrictions for composite partitioning in general (see composite_partitioning ), for hash subpartitioning in subpartition_template, you cannot specify the list_values_clause.

subpartition_by_list

Use the subpartition_by_list clause to indicate that Oracle should subpartition each partition in table by literal values from column.

If you omit subpartition_template, then you can define list subpartitions individually for each partition using the partition_level_subpartition clause of table_partition_description. If you omit both subpartition_template and partition_level_subpartition, then Oracle creates a single DEFAULT subpartition.

Restrictions on List Subpartitioning

In addition to the restrictions for composite partitioning in general (see composite_partitioning ), for list subpartitioning:

  • You can specify only one subpartitioning key column.
  • You must specify the list_values_clause, which is subject to the same requirements as at the table level.
  • In the subpartition_template, you cannot specify the hash_subpartition_quantity clause.
partition_level_subpartition

This clause of the table_partition_description is valid only for composite-partitioned tables. This clause lets you specify hash or list subpartitions for partition. This clause overrides the default settings established in the subpartition_by_hash clause (for range-hash composite partitions) or in the subpartition_template (for range-hash or range-list composite partitions).

For all composite partitions:

  • You can specify the number of subpartitions (and optionally one or more tablespaces where they are to be stored). In this case, Oracle assigns subpartition names of the form SYS_SUBPn. The number of tablespaces does not have to equal the number of subpartitions. If the number of partitions is greater than the number of tablespaces, Oracle cycles through the names of the tablespaces.
  • Alternatively, you can use the subpartition_spec to specify individual subpartitions by name, and optionally the tablespace where each should be stored.
  • If you omit partition_level_subpartition and if you have created a subpartition template, Oracle uses the template to create subpartitions. If you have not created a subpartition template, Oracle creates one hash subpartition or one DEFAULT list subpartition.
  • If you omit partition_level_subpartition entirely, Oracle assigns subpartition names as follows:
    • If you have specified a subpartition template and you have specified partition names, then Oracle generates subpartition names of the form "partition_name underscore (_) subpartition_name" (for example, P1_SUB1).
    • If you have not specified a subpartition template or if you have specified a subpartition template but did not specify partition names, then Oracle generates subpartition names of the form SYS_SUBP n.
  • In partition_spec, the only clause of the partitioning_storage_clause you can specify is the TABLESPACE clause.

For range-hash composite partitions, the list_values_clause of subpartition_spec is not relevant and is invalid.

For range-list composite partitions:

  • The hash_subpartition_quantity is not relevant, so you must use the lower branch of partition_level_subpartition.
  • Within subpartition_spec, you must specify the list_values_clause for each subpartition, and the values you specify for each subpartition cannot exist in any other subpartition of the same partition.
CACHE | NOCACHE | CACHE READS

Use the CACHE clauses to indicate how Oracle should store blocks in the buffer cache. If you specify neither CACHE nor NOCACHE:

  • In a CREATE TABLE statement, NOCACHE is the default
  • In an ALTER TABLE statement, the existing value is not changed.
CACHE Clause

For data that is accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables.

As a parameter in the LOB_storage_clause, CACHE specifies that Oracle places LOB data values in the buffer cache for faster access.

Restriction on CACHE

You cannot specify CACHE for an index-organized table. However, index-organized tables implicitly provide CACHE behavior.

NOCACHE Clause

For data that is not accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed.

As a parameter in the LOB_storage_clause, NOCACHE specifies that the LOB value is either not brought into the buffer cache or brought into the buffer cache and placed at the least recently used end of the LRU list. (The latter is the default behavior.)

Restriction on NOCACHE

You cannot specify NOCACHE for index-organized tables.

CACHE READS

CACHE READS applies only to LOB storage. It specifies that LOB values are brought into the buffer cache only during read operations, but not during write operations.

See Also:

logging_clause for a description of the logging_clause when specified as part of LOB_parameters
parallel_clause

The parallel_clause lets you parallelize creation of the table and set the default degree of parallelism for queries and DML (INSERT, UPDATE, DELETE, and MERGE) operations on the table after creation.

Note:

The syntax of the parallel_clause supersedes syntax appearing in earlier releases of Oracle. Superseded syntax is still supported for backward compatibility, but may result in slightly different behavior than that documented.
NOPARALLEL

Specify NOPARALLEL for serial execution. This is the default.

PARALLEL

Specify PARALLEL if you want Oracle to select a degree of parallelism equal to the number of CPUs available on all participating instances times the value of the PARALLEL_THREADS_PER_CPU initialization parameter.

PARALLEL integer

Specification of integer indicates the degree of parallelism, which is the number of parallel threads used in the parallel operation. Each parallel thread may use one or two parallel execution servers. Normally Oracle calculates the optimum degree of parallelism, so it is not necessary for you to specify integer.

Notes on the parallel_clause
  • Parallelism is disabled for tables on which you have defined a trigger or referential integrity constraint.
  • If you define a bitmap index on table:
    • If table is nonpartitioned, then subsequent DML operations are executed serially.
    • If table is partitioned, then Oracle limits the degree of parallelism to the number of partitions accessed in the DML operation.
  • If table contains any columns of LOB or user-defined object type, then subsequent INSERT, UPDATE, or DELETE operations that modify the LOB or object type column are executed serially without notification. Subsequent queries, however, will be executed in parallel.
  • A parallel hint overrides the effect of the parallel_clause.
  • DML statements and CREATE TABLE ... AS SELECT statements that reference remote objects can run in parallel. However, the "remote object" must really be on a remote database. The reference cannot loop back to an object on the local database (for example, by way of a synonym on the remote database pointing back to an object on the local database).
  • DML operations on tables with LOB columns can be parallelized. However, intra-partition parallelism is not supported.

    See Also:

    Oracle9i Database Performance Tuning Guide and Reference, Oracle9i Database Concepts, Oracle9i Data Warehousing Guide for more information on parallelized operations, and "PARALLEL Example"

NOROWDEPENDENCIES | ROWDEPENDENCIES

This clause lets you specify whether table will use row-level dependency tracking. With this feature, each row in the table has a system change number (SCN) that represents a time greater than or equal to the commit time of the last transaction that modified the row. You cannot change this setting after table is created.

ROWDEPENDENCIES

Specify ROWDEPENDENCIES if you want to enable row-level dependency tracking. This setting is useful primarily to allow for parallel propagation in replication environments. It increases the size of each row by 6 bytes.

NOROWDEPENDENCIES

Specify NOROWDEPENDENCIES if you do not want table to use the row level dependency tracking feature. This is the default.

See Also:

Oracle9i Advanced Replication for information about the use of row-level dependency tracking in replication environments
MONITORING | NOMONITORING
MONITORING

Specify MONITORING if you want modification statistics to be collected on this table. These statistics are estimates of the number of rows affected by DML statements over a particular period of time. They are available for use by the optimizer or for analysis by the user.

Restriction on MONITORING

You cannot specify MONITORING for a temporary table.

NOMONITORING

Specify NOMONITORING if you do not want Oracle to collect modification statistics on the table. This is the default.

Restriction on NOMONITORING

You cannot specify NOMONITORING for a temporary table.

enable_disable_clause

The enable_disable_clause lets you specify whether Oracle should apply a constraint. By default, constraints are created in ENABLE VALIDATE state.

Restrictions on Enabling and Disabling Constraints
  • To enable or disable any integrity constraint, you must have defined the constraint in this or a previous statement.
  • You cannot enable a foreign key constraint unless the referenced unique or primary key constraint is already enabled.

    See Also:

    constraints for more information on constraints, "ENABLE VALIDATE Example" , and "DISABLE Example"

ENABLE Clause

Specify ENABLE if you want the constraint to be applied to the data in the table.

Note:

If you enable a unique or primary key constraint, and if no index exists on the key, Oracle creates a unique index. This index is dropped if the constraint is subsequently disabled, and Oracle rebuilds the index every time the constraint is enabled.

To avoid rebuilding the index and eliminate redundant indexes, create new primary key and unique constraints initially disabled. Then create (or use existing) nonunique indexes to enforce the constraint. Oracle does not drop a nonunique index when the constraint is disabled, so subsequent ENABLE operations are facilitated.
  • ENABLE VALIDATE specifies that all old and new data also complies with the constraint. An enabled validated constraint guarantees that all data is and will continue to be valid.

    If any row in the table violates the integrity constraint, the constraint remains disabled and Oracle returns an error. If all rows comply with the constraint, Oracle enables the constraint. Subsequently, if new data violates the constraint, Oracle does not execute the statement and returns an error indicating the integrity constraint violation.

    Note:

    If you place a primary key constraint in ENABLE VALIDATE mode, the validation process will verify that the primary key columns contain no nulls. To avoid this overhead, mark each column in the primary key NOT NULL before entering data into the column and before enabling the table's primary key constraint.
  • ENABLE NOVALIDATE ensures that all new DML operations on the constrained data comply with the constraint. This clause does not ensure that existing data in the table complies with the constraint and therefore does not require a table lock.

If you specify neither VALIDATE nor NOVALIDATE, the default is VALIDATE.

If you change the state of any single constraint from ENABLE NOVALIDATE to ENABLE VALIDATE, the operation can be performed in parallel, and does not block reads, writes, or other DDL operations.

Restriction on the ENABLE Clause

You cannot enable a foreign key that references a disabled unique or primary key.

DISABLE Clause

Specify DISABLE to disable the integrity constraint. Disabled integrity constraints appear in the data dictionary along with enabled constraints. If you do not specify this clause when creating a constraint, Oracle automatically enables the constraint.

  • DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. This setting lets you load data from a nonpartitioned table into a partitioned table using the exchange_partition_clause of the ALTER TABLE statement or using SQL*Loader. All other modifications to the table (inserts, updates, and deletes) by other SQL statements are disallowed.

    See Also:

    Oracle9i Data Warehousing Guide for more information on using this setting
  • DISABLE NOVALIDATE signifies that Oracle makes no effort to maintain the constraint (because it is disabled) and cannot guarantee that the constraint is true (because it is not being validated).

    You cannot drop a table whose primary key is being referenced by a foreign key even if the foreign key constraint is in DISABLE NOVALIDATE state. Further, the optimizer can use constraints in DISABLE NOVALIDATE state.

    See Also:

    Oracle9i Database Performance Tuning Guide and Reference for information on when to use this setting

If you specify neither VALIDATE nor NOVALIDATE, the default is NOVALIDATE.

If you disable a unique or primary key constraint that is using a unique index, Oracle drops the unique index.

UNIQUE

The UNIQUE clause lets you enable or disable the unique constraint defined on the specified column or combination of columns.

PRIMARY KEY

The PRIMARY KEY clause lets you enable or disable the table's primary key constraint.

CONSTRAINT

The CONSTRAINT clause lets you enable or disable the integrity constraint named constraint.

KEEP | DROP INDEX

This clause lets you either preserve or drop the index Oracle has been using to enforce a unique or primary key constraint.

Restriction on Preserving and Dropping Indexes

You can specify this clause only when disabling a unique or primary key constraint.

using_index_clause

The using_index_clause lets you specify an index for Oracle to use to enforce a unique or primary key constraint, or lets you instruct Oracle to create the index used to enforce the constraint.

You can specify the using_index_clause only when enabling unique or primary key constraints. You can specify the clauses of the using_index_clause in any order, but you can specify each clause only once.

  • If you specify schema.index, Oracle attempts to enforce the constraint using the specified index. If Oracle cannot find the index or cannot use the index to enforce the constraint, Oracle returns an error.
  • If you specify the create_index_statement, Oracle attempts to create the index and use it to enforce the constraint. If Oracle cannot create the index or cannot use the index to enforce the constraint, Oracle returns an error.
  • If you neither specify an existing index nor create a new index, Oracle creates the index. In this case:
    • The index receives the same name as the constraint.
    • You can choose the values of the INITRANS, MAXTRANS, TABLESPACE, PCTFREE, and STORAGE parameters for the index. You cannot specify PCTUSED or the logging_clause for the index.
    • If table is partitioned, you can specify a locally or globally partitioned index for the unique or primary key constraint.
Restrictions on the using_index_clause
  • You cannot specify this clause for a view constraint.
  • You cannot specify this clause for a NOT NULL, foreign key, or check constraint.
  • You cannot specify an index (schema.index) or create an index (create_index_statement) when enabling the primary key of an index-organized table.

    See Also:
    • index_attributes for more information on specifying index attributes in this clause.
    • constraints for additional information on the using_index_clause and on PRIMARY KEY and UNIQUE constraints
    • CREATE INDEX for a description of LOCAL and the global_index_clause, and for a description of NOSORT and the logging_clause in relation to indexes
    • segment_attributes_clause for information on the INITRANS, MAXTRANS, TABLESPACE, STORAGE, and PCTFREE parameters
    • "Explicit Index Control Example" for an example of how you can create an index for Oracle to use in enforcing a constraint
global_partitioned_index

The global_partitioned_index clause lets you specify that the partitioning of the index is user defined and is not equipartitioned with the underlying table. By default, nonpartitioned indexes are global indexes. Oracle will partition the global index on the ranges of values from the table columns you specify in column_list. You cannot specify this clause for a local index.

The column_list must specify a left prefix of the index column list. That is, if the index is defined on columns a, b, and c, then for column_list you can specify (a, b, c), or (a, b), or (a, c), but you cannot specify (b, c) or (c) or (b, a).

Restrictions on the Global Partitioned Index Key
  • You cannot specify more than 32 columns in column_list.
  • The columns cannot contain the ROWID pseudocolumn or a column of type ROWID.

    Note:

    If your enterprise has or will have databases using different character sets, use caution when partitioning on character columns. The sort sequence of characters is not identical in all character sets.
    See Also:

    Oracle9i Database Globalization Support Guide for more information on character set support
index_partitioning_clause

Use this clause to describe the individual index partitions. The number of repetitions of this clause determines the number of partitions. If you omit partition, Oracle generates a name with the form SYS_P n.

For VALUES LESS THAN (value_list), specify the (noninclusive) upper bound for the current partition in a global index. The value list is a comma-delimited, ordered list of literal values corresponding to the column list in the global_partitioned_index clause. Always specify MAXVALUE as the value of the last partition.

Note:

If the index is partitioned on a DATE column, and if the date format does not specify the first two digits of the year, you must use the TO_DATE function with a 4-character format mask for the year. The date format is determined implicitly by NLS_TERRITORY or explicitly by NLS_DATE_FORMAT.
CASCADE

Specify CASCADE to disable any integrity constraints that depend on the specified integrity constraint. To disable a primary or unique key that is part of a referential integrity constraint, you must specify this clause.

Restriction on CASCADE

You can specify CASCADE only if you have specified DISABLE.

row_movement_clause

The row_movement_clause lets you specify whether Oracle can move a table row. It is possible for a row to move, for example, during data segment compression or an update operation on partitioned data.

Caution:

If you need static rowids for data access, do not enable row movement. For a normal (heap-organized) table, moving a row changes that row's rowid. For a moved row in an index-organized table, the logical rowid remains valid, although the physical guess component of the logical rowid becomes inaccurate.
  • Specify ENABLE to allow Oracle to move a row, thus changing the rowid.
  • Specify DISABLE if you want to prevent Oracle from moving a row, thus preventing a change of rowid.
Restriction on Row Movement

You cannot specify this clause for a nonpartitioned index-organized table.

If you omit this clause, then Oracle disables row movement.

AS subquery

Specify a subquery to determine the contents of the table. The rows returned by the subquery are inserted into the table upon its creation.

For object tables, subquery can contain either one expression corresponding to the table type, or the number of top-level attributes of the table type.

See Also:

SELECT

If subquery returns (in part or totally) the equivalent of an existing materialized view, then Oracle may use the materialized view (for query rewrite) in place of one or more tables specified in subquery.

See Also:

Oracle9i Data Warehousing Guide for more information on materialized views and query rewrite

Oracle derives datatypes and lengths from the subquery. Oracle follows the following rules for integrity constraints and other column and table attributes:

  • Oracle automatically defines any NOT NULL constraints on columns in the new table that were explicitly created on the corresponding columns of the selected table if the subquery selects the column rather than an expression containing the column. If any rows violate the constraint, then Oracle does not create the table and returns an error.
  • NOT NULL constraints that were implicitly created by Oracle on columns of the selected table (for example, for primary keys) are not carried over to the new table.
  • In addition, primary keys, unique keys, foreign keys, check constraints, partitioning criteria, indexes, and column default values are not carried over to the new table.

If all expressions in subquery are columns, rather than expressions, then you can omit the columns from the table definition entirely. In this case, the names of the columns of table are the same as the columns in subquery.

You can use subquery in combination with the TO_LOB function to convert the values in a LONG column in another table to LOB values in a column of the table you are creating.

See Also:
  • Oracle9i Database Migration Guide for a discussion of why and when to copy LONGs to LOBs
  • "Conversion Functions" for a description of how to use the TO_LOB function
  • SELECT for more information on the order_by_clause
parallel_clause

If you specify the parallel_clause in this statement, then Oracle will ignore any value you specify for the INITIAL storage parameter, and will instead use the value of the NEXT parameter.

See Also:

storage_clause for information on these parameters
ORDER BY

The ORDER BY clause lets you order rows returned by the subquery.

Note:

When specified with CREATE TABLE, this clause does not necessarily order data cross the entire table. (For example, it does not order across partitions.) Specify this clause if you intend to create an index on the same key as the ORDER BY key column. Oracle will cluster data on the ORDER BY key so that it corresponds to the index key.
Restrictions on the Defining Subquery of a Table
  • The number of columns in the table must equal the number of expressions in the subquery.
  • The column definitions can specify only column names, default values, and integrity constraints, not datatypes.
  • You cannot define a foreign key constraint in a CREATE TABLE statement that contains AS subquery. Instead, you must create the table without the constraint and then add it later with an ALTER TABLE statement.

object_table

The OF clause lets you explicitly create an object table of type object_type. The columns of an object table correspond to the top-level attributes of type object_type. Each row will contain an object instance, and each instance will be assigned a unique, system-generated object identifier (OID) when a row is inserted. If you omit schema, then Oracle creates the object table in your own schema.

Object tables (as well as XMLType tables, object views, and XMLType views) do not have any column names specified for them. Therefore, Oracle defines a system-generated column SYS_NC_ROWINFO$. You can use this column name in queries and to create object views with the WITH OBJECT IDENTIFIER clause.

See Also:

"Object Column and Table Examples"

object_table_substitution

Use the object_table_substitution clause to specify whether row objects corresponding to subtypes can be inserted into this object table.

NOT SUBSTITUTABLE AT ALL LEVELS

NOT SUBSTITUTABLE AT ALL LEVELS indicates that the object table being created is not substitutable. In addition, substitution is disabled for all embedded object attributes and elements of embedded nested tables and arrays. The default is SUBSTITUTABLE AT ALL LEVELS.

object_properties

The properties of object tables are essentially the same as those of relational tables. However, instead of specifying columns, you specify attributes of the object.

For attribute, specify the qualified column name of an item in an object.

OID_clause

The OID_clause lets you specify whether the object identifier (OID) of the object table should be system generated or should be based on the primary key of the table. The default is SYSTEM GENERATED.

Restrictions on the OID_clause
  • You cannot specify OBJECT IDENTIFIER IS PRIMARY KEY unless you have already specified a PRIMARY KEY constraint for the table.
  • You cannot specify this clause for a nested table.

    Note:

    A primary key OID is locally (but not necessarily globally) unique. If you require a globally unique identifier, then you must ensure that the primary key is globally unique.

OID_index_clause

This clause is relevant only if you have specified the OID_clause as SYSTEM GENERATED. It specifies an index, and optionally its storage characteristics, on the hidden object identifier column.

For index, specify the name of the index on the hidden system-generated object identifier column. If you omit index, then Oracle generates a name.

physical_properties and table_properties

The semantics of these clauses are documented in the corresponding sections under relational tables. See physical_properties and table_properties .

XMLType_table

Use the XMLType_table syntax to create a table of datatype XMLType.

Object tables (as well as XMLType tables, object views, and XMLType views) do not have any column names specified for them. Therefore, Oracle defines a system-generated column SYS_NC_ROWINFO$. You can use this column name in queries and to create object views with the WITH OBJECT IDENTIFIER clause.

XMLType_storage

This clause lets you determine how Oracle manages the storage of the underlying columns.

OBJECT RELATIONAL

Specify OBJECT RELATIONAL if you want Oracle to store the XMLType data in object relational columns. If you specify OBJECT RELATIONAL, then you must also specify an XMLSchema in the XMLSchema_storage_clause, and you must already have registered the schema (using the DBMS_XMLSCHEMA package). Oracle will create the table conforming to the registered schema.

CLOB

Specify CLOB if you want Oracle to store the XML data in a CLOB column. If you specify CLOB, then you may also specify either a LOB segment name, or the LOB_parameters clause, or both.

XMLSchema_spec

This clause lets you specify the URL of a registered XMLSchema (in the XMLSCHEMA clause or as part of the ELEMENT clause) and an XML element name. You must specify an element, although the XMLSchema URL is optional. If you do specify an XMLSchema URL, you must already have registered the XMLSchema using the DBMS_XMLSCHEMA package.

See Also:
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_XMLSCHEMA package
  • Oracle9i XML Database Developer's Guide - Oracle XML DB for information on creating and working with XML data
  • "XMLType Table Examples"

Examples

General Examples

To statement shows how the employees table owned by the sample Human Resources (hr) schema was created:

CREATE TABLE employees_demo
    ( employee_id    NUMBER(6)
    , first_name     VARCHAR2(20)
    , last_name      VARCHAR2(25)
         CONSTRAINT emp_last_name_nn NOT NULL
    , email          VARCHAR2(25)
         CONSTRAINT emp_email_nn     NOT NULL
    , phone_number   VARCHAR2(20)
    , hire_date      DATE  DEFAULT SYSDATE
         CONSTRAINT emp_hire_date_nn  NOT NULL
    , job_id         VARCHAR2(10)
       CONSTRAINT     emp_job_nn  NOT NULL
    , salary         NUMBER(8,2)
       CONSTRAINT     emp_salary_nn  NOT NULL
    , commission_pct NUMBER(2,2)
    , manager_id     NUMBER(6)
    , department_id  NUMBER(4)
    , dn             VARCHAR2(300)
    , CONSTRAINT     emp_salary_min
                     CHECK (salary > 0)
    , CONSTRAINT     emp_email_uk
                     UNIQUE (email)
    ) ;

This table contains twelve columns. The employee_id column is of datatype NUMBER. The hire_date column is of datatype DATE and has a default value of SYSDATE. The last_name column is of type VARCHAR2 and has a NOT NULL constraint, and so on.

Storage Example

To define the same employees_demo table in the example tablespace with a small storage capacity and limited allocation potential, issue the following statement:

CREATE TABLE employees_demo
    ( employee_id    NUMBER(6)
    , first_name     VARCHAR2(20)
    , last_name      VARCHAR2(25)
         CONSTRAINT emp_last_name_nn NOT NULL
    , email          VARCHAR2(25)
         CONSTRAINT emp_email_nn     NOT NULL
    , phone_number   VARCHAR2(20)
    , hire_date      DATE  DEFAULT SYSDATE
         CONSTRAINT emp_hire_date_nn  NOT NULL
    , job_id         VARCHAR2(10)
       CONSTRAINT     emp_job_nn  NOT NULL
    , salary         NUMBER(8,2)
       CONSTRAINT     emp_salary_nn  NOT NULL
    , commission_pct NUMBER(2,2)
    , manager_id     NUMBER(6)
    , department_id  NUMBER(4)
    , dn             VARCHAR2(300)
    , CONSTRAINT     emp_salary_min
                     CHECK (salary > 0)
    , CONSTRAINT     emp_email_uk
                     UNIQUE (email)
    )
   TABLESPACE example
   STORAGE (INITIAL     6144
            NEXT        6144
            MINEXTENTS     1
            MAXEXTENTS     5 );
Temporary Table Example

The following statement creates a temporary table today_sales for use by sales representatives in the sample database. Each sales representative session can store its own sales data for the day in the table. The temporary data is deleted at the end of the session.

CREATE GLOBAL TEMPORARY TABLE today_sales
   ON COMMIT PRESERVE ROWS
   AS SELECT * FROM orders WHERE order_date = SYSDATE;
Substitutable Table and Column Examples

The following statement creates a substitutable table from the person_t type, which was created in "Type Hierarchy Example" :

CREATE TABLE persons OF person_t;

The following statement creates a table with a substitutable column of type person_t:

CREATE TABLE books (title VARCHAR2(100), author person_t);

When you insert into persons or books, you can specify values for the attributes of person_t or any of its subtypes. Example insert statements appear in "Inserting into a Substitutable Tables and Columns: Examples" .

You can extract data from such tables using built-in functions and conditions. For examples, see the functions TREAT and SYS_TYPEID , and "IS OF type Conditions" .

PARALLEL Example

The following statement creates a table using an optimum number of parallel execution servers to scan employees and to populate dept_80:

CREATE TABLE dept_80
   PARALLEL
   AS SELECT * FROM employees
   WHERE department_id = 80;

Using parallelism speeds up the creation of the table because Oracle uses parallel execution servers to create the table. After the table is created, querying the table is also faster, because the same degree of parallelism is used to access the table.

NOPARALLEL Example

The following statement creates the same table serially. Subsequent DML and queries on the table will also be serially executed.

CREATE TABLE dept_80
   AS SELECT * FROM employees
   WHERE department_id = 80;
ENABLE VALIDATE Example

The following statement shows how the sample table departments was created. The example defines a NOT NULL constraint, and places it in ENABLE VALIDATE state:

CREATE TABLE departments_demo
    ( department_id    NUMBER(4)
    , department_name  VARCHAR2(30)
           CONSTRAINT  dept_name_nn  NOT NULL
    , manager_id       NUMBER(6)
    , location_id      NUMBER(4)
    , dn               VARCHAR2(300)
    ) ;
DISABLE Example

The following statement creates the same departments_demo table but also defines a disabled primary key constraint:

CREATE TABLE departments_demo
    ( department_id    NUMBER(4)   PRIMARY KEY DISABLE
    , department_name  VARCHAR2(30)
           CONSTRAINT  dept_name_nn  NOT NULL
    , manager_id       NUMBER(6)
    , location_id      NUMBER(4)
    , dn               VARCHAR2(300)
    ) ;
Nested Table Example

The following statement shows how the sample table pm.print_media was created with a nested table column ad_textdocs_ntab:

CREATE TABLE print_media
    ( product_id        NUMBER(6)
    , ad_id             NUMBER(6)
    , ad_composite      BLOB
    , ad_sourcetext     CLOB
    , ad_finaltext      CLOB
    , ad_fltextn        NCLOB
    , ad_textdocs_ntab  textdoc_tab
    , ad_photo          BLOB
    , ad_graphic        BFILE
    , ad_header         adheader_typ
    , press_release     LONG
    ) NESTED TABLE ad_textdocs_ntab STORE AS textdocs_nestedtab;
Multi-level Collection Example

The following example shows how an account manager might create a table of customers using two levels of nested tables:

CREATE TYPE phone AS OBJECT (telephone NUMBER);
/
CREATE TYPE phone_list AS TABLE OF phone;
/
CREATE TYPE my_customer AS OBJECT (
   cust_name VARCHAR2(25),
   phones phone_list);
/
CREATE TYPE customer_list AS TABLE OF my_customer;
/
CREATE TABLE business_contacts (
   company_name VARCHAR2(25),
   company_reps customer_list)
   NESTED TABLE company_reps STORE AS outer_ntab
   (NESTED TABLE phones STORE AS inner_ntab);

The following variation of this example shows how to use the COLUMN_VALUE keyword if the inner nested table has no column or attribute name:

CREATE TYPE phone AS TABLE OF NUMBER;
/
CREATE TYPE phone_list AS TABLE OF phone;
/
CREATE TABLE my_customers (
   name VARCHAR2(25),
   phone_numbers phone_list)
   NESTED TABLE phone_numbers STORE AS outer_ntab
   (NESTED TABLE COLUMN_VALUE STORE AS inner_ntab);
LOB Column Example

The following statement is a variation of the statement that created the pm.print_media table with some added LOB storage characteristics:

CREATE TABLE print_media_new
    ( product_id        NUMBER(6)
    , ad_id             NUMBER(6)
    , ad_composite      BLOB
    , ad_sourcetext     CLOB
    , ad_finaltext      CLOB
    , ad_fltextn        NCLOB
    , ad_textdocs_ntab  textdoc_tab
    , ad_photo          BLOB
    , ad_graphic        BFILE
    , ad_header         adheader_typ
    , press_release     LONG
    ) NESTED TABLE ad_textdocs_ntab STORE AS textdocs_nestedtab_new
    LOB (ad_sourcetext, ad_finaltext) STORE AS
      (TABLESPACE example
       STORAGE (INITIAL 6144 NEXT 6144)
       CHUNK 4000
       NOCACHE LOGGING);

In the example, Oracle rounds the value of CHUNK up to 4096 (the nearest multiple of the block size of 2048).

Index-Organized Table Example

The following statement shows how the sample table hr.countries, which is index organized, was created:

CREATE TABLE countries
    ( country_id      CHAR(2)
      CONSTRAINT country_id_nn NOT NULL
    , country_name    VARCHAR2(40)
    , currency_name   VARCHAR2(25)
    , currency_symbol VARCHAR2(3)
    , region          VARCHAR2(15)
    , CONSTRAINT    country_c_id_pk
                    PRIMARY KEY (country_id )
    ORGANIZATION INDEX
    INCLUDING   country_name
    PCTTHRESHOLD 2
    STORAGE
     ( INITIAL  4K
      NEXT  2K
      PCTINCREASE 0
      MINEXTENTS 1
      MAXEXTENTS 1 )
   OVERFLOW
    STORAGE
      ( INITIAL  4K
        NEXT  2K
        PCTINCREASE 0
        MINEXTENTS 1
        MAXEXTENTS 1 );
External Table Example

The following statement creates an external table that represents a subset of the sample table hr.departments. The opaque_format_spec is shown in italics. Please refer to Oracle9i Database Utilities for information on the ORACLE_LOADER access driver and how to specify values for the opaque_format_spec.

CREATE TABLE dept_external (
   deptno     NUMBER(6),
   dname      VARCHAR2(20),
   loc        VARCHAR2(25)
)
ORGANIZATION EXTERNAL
(TYPE oracle_loader
 DEFAULT DIRECTORY admin
 ACCESS PARAMETERS
 (
 RECORDS DELIMITED BY newline
 BADFILE 'ulcase1.bad'
 DISCARDFILE 'ulcase1.dis'
 LOGFILE 'ulcase1.log'
 SKIP 20
 FIELDS TERMINATED BY ","  OPTIONALLY ENCLOSED BY '"'
 (
 deptno     INTEGER EXTERNAL(6),
 dname      CHAR(20),
 loc        CHAR(25)
  )
 )
 LOCATION ('ulcase1.ctl')
)
REJECT LIMIT UNLIMITED;
See Also:

"Creating a Directory: Examples" to see how the admin directory was created
XMLType Examples

This section contains brief examples of creating an XMLType table or XMLType column. For a more expanded version of these examples, please refer to "Using XML in SQL Statements" .

XMLType Table Examples

The following example creates a very simple XMLType table with one implicit CLOB column:

CREATE TABLE xwarehouses OF XMLTYPE;

Because Oracle implicitly stores the data in a CLOB column, it is subject to all of the restrictions on LOB columns. To avoid these restrictions, you can create an XMLSchema-based table, as shown in the following example. The XMLSchema must already have been created (see "Using XML in SQL Statements" for more information):

CREATE TABLE xwarehouses OF XMLTYPE
   XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
   ELEMENT "Warehouse";

You can define constraints on an XMLSchema-based table, and you can also create indexes on XMLSchema-based tables, which greatly enhance subsequent queries. You can create object-relational views on XMLType tables, and you can create XMLType views on object-relational tables.

See Also:
  • "Using XML in SQL Statements" for an example of adding a constraint
  • "Create an Index on an XMLType Table: Example" for an example of creating an index
  • "Creating an XMLType View: Example" for an example of creating an XMLType view
XMLType Column Examples

The following example creates a table with an XMLType column stored as a CLOB. This table does not require an XMLSchema, so the content structure is not predetermined:

CREATE TABLE xwarehouses (
   warehouse_id        NUMBER,
   warehouse_spec      XMLTYPE)
   XMLTYPE warehouse_spec STORE AS CLOB
   (TABLESPACE example
    STORAGE (INITIAL 6144 NEXT 6144)
    CHUNK 4000
    NOCACHE LOGGING);

The following example creates a similar table, but stores XMLType data in an object relational XMLType column whose structure is determined by the specified schema:

CREATE TABLE xwarehouses (
   warehouse_id    NUMBER,
   warehouse_spec  XMLTYPE)
   XMLTYPE warehouse_spec STORE AS OBJECT RELATIONAL
      XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
      ELEMENT "Warehouse";
Partitioning Examples
Range Partitioning Example

The sales table in the sample schema sh is partitioned by range. The following example shows an abbreviated variation of the sales table (constraints and storage elements have been omitted from the example):

CREATE TABLE range_sales
    ( prod_id        NUMBER(6)
    , cust_id        NUMBER
    , time_id        DATE
    , channel_id     CHAR(1)
    , promo_id       NUMBER(6)
    , quantity_sold  NUMBER(3)
    , amount_sold         NUMBER(10,2)
    )
PARTITION BY RANGE (time_id)
  (PARTITION SALES_Q1_1998 VALUES LESS THAN (TO_DATE('01-APR-1998','DD-MON-YYYY')),
   PARTITION SALES_Q2_1998 VALUES LESS THAN (TO_DATE('01-JUL-1998','DD-MON-YYYY')),
   PARTITION SALES_Q3_1998 VALUES LESS THAN (TO_DATE('01-OCT-1998','DD-MON-YYYY')),
   PARTITION SALES_Q4_1998 VALUES LESS THAN (TO_DATE('01-JAN-1999','DD-MON-YYYY')),
   PARTITION SALES_Q1_1999 VALUES LESS THAN (TO_DATE('01-APR-1999','DD-MON-YYYY')),
   PARTITION SALES_Q2_1999 VALUES LESS THAN (TO_DATE('01-JUL-1999','DD-MON-YYYY')),
   PARTITION SALES_Q3_1999 VALUES LESS THAN (TO_DATE('01-OCT-1999','DD-MON-YYYY')),
   PARTITION SALES_Q4_1999 VALUES LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY')),
   PARTITION SALES_Q1_2000 VALUES LESS THAN (TO_DATE('01-APR-2000','DD-MON-YYYY')),
   PARTITION SALES_Q2_2000 VALUES LESS THAN (TO_DATE('01-JUL-2000','DD-MON-YYYY')),
   PARTITION SALES_Q3_2000 VALUES LESS THAN (TO_DATE('01-OCT-2000','DD-MON-YYYY')),
   PARTITION SALES_Q4_2000 VALUES LESS THAN (MAXVALUE))
;

For information about partitioned table maintenance operations, see the Oracle9i Database Administrator's Guide.

List Partitioning Example

The following statement shows how the sample table oe.customers might have been created as a list-partitioned table (some columns and all constraints of the sample table have been omitted in this example):

CREATE TABLE list_customers
   ( customer_id             NUMBER(6)
   , cust_first_name         VARCHAR2(20)
   , cust_last_name          VARCHAR2(20)
   , cust_address            CUST_ADDRESS_TYP
   , nls_territory           VARCHAR2(30)
   , cust_email              VARCHAR2(30))
   PARTITION BY LIST (nls_territory) (
   PARTITION asia VALUES ('CHINA', 'THAILAND'),
   PARTITION europe VALUES ('GERMANY', 'ITALY', 'SWITZERLAND'),
   PARTITION west VALUES ('AMERICA'),
   PARTITION east VALUES ('INDIA'),
   PARTITION rest VALUES (DEFAULT));
Partitioned Table with LOB Columns Example

This statement creates a partitioned table part_tab with two partitions p1 and p2, and three LOB columns, b, c, and d. The statement uses the sample table pm.print_media, but the LONG column press_release is omitted because LONG columns are not supported in partitioning.

CREATE TABLE print_media_demo
   ( product_id NUMBER(6)
   , ad_id NUMBER(6)
   , ad_composite BLOB
   , ad_sourcetext CLOB
   , ad_finaltext CLOB
   , ad_fltextn NCLOB
   , ad_textdocs_ntab textdoc_tab
   , ad_photo BLOB
   , ad_graphic BFILE
   , ad_header adheader_typ
   ) NESTED TABLE ad_textdocs_ntab STORE AS textdocs_nestedtab_demo
      LOB (ad_composite, ad_photo, ad_finaltext)
      STORE AS(STORAGE (NEXT 20M))
   PARTITION BY RANGE (product_id)
      (PARTITION p1 VALUES LESS THAN (3000) TABLESPACE tbs_1
         LOB (ad_composite, ad_photo)
         STORE AS (TABLESPACE tbs_2 STORAGE (INITIAL 10M)),
       PARTITION P2 VALUES LESS THAN (MAXVALUE)
         LOB (ad_composite, ad_finaltext)
         STORE AS (TABLESPACE tbs_3)
       )
   TABLESPACE tbs_4;

Partition p1 will be in tablespace tbs_1. The LOB data partitions for ad_composite and ad_finaltext will be in tablespace tbs_2. The LOB data partition for ad_photo will be in tablespace tbs_1. The storage attribute INITIAL is specified for LOB columns ad_composite and ad_finaltext. Other attributes will be inherited from the default table-level specification. The default LOB storage attributes not specified at the table level will be inherited from the tablespace tbs_2 for columns ad_composite and ad_finaltext and tablespace tbs_1 for column ad_photo. LOB index partitions will be in the same tablespaces as the corresponding LOB data partitions. Other storage attributes will be based on values of the corresponding attributes of the LOB data partitions and default attributes of the tablespace where the index partitions reside.

Partition p2 will be in the default tablespace tbs_4. The LOB data for ad_composite and ad_photo will be in tablespace tbs_3. The LOB data for ad_finaltext will be in tablespace tbs_4. The LOB index for columns ad_composite and ad_photo will be in tablespace tbs_3. The LOB index for column ad_finaltext will be in tablespace tbs_4.

Hash Partitioning Example

The sample table oe.product_information is not partitioned. However, you might want to partition such a large table by hash for performance reasons, as shown in this example. (The tablespace names are hypothetical in this example.)

CREATE TABLE hash_products
    ( product_id          NUMBER(6)
    , product_name        VARCHAR2(50)
    , product_description VARCHAR2(2000)
    , category_id         NUMBER(2)
    , weight_class        NUMBER(1)
    , warranty_period     INTERVAL YEAR TO MONTH
    , supplier_id         NUMBER(6)
    , product_status      VARCHAR2(20)
    , list_price          NUMBER(8,2)
    , min_price           NUMBER(8,2)
    , catalog_url         VARCHAR2(50)
    , CONSTRAINT          product_status_lov
                          CHECK (product_status in ('orderable'
                                                  ,'planned'
                                                  ,'under development'
                                                  ,'obsolete')
 ) )
 PARTITION BY HASH (product_id)
 PARTITIONS 5
 STORE IN (tbs_1, tbs_2, tbs_3, tbs_4);
Composite-Partitioned Table Examples

The table created in the "Range Partitioning Example" divides data by time of sale. If you plan to access recent data according to distribution channel as well as time, then composite partitioning might be more appropriate. The following example creates a copy of that range_sales table, but with range-hash composite partitioning. The partitions with the most recent data are subpartitioned with both Oracle-defined and user-defined subpartition names. (Constraints and storage attributes have been omitted from the example).

CREATE TABLE composite_sales
    ( prod_id        NUMBER(6)
    , cust_id        NUMBER
    , time_id        DATE
    , channel_id     CHAR(1)
    , promo_id       NUMBER(6)
    , quantity_sold  NUMBER(3)
    , amount_sold         NUMBER(10,2)
    )
PARTITION BY RANGE (time_id)
SUBPARTITION BY HASH (channel_id)
  (PARTITION SALES_Q1_1998 VALUES LESS THAN (TO_DATE('01-APR-1998','DD-MON-YYYY')),
   PARTITION SALES_Q2_1998 VALUES LESS THAN (TO_DATE('01-JUL-1998','DD-MON-YYYY')),
   PARTITION SALES_Q3_1998 VALUES LESS THAN (TO_DATE('01-OCT-1998','DD-MON-YYYY')),
   PARTITION SALES_Q4_1998 VALUES LESS THAN (TO_DATE('01-JAN-1999','DD-MON-YYYY')),
   PARTITION SALES_Q1_1999 VALUES LESS THAN (TO_DATE('01-APR-1999','DD-MON-YYYY')),
   PARTITION SALES_Q2_1999 VALUES LESS THAN (TO_DATE('01-JUL-1999','DD-MON-YYYY')),
   PARTITION SALES_Q3_1999 VALUES LESS THAN (TO_DATE('01-OCT-1999','DD-MON-YYYY')),
   PARTITION SALES_Q4_1999 VALUES LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY')),
   PARTITION SALES_Q1_2000 VALUES LESS THAN (TO_DATE('01-APR-2000','DD-MON-YYYY')),
   PARTITION SALES_Q2_2000 VALUES LESS THAN (TO_DATE('01-JUL-2000','DD-MON-YYYY'))
      SUBPARTITIONS 8,
   PARTITION SALES_Q3_2000 VALUES LESS THAN (TO_DATE('01-OCT-2000','DD-MON-YYYY'))
     (SUBPARTITION ch_c,
      SUBPARTITION ch_i,
      SUBPARTITION ch_p,
      SUBPARTITION ch_s,
      SUBPARTITION ch_t),
   PARTITION SALES_Q4_2000 VALUES LESS THAN (MAXVALUE)
      SUBPARTITIONS 4)
;

The following examples creates a partitioned table of customers based on the sample table oe.customers. In this example, the table is partitioned on the credit_limit column and list subpartitioned on the nls_territory column. The subpartition template determines the subpartitioning of any subsequently added partitions (unless you override the template by defining individual subpartitions). This composite partitioning makes it possible to query the table based on a credit limit range within a specified region:

CREATE TABLE customers_part (
   customer_id        NUMBER(6),
   cust_first_name    VARCHAR2(20),
   cust_last_name     VARCHAR2(20),
   nls_territory      VARCHAR2(30),
   credit_limit       NUMBER(9,2))
   PARTITION BY RANGE (credit_limit)
   SUBPARTITION BY LIST (nls_territory)
      SUBPARTITION TEMPLATE
         (SUBPARTITION east  VALUES
            ('CHINA', 'JAPAN', 'INDIA', 'THAILAND'),
          SUBPARTITION west VALUES
             ('AMERICA', 'GERMANY', 'ITALY', 'SWITZERLAND'),
          SUBPARTITION other VALUES (DEFAULT))
      (PARTITION p1 VALUES LESS THAN (1000),
       PARTITION p2 VALUES LESS THAN (2500),
       PARTITION p3 VALUES LESS THAN (MAXVALUE));
Object Column and Table Examples
Creating Object Tables: Examples

Consider object type department_typ:

CREATE TYPE department_typ AS OBJECT
   ( d_name   VARCHAR2(100),
     d_address VARCHAR2(200) );
/

Object table departments_obj_t holds department objects of type department_typ:

CREATE TABLE departments_obj_t OF department_typ;

The following statement creates object table salesreps with a user-defined object type, salesrep_typ:

CREATE OR REPLACE TYPE salesrep_typ AS OBJECT
  ( repId NUMBER,
    repName VARCHAR2(64));

CREATE TABLE salesreps OF salesrep_typ;
Creating Tables with a Scoped REF: Example

The following example uses the type department_typ and the table departments_obj_t (created in "Creating Object Tables: Examples" ). A table with a scoped REF is then created.

CREATE TABLE employees_obj
   ( e_name   VARCHAR2(100),
     e_number NUMBER,
     e_dept   REF department_typ SCOPE IS departments_obj_t );

The following statement creates a table with a REF column which has a referential integrity constraint defined on it:

CREATE TABLE employees_obj
   ( e_name   VARCHAR2(100),
     e_number NUMBER,
     e_dept   REF department_typ REFERENCES departments_obj_t);
Creating a Table with a User-Defined OID: Example

This example creates an object type and a corresponding object table whose OID is primary key based:

CREATE TYPE employees_typ AS OBJECT
   (e_no NUMBER, e_address CHAR(30));

CREATE TABLE employees_obj_t OF employees_typ (e_no PRIMARY KEY)
   OBJECT IDENTIFIER IS PRIMARY KEY;

You can subsequently reference the emp object table in either of the following two ways:

CREATE TABLE departments_t
   (d_no    NUMBER,
    mgr_ref REF employees_typ SCOPE IS employees_obj_t);

CREATE TABLE departments_t (
    d_no NUMBER,
    mgr_ref REF employees_typ
       CONSTRAINT mgr_in_emp REFERENCES employees_obj_t);
Specifying Constraints on Type Columns: Example
CREATE TYPE address_t AS OBJECT
  ( hno    NUMBER,
    street VARCHAR2(40),
    city   VARCHAR2(20),
    zip    VARCHAR2(5),
    phone  VARCHAR2(10) );

CREATE TYPE person AS OBJECT
  ( name        VARCHAR2(40),
    dateofbirth DATE,
    homeaddress address,
    manager     REF person );

CREATE TABLE persons OF person
  ( homeaddress NOT NULL,
      UNIQUE (homeaddress.phone),
      CHECK (homeaddress.zip IS NOT NULL),
      CHECK (homeaddress.city <> 'San Francisco') );
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE SYNONYM to CREATE TRIGGER, 4 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE TABLESPACE

Purpose

Use the CREATE TABLESPACE statement to create a tablespace, which is an allocation of space in the database that can contain persistent schema objects.

When you create a tablespace, it is initially a read/write tablespace. You can subsequently use the ALTER TABLESPACE statement to take the tablespace offline or online, add datafiles to it, or make it a read-only tablespace.

You can also drop a tablespace from the database with the DROP TABLESPACE statement.

You can use the CREATE TEMPORARY TABLESPACE statement to create tablespaces that contain schema objects only for the duration of a session.

See Also:
  • Oracle9i Database Concepts for information on tablespaces
  • ALTER TABLESPACE for information on modifying tablespaces
  • DROP TABLESPACE for information on dropping tablespaces
  • CREATE TEMPORARY TABLESPACE

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

You must have CREATE TABLESPACE system privilege.

Before you can create a tablespace, you must create a database to contain it, and the database must be open.

See Also:

CREATE DATABASE

To use objects in a tablespace other than the SYSTEM tablespace:

  • If you are running the database in rollback undo mode, at least one rollback segment (other than the SYSTEM rollback segment) must be online.
  • If you are running the database in Automatic Undo Management mode, at least one UNDO tablespace must be online.

    See Also:

    CREATE ROLLBACK SEGMENT

Syntax

create_tablespace::=

Text description of statements_759.gif follows
Text description of create_tablespace

(datafile_tempfile_spec::= --part of file_specification, logging_clause::= , data_segment_compression::= , storage_clause::= , extent_management_clause::= , segment_management_clause::= )

logging_clause::=

Text description of statements_711.gif follows
Text description of logging_clause

data_segment_compression::=

Text description of statements_766a.gif follows
Text description of data_segment_compression

(storage_clause )

extent_management_clause::=

Text description of statements_760.gif follows
Text description of extent_management_clause

segment_management_clause::=

Text description of statements_73.gif follows
Text description of segment_management_clause

Semantics

UNDO

Specify UNDO to create an undo tablespace. When you run the database in Automatic Undo Management mode, Oracle manages undo space using the undo tablespace instead of rollback segments. This clause is useful if you are now running in Automatic Undo Management mode but your database was not created in Automatic Undo Management mode.

Oracle always assigns an undo tablespace when you start up the database in Automatic Undo Management mode. If no undo tablespace has been assigned to this instance, then Oracle will use the SYSTEM rollback segment. You can avoid this by creating an undo tablespace, which Oracle will implicitly assign to the instance if no other undo tablespace is currently assigned.

Restrictions on Undo Tablespaces
  • You cannot create database objects in this tablespace. It is reserved for system-managed undo data.
  • The only clauses you can specify for an undo tablespace are the DATAFILE clause and the extent_management_clause to specify local extent management. (You cannot specify dictionary extent management using the extent_management_clause.) All undo tablespaces are created permanent, read/write, and in logging mode. Values for MINIMUM EXTENT and DEFAULT STORAGE are system generated.

    See Also:
    • Oracle9i Database Administrator's Guide for information on Automatic Undo Management and undo tablespaces
    • CREATE DATABASE for information on creating an undo tablespace implicitly or explicitly during database creation
    • ALTER TABLESPACE for information about altering undo tablespaces
    • DROP TABLESPACE for information about dropping undo tablespaces
    • Oracle9i Database Reference for information on opening a database instance in Automatic Undo Management mode using the UNDO_MANAGEMENT parameter
    • "Creating an Undo Tablespace: Example"

tablespace

Specify the name of the tablespace to be created.

DATAFILE datafile_tempfile_spec

Specify the datafile or files to make up the tablespace.

Note:

For operating systems that support raw devices, the REUSE keyword of datafile_tempfile_spec has no meaning when specifying a raw device as a datafile. Such a CREATE TABLESPACE statement will succeed whether or not you specify REUSE.

The DATAFILE clause is optional only if the DB_CREATE_FILE_DEST initialization parameter is set. In this case, Oracle creates a system-named 100MB file in the default file destination specified in the parameter. The file has AUTOEXTEND enabled and an unlimited maximum size.

See Also:
  • file_specification for a full description, including the AUTOEXTEND parameter
  • "Enabling Autoextend for a Tablespace: Example" and "Creating Oracle-managed Files: Examples"

MINIMUM EXTENT Clause

Specify the minimum size of an extent in the tablespace. This clause lets you control free space fragmentation in the tablespace by ensuring that every used or free extent size in a tablespace is at least as large as, and is a multiple of, integer.

Note:

This clause is not relevant for a dictionary-managed temporary tablespace.
See Also:

Oracle9i Database Concepts for more information about using MINIMUM EXTENT to control fragmentation and "Specifying Minimum Extent Size: Example"

BLOCKSIZE Clause

Use the BLOCKSIZE clause to specify a nonstandard block size for the tablespace. In order to specify this clause, you must have the DB_CACHE_SIZE and at least one DB_n K_CACHE_SIZE parameter set, and the integer you specify in this clause must correspond with the setting of one DB_n K_CACHE_SIZE parameter setting.

Restriction on BLOCKSIZE

You cannot specify nonstandard block sizes for a temporary tablespace (that is, if you also specify TEMPORARY) or if you intend to assign this tablespace as the temporary tablespace for any users.

See Also:

Oracle9i Database Administrator's Guide for information on allowing multiple block sizes in the buffer cache, and for restrictions on using multiple block sizes in partitioned objects

logging_clause

Specify the default logging attributes of all tables, indexes, materialized views, materialized view logs, and partitions within the tablespace. LOGGING is the default.

The tablespace-level logging attribute can be overridden by logging specifications at the table, index, materialized view, materialized view log, and partition levels.

See Also:

logging_clause for a full description of this clause

FORCE LOGGING

Use this clause to put the tablespace into FORCE LOGGING mode. Oracle will log all changes to all objects in the tablespace except changes to temporary segments, overriding any NOLOGGING setting for individual objects. The database must be open and in READ WRITE mode.

This setting does not exclude the NOLOGGING attribute. That is, you can specify both FORCE LOGGING and NOLOGGING. In this case, NOLOGGING is the default logging mode for objects subsequently created in the tablespace, but Oracle ignores this default as long as the tablespace (or the database) is in FORCE LOGGING mode. If you subsequently take the tablespace out of FORCE LOGGING mode, then the NOLOGGING default is once again enforced.

Note:

FORCE LOGGING mode can have performance effects. Please refer to Oracle9i Database Administrator's Guide for information on when to use this setting.
Restriction on Forced Logging

You cannot specify FORCE LOGGING for an undo or temporary tablespace.

DEFAULT storage_clause

Specify the default storage parameters for all objects created in the tablespace.

For a dictionary-managed temporary tablespace, Oracle considers only the NEXT parameter of the storage_clause.

See Also:

storage_clause for information on storage parameters and "Creating a Tablespace with Default Storage: Example"

ONLINE | OFFLINE Clauses

ONLINE

Specify ONLINE to make the tablespace available immediately after creation to users who have been granted access to the tablespace. This is the default.

OFFLINE

Specify OFFLINE to make the tablespace unavailable immediately after creation.

The data dictionary view DBA_TABLESPACES indicates whether each tablespace is online or offline.

PERMANENT | TEMPORARY Clauses

PERMANENT

Specify PERMANENT if the tablespace will be used to hold permanent objects. This is the default.

TEMPORARY

Specify TEMPORARY if the tablespace will be used only to hold temporary objects, for example, segments used by implicit sorts to handle ORDER BY clauses.

Temporary tablespaces created with this clause are always dictionary managed, so you cannot specify the EXTENT MANAGEMENT LOCAL clause. To create a locally managed temporary tablespace, use the CREATE TEMPORARY TABLESPACE statement.

Note:

Oracle Corporation strongly recommends that you create locally managed temporary tablespaces containing tempfiles by using the CREATE TEMPORARY TABLESPACE statement. The creation of new dictionary-managed tablespaces is scheduled for desupport.
Restriction on Temporary Tablespaces

If you specify TEMPORARY, then you cannot specify the BLOCKSIZE clause.

extent_management_clause

The extent_management_clause lets you specify how the extents of the tablespace will be managed.

Note:

Once you have specified extent management with this clause, you can change extent management only by migrating the tablespace.
  • Specify LOCAL if you want the tablespace to be locally managed. Locally managed tablespaces have some part of the tablespace set aside for a bitmap. This is the default.
    • AUTOALLOCATE specifies that the tablespace is system managed. Users cannot specify an extent size. This is the default if the COMPATIBLE initialization parameter is set to 9.0.0 or higher.
    • UNIFORM specifies that the tablespace is managed with uniform extents of SIZE bytes. Use K or M to specify the extent size in kilobytes or megabytes. The default SIZE is 1 megabyte.
  • Specify DICTIONARY if you want the tablespace to be managed using dictionary tables. This is the default if the COMPATIBLE initialization parameter is set less than 9.0.0.
Restriction on Dictionary-managed Tablespaces

You cannot specify DICTIONARY if the SYSTEM tablespace of the database is locally managed.

Note:

Oracle Corporation strongly recommends that you create only locally managed tablespaces. Locally managed tablespaces are much more efficiently managed than dictionary-managed tablespaces. The creation of new dictionary-managed tablespaces is scheduled for desupport.

If you do not specify the extent_management_clause, then Oracle interprets the COMPATIBLE setting, the MINIMUM EXTENT clause and the DEFAULT storage_clause to determine extent management. If the COMPATIBLE initialization parameter is less than 9.0.0, then Oracle creates a dictionary managed tablespace. If COMPATIBLE = 9.0.0 or higher:

  • If you do not specify the DEFAULT storage_clause, then Oracle creates a locally managed autoallocated tablespace.
  • If you did specify the DEFAULT storage_clause:
    • If you specified the MINIMUM EXTENT clause, then Oracle evaluates whether the values of MINIMUM EXTENT, INITIAL, and NEXT are equal and the value of PCTINCREASE is 0. If so, Oracle creates a locally managed uniform tablespace with extent size = INITIAL. If the MINIMUM EXTENT, INITIAL, and NEXT parameters are not equal, or if PCTINCREASE is not 0, Oracle ignores any extent storage parameters you may specify and creates a locally managed, autoallocated tablespace.
    • If you did not specify MINIMUM EXTENT clause, then Oracle evaluates only whether the storage values of INITIAL and NEXT are equal and PCTINCREASE is 0. If so, the tablespace is locally managed and uniform. Otherwise, the tablespace is locally managed and autoallocated.

      See Also:

      Oracle9i Database Concepts for a discussion of locally managed tablespaces
Restrictions on Extent Management
  • A permanent locally managed tablespace can contain only permanent objects. If you need a locally managed tablespace to store temporary objects (for example, if you will assign it as a user's temporary tablespace, use the CREATE TEMPORARY TABLESPACE statement.
  • If you specify LOCAL, then you cannot specify DEFAULT storage_clause, MINIMUM EXTENT, or TEMPORARY.

    See Also:

    Oracle9i Database Migration Guide for information on changing extent management by migrating tablespaces and "Creating a Locally Managed Tablespace: Example"

segment_management_clause

The segment_management_clause is relevant only for permanent, locally managed tablespaces. It lets you specify whether Oracle should track the used and free space in the segments in the tablespace using free lists or bitmaps.

MANUAL

Specify MANUAL if you want Oracle to manage the free space of segments in the tablespace using free lists.

AUTO

Specify AUTO if you want Oracle to manage the free space of segments in the tablespace using a bitmap. If you specify AUTO, then Oracle ignores any specification for PCTUSED, FREELIST, and FREELIST GROUPS in subsequent storage specifications for objects in this tablespace. This setting is called automatic segment-space management.

To determine the segment management of an existing tablespace, query the SEGMENT_SPACE_MANAGEMENT column of the DBA_TABLESPACES or USER_TABLESPACES data dictionary view.

Notes:

If you specify AUTO, then:

  • If you set extent management to LOCAL UNIFORM, then you must ensure that each extent contains at least 5 database blocks, given the database block size.
  • If you set extent management to LOCAL AUTOALLOCATE, and if the database block size is 16K or greater, then Oracle manages segment space by creating extents with a minimum size of 1M.
Restrictions on Automatic Segment-space Management
  • You can specify this clause only for permanent, locally managed tablespace.
  • You cannot specify this clause for the SYSTEM tablespace.

    See Also:
    • Oracle9i Database Administrator's Guide for information on automatic segment-space management and when to use it
    • Oracle9i Database Reference for information on the data dictionary views
    • "Specifying Segment Space Management for a Tablespace: Example"

Examples

Creating an Undo Tablespace: Example

The following example creates a 10 MB undo tablespace undots1 with datafile undotbs_1a.f:

CREATE UNDO TABLESPACE undots1
   DATAFILE 'undotbs_1a.f'
   SIZE 10M AUTOEXTEND ON;
Creating a Tablespace with Default Storage: Example

This statement creates a tablespace named tbs_01 with one datafile:

CREATE TABLESPACE tbs_01
   DATAFILE 'tbs_f2.dat' SIZE 40M
   DEFAULT STORAGE (INITIAL 128K NEXT 128K
                    MINEXTENTS 1 MAXEXTENTS 999)
   ONLINE;
Enabling Autoextend for a Tablespace: Example

This statement creates a tablespace named tbs_02 with one datafile. When more space is required, 500 kilobyte extents will be added up to a maximum size of 10 megabytes:

CREATE TABLESPACE tbs_02
   DATAFILE 'diskb:tbs_f5.dat' SIZE 500K REUSE
   AUTOEXTEND ON NEXT 500K MAXSIZE 100M;
Specifying Minimum Extent Size: Example

This statement creates tablespace tbs_03 with one datafile and allocates every extent as a multiple of 500K:

CREATE TABLESPACE tbs_03
   DATAFILE 'tbs_f03.dbf' SIZE 20M
   MINIMUM EXTENT 500K
   DEFAULT STORAGE (INITIAL 128K NEXT 128K)
   LOGGING;
Creating a Locally Managed Tablespace: Example

In the following statement, we assume that the database block size is 2K.

CREATE TABLESPACE tbs_04 DATAFILE 'file_1.f' SIZE 10M
   EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;

This statement creates a locally managed tablespace in which every extent is 128K and each bit in the bit map describes 64 blocks.

Specifying Segment Space Management for a Tablespace: Example

The following example creates a tablespace with automatic segment-space management:

CREATE TABLESPACE auto_seg_ts DATAFILE 'file_2.f' SIZE 1M
   EXTENT MANAGEMENT LOCAL
   SEGMENT SPACE MANAGEMENT AUTO;
Creating Oracle-managed Files: Examples

The following example sets the default location for datafile creation and creates a tablespace with a datafile in the default location. The datafile is 100M and is autoextensible with an unlimited maximum size:

ALTER SYSTEM SET DB_CREATE_FILE_DEST = '$ORACLE_HOME/rdbms/log';

CREATE TABLESPACE omf_ts1;

The following example creates a tablespace with an Oracle managed datafile of 100M that is not autoextensible:

CREATE TABLESPACE omf_ts2 DATAFILE AUTOEXTEND OFF;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE SYNONYM to CREATE TRIGGER, 5 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE TEMPORARY TABLESPACE

Purpose

Use the CREATE TEMPORARY TABLESPACE statement to create a locally managed temporary tablespace, which is an allocation of space in the database that can contain schema objects for the duration of a session. If you subsequently assign this temporary tablespace to a particular user, then Oracle will also use this tablespace for sorting operations in transactions initiated by that user.

To create a tablespace to contain persistent schema objects, use the CREATE TABLESPACE statement.

To create a temporary tablespace that is dictionary managed, use the CREATE TABLESPACE statement with the TEMPORARY clause.

Note:

Media recovery does not recognize tempfiles.
See Also:
  • CREATE TABLESPACE for information on creating tablespaces to store persistent schema objects and dictionary-managed temporary tablespaces
  • CREATE USER for information on assigning a temporary tablespace to a user

Prerequisites

You must have the CREATE TABLESPACE system privilege.

Syntax

create_temporary_tablespace::=

Text description of statements_762.gif follows
Text description of create_temporary_tablespace

(datafile_tempfile_spec::= , temp_tablespace_extent::= )

temp_tablespace_extent::=

Text description of statements_763.gif follows
Text description of temp_tablespace_extent

Semantics

tablespace

Specify the name of the temporary tablespace.

TEMPFILE datafile_tempfile_spec

Specify the tempfiles that make up the tablespace.

You can omit the TEMPFILE clause only if the DB_CREATE_FILE_DEST initialization parameter has been set. In this case, Oracle creates a 100 MB Oracle-managed tempfile in the default file destination specified in the parameter. The file has AUTOEXTEND enabled and an unlimited maximum size. If the DB_CREATE_FILE_DEST parameter is not set, then you must specify the TEMPFILE clause.

Note:

On some operating systems, Oracle does not allocate space for the tempfile until the tempfile blocks are actually accessed. This delay in space allocation results in faster creation and resizing of tempfiles, but it requires that sufficient disk space is available when the tempfiles are later used. To avoid potential problems, before you create or resize a tempfile, ensure that the available disk space exceeds the size of the new tempfile or the increased size of a resized tempfile. The excess space should allow for anticipated increases in disk space use by unrelated operations as well. Then proceed with the creation or resizing operation.
See Also:

file_specification for a full description, including the AUTOEXTEND parameter

temp_tablespace_extent

The temp_tablespace_extent clause lets you specify how the tablespace is managed.

EXTENT MANAGEMENT LOCAL

This clause indicates that some part of the tablespace is set aside for a bitmap. All temporary tablespaces created with the CREATE TEMPORARY TABLESPACE statement have locally managed extents, so this clause is optional. To create a dictionary-managed temporary tablespace, use the CREATE TABLESPACE statement with the TEMPORARY clause.

UNIFORM

All extents of temporary tablespaces are the same size (uniform), so this keyword is optional. However, you must specify UNIFORM in order to specify SIZE.

SIZE integer

Specify in bytes the size of the tablespace extents. Use K or M to specify the size in kilobytes or megabytes.

If you do not specify SIZE, then Oracle uses the default extent size of 1M.

See Also:

Oracle9i Database Concepts for a discussion of locally managed tablespaces

Example

Creating a Temporary Tablespace: Example

This statement shows how the temporary tablespace that serves as the default temporary tablespace for database users in the sample database was created:

CREATE TEMPORARY TABLESPACE temp_demo
   TEMPFILE 'temp01.dbf' SIZE 5M AUTOEXTEND ON;

If we assume the default database block size of 2K, and that each bit in the map represents one extent, then each bit maps 2,500 blocks.

The following example sets the default location for datafile creation and then creates a tablespace with an Oracle-managed tempfile in the default location. The tempfile is 100 M and is autoextensible with unlimited maximum size (the default values for Oracle-managed files):

ALTER SYSTEM SET DB_CREATE_FILE_DEST = '$ORACLE_HOME/rdbms/log';

CREATE TEMPORARY TABLESPACE tbs_05;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE SYNONYM to CREATE TRIGGER, 6 of 6

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE TRIGGER

Purpose

Use the CREATE TRIGGER statement to create and enable a database trigger, which is

  • A stored PL/SQL block associated with a table, a schema, or the database or
  • An anonymous PL/SQL block or a call to a procedure implemented in PL/SQL or Java

Oracle automatically executes a trigger when specified conditions occur.

When you create a trigger, Oracle enables it automatically. You can subsequently disable and enable a trigger with the DISABLE and ENABLE clause of the ALTER TRIGGER or ALTER TABLE statement.

See Also:
  • Oracle9i Database Concepts for a description of the various types of triggers
  • Oracle9i Application Developer's Guide - Fundamentals for more information on how to design triggers
  • ALTER TRIGGER and ALTER TABLE for information on enabling, disabling, and compiling triggers
  • DROP TRIGGER for information on dropping a trigger

Prerequisites

Before a trigger can be created, the user SYS must run a SQL script commonly called DBMSSTDX.SQL. The exact name and location of this script depend on your operating system.

  • To create a trigger in your own schema on a table in your own schema or on your own schema (SCHEMA), you must have the CREATE TRIGGER privilege.
  • To create a trigger in any schema on a table in any schema, or on another user's schema (schema.SCHEMA), you must have the CREATE ANY TRIGGER privilege.
  • In addition to the preceding privileges, to create a trigger on DATABASE, you must have the ADMINISTER DATABASE TRIGGER system privilege.

If the trigger issues SQL statements or calls procedures or functions, then the owner of the trigger must have the privileges necessary to perform these operations. These privileges must be granted directly to the owner rather than acquired through roles.

Syntax

create_trigger::=

Text description of statements_764.gif follows
Text description of create_trigger

dml_event_clause::=

Text description of statements_765.gif follows
Text description of dml_event_clause

referencing_clause::=

Text description of statements_7a.gif follows
Text description of referencing_clause

Semantics

OR REPLACE

Specify OR REPLACE to re-create the trigger if it already exists. Use this clause to change the definition of an existing trigger without first dropping it.

schema

Specify the schema to contain the trigger. If you omit schema, then Oracle creates the trigger in your own schema.

trigger

Specify the name of the trigger to be created.

If a trigger produces compilation errors, then it is still created, but it fails on execution. This means it effectively blocks all triggering DML statements until it is disabled, replaced by a version without compilation errors, or dropped. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

Note:

If you create a trigger on a base table of a materialized view, then you must ensure that the trigger does not fire during a refresh of the materialized view. (During refresh, the DBMS_MVIEW procedure I_AM_A_REFRESH returns TRUE.)

BEFORE

Specify BEFORE to cause Oracle to fire the trigger before executing the triggering event. For row triggers, the trigger is fired before each affected row is changed.

Restrictions on BEFORE Triggers
  • You cannot specify a BEFORE trigger on a view or an object view.
  • You can write to the :NEW value but not to the :OLD value.

AFTER

Specify AFTER to cause Oracle to fire the trigger after executing the triggering event. For row triggers, the trigger is fired after each affected row is changed.

Restrictions on AFTER Triggers
  • You cannot specify an AFTER trigger on a view or an object view.
  • You cannot write either the :OLD or the :NEW value.

    Note:

    When you create a materialized view log for a table, Oracle implicitly creates an AFTER ROW trigger on the table. This trigger inserts a row into the materialized view log whenever an INSERT, UPDATE, or DELETE statement modifies the table's data. You cannot control the order in which multiple row triggers fire. Therefore, you should not write triggers intended to affect the content of the materialized view.
    See Also:

    CREATE MATERIALIZED VIEW LOG for more information on materialized view logs

INSTEAD OF

Specify INSTEAD OF to cause Oracle to fire the trigger instead of executing the triggering event. INSTEAD OF triggers are valid for DML events on views. They are not valid for DDL or database events.

If a view is inherently updatable and has INSTEAD OF triggers, then the triggers take preference. In other words, Oracle fires the triggers instead of performing DML on the view.

If the view belongs to a hierarchy, then the trigger is not inherited by subviews.

Note:

Oracle fine-grained access control lets you define row-level security policies on views. These policies enforce specified rules in response to DML operations. If an INSTEAD OF trigger is also defined on the view, then Oracle will not enforce the row-level security policies, because Oracle fires the INSTEAD OF trigger instead of executing the DML on the view.
Restrictions on INSTEAD OF Triggers
  • INSTEAD OF triggers are valid only for views. You cannot specify an INSTEAD OF trigger on a table.
  • You can read both the :OLD and the :NEW value, but you cannot write either the :OLD or the :NEW value.

    Note:

    You can create multiple triggers of the same type (BEFORE, AFTER, or INSTEAD OF) that fire for the same statement on the same table. The order in which Oracle fires these triggers is indeterminate. If your application requires that one trigger be fired before another of the same type for the same statement, combine these triggers into a single trigger whose trigger action performs the trigger actions of the original triggers in the appropriate order.
    See Also:

    "Creating an INSTEAD OF Trigger: Example"

dml_event_clause

The dml_event_clause lets you specify one of three DML statements that can cause the trigger to fire. Oracle fires the trigger in the existing user transaction.

See Also:

"Creating a DML Trigger: Examples"

DELETE

Specify DELETE if you want Oracle to fire the trigger whenever a DELETE statement removes a row from the table or removes an element from a nested table.

INSERT

Specify INSERT if you want Oracle to fire the trigger whenever an INSERT statement adds a row to table or adds an element to a nested table.

UPDATE

Specify UPDATE if you want Oracle to fire the trigger whenever an UPDATE statement changes a value in one of the columns specified after OF. If you omit OF, then Oracle fires the trigger whenever an UPDATE statement changes a value in any column of the table or nested table.

For an UPDATE trigger, you can specify object type, varray, and REF columns after OF to indicate that the trigger should be fired whenever an UPDATE statement changes a value in one of the columns. However, you cannot change the values of these columns in the body of the trigger itself.

Note:

Using OCI functions or the DBMS_LOB package to update LOB values or LOB attributes of object columns does not cause Oracle to fire triggers defined on the table containing the columns or the attributes.
Restrictions on Triggers on UPDATE Operations
  • You cannot specify UPDATE OF for an INSTEAD OF trigger. Oracle fires INSTEAD OF triggers whenever an UPDATE changes a value in any column of the view.
  • You cannot specify a nested table or LOB column in the UPDATE OF clause.

    See Also:

    AS subquery of CREATE VIEW for a list of constructs that prevent inserts, updates, or deletes on a view

Performing DML operations directly on nested table columns does not cause Oracle to fire triggers defined on the table containing the nested table column.

ddl_event

Specify one or more types of DDL statements that can cause the trigger to fire. You can create triggers for these events on DATABASE or SCHEMA unless otherwise noted. You can create BEFORE and AFTER triggers for these events. Oracle fires the trigger in the existing user transaction.

Restriction on Triggers on DDL Events

You cannot specify as a triggering event any DDL operation performed through a PL/SQL procedure.

See Also:

"Creating a DDL Trigger: Example"

The following ddl_event values are valid:

ALTER

Specify ALTER to fire the trigger whenever an ALTER statement modifies a database object in the data dictionary.

Restriction on Triggers on ALTER Operations

The trigger will not be fired by an ALTER DATABASE statement.

ANALYZE

Specify ANALYZE to fire the trigger whenever Oracle collects or deletes statistics or validates the structure of a database object.

ASSOCIATE STATISTICS

Specify ASSOCIATE STATISTICS to fire the trigger whenever Oracle associates a statistics type with a database object.

AUDIT

Specify AUDIT to fire the trigger whenever Oracle tracks the occurrence of a SQL statement or tracks operations on a schema object.

COMMENT

Specify COMMENT to fire the trigger whenever a comment on a database object is added to the data dictionary.

CREATE

Specify CREATE to fire the trigger whenever a CREATE statement adds a new database object to the data dictionary.

Restriction on Triggers on CREATE Operations

The trigger will not be fired by a CREATE DATABASE or CREATE CONTROLFILE statement.

DISASSOCIATE STATISTICS

Specify DISASSOCIATE STATISTICS to fire the trigger whenever Oracle disassociates a statistics type from a database object.

DROP

Specify DROP to fire the trigger whenever a DROP statement removes a database object from the data dictionary.

GRANT

Specify GRANT to fire the trigger whenever a user grants system privileges or roles or object privileges to another user or to a role.

NOAUDIT

Specify NOAUDIT to fire the trigger whenever a NOAUDIT statement instructs Oracle to stop tracking a SQL statement or operations on a schema object.

RENAME

Specify RENAME to fire the trigger whenever a RENAME statement changes the name of a database object.

REVOKE

Specify REVOKE to fire the trigger whenever a REVOKE statement removes system privileges or roles or object privileges from a user or role.

TRUNCATE

Specify TRUNCATE to fire the trigger whenever a TRUNCATE statement removes the rows from a table or cluster and resets its storage characteristics.

DDL

Specify DDL to fire the trigger whenever any of the preceding DDL statements is issued.

database_event

Specify one or more particular states of the database that can cause the trigger to fire. You can create triggers for these events on DATABASE or SCHEMA unless otherwise noted. For each of these triggering events, Oracle opens an autonomous transaction scope, fires the trigger, and commits any separate transaction (regardless of any existing user transaction).

See Also:

"Creating a Database Event Trigger: Example"

SERVERERROR

Specify SERVERERROR to fire the trigger whenever a server error message is logged.

The following errors do not cause a SERVERERROR trigger to fire:

  • ORA-01403: data not found
  • ORA-01422: exact fetch returns more than requested number of rows
  • ORA-01423: error encountered while checking for extra rows in exact fetch
  • ORA-01034: ORACLE not available
  • ORA-04030: out of process memory
LOGON

Specify LOGON to fire the trigger whenever a client application logs onto the database.

LOGOFF

Specify LOGOFF to fire the trigger whenever a client applications logs off the database.

STARTUP

Specify STARTUP to fire the trigger whenever the database is opened.

SHUTDOWN

Specify SHUTDOWN to fire the trigger whenever an instance of the database is shut down.

SUSPEND

Specify SUSPEND to fire the trigger whenever a server error causes a transaction to be suspended.

Notes:
  • Only AFTER triggers are relevant for LOGON, STARTUP, SERVERERROR, and SUSPEND.
  • Only BEFORE triggers are relevant for LOGOFF and SHUTDOWN.
  • AFTER STARTUP and BEFORE SHUTDOWN triggers apply only to DATABASE.
See Also:

PL/SQL User's Guide and Reference for more information on autonomous transaction scope

ON table | view

The ON clause lets you determine the database object on which the trigger is to be created.

table | view

Specify the schema and table or view name of one of the following on which the trigger is to be created:

  • Table or view
  • Object table or object view
  • A column of nested-table type

If you omit schema, then Oracle assumes the table is in your own schema. You can create triggers on index-organized tables.

Restriction on Schema

You cannot create a trigger on a table in the schema SYS.

NESTED TABLE Clause

Specify the nested_table_column of a view upon which the trigger is being defined. Such a trigger will fire only if the DML operates on the elements of the nested table.

Restriction on Triggers on Nested Tables

You can specify NESTED TABLE only for INSTEAD OF triggers.

DATABASE

Specify DATABASE to define the trigger on the entire database. The trigger fires whenever any database user initiates the triggering event.

SCHEMA

Specify SCHEMA to define the trigger on the current schema. The trigger fires whenever any user connected as schema initiates the triggering event.

See Also:

"Creating a SCHEMA Trigger: Example"

referencing_clause

The referencing_clause lets you specify correlation names. You can use correlation names in the PL/SQL block and WHEN condition of a row trigger to refer specifically to old and new values of the current row. The default correlation names are OLD and NEW. If your row trigger is associated with a table named OLD or NEW, use this clause to specify different correlation names to avoid confusion between the table name and the correlation name.

  • If the trigger is defined on a nested table, then OLD and NEW refer to the row of the nested table, and PARENT refers to the current row of the parent table.
  • If the trigger is defined on an object table or view, then OLD and NEW refer to object instances.
Restriction on the referencing_clause

The referencing_clause is not valid with INSTEAD OF triggers on CREATE DDL events.

FOR EACH ROW

Specify FOR EACH ROW to designate the trigger as a row trigger. Oracle fires a row trigger once for each row that is affected by the triggering statement and meets the optional trigger constraint defined in the WHEN condition.

Except for INSTEAD OF triggers, if you omit this clause, then the trigger is a statement trigger. Oracle fires a statement trigger only once when the triggering statement is issued if the optional trigger constraint is met.

INSTEAD OF trigger statements are implicitly activated for each row.

Restriction on Row Triggers

This clause is valid only for DML event triggers (not DDL or database event triggers).

WHEN Clause

Specify the trigger restriction, which is a SQL condition that must be satisfied for Oracle to fire the trigger. See the syntax description of condition in Chapter 5, "Conditions". This condition must contain correlation names and cannot contain a query.

The NEW and OLD keywords, when specified in the WHEN clause, are not considered bind variables, so are not preceded by a colon (:). However, you must precede NEW and OLD with a colon in all references other than the WHEN clause.

See Also:

"Calling a Procedure in a Trigger Body: Example"

Restrictions on Trigger Conditions
  • If you specify this clause for a DML event trigger, then you must also specify FOR EACH ROW. Oracle evaluates this condition for each row affected by the triggering statement.
  • You cannot specify trigger restrictions for INSTEAD OF trigger statements.
  • You can reference object columns or their attributes, or varray, nested table, or LOB columns. You cannot invoke PL/SQL functions or methods in the trigger restriction.

pl/sql_block

Specify the PL/SQL block that Oracle executes to fire the trigger.

The PL/SQL block of a database trigger can contain one of a series of built-in functions in the SYS schema designed solely to extract system event attributes. These functions can be used only in the PL/SQL block of a database trigger.

Restrictions on Trigger Implementation
  • The PL/SQL block of a trigger cannot contain transaction control SQL statements (COMMIT, ROLLBACK, SAVEPOINT, and SET CONSTRAINT) if the block is executed within the same transaction.
  • You can reference and use LOB columns in the trigger action inside the PL/SQL block. You can modify the :NEW values but not the :OLD values of LOB columns within the trigger action.

    See Also:
    • PL/SQL User's Guide and Reference for information on PL/SQL, including how to write PL/SQL blocks
    • Oracle9i Application Developer's Guide - Fundamentals for information on these functions
    • "Calling a Procedure in a Trigger Body: Example"

call_procedure_statement

The call_procedure_statement lets you call a stored procedure, rather than specifying the trigger code inline as a PL/SQL block. The syntax of this statement is the same as that for CALL , with the following exceptions:

  • You cannot specify the INTO clause of CALL, because it applies only to functions.
  • You cannot specify bind variables in expr.
  • To reference columns of tables on which the trigger is being defined, you must specify :NEW and :OLD.

    See Also:

    "Calling a Procedure in a Trigger Body: Example"

Examples

Creating a DML Trigger: Examples

This example shows the basic syntax for a BEFORE statement trigger named . You would write such a trigger to place restrictions on DML statements issued on a table (such as when such statements could be issued).

CREATE TRIGGER schema.trigger_name
    BEFORE
    DELETE OR INSERT OR UPDATE
    ON schema.table_name
       pl/sql_block

Oracle fires such a trigger whenever a DELETE, INSERT, or UPDATE statement affects the table. This trigger is a BEFORE statement trigger, so Oracle fires it once before executing the triggering statement.

The next example shows a partial BEFORE row trigger. The PL/SQL block might specify, for example, that an employee's salary must fall within the established salary range for the employee's job:

CREATE TRIGGER hr.salary_check
      BEFORE INSERT OR UPDATE OF salary, job_id ON hr.employees
      FOR EACH ROW
         WHEN (new.job_id <> 'AD_VP')
      pl/sql_block

Oracle fires this trigger whenever one of the following statements is issued:

  • An INSERT statement that adds rows to the employees table
  • An UPDATE statement that changes values of the salary or job_id columns of the employees table

salary_check is a BEFORE row trigger, so Oracle fires it before changing each row that is updated by the UPDATE statement or before adding each row that is inserted by the INSERT statement.

salary_check has a trigger restriction that prevents it from checking the salary of the administrative vice president (AD_VP).

Creating a DDL Trigger: Example

This example creates an AFTER statement trigger on any DDL statement CREATE. Such a trigger can be used to audit the creation of new data dictionary objects in your schema.

CREATE TRIGGER audit_db_object AFTER CREATE
   ON SCHEMA
      pl/sql_block
Calling a Procedure in a Trigger Body: Example

You could create the salary_check trigger described in the preceding example by calling a procedure instead of providing the trigger body in a PL/SQL block. Assume you have defined a procedure hr.salary_check, which verifies that an employee's salary is in an appropriate range. Then you could create the trigger salary_check as follows:

CREATE TRIGGER hr.salary_check
   BEFORE INSERT OR UPDATE OF salary, job_id ON hr.employees
   FOR EACH ROW
   WHEN (new.job_id <> 'AD_VP')
   CALL check_sal(:new.job_id, :new.salary, :new.last_name);

The procedure check_sal could be implemented in PL/SQL, C, or Java. Also, you can specify :OLD values in the CALL clause instead of :NEW values.

Creating a Database Event Trigger: Example

This example shows the basic syntax for a trigger to log all errors. The hypothetical PL/SQL block does some special processing for a particular error (invalid logon, error number 1017). This trigger is an AFTER statement trigger, so it is fired after an unsuccessful statement execution (such as unsuccessful logon).

CREATE TRIGGER log_errors AFTER SERVERERROR ON DATABASE
 BEGIN
    IF (IS_SERVERERROR (1017)) THEN
       <special processing of logon error>
    ELSE
       <log error number>
    END IF;
 END;
Creating an INSTEAD OF Trigger: Example

In this example, an oe.order_info view is created to display information about customers and their orders:

CREATE VIEW order_info AS
   SELECT c.customer_id, c.cust_last_name, c.cust_first_name,
          o.order_id, o.order_date, o.order_status
   FROM customers c, orders o
   WHERE c.customer_id = o.customer_id;

Normally this view would not be updatable, because the primary key of the orders table (order_id) is not unique in the result set of the join view. To make this view updatable, create an INSTEAD OF trigger on the view to process INSERT statements directed to the view (the PL/SQL trigger implementation is shown in italics):

CREATE OR REPLACE TRIGGER order_info_insert
   INSTEAD OF INSERT ON order_info
 DECLARE
   duplicate_info EXCEPTION;
   PRAGMA EXCEPTION_INIT (duplicate_info, -00001);
 BEGIN
   INSERT INTO customers
     (customer_id, cust_last_name, cust_first_name)
   VALUES (
   :new.customer_id,
   :new.cust_last_name,
   :new.cust_first_name);
 INSERT INTO orders (order_id, order_date, customer_id)
 VALUES (
   :new.order_id,
   :new.order_date,
   :new.customer_id);
 EXCEPTION
   WHEN duplicate_info THEN
     RAISE_APPLICATION_ERROR (
       num=> -20107,
       msg=> 'Duplicate customer or order ID');
 END order_info_insert;
/

You can now insert into both base tables through the view (as long as all NOT NULL columns receive values):

INSERT INTO order_info VALUES
   (999, 'Smith', 'John', 2500, '13-MAR-2001', 0);
Creating a SCHEMA Trigger: Example

The following example creates a BEFORE statement trigger on the sample schema hr. When a user connected as hr attempts to drop a database object, Oracle fires the trigger before dropping the object:

CREATE OR REPLACE TRIGGER drop_trigger
   BEFORE DROP ON hr.SCHEMA
   BEGIN
      RAISE_APPLICATION_ERROR (
         num => -20000,
         msg => 'Cannot drop object');
   END;
/
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 1 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

16
SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT

This chapter contains the following SQL statements:

  • CREATE TYPE
  • CREATE TYPE BODY
  • CREATE USER
  • CREATE VIEW
  • DELETE
  • DISASSOCIATE STATISTICS
  • DROP CLUSTER
  • DROP CONTEXT
  • DROP DATABASE LINK
  • DROP DIMENSION
  • DROP DIRECTORY
  • DROP FUNCTION
  • DROP INDEX
  • DROP INDEXTYPE
  • DROP JAVA
  • DROP LIBRARY
  • DROP MATERIALIZED VIEW
  • DROP MATERIALIZED VIEW LOG
  • DROP OPERATOR
  • DROP OUTLINE
  • DROP PACKAGE
  • DROP PROCEDURE
  • DROP PROFILE
  • DROP ROLE
  • DROP ROLLBACK SEGMENT
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 2 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE TYPE

Purpose

Use the CREATE TYPE statement to create the specification of an object type, a SQLJ object type (which is a kind of object type), a named varying array (varray), a nested table type, or an incomplete object type. You create object types with the CREATE TYPE and the CREATE TYPE BODY statements. The CREATE TYPE statement specifies the name of the object type, its attributes, methods, and other properties. The CREATE TYPE BODY statement contains the code for the methods in the type.

Notes:
  • If you create an object type for which the type specification declares only attributes but no methods, you need not specify a type body.
  • If you create a SQLJ object type, you cannot specify a type body. The implementation of the type is specified as a Java class.

Oracle implicitly defines a constructor method for each user-defined type that you create. A constructor is a system-supplied procedure that is used in SQL statements or in PL/SQL code to construct an instance of the type value. The name of the constructor method is the same as the name of the user-defined type. You can also create a user-defined constructor using the constructor_spec syntax.

The parameters of the object type constructor method are the data attributes of the object type. They occur in the same order as the attribute definition order for the object type. The parameters of a nested table or varray constructor are the elements of the nested table or the varray.

An incomplete type is a type created by a forward type definition. It is called "incomplete" because it has a name but no attributes or methods. It can be referenced by other types, and so can be used to define types that refer to each other. However, you must fully specify the type before you can use it to create a table or an object column or a column of a nested table type.

See Also:
  • CREATE TYPE BODY for information on creating the member methods of a type
  • PL/SQL User's Guide and Reference, Oracle9i Application Developer's Guide - Object-Relational Features, and Oracle9i Database Concepts for more information about objects, incomplete types, varrays, and nested tables

Prerequisites

To create a type in your own schema, you must have the CREATE TYPE system privilege. To create a type in another user's schema, you must have the CREATE ANY TYPE system privilege. You can acquire these privileges explicitly or be granted them through a role.

To create a subtype, you must have the UNDER ANY TYPE system privilege or the UNDER object privilege on the supertype.

The owner of the type must either be explicitly granted the EXECUTE object privilege in order to access all other types referenced within the definition of the type, or the type owner must be granted the EXECUTE ANY TYPE system privilege. The owner cannot obtain these privileges through roles.

If the type owner intends to grant other users access to the type, the owner must be granted the EXECUTE object privilege to the referenced types with the GRANT OPTION or the EXECUTE ANY TYPE system privilege with the ADMIN OPTION. Otherwise, the type owner has insufficient privileges to grant access on the type to other users.

Syntax

create_type::=

Text description of statements_814.gif follows
Text description of create_type

(create_incomplete_type::= , create_object_type::= , create_varray_type::= , create_nested_table_type::= )

create_incomplete_type::=

Text description of statements_823.gif follows
Text description of create_incomplete_type

create_object_type::=

Text description of statements_824.gif follows
Text description of create_object_type

(invoker_rights_clause::= , element_spec::= )

invoker_rights_clause::=

Text description of statements_815.gif follows
Text description of invoker_rights_clause

sqlj_object_type::=

Text description of statements_816.gif follows
Text description of sqlj_object_type

sqlj_object_type_attr::=

Text description of statements_820.gif follows
Text description of sqlj_object_type_attr

element_spec::=

Text description of statements_825.gif follows
Text description of element_spec

(inheritance_clauses::= , subprogram_spec::= , constructor_spec::= , map_order_function_spec::= , pragma_clause::= )

inheritance_clauses::=

Text description of statements_822.gif follows
Text description of inheritance_clauses

subprogram_spec::=

Text description of statements_83.gif follows
Text description of subprogram_spec

(procedure_spec::= , function_spec::= )

procedure_spec::=

Text description of statements_817.gif follows
Text description of procedure_spec

(call_spec::= )

function_spec::=

Text description of statements_818.gif follows
Text description of function_spec

(return_clause::= )

constructor_spec::=

Text description of statements_84.gif follows
Text description of constructor_spec

(call_spec::= )

map_order_function_spec::=

Text description of statements_88.gif follows
Text description of map_order_function_spec

(function_spec::= )

return_clause::=

Text description of statements_89.gif follows
Text description of return_clause

(call_spec::= , sqlj_object_type_sig::= )

sqlj_object_type_sig::=

Text description of statements_810.gif follows
Text description of sqlj_object_type_sig

pragma_clause::=

Text description of statements_819.gif follows
Text description of pragma_clause

call_spec::=

Text description of statements_813.gif follows
Text description of call_spec

Java_declaration::=

Text description of statements_826.gif follows
Text description of Java_declaration

C_declaration::=

Text description of statements_827.gif follows
Text description of C_declaration

create_varray_type::=

Text description of statements_828.gif follows
Text description of create_varray_type

create_nested_table_type::=

Text description of statements_829.gif follows
Text description of create_nested_table_type

Semantics

OR REPLACE

Specify OR REPLACE to re-create the type if it already exists. Use this clause to change the definition of an existing type without first dropping it.

Users previously granted privileges on the re-created object type can use and reference the object type without being granted privileges again.

If any function-based indexes depend on the type, Oracle marks the indexes DISABLED.

schema

Specify the schema to contain the type. If you omit schema, Oracle creates the type in your current schema.

type_name

Specify the name of an object type, a nested table type, or a varray type.

If creating the type results in compilation errors, Oracle returns an error. You can see the associated compiler error messages with the SQL*Plus command SHOW ERRORS.

create_object_type

Use the create_object_type clause to create a user-defined object type (rather than an incomplete type). The variables that form the data structure are called attributes. The member subprograms that define the object's behavior are called methods. The keywords AS OBJECT are required when creating an object type.

See Also:

"Object Type Examples"

invoker_rights_clause

The invoker_rights_clause lets you specify whether the member functions and procedures of the object type execute with the privileges and in the schema of the user who owns the object type or with the privileges and in the schema of CURRENT_USER. This specification applies to the corresponding type body as well.

This clause also determines how Oracle resolves external names in queries, DML operations, and dynamic SQL statements in the member functions and procedures of the type.

  • Specify AUTHID CURRENT_USER if you want the member functions and procedures of the object type to execute with the privileges of CURRENT_USER. This clause creates an invoker-rights type.

    This clause also indicates that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the type resides.

  • Specify AUTHID DEFINER if you want the member functions and procedures of the object type to execute with the privileges of the owner of the schema in which the functions and procedures reside, and that external names resolve in the schema where the member functions and procedures reside. This is the default and creates a definer-rights type.
Restrictions on Invoker Rights
  • You can specify this clause only for an object type, not for a nested table or varray type.
  • You can specify this clause for clarity if you are creating a subtype. However, subtypes inherit the rights model of their supertypes, so you cannot specify a different value than was specified for the supertype.
  • If the supertype was created with definer's rights, you must create the subtype in the same schema as the supertype.

    See Also:
    • Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals for information on how CURRENT_USER is determined
    • PL/SQL User's Guide and Reference
AS OBJECT Clause

Specify AS OBJECT to create a top-level (root) object type.

UNDER Clause

Specify UNDER supertype to create a subtype of an existing type. The existing supertype must be an object type. The subtype you create in this statement inherits the properties of its supertype, and must either override some of those properties or add new properties to distinguish it from the supertype.

See Also:

"Subtype Example" and "Type Hierarchy Example"

sqlj_object_type

Specify the this clause to create a SQLJ object type. In a SQLJ object type, you map a Java class to a SQL user-defined type. You can then define tables or columns on SQLJ object type as you would with any other user-defined type.

You can map one Java class to multiple SQLJ object types. If there exists a subtype or supertype of a SQLJ object type, it must be a SQLJ object type. That is, all types in the hierarchy must be SQLJ object types.

java_ext_name

Specify the name of the Java class. If the class exists, it must be public. The Java external name, including the schema, will be validated.

Multiple SQLJ object types can be mapped to the same class. However:

  • A subtype must be mapped to a class that is an immediate subclass of the class to which its supertype is mapped.
  • Two subtypes of a common supertype cannot be mapped to the same class.
SQLData | CustomDatum | OraData

Choose the mechanism for creating the Java instance of the type. SQLData, CustomDatum, and OraData are the interfaces that determine which mechanism will be used.

See Also:

Oracle9i JDBC Developer's Guide and Reference for information on these three interfaces and "SQLJ Object Type Example"

element_spec

The element_spec lets you specify each attribute of the object type.

attribute

For attribute, specify the name of an object attribute. Attributes are data items with a name and a type specifier that form the structure of the object. You must specify at least one attribute for each object type.

If you are creating a subtype, the attribute name cannot be the same as any attribute or method name declared in the supertype chain.

datatype

For datatype, specify the Oracle built-in datatype or user-defined type of the attribute.

Restrictions on Attribute Datatype
  • You cannot specify attributes of type ROWID, LONG, or LONG ROW.
  • You cannot specify a datatype of UROWID for a user-defined object type.
  • If you specify an object of type REF, then the target object must have an object identifier.
  • If you are creating a collection type for use as a nested table or varray column of a table, then you cannot specify attributes of type AnyType, AnyData, or AnyDataSet.

    See Also:

    "Datatypes" for a list of valid datatypes
sqlj_object_type_attr

This clause is valid only if you have specified the sqlj_object_type clause (that is, you are mapping a Java class to a SQLJ object type). Specify the external name of the Java field that corresponds to the attribute of the SQLJ object type. The Java field_name must already exist in the class. You cannot map a Java field_name to more than one SQLJ object type attribute in the same type hierarchy.

This clause is optional when you create a SQLJ object type.

subprogram_spec

The subprogram_spec let you associate a procedure subprogram with the object type.

MEMBER Clause

Specify a function or procedure subprogram associated with the object type that is referenced as an attribute. Typically, you invoke MEMBER methods in a "selfish" style, such as object_expression.method(). This class of method has an implicit first argument referenced as SELF in the method's body, which represents the object on which the method has been invoked.

Restriction on Member Methods

You cannot specify a MEMBER method if you are mapping a Java class to a SQLJ object type.

See Also:

"Creating a Member Method: Example"

STATIC Clause

Specify a function or procedure subprogram associated with the object type. Unlike MEMBER methods, STATIC methods do not have any implicit parameters (that is, you cannot reference SELF in their body). They are typically invoked as type_name.method().

Restrictions on Static Methods
  • You cannot map a MEMBER method in a Java class to a STATIC method in a SQLJ object type.
  • For both MEMBER and STATIC methods, you must specify a corresponding method body in the object type body for each procedure or function specification.

    See Also:

    "Creating a Static Method: Example"

[NOT] FINAL, [NOT] INSTANTIABLE

At the top level of the syntax, these clauses specify the inheritance attributes of the type.

Use the [NOT] FINAL clause to indicate whether any further subtypes can be created for this type:

  • Specify FINAL if no further subtypes can be created for this type. This is the default.
  • Specify NOT FINAL if further subtypes can be created under this type.

Use the [NOT] INSTANTIABLE clause to indicate whether any object instances of this type can be constructed:

  • Specify INSTANTIABLE if object instances of this type can be constructed. This is the default.
  • Specify NOT INSTANTIABLE if no constructor (default or user-defined) exists for this object type. You must specify these keywords for any type with noninstantiable methods and for any type that has no attributes (either inherited or specified in this statement). You must specify these keywords for any type with noninstantiable methods and for any type that has no attributes (either inherited or specified in this statement).
inheritance_clauses

As part of the element_spec, the inheritance_clauses let you specify the relationship between super- and subtypes.

OVERRIDING

This clause is valid only for MEMBER methods. Specify OVERRIDING to indicate that this method overrides a MEMBER method defined in the supertype. This keyword is required if the method redefines a supertype method. NOT OVERRIDING is the default.

Restriction on OVERRIDING

The OVERRIDING clause is not valid for a STATIC method or for a SQLJ object type.

FINAL

Specify FINAL to indicate that this method cannot be overridden by any subtype of this type. The default is NOT FINAL.

NOT INSTANTIABLE

Specify NOT INSTANTIABLE if the type does not provide an implementation for this method. By default all methods are INSTANTIABLE.

Restriction on NOT INSTANTIABLE

: If you specify NOT INSTANTIABLE, you cannot specify FINAL or STATIC.

See Also:

constructor_spec

procedure_spec or function_spec

Use these clauses to specify the parameters and datatypes of the procedure or function. If this subprogram does not include the declaration of the procedure or function, you must issue a corresponding CREATE TYPE BODY statement.

Restriction on Procedure and Function Specification

If you are creating a subtype, the name of the procedure or function cannot be the same as the name of any attribute, whether inherited or not, declared in the supertype chain.

return_clause

The first form of the return_clause is valid only for a function. The syntax shown is an abbreviated form.

See Also:
  • PL/SQL User's Guide and Reference for information about method invocation and methods
  • CREATE PROCEDURE and CREATE FUNCTION for the full syntax with all possible clauses
  • CREATE TYPE BODY
  • "Restrictions on User-defined Functions" for a list of restrictions on user-defined functions
sqlj_object_type_sig

Use this form of the return_clause if you intend to create SQLJ object type functions or procedures.

  • If you are mapping a Java class to a SQLJ object type and you specify EXTERNAL NAME, the value of the Java method returned must be compatible with the SQL returned value, and the Java method must be public. Also, the method signature (method name plus parameter types) must be unique within the type hierarchy.
  • If you specify EXTERNAL VARIABLE NAME, the type of the Java static field must be compatible with the return type.
call_spec

Specify the call specification ("call spec") that maps a Java or C method name, parameter types, and return type to their SQL counterparts. If all the member methods in the type have been defined in this clause, you need not issue a corresponding CREATE TYPE BODY statement.

The Java_declaration, 'string' identifies the Java implementation of the method.

See Also:
  • Oracle9i Java Stored Procedures Developer's Guide.
  • Oracle9i Application Developer's Guide - Fundamentals for an explanation of the parameters and semantics of the C_declaration
pragma_clause

The pragma_clause lets you specify a compiler directive. The PRAGMA RESTRICT_REFERENCES compiler directive denies member functions read/write access to database tables, packaged variables, or both, and thereby helps to avoid side effects.

Note:

Oracle Corporation recommends that you avoid using this clause unless you must do so for backward compatibility of your applications. This clause has been deprecated, because beginning with Oracle9i, Oracle runs purity checks at run time.
method

Specify the name of the MEMBER function or procedure to which the pragma is being applied.

DEFAULT

Specify DEFAULT if you want Oracle to apply the pragma to all methods in the type for which a pragma has not been explicitly specified.

WNDS

Specify WNDS to enforce the constraint writes no database state (does not modify database tables).

WNPS

Specify WNPS to enforce the constraint writes no package state (does not modify packaged variables).

RNDS

Specify RNDS to enforce the constraint reads no database state (does not query database tables).

RNPS

Specify RNPS to enforce the constraint reads no package state (does not reference package variables).

TRUST

Specify TRUST to indicate that the restrictions listed in the pragma are not actually to be enforced, but are simply trusted to be true.

See Also:

Oracle9i Application Developer's Guide - Fundamentals
constructor_spec

Use this clause to create a user-defined constructor, which is a function that returns an initialized instance of a user-defined object type. You can declare multiple constructors for a single object type, as long as the parameters of each constructor differ in number, order, or datatype.

  • User-defined constructor functions are always FINAL and INSTANTIABLE, so these keywords are optional.
  • The parameter-passing mode of user-defined constructors is always SELF IN OUT. Therefore you need not specify this clause unless you wish to do so explicitly for clarity.
  • RETURN SELF AS RESULT specifies that the runtime type of the value returned by the constructor is the same as the runtime type of the SELF argument.

    See Also:

    Oracle9i Application Developer's Guide - Object-Relational Features for more information on and examples of user-defined constructors and "Constructor Example"

map_order_function_spec

You can define either one MAP method or one ORDER method in a type specification, regardless how many MEMBER or STATIC methods you define. Also, you cannot define either MAP or ORDER methods for subtypes. However, a subtype can override a MAP method if the supertype defines a nonfinal MAP method. (A subtype cannot override an ORDER method at all.) If you declare either method, you can compare object instances in SQL.

You can specify either MAP or ORDER when mapping a Java class to a SQL type. However, the MAP or ORDER methods must map to MEMBER functions in the Java class.

If neither a MAP nor an ORDER method is specified, only comparisons for equality or inequality can be performed. Therefore object instances cannot be ordered. Instances of the same type definition are equal only if each pair of their corresponding attributes is equal. No comparison method needs to be specified to determine the equality of two object types.

Use MAP if you are performing extensive sorting or hash join operations on object instances. MAP is applied once to map the objects to scalar values and then the scalars are used during sorting and merging. A MAP method is more efficient than an ORDER method, which must invoke the method for each object comparison. You must use a MAP method for hash joins. You cannot use an ORDER method because the hash mechanism hashes on the object value.

See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information about object value comparisons
MAP MEMBER

This clause lets you specify a member function (MAP method) that returns the relative position of a given instance in the ordering of all instances of the object. A MAP method is called implicitly and induces an ordering of object instances by mapping them to values of a predefined scalar type. PL/SQL uses the ordering to evaluate Boolean expressions and to perform comparisons.

If the argument to the MAP method is null, the MAP method returns null and the method is not invoked.

An object specification can contain only one MAP method, which must be a function. The result type must be a predefined SQL scalar type, and the MAP method can have no arguments other than the implicit SELF argument.

Note:

If type_name will be referenced in queries involving sorts (through an ORDER BY, GROUP BY, DISTINCT, or UNION clause) or joins, and you want those queries to be parallelized, you must specify a MAP member function.

A subtype cannot define a new MAP method. However it can override an inherited MAP method.

ORDER MEMBER

This clause lets you specify a member function (ORDER method) that takes an instance of an object as an explicit argument and the implicit SELF argument and returns either a negative, zero, or positive integer. The negative, positive, or zero indicates that the implicit SELF argument is less than, equal to, or greater than the explicit argument.

If either argument to the ORDER method is null, the ORDER method returns null and the method is not invoked.

When instances of the same object type definition are compared in an ORDER BY clause, the ORDER method map_order_function_spec is invoked.

An object specification can contain only one ORDER method, which must be a function having the return type NUMBER.

A subtype can neither define nor override an ORDER method.

create_varray_type

The create_varray_type lets you create the type as an ordered set of elements, each of which has the same datatype. You must specify a name and a maximum limit of zero or more. The array limit must be an integer literal. Oracle does not support anonymous varrays.

The type name for the objects contained in the varray must be one of the following:

  • A built-in datatype,
  • A REF, or
  • An object type.
Restrictions on Varray Types

You can create a VARRAY type of XMLType or of a LOB type for procedural purposes (for example, in PL/SQL or in view queries). However, database storage of such a varray is not supported, so you cannot create an object table or an object type column of such a varray type.

See Also:

"Varray Type Example"

create_nested_table_type

The create_nested_table_type lets you create a named nested table of type datatype.

  • When datatype is an object type, the nested table type describes a table whose columns match the name and attributes of the object type.
  • When datatype is a scalar type, then the nested table type describes a table with a single, scalar type column called "column_value".
Restriction on Nested Table Types

You cannot specify NCLOB for datatype. However, you can specify CLOB or BLOB.

See Also:

"Named Table Type Example" and "Nested Table Type Containing a Varray"

Examples

Object Type Examples

The following example shows how the sample type customer_typ was created for the sample Order Entry (oe) schema:

CREATE TYPE customer_typ_demo AS OBJECT
    ( customer_id        NUMBER(6)
    , cust_first_name    VARCHAR2(20)
    , cust_last_name     VARCHAR2(20)
    , cust_address       CUST_ADDRESS_TYP
    , phone_numbers      PHONE_LIST_TYP
    , nls_language       VARCHAR2(3)
    , nls_territory      VARCHAR2(30)
    , credit_limit       NUMBER(9,2)
    , cust_email         VARCHAR2(30)
    , cust_orders        ORDER_LIST_TYP
    ) ;

In the following example, the data_typ object type is created with one member function prod, which is implemented in the CREATE TYPE BODY statement:

CREATE TYPE data_typ AS OBJECT
   ( year NUMBER,
     MEMBER FUNCTION prod(invent NUMBER) RETURN NUMBER
   );

CREATE TYPE BODY data_typ IS
      MEMBER FUNCTION prod (invent NUMBER) RETURN NUMBER IS
       BEGIN
           RETURN (year + invent);
       END;
      END;
Subtype Example

The following statement shows how the subtype corporate_customer_typ in the sample oe schema was created. It is based on the customer_typ supertype created in the preceding example and adds the account_mgr_id attribute:

CREATE TYPE corporate_customer_typ_demo UNDER customer_typ
    ( account_mgr_id     NUMBER(6)
    );
SQLJ Object Type Example

The following examples create a SQLJ object type and subtype. The address_t type maps to the Java class Examples.Address. The subtype long_address_t maps to the Java class Examples.LongAddress. The examples specify SQLData as the mechanism used to create the Java instance of these types. Each of the functions in these type specifications have corresponding implementations in the Java class.

See Also:

Oracle9i Application Developer's Guide - Object-Relational Features for the Java implementation of the functions in these type specifications

CREATE TYPE address_t AS OBJECT
  EXTERNAL NAME 'Examples.Address' LANGUAGE JAVA
  USING SQLData(
    street_attr varchar(250) EXTERNAL NAME 'street',
    city_attr varchar(50) EXTERNAL NAME 'city',
    state varchar(50) EXTERNAL NAME 'state',
    zip_code_attr number EXTERNAL NAME 'zipCode',
    STATIC FUNCTION recom_width RETURN NUMBER
      EXTERNAL VARIABLE NAME 'recommendedWidth',
    STATIC FUNCTION create_address RETURN address_t
      EXTERNAL NAME 'create() return Examples.Address',
    STATIC FUNCTION construct RETURN address_t
      EXTERNAL NAME 'create() return Examples.Address',
    STATIC FUNCTION create_address (street VARCHAR, city VARCHAR,
        state VARCHAR, zip NUMBER) RETURN address_t
      EXTERNAL NAME 'create (java.lang.String, java.lang.String,
java.lang.String, int) return Examples.Address',
    STATIC FUNCTION construct (street VARCHAR, city VARCHAR,
        state VARCHAR, zip NUMBER) RETURN address_t
      EXTERNAL NAME
        'create (java.lang.String, java.lang.String,
java.lang.String, int) return Examples.Address',
    MEMBER FUNCTION to_string RETURN VARCHAR
      EXTERNAL NAME 'tojava.lang.String() return java.lang.String',
    MEMBER FUNCTION strip RETURN SELF AS RESULT
      EXTERNAL NAME 'removeLeadingBlanks () return Examples.Address'
  ) NOT FINAL;

CREATE OR REPLACE TYPE long_address_t
UNDER address_t
EXTERNAL NAME 'Examples.LongAddress' LANGUAGE JAVA
USING SQLData(
    street2_attr VARCHAR(250) EXTERNAL NAME 'street2',
    country_attr VARCHAR (200) EXTERNAL NAME 'country',
    address_code_attr VARCHAR (50) EXTERNAL NAME 'addrCode',
    STATIC FUNCTION create_address RETURN long_address_t
      EXTERNAL NAME 'create() return Examples.LongAddress',
    STATIC FUNCTION  construct (street VARCHAR, city VARCHAR,
        state VARCHAR, country VARCHAR, addrs_cd VARCHAR)
      RETURN long_address_t
      EXTERNAL NAME
        'create(java.lang.String, java.lang.String,
        java.lang.String, java.lang.String, java.lang.String)
          return Examples.LongAddress',
    STATIC FUNCTION construct RETURN long_address_t
      EXTERNAL NAME 'Examples.LongAddress()
        return Examples.LongAddress',
    STATIC FUNCTION create_longaddress (
      street VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR,
      addrs_cd VARCHAR) return long_address_t
      EXTERNAL NAME
        'Examples.LongAddress (java.lang.String, java.lang.String,
         java.lang.String, java.lang.String, java.lang.String)
           return Examples.LongAddress',
    MEMBER FUNCTION get_country RETURN VARCHAR
      EXTERNAL NAME 'country_with_code () return java.lang.String'
  );
Type Hierarchy Example

The following statements creates a type hierarchy. Type employee_t inherits the name and ssn attributes from type person_t, and in addition has department_id and salary attributes. Type part_time_emp_t inherits all of the attributes from employee_t and, through employee_t, those of person_t, and in addition has a num_hrs attribute. Type part_time_emp_t is final by default, so no further subtypes can be created under it.:

CREATE TYPE person_t AS OBJECT (name VARCHAR2(100), ssn NUMBER)
   NOT FINAL;

CREATE TYPE employee_t UNDER person_t
   (department_id NUMBER, salary NUMBER) NOT FINAL;

CREATE TYPE part_time_emp_t UNDER employee_t (num_hrs NUMBER);

You can use type hierarchies to create substitutable tables and tables with substitutable columns. For examples, see "Substitutable Table and Column Examples" .

Varray Type Example

The following statement shows how the phone_list_typ varray type with 5 elements in the sample oe schema was created:

CREATE TYPE phone_list_typ_demo AS VARRAY(5) OF VARCHAR2(25);
Named Table Type Example

The following example from the sample schema pm creates the named table type textdoc_tab of object type textdoc_typ:

CREATE TYPE textdoc_typ AS OBJECT
    ( document_typ      VARCHAR2(32)
    , formatted_doc     BLOB
    ) ;

CREATE TYPE textdoc_tab AS TABLE OF textdoc_typ;
Nested Table Type Containing a Varray

The following example of multilevel collections is a variation of the sample table oe.customers. In this example, the cust_address object column becomes a nested table column with the phone_list_typ varray column embedded in it:

CREATE TYPE phone_list_typ AS VARRAY(5) OF VARCHAR2(25);

CREATE TYPE cust_address_typ2 AS OBJECT
       ( street_address     VARCHAR2(40)
       , postal_code        VARCHAR2(10)
       , city               VARCHAR2(30)
       , state_province     VARCHAR2(10)
       , country_id         CHAR(2)
       , phone              phone_list_typ
       );

CREATE TYPE cust_nt_address_typ
   AS TABLE OF cust_address_typ;
Constructor Example

This example invokes the system-defined constructor to construct the demo_typ object and insert it into the demo_tab table:

CREATE TYPE demo_typ1 AS OBJECT (a1 NUMBER, a2 NUMBER);

CREATE TABLE demo_tab1 (b1 NUMBER, b2 demo_typ1);

INSERT INTO demo_tab1 VALUES (1, demo_typ1(2,3));
See Also:

Oracle9i Application Developer's Guide - Fundamentals and PL/SQL User's Guide and Reference for more information about constructors
Creating a Member Method: Example

The following example invokes method constructor col.getbar(). (The example assumes the getbar method already exists.)

CREATE TYPE demo_typ2 AS OBJECT (a1 NUMBER,
   MEMBER FUNCTION getbar RETURN NUMBER);

CREATE TABLE demo_tab2(col demo_typ2);

SELECT col.getbar() FROM demo_tab2;

Unlike function invocations, method invocations require parentheses, even when the methods do not have additional arguments.

Creating a Static Method: Example

The following example changes the definition of the employee_t type to associate it with the construct_emp function. The example first creates an object type department_t and then an object type employee_t containing an attribute of type department_t:

CREATE OR REPLACE TYPE department_t AS OBJECT (
   deptno number(10),
   dname CHAR(30));

CREATE OR REPLACE TYPE employee_t AS OBJECT(
   empid RAW(16),
   ename CHAR(31),
   dept REF department_t,
      STATIC function construct_emp
      (name VARCHAR2, dept REF department_t)
      RETURN employee_t
);

This statement requires the following type body statement (PL/SQL is shown in italics):

CREATE OR REPLACE TYPE BODY employee_t IS
   STATIC FUNCTION construct_emp
   (name varchar2, dept REF department_t)
   RETURN employee_t IS
    BEGIN
       return employee_t(SYS_GUID(),name,dept);
    END;
END;

Next create an object table and insert into the table:

CREATE TABLE emptab OF employee_t;
INSERT INTO emptab
   VALUES (employee_t.construct_emp('John Smith', NULL));
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 3 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE TYPE BODY

Purpose

Use the CREATE TYPE BODY to define or implement the member methods defined in the object type specification. You create object types with the CREATE TYPE and the CREATE TYPE BODY statements. The CREATE TYPE statement specifies the name of the object type, its attributes, methods, and other properties. The CREATE TYPE BODY statement contains the code for the methods in the type.

For each method specified in an object type specification for which you did not specify the call_spec, you must specify a corresponding method body in the object type body.

Note:

If you create a SQLJ object type, you cannot specify a type body. The implementation of the type is specified as a Java class.
See Also:

CREATE TYPE and ALTER TYPE for information on creating and modifying a type specification

Prerequisites

Every member declaration in the CREATE TYPE specification for object types must have a corresponding construct in the CREATE TYPE or CREATE TYPE BODY statement.

To create or replace a type body in your own schema, you must have the CREATE TYPE or the CREATE ANY TYPE system privilege. To create an object type in another user's schema, you must have the CREATE ANY TYPE system privileges. To replace an object type in another user's schema, you must have the DROP ANY TYPE system privileges.

Syntax

create_type_body::=

Text description of statements_831.gif follows
Text description of create_type_body

(procedure_declaration::= , function_declaration::= , constructor_declaration::= )

subprogram_declaration::=

Text description of subprogram_declaration.gif follows
Text description of subprogram_declaration

procedure_declaration::=

Text description of statements_832.gif follows
Text description of procedure_declaration

(call_spec::= )

function_declaration::=

Text description of statements_858a.gif follows
Text description of function_declaration

(call_spec::= )

constructor_declaration::=

Text description of statements_87b.gif follows
Text description of constructor_declaration

map_order_func_declaration::=

Text description of map_order_func_declaration.gif follows
Text description of map_order_func_declaration

call_spec::=

Text description of statements_833.gif follows
Text description of call_spec

Java_declaration::=

Text description of statements_834.gif follows
Text description of Java_declaration

C_declaration::=

Text description of statements_835.gif follows
Text description of C_declaration

Semantics

OR REPLACE

Specify OR REPLACE to re-create the type body if it already exists. Use this clause to change the definition of an existing type body without first dropping it.

Users previously granted privileges on the re-created object type body can use and reference the object type body without being granted privileges again.

You can use this clause to add new member subprogram definitions to specifications added with the ALTER TYPE ... REPLACE statement.

schema

Specify the schema to contain the type body. If you omit schema, Oracle creates the type body in your current schema.

type_name

Specify the name of an object type.

IS | AS

MEMBER | STATIC

Specify the type of function or procedure subprogram associated with the object type specification.

You must define a corresponding method name, optional parameter list, and (for functions) a return type in the object type specification for each procedure or function declaration.

procedure_declaration, function_declaration,

Declare a procedure or function subprogram.

constructor_declaration

Declare a user-defined constructor subprogram. The RETURN clause of a constructor function must be RETURN SELF AS RESULT. This setting indicates that the most specific type of the value returned by the constructor function is the same as the most specific type of the SELF argument that was passed in to the constructor function.

See Also:
  • CREATE TYPE for a list of restrictions on user-defined functions
  • PL/SQL User's Guide and Reference for information about overloading subprogram names within a package
  • CREATE PROCEDURE , CREATE FUNCTION , and Oracle9i Application Developer's Guide - Fundamentals for information on the components of type body
  • Oracle9i Application Developer's Guide - Object-Relational Features for information on and examples of user-defined constructors
pl/sql_block

Declare the procedure or function.

See Also:

PL/SQL User's Guide and Reference
call_spec

Specify the call specification ("call spec") that maps a Java or C method name, parameter types, and return type to their SQL counterparts.

The Java_declaration, 'string' identifies the Java implementation of the method.

See Also:
  • Oracle9i Java Stored Procedures Developer's Guide
  • Oracle9i Application Developer's Guide - Fundamentals for an explanation of the parameters and semantics of the C_declaration

map_order_func_declaration

You can declare either one MAP method or one ORDER method, regardless how many MEMBER or STATIC methods you declare. If you declare either a MAP or ORDER method, you can compare object instances in SQL.

If you do not declare either method, you can compare object instances only for equality or inequality. Instances of the same type definition are equal only if each pair of their corresponding attributes is equal.

MAP MEMBER Clause

Specify MAP MEMBER to declare or implement a member function (MAP method) that returns the relative position of a given instance in the ordering of all instances of the object. A MAP method is called implicitly and specifies an ordering of object instances by mapping them to values of a predefined scalar type. PL/SQL uses the ordering to evaluate Boolean expressions and to perform comparisons.

If the argument to the MAP method is null, the MAP method returns null and the method is not invoked.

An object type body can contain only one MAP method, which must be a function. The MAP function can have no arguments other than the implicit SELF argument.

ORDER MEMBER Clause

Specify ORDER MEMBER to specify a member function (ORDER method) that takes an instance of an object as an explicit argument and the implicit SELF argument and returns either a negative, zero, or positive integer. The negative, positive, or zero indicates that the implicit SELF argument is less than, equal to, or greater than the explicit argument.

If either argument to the ORDER method is null, the ORDER method returns null and the method is not invoked.

When instances of the same object type definition are compared in an ORDER BY clause, Oracle invokes the ORDER MEMBER function_declaration.

An object specification can contain only one ORDER method, which must be a function having the return type NUMBER.

function_declaration

Declare a function subprogram.

See Also:

CREATE PROCEDURE and CREATE FUNCTION for the full syntax with all possible clauses
AS EXTERNAL

AS EXTERNAL is an alternative way of declaring a C method. This clause has been deprecated and is supported for backward compatibility only. Oracle Corporation recommends that you use the call_spec syntax with the C_declaration.

Examples

Several examples of creating type bodies appear in the "Examples" section of CREATE TYPE .

Updating a Type Body: Example

The following example shows how the type body of the data_typ object type (see "Object Type Examples" ) must be modified when an attribute is added to the type (the PL/SQL is shown in italics):

ALTER TYPE data_typ
   ADD MEMBER FUNCTION qtr(der_qtr DATE)
   RETURN CHAR CASCADE;

CREATE OR REPLACE TYPE BODY data_typ IS
 MEMBER FUNCTION prod (invent NUMBER) RETURN NUMBER IS
 BEGIN
 RETURN (year + invent);
 END;
   MEMBER FUNCTION qtr(der_qtr DATE) RETURN CHAR IS
   BEGIN
     IF (der_qtr < TO_DATE('01-APR', 'DD-MON')) THEN
       RETURN 'FIRST';
     ELSIF (der_qtr < TO_DATE('01-JUL', 'DD-MON')) THEN
       RETURN 'SECOND';
     ELSIF (der_qtr < TO_DATE('01-OCT', 'DD-MON')) THEN
       RETURN 'THIRD';
     ELSE
       RETURN 'FOURTH';
     END IF;
   END;
 END;
/
   END;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 4 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE USER

Purpose

Use the CREATE USER statement to create and configure a database user, or an account through which you can log in to the database and establish the means by which Oracle permits access by the user.

Note:

You can enable a user to connect to Oracle through a proxy (that is, an application or application server). For syntax and discussion, refer to ALTER USER .

Prerequisites

You must have CREATE USER system privilege. When you create a user with the CREATE USER statement, the user's privilege domain is empty. To log on to Oracle, a user must have CREATE SESSION system privilege. Therefore, after creating a user, you should grant the user at least the CREATE SESSION privilege.

See Also:

GRANT

Syntax

create_user::=

Text description of statements_836.gif follows
Text description of create_user

Semantics

user

Specify the name of the user to be created. This name can contain only characters from your database character set and must follow the rules described in the section "Schema Object Naming Rules" . Oracle recommends that the user name contain at least one single-byte character regardless of whether the database character set also contains multibyte characters.

Note:

Oracle Corporation recommends that user names and passwords be encoded in ASCII or EBCDIC characters only, depending on your platform. Please refer to Oracle9i Database Administrator's Guide for more information about this recommendation.
See Also:

"Creating a Database User: Example"

IDENTIFIED Clause

The IDENTIFIED clause lets you indicate how Oracle authenticates the user.

BY password

The BY password clause lets you creates a local user and indicates that the user must specify password to log on. Passwords can contain only single-byte characters from your database character set regardless of whether this character set also contains multibyte characters.

Passwords must follow the rules described in the section "Schema Object Naming Rules" , unless you are using Oracle's password complexity verification routine. That routine requires a more complex combination of characters than the normal naming rules permit. You implement this routine with the UTLPWDMG.SQL script, which is further described in Oracle9i Database Administrator's Guide.

Note:

Oracle Corporation recommends that user names and passwords be encoded in ASCII or EBCDIC characters only, depending on your platform. Please refer to Oracle9i Database Administrator's Guide for more information about this recommendation.
See Also:

Oracle9i Database Administrator's Guide to for a detailed description and explanation of how to use password management and protection
EXTERNALLY Clause

Specify EXTERNALLY to create an external user. Such a user must be authenticated by an external service (such as an operating system or a third-party service). In this case, Oracle to relies on the login authentication of the operating system to ensure that a specific operating system user has access to a specific database user.

Caution:

Oracle Corporation strongly recommends that you do not use IDENTIFIED EXTERNALLY with operating systems that have inherently weak login security. For more information, see Oracle9i Database Administrator's Guide.
See Also:

"Creating External Database Users: Examples"

GLOBALLY Clause

The GLOBALLY clause lets you create a global user. Such a user must be authenticated by the enterprise directory service. The 'external_name' string can take one of two forms:

  • The X.509 name at the enterprise directory service that identifies this user. It should be of the form 'CN=username,other_attributes', where other_attributes is the rest of the user's distinguished name (DN) in the directory.
  • A null string (' ') indicating that the enterprise directory service will map authenticated global users to the appropriate database schema with the appropriate roles.

    Note:

    You can control the ability of an application server to connect as the specified user and to activate that user's roles using the ALTER USER statement.
    See Also:
    • Oracle Advanced Security Administrator's Guide for more information on global users
    • ALTER USER
    • Oracle9i Application Developer's Guide - Fundamentals and your operating system specific documentation for more information
    • "Creating a Global Database User: Example"

DEFAULT TABLESPACE Clause

Specify the default tablespace for objects that the user creates. If you omit this clause, objects default to the SYSTEM tablespace.

Restriction on Default Temporary Tablespaces

You cannot specify a locally managed tablespace (including an undo tablespace) or a dictionary-managed temporary tablespace as a user's default tablespace.

See Also:

CREATE TABLESPACE for more information on tablespaces in general and undo tablespaces in particular

TEMPORARY TABLESPACE Clause

Specify the tablespace for the user's temporary segments. If you omit this clause, temporary segments default to the SYSTEM tablespace.

Restrictions on a User's Temporary Tablespace
  • The tablespace must be a temporary tablespace and must have a standard block size.
  • The tablespace cannot be an undo tablespace or a tablespace with automatic segment-space management.

    See Also:

    CREATE TABLESPACE for more information on undo tablespaces and segment management

QUOTA Clause

Use the QUOTA clause to allow the user to allocate up to integer bytes of space in the tablespace. Use K or M to specify the quota in kilobytes or megabytes. This quota is the maximum space in the tablespace the user can allocate.

A CREATE USER statement can have multiple QUOTA clauses for multiple tablespaces.

UNLIMITED lets the user allocate space in the tablespace without bound.

PROFILE Clause

Specify the profile you want to assign to the user. The profile limits the amount of database resources the user can use. If you omit this clause, Oracle assigns the DEFAULT profile to the user.

See Also:

GRANT and CREATE PROFILE

PASSWORD EXPIRE Clause

Specify PASSWORD EXPIRE if you want the user's password to expire. This setting forces the user (or the DBA) to change the password before the user can log in to the database.

ACCOUNT Clause

Specify ACCOUNT LOCK to lock the user's account and disable access. Specify ACCOUNT UNLOCK to unlock the user's account and enable access to the account.

Examples

Note:

All of the following examples use the example tablespace because it which exists in the seed database and is accessible to the sample schemas.
Creating a Database User: Example

If you create a new user with PASSWORD EXPIRE, the user's password must be changed before attempting to log in to the database. You can create the user sidney by issuing the following statement:

CREATE USER sidney
    IDENTIFIED BY out_standing1
    DEFAULT TABLESPACE example
    QUOTA 10M ON example
    TEMPORARY TABLESPACE temp
    QUOTA 5M ON system
    PROFILE app_user
    PASSWORD EXPIRE;

The user sidney has the following characteristics:

  • The password welcome
  • Default tablespace example, with a quota of 10 megabytes
  • Temporary tablespace temp
  • Access to the tablespace SYSTEM, with a quota of 5 megabytes
  • Limits on database resources defined by the profile app_user (which was created in "Creating a Profile: Example" )
  • An expired password, which must be changed before sidney can log in to the database
Creating External Database Users: Examples

The following example creates an external user, who must be identified by an external source before accessing the database:

CREATE USER app_user1
   IDENTIFIED EXTERNALLY
   DEFAULT TABLESPACE example
   QUOTA 5M ON example
   PROFILE app_user;

The user app_user1 has the following additional characteristics:

  • Default tablespace example
  • Default temporary tablespace example
  • 5M of space on the tablespace example and unlimited quota on the temporary tablespace of the database
  • Limits on database resources defined by the app_user profile

To create another user accessible only by the operating system account app_user2, prefix app_user2 by the value of the initialization parameter OS_AUTHENT_PREFIX. For example, if this value is "ops$", you can create the user ops$app_user2 with the following statement:

CREATE USER ops$external_user
   IDENTIFIED EXTERNALLY
   DEFAULT TABLESPACE example
   QUOTA 5M ON example
   PROFILE app_user;
Creating a Global Database User: Example

The following example creates a global user. When you create a global user, you can specify the X.509 name that identifies this user at the enterprise directory server:

CREATE USER global_user
   IDENTIFIED GLOBALLY AS 'CN=analyst, OU=division1, O=oracle, C=US'
   DEFAULT TABLESPACE example
   QUOTA 5M ON example;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 5 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE VIEW

Purpose

Use the CREATE VIEW statement to define a view, which is a logical table based on one or more tables or views. A view contains no data itself. The tables upon which a view is based are called base tables.

You can also create an object view or a relational view that supports LOB and object datatypes (object types, REFs, nested table, or varray types) on top of the existing view mechanism. An object view is a view of a user-defined type, where each row contains objects, each object with a unique object identifier.

You can also create XMLType views, which are similar to an object views but display data from XMLSchema-based tables of XMLType.

See Also:
  • Oracle9i Database Concepts, Oracle9i Application Developer's Guide - Fundamentals, and Oracle9i Database Administrator's Guide for information on various types of views and their uses
  • Oracle9i XML Database Developer's Guide - Oracle XML DB for information on XMLType views
  • ALTER VIEW for information on modifying a view
  • DROP VIEW for information on removing a view from the database

Prerequisites

To create a view in your own schema, you must have CREATE VIEW system privilege. To create a view in another user's schema, you must have CREATE ANY VIEW system privilege.

To create a subview, you must have UNDER ANY VIEW system privilege or the UNDER object privilege on the superview.

The owner of the schema containing the view must have the privileges necessary to either select, insert, update, or delete rows from all the tables or views on which the view is based. The owner must be granted these privileges directly, rather than through a role.

To use the basic constructor method of an object type when creating an object view, one of the following must be true:

  • The object type must belong to the same schema as the view to be created.
  • You must have EXECUTE ANY TYPE system privileges.
  • You must have the EXECUTE object privilege on that object type.

    See Also:

    SELECT , INSERT , UPDATE , and DELETE for information on the privileges required by the owner of a view on the base tables or views of the view being created

Partition Views

Partition views were introduced in Oracle Release 7.3 to provide partitioning capabilities for applications requiring them. Partition views are supported in Oracle9i so that you can upgrade applications from Release 7.3 without any modification. In most cases, subsequent to upgrading to Oracle9i you will want to migrate partition views into partitions.

In Oracle9i, you can use the CREATE TABLE statement to create partitioned tables easily. Partitioned tables offer the same advantages as partition views, while also addressing their shortcomings. Oracle recommends that you use partitioned tables rather than partition views in most operational environments.

See Also:
  • Oracle9i Database Concepts for more information on the shortcomings of partition views
  • Oracle9i Database Administrator's Guide for information on migrating partition views into partitions
  • CREATE TABLE for more information about partitioned tables

Syntax

create_view::=

Text description of statements_837.gif follows
Text description of create_view

(inline_constraint::= and out_of_line_constraint::= --part of constraints syntax, object_view_clause::= , XMLType_view_clause::= , subquery::= --part of SELECT syntax, subquery_restriction_clause::=)

object_view_clause::=

Text description of statements_830.gif follows
Text description of object_view_clause

(inline_constraint::= and out_of_line_constraint::= --part of constraints syntax)

XMLType_view_clause::=

Text description of statements_86.gif follows
Text description of XMLType_view_clause

XMLSchema_spec::=

Text description of statements_87.gif follows
Text description of XMLSchema_spec

subquery_restriction_clause::=

Text description of statements_838.gif follows
Text description of subquery_restriction_clause

Semantics

OR REPLACE

Specify OR REPLACE to re-create the view if it already exists. You can use this clause to change the definition of an existing view without dropping, re-creating, and regranting object privileges previously granted on it.

INSTEAD OF triggers defined in the view are dropped when a view is re-created.

If any materialized views are dependent on view, those materialized views will be marked UNUSABLE and will require a full refresh to restore them to a usable state. Invalid materialized views cannot be used by query rewrite and cannot be refreshed until they are recompiled.

See Also:
  • ALTER MATERIALIZED VIEW for information on refreshing invalid materialized views
  • Oracle9i Database Concepts for information on materialized views in general
  • CREATE TRIGGER for more information about the INSTEAD OF clause

FORCE

Specify FORCE if you want to create the view regardless of whether the view's base tables or the referenced object types exist or the owner of the schema containing the view has privileges on them. These conditions must be true before any SELECT, INSERT, UPDATE, or DELETE statements can be issued against the view.

If the view definition contains any constraints, CREATE VIEW ... FORCE will fail if the base table does not exist or the referenced object type does not exist. CREATE VIEW ... FORCE will also fail if the view definition references a constraint that does not exist.

NO FORCE

Specify NOFORCE if you want to create the view only if the base tables exist and the owner of the schema containing the view has privileges on them. This is the default.

schema

Specify the schema to contain the view. If you omit schema, Oracle creates the view in your own schema.

view

Specify the name of the view or the object view.

Restriction on Views

If a view has INSTEAD OF triggers, any views created on it must have INSTEAD OF triggers, even if the views are inherently updatable.

See Also:

"Creating a View: Example"

alias

Specify names for the expressions selected by the view's query. The number of aliases must match the number of expressions selected by the view. Aliases must follow the rules for naming Oracle schema objects. Aliases must be unique within the view.

If you omit the aliases, Oracle derives them from the columns or column aliases in the view's query. For this reason, you must use aliases if the view's query contains expressions rather than only column names. Also, you must specify aliases if the view definition includes constraints.

Restriction on View Aliases

You cannot specify an alias when creating an object view.

See Also:

"Syntax for Schema Objects and Parts in SQL Statements"

inline_constraint and out_of_line_constraint

You can specify constraints on views and object views. You define the constraint at the view level using the out_of_line_constraint clause. You define the constraint as part of column or attribute specification using the inline_constraint clause after the appropriate alias.

Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.

Restrictions on View Constraints

View constraints are a subset of table constraints and are subject to the following restrictions:

  • You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
  • Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
  • View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
  • You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
  • You cannot define view constraints on attributes of an object column.

    See Also:

    constraints for more information on constraints in general and on restrictions on view constraints and "Creating a View with Constraints: Example"
object_view_clause

The object_view_clause lets you define a view on an object type.

See Also:

"Creating an Object View: Example"

OF type_name Clause

Use this clause to explicitly create an object view of type type_name. The columns of an object view correspond to the top-level attributes of type type_name. Each row will contain an object instance and each instance will be associated with an object identifier (OID) as specified in the WITH OBJECT IDENTIFIER clause. If you omit schema, Oracle creates the object view in your own schema.

Object tables (as well as XMLType tables, object views, and XMLType views) do not have any column names specified for them. Therefore, Oracle defines a system-generated column SYS_NC_ROWINFO$. You can use this column name in queries and to create object views with the WITH OBJECT IDENTIFIER clause.

WITH OBJECT IDENTIFIER Clause

Use the WITH OBJECT IDENTIFIER clause to specify a top-level (root) object view. This clause lets you specify the attributes of the object type that will be used as a key to identify each row in the object view. In most cases these attributes correspond to the primary key columns of the base table. You must ensure that the attribute list is unique and identifies exactly one row in the view.

Restrictions on Object Views
  • If you try to dereference or pin a primary key REF that resolves to more than one instance in the object view, Oracle returns an error.
  • You cannot specify this clause if you are creating a subview, because subviews inherit object identifiers from superviews.

    Note:

    The Oracle8i, Release 8.0 syntax WITH OBJECT OID is replaced with this syntax for clarity. The keywords WITH OBJECT OID are supported for backward compatibility, but Oracle Corporation recommends that you use the new syntax WITH OBJECT IDENTIFIER.

If the object view is defined on an object table or an object view, you can omit this clause or specify DEFAULT.

DEFAULT

Specify DEFAULT if you want Oracle to use the intrinsic object identifier of the underlying object table or object view to uniquely identify each row.

attribute

For attribute, specify an attribute of the object type from which Oracle should create the object identifier for the object view.

UNDER Clause

Use the UNDER clause to specify a subview based on an object superview.

To learn whether a view is a superview or a subview, query the SUPERVIEW_NAME column of the USER_, ALL_, or DBA_VIEWS data dictionary views.

Restrictions on Subviews
  • You must create a subview in the same schema as the superview.
  • The object type type_name must be the immediate subtype of superview.
  • You can create only one subview of a particular type under the same superview.

    See Also:
    • CREATE TYPE for information about creating objects
    • Oracle9i Database Reference for information on data dictionary views

AS subquery

Specify a subquery that identifies columns and rows of the table(s) that the view is based on. The select list of the subquery can contain up to 1000 expressions.

If you create views that refer to remote tables and views, the database links you specify must have been created using the CONNECT TO clause of the CREATE DATABASE LINK statement, and you must qualify them with schema name in the view subquery.

If you create a view with the flashback_clause in the defining subquery, Oracle does not interpret the AS OF expression at create time but rather each time a user subsequently queries the view.

See Also:

"Creating a Join View: Example"

See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information on flashback queries
Restrictions on the Defining Subquery of a View
  • The view subquery cannot select the CURRVAL or NEXTVAL pseudocolumns.
  • If the view subquery selects the ROWID, ROWNUM, or LEVEL pseudocolumns, those columns must have aliases in the view subquery.
  • If the view subquery uses an asterisk (*) to select all columns of a table, and you later add new columns to the table, the view will not contain those columns until you re-create the view by issuing a CREATE OR REPLACE VIEW statement.
  • For object views, the number of elements in the view subquery select list must be the same as the number of top-level attributes for the object type. The datatype of each of the selecting elements must be the same as the corresponding top-level attribute.
  • You cannot specify the SAMPLE clause.

The preceding restrictions apply to materialized views as well.

Notes on Creating Updatable Views

An updatable view is one you can use to insert, update, or delete base table rows. You can create a view to be inherently updatable, or you can create an INSTEAD OF trigger on any view to make it updatable.

To learn whether and in what ways the columns of an inherently updatable view can be modified, query the USER_UPDATABLE_COLUMNS data dictionary view. (The information displayed by this view is meaningful only for inherently updatable views.)

  • If you want the view to be inherently updatable, it must not contain any of the following constructs:
    • A set operator
    • A DISTINCT operator
    • An aggregate or analytic function
    • A GROUP BY, ORDER BY, CONNECT BY, or START WITH clause
    • A collection expression in a SELECT list
    • A subquery in a SELECT list
    • Joins (with some exceptions as described in the paragraphs that follow).
  • In addition, if an inherently updatable view contains pseudocolumns or expressions, you cannot update base table rows with an UPDATE statement that refers to any of these pseudocolumns or expressions.
  • If you want a join view to be updatable, all of the following conditions must be true:
    • The DML statement must affect only one table underlying the join.
    • For an INSERT statement, the view must not be created WITH CHECK OPTION, and all columns into which values are inserted must come from a key-preserved table. A key-preserved table in one for which every primary key or unique key value in the base table is also unique in the join view.
    • For an UPDATE statement, all columns updated must be extracted from a key-preserved table. If the view was created WITH CHECK OPTION, join columns and columns taken from tables that are referenced more than once in the view must be shielded from UPDATE.
  • For a DELETE statement, if the join results in more than one key-preserved table, then Oracle deletes from the first table named in the FROM clause, whether or not the view was created WITH CHECK OPTION.

    See Also:
    • Oracle9i Database Administrator's Guide for more information on updatable views
    • Oracle9i Application Developer's Guide - Fundamentals for more information about updating object views or relational views that support object types
    • "Creating an Updatable View: Example"
    • "Creating a Join View: Example" for an example of updatable join views and key-preserved tables
    • "Creating an INSTEAD OF Trigger: Example" for an example of an INSTEAD OF trigger on a view that is not inherently updatable

XMLType_view_clause

Use this clause to create an XMLType view, which displays data from an XMLSchema-based table of type XMLType. The XMLSchema_spec indicates the XMLSchema to be used to map the XML data to its object-relational equivalents. The XMLSchema must already have been created before you can create an XMLType view.

Object tables (as well as XMLType tables, object views, and XMLType views) do not have any column names specified for them. Therefore, Oracle defines a system-generated column SYS_NC_ROWINFO$. You can use this column name in queries and to create object views with the WITH OBJECT IDENTIFIER clause.

See Also:
  • Oracle9i XML Database Developer's Guide - Oracle XML DB for information on XMLType views and XMLSchemas
  • "Creating an XMLType View: Example" and "Creating a View on an XMLType Table: Example"

subquery_restriction_clause

Use the subquery_restriction_clause to restrict the defining subquery of the view in one of the following ways:

WITH READ ONLY

Specify WITH READ ONLY to indicate that the table or view cannot be updated.

WITH CHECK OPTION

Specify WITH CHECK OPTION to indicate that Oracle prohibits any changes to the table or view that would produce rows that are not included in the subquery.

CONSTRAINT constraint

Specify the name of the CHECK OPTION constraint. If you omit this identifier, Oracle automatically assigns the constraint a name of the form SYS_C n, where n is an integer that makes the constraint name unique within the database.

Note on WITH CHECK OPTION:

For tables, WITH CHECK OPTION guarantees that inserts and updates result in tables that the defining table subquery can select. For views, WITH CHECK OPTION cannot make this guarantee if:

  • There is a subquery within the defining subquery of this view or any view on which this view is based or
  • INSERT, UPDATE, or DELETE operations are performed using INSTEAD OF triggers.
See Also:

"Creating a Read-Only View: Example"

Examples

Creating a View: Example

The following statement creates a view of the sample table employees named emp_view. The view shows the employees in department 20 and their annual salary:

CREATE VIEW emp_view AS
   SELECT last_name, salary*12 annual_salary
   FROM employees
   WHERE department_id = 20;

The view declaration need not define a name for the column based on the expression salary*12, because the subquery uses a column alias (annual_salary) for this expression.

Creating a View with Constraints: Example

The following statement creates a restricted view of the sample table hr.employees and defines a unique constraint on the email view column and a primary key constraint for the view on the emp_id view column:

CREATE VIEW emp_sal (emp_id, last_name,
      email UNIQUE RELY DISABLE NOVALIDATE,
   CONSTRAINT id_pk PRIMARY KEY (emp_id) RELY DISABLE NOVALIDATE)
   AS SELECT employee_id, last_name, email FROM employees;
Creating an Updatable View: Example

The following statement creates an updatable view named clerk of all sales and purchasing clerks in the employees table. Only the employees' IDs, last names, department numbers, and jobs are visible in this view, and these columns can be updated only in rows where the employee is a king of clerk:

CREATE VIEW clerk AS
   SELECT employee_id, last_name, department_id, job_id
   FROM employees
   WHERE job_id = 'PU_CLERK'
      or job_id = 'SH_CLERK'
      or job_id = 'ST_CLERK';

This view lets you change the job_id of a purchasing clerk to purchasing manager (PU_MAN):

UPDATE clerk SET job_id = 'PU_MAN' WHERE employee_id = 118;

The next example creates the same view WITH CHECK OPTION. You cannot subsequently insert a new row into clerk if the new employee is not a clerk. You can update an employee's job_id from one type of clerk to another type of clerk, but the update in the preceding statement would fail, because the view cannot access employees with non-clerk job_id.

CREATE VIEW clerk AS
   SELECT employee_id, last_name, department_id, job_id
   FROM employees
   WHERE job_id = 'PU_CLERK'
      or job_id = 'SH_CLERK'
      or job_id = 'ST_CLERK'
   WITH CHECK OPTION;
Creating a Join View: Example

A join view is one whose view subquery contains a join. If at least one column in the join has a unique index, then it may be possible to modify one base table in a join view. You can query USER_UPDATABLE_COLUMNS to see whether the columns in a join view are updatable. For example:

CREATE VIEW locations_view AS
   SELECT d.department_id, d.department_name, l.location_id, l.city
   FROM departments d, locations l
   WHERE d.location_id = l.location_id;

SELECT column_name, updatable
   FROM user_updatable_columns
   WHERE table_name = 'LOCATIONS_VIEW';

COLUMN_NAME                    UPD
------------------------------ ---
DEPARTMENT_ID                  YES
DEPARTMENT_NAME                YES
LOCATION_ID                    NO
CITY                           NO

In the preceding example, the primary key index on the location_id column of the locations table is not unique in the locations_view view. Therefore, locations is not a key-preserved table and columns from that base table are not updatable.

INSERT INTO locations_view VALUES
   (999, 'Entertainment', 87, 'Roma');
INSERT INTO locations_view VALUES
*
ERROR at line 1:
ORA-01776: cannot modify more than one base table through a join
view

You can insert, update, or delete a row from the departments base table, because all the columns in the view mapping to the departments table are marked as updatable and because the primary key of departments is retained in the view.

INSERT INTO locations_view (department_id, department_name)
   VALUES (999, 'Entertainment');

1 row created.
Note:

You cannot insert into the table using the view unless the view contains all NOT NULL columns of all tables in the join, unless you have specified DEFAULT values for the NOT NULL columns.
See Also:

Oracle9i Application Developer's Guide - Fundamentals for more information on updating join views
Creating a Read-Only View: Example

The following statement creates a read-only view named customer_ro of the oe.customers table. Only the customers' last names, language, and credit limit are visible in this view:

CREATE VIEW customer_ro (name, language, credit)
      AS SELECT cust_last_name, nls_language, credit_limit
      FROM customers
      WITH READ ONLY;
Creating an Object View: Example

The following example shows the creation of the type inventory_typ in the oc schema, and the oc_inventories view that is based on that type:

CREATE TYPE inventory_typ AS OBJECT
    ( product_id          number(6)
    , warehouse           warehouse_typ
    , quantity_on_hand    number(8)
    ) ;

CREATE OR REPLACE VIEW oc_inventories OF inventory_typ
   WITH OBJECT IDENTIFIER (product_id)
   AS SELECT i.product_id,
     warehouse_typ(w.warehouse_id, w.warehouse_name, w.location_id),
     i.quantity_on_hand
   FROM inventories i, warehouses w
   WHERE i.warehouse_id=w.warehouse_id;
Creating a View on an XMLType Table: Example

The following example builds a regular view on the XMLType table xwarehouses, which was created in "XMLType Table Examples" :

CREATE VIEW warehouse_view AS
   SELECT VALUE(p) AS warehouse_xml
   FROM xwarehouses p;

You select from such a view as follows:

SELECT e.warehouse_xml.getclobval()
   FROM warehouse_view e
   WHERE EXISTSNODE(warehouse_xml, '//Docks') =1;
Creating an XMLType View: Example

In some cases you may have an object-relational table upon which you would like to build an XMLType view. The following example creates an object-relational table (resembling the XMLType column warehouse_spec in the sample table oe.warehouses), and then creates an XMLType view of that table:

CREATE TABLE warehouse_table
(
  WarehouseID       NUMBER,
  Area              NUMBER,
  Docks             NUMBER,
  DockType          VARCHAR2(100),
  WaterAccess       VARCHAR2(10),
  RailAccess        VARCHAR2(10),
  Parking           VARCHAR2(20),
  VClearance        NUMBER
);

INSERT INTO warehouse_table
   VALUES(5, 103000,3,'Side Load','false','true','Lot',15);

CREATE VIEW warehouse_view OF XMLTYPE
 XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
    ELEMENT "Warehouse"
    WITH OBJECT ID
    (extract(sys_nc_rowinfo$,
'/Warehouse/Area/text()').getnumberval())
 AS SELECT XMLELEMENT("Warehouse",
            XMLFOREST(WarehouseID as "Building",
                      area as "Area",
                      docks as "Docks",
                      docktype as "DockType",
                      wateraccess as "WaterAccess",
                      railaccess as "RailAccess",
                      parking as "Parking",
                      VClearance as "VClearance"))
  FROM warehouse_table;

You would query this view as follows:

SELECT VALUE(e) FROM warehouse_view e;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 6 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DELETE

Purpose

Use the DELETE statement to remove rows from a table, a partitioned table, a view's base table, or a view's partitioned base table.

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

For you to delete rows from a table, the table must be in your own schema or you must have DELETE privilege on the table.

For you to delete rows from the base table of a view, the owner of the schema containing the view must have DELETE privilege on the base table. Also, if the view is in a schema other than your own, you must be granted DELETE privilege on the view.

The DELETE ANY TABLE system privilege also allows you to delete rows from any table or table partition, or any view's base table.

You must also have the SELECT privilege on the object from which you want to delete if:

  • The object is on a remote database or
  • The SQL92_SECURITY initialization parameter is set to TRUE and the DELETE operation references table columns (such as the columns in a where_clause).

Syntax

delete::=

Text description of statements_812.gif follows
Text description of delete

(DML_table_expression_clause::= , where_clause::= , returning_clause::= )

DML_table_expression_clause::=

Text description of statements_839.gif follows
Text description of DML_table_expression_clause

(subquery::= , subquery_restriction_clause::= , table_collection_expression::= )

subquery_restriction_clause::=

Text description of statements_811.gif follows
Text description of subquery_restriction_clause

table_collection_expression::=

Text description of statements_840.gif follows
Text description of table_collection_expression

where_clause::=

Text description of statements_841.gif follows
Text description of where_clause

returning_clause::=

Text description of statements_842.gif follows
Text description of returning_clause

Semantics

hint

Specify a comment that passes instructions to the optimizer on choosing an execution plan for the statement.

See Also:

"Hints" and Oracle9i Database Performance Tuning Guide and Reference for the syntax and description of hints

from_clause

Use the FROM clause to specify the database objects from which you are deleting rows.

The ONLY syntax is only relevant for views. Use the ONLY clause if the view in the FROM clause belongs to a view hierarchy and you do not want to delete rows from any of its subviews.

DML_table_expression_clause

schema

Specify the schema containing the table or view. If you omit schema, Oracle assumes the table or view is in your own schema.

table | view | materialized view | subquery

Specify the name of a table or view, or the column or columns resulting from a subquery, from which the rows are to be deleted. If you specify view, Oracle deletes rows from the view's base table.

If table (or the base table of view) contains one or more domain index columns, this statements executes the appropriate indextype delete routine.

See Also:

Oracle9i Data Cartridge Developer's Guide for more information on these routines

Issuing a DELETE statement against a table fires any DELETE triggers defined on the table.

All table or index space released by the deleted rows is retained by the table and index.

PARTITION (partition_name) and SUBPARTITION (subpartition_name)

Specify the name of the partition or subpartition within table targeted for deletes.

You need not specify the partition name when deleting values from a partitioned table. However, in some cases, specifying the partition name is more efficient than a complicated where_clause.

See Also:

"Deleting Rows from a Partition: Example"

dblink

Specify the complete or partial name of a database link to a remote database where the table or view is located. You can delete rows from a remote table or view only if you are using Oracle's distributed functionality.

See Also:

"Referring to Objects in Remote Databases" for information on referring to database links and "Deleting Rows from a Remote Database: Example"

If you omit dblink, Oracle assumes that the table or view is located on the local database.

subquery_restriction_clause

The subquery_restriction_clause lets you restrict the subquery in one of the following ways:

WITH READ ONLY

Specify WITH READ ONLY to indicate that the table or view cannot be updated.

WITH CHECK OPTION

Specify WITH CHECK OPTION to indicate that Oracle prohibits any changes to the table or view that would produce rows that are not included in the subquery.

CONSTRAINT constraint

Specify the name of the CHECK OPTION constraint. If you omit this identifier, Oracle automatically assigns the constraint a name of the form SYS_C n, where n is an integer that makes the constraint name unique within the database.

See Also:

"Using the WITH CHECK OPTION Clause: Example"

table_collection_expression

The table_collection_expression lets you inform Oracle that the value of collection_expression should be treated as a table for purposes of query and DML operations. The collection_expression can be a subquery, a column, a function, or a collection constructor. Regardless of its form, it must return a collection value (that is, a value whose type is nested table or varray). This process of extracting the elements of a collection is called collection unnesting.

Note:

In earlier releases of Oracle, when collection_expression was a subquery, table_collection_expression was expressed as "THE subquery". That usage is now deprecated.

You can use a table_collection_expression in a correlated subquery to delete rows with values that also exist in another table.

See Also:

"Table Collections: Examples"

collection_expression

Specify a subquery that selects a nested table column from table or view.

Note:

In earlier releases of Oracle, table_collection_expression was expressed as "THE subquery". That usage is now deprecated.
Restrictions on the dml_table_expression_clause
  • You cannot execute this statement if table (or the base table of view) contains any domain indexes marked IN_PROGRESS or FAILED.
  • You cannot insert into a partition if any affected index partitions are marked UNUSABLE.
  • You cannot specify the ORDER BY clause in the subquery of the dml_table_expression_clause.
  • You cannot delete from a view except through INSTEAD OF triggers if the view's defining query contains one of the following constructs:
    • A set operator
    • A DISTINCT operator
    • An aggregate or analytic function
    • A GROUP BY, ORDER BY, CONNECT BY, or START WITH clause
    • A collection expression in a SELECT list
    • A subquery in a SELECT list
    • Joins (with some exceptions). See Oracle9i Database Administrator's Guide for details.

If you specify an index, index partition, or index subpartition that has been marked UNUSABLE, the DELETE statement will fail unless the SKIP_UNUSABLE_INDEXES parameter has been set to true.

See Also:

ALTER SESSION

table_collection_expression

where_clause

Use the where_clause to delete only rows that satisfy the condition. The condition can reference the table and can contain a subquery. You can delete rows from a remote table or view only if you are using Oracle's distributed functionality.

See Also:

Chapter 5, "Conditions" for the syntax of condition
Note:

If this clause contains a subquery that refers to remote objects, the DELETE operation can run in parallel as long as the reference does not loop back to an object on the local database. However, if the subquery in the dml_table_expression_clause refers to any remote objects, the UPDATE operation will run serially without notification. Please refer to the parallel_clause for CREATE TABLE for additional information.

If you omit dblink, Oracle assumes that the table or view is located on the local database.

If you omit the where_clause, Oracle deletes all rows of the table or view.

t_alias

Provide a correlation name for the table, view, subquery, or collection value to be referenced elsewhere in the statement. Table aliases are generally used in DELETE statements with correlated queries.

Note:

This alias is required if the dml_table_expression_clause references any object type attributes or object type methods.

returning_clause

The returning clause retrieves the rows affected by a DML (INSERT, UPDATE, or DELETE) statement. You can specify this clause for tables and materialized views, and for views with a single base table.

When operating on a single row, a DML statement with a returning_clause can retrieve column expressions using the affected row, rowid, and REFs to the affected row and store them in host variables or PL/SQL variables.

When operating on multiple rows, a DML statement with the returning_clause stores values from expressions, rowids, and REFs involving the affected rows in bind arrays.

expr

Each item in the expr list must be a valid expression syntax. All forms are valid except scalar subquery expressions.

INTO

The INTO clause indicates that the values of the changed rows are to be stored in the variable(s) specified in data_item list.

data_item

Each data_item is a host variable or PL/SQL variable that stores the retrieved expr value.

For each expression in the RETURNING list, you must specify a corresponding type-compatible PL/SQL variable or host variable in the INTO list.

Restrictions on the RETURNING Clause

You cannot:

  • Specify the returning_clause for a multitable insert.
  • Use this clause with parallel DML or with remote objects.
  • Retrieve LONG types with this clause.
  • Specify this clause for a view on which an INSTEAD OF trigger has been defined.

    See Also:

    PL/SQL User's Guide and Reference for information on using the BULK COLLECT clause to return multiple values to collection variables
    Note:

    This clause lets you return values from deleted columns, and thereby eliminate the need to issue a SELECT statement following the DELETE statement.
    See Also:

    "Using the RETURNING Clause: Example"

Examples

Deleting Rows: Examples

The following statement deletes all rows from the sample table oe.product_descriptions:

DELETE FROM product_descriptions
   WHERE language_id = 'AR';

The following statement deletes from the sample table hr.employees purchasing clerks whose commission rate is less than 10%:

DELETE FROM employees
   WHERE job_id = 'PU_CLERK'
   AND commission_pct < .1;

The following statement has the same effect as the preceding example, but uses a subquery:

DELETE FROM (SELECT * FROM employees)
   WHERE job_id = 'PU_CLERK'
   AND commission_pct < .1;
Deleting Rows from a Remote Database: Example

The following statement deletes specified rows from the locations table owned by the user hr on a database accessible by the database link remote:

DELETE FROM hr.locations@remote
   WHERE location_id > 3000;
Deleting Nested Table Rows: Example

The following example deletes rows of nested table projs where the department number is either 123 or 456, or the department's budget is greater than 456.78:

DELETE TABLE(SELECT projs FROM dept d WHERE d.dno = 123) p
   WHERE p.pno IN (123, 456) OR p.budgets > 456.78;
Deleting Rows from a Partition: Example

The following example removes rows from partition sales_q1_1998 of the sh.sales table:

DELETE FROM sales PARTITION (sales_q1_1998)
   WHERE amount_sold > 10000;
Using the RETURNING Clause: Example

The following example returns column salary from the deleted rows and stores the result in bind variable :bnd1. (The bind variable must already have been declared.)

DELETE FROM employees
   WHERE job_id = 'SA_REP'
   AND hire_date + TO_YMINTERVAL('01-00') < SYSDATE;
   RETURNING salary INTO :bnd1;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 7 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DISASSOCIATE STATISTICS

Purpose

Use the DISASSOCIATE STATISTICS statement to disassociate a statistics type (or default statistics) from columns, standalone functions, packages, types, domain indexes, or indextypes.

See Also:

ASSOCIATE STATISTICS for more information on statistics type associations

Prerequisites

To issue this statement, you must have the appropriate privileges to alter the base object (table, function, package, type, domain index, or indextype).

Syntax

disassociate_statistics::=

Text description of statements_843.gif follows
Text description of disassociate_statistics

Semantics

FROM COLUMNS | FUNCTIONS | PACKAGES | TYPES | INDEXES | INDEXTYPES

Specify one or more columns, standalone functions, packages, types, domain indexes, or indextypes from which you are disassociating statistics.

If you do not specify schema, Oracle assumes the object is in your own schema.

If you have collected user-defined statistics on the object, the statement fails unless you specify FORCE.

FORCE

Specify FORCE to remove the association regardless of whether any statistics exist for the object using the statistics type. If statistics do exist, the statistics are deleted before the association is deleted.

Note:

When you drop an object with which a statistics type has been associated, Oracle automatically disassociates the statistics type with the FORCE option and drops all statistics that have been collected with the statistics type.

Example

Disassociating Statistics: Example

This statement disassociates statistics from the pack package in the hr schema:

DISASSOCIATE STATISTICS FROM PACKAGES oe.emp_mgmt;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 8 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP CLUSTER

Purpose

Use the DROP CLUSTER clause to remove a cluster from the database.

You cannot uncluster an individual table. Instead you must perform these steps:

  1. Create a new table with the same structure and contents as the old one, but with no CLUSTER clause.
  2. Drop the old table.
  3. Use the RENAME statement to give the new table the name of the old one.
  4. Grant privileges on the new unclustered table, as grants on the old clustered table do not apply.

    See Also:

    CREATE TABLE , DROP TABLE , RENAME , GRANT for information on these steps

Prerequisites

The cluster must be in your own schema or you must have the DROP ANY CLUSTER system privilege.

Syntax

drop_cluster::=

Text description of statements_844.gif follows
Text description of drop_cluster

Semantics

schema

Specify the schema containing the cluster. If you omit schema, Oracle assumes the cluster is in your own schema.

cluster

Specify the name of the cluster to be dropped. Dropping a cluster also drops the cluster index and returns all cluster space, including data blocks for the index, to the appropriate tablespace(s).

INCLUDING TABLES

Specify INCLUDING TABLES to drop all tables that belong to the cluster.

CASCADE CONSTRAINTS

Specify CASCADE CONSTRAINTS to drop all referential integrity constraints from tables outside the cluster that refer to primary and unique keys in tables of the cluster. If you omit this clause and such referential integrity constraints exist, Oracle returns an error and does not drop the cluster.

Example

Dropping a Cluster: Examples

The following examples drop the clusters created in the "Examples" section of CREATE CLUSTER on .

The following statements drops the language cluster:

DROP CLUSTER language;

This statement drops the personnel cluster as well as tables dept_10 and dept_20 and any referential integrity constraints that refer to primary or unique keys in those tables:

DROP CLUSTER personnel
   INCLUDING TABLES
   CASCADE CONSTRAINTS;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 9 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP CONTEXT

Purpose

Use the DROP CONTEXT statement to remove a context namespace from the database.

Note:

Removing a context namespace does not invalidate any context under that namespace that has been set for a user session. However, the context will be invalid when the user next attempts to set that context.
See Also:

CREATE CONTEXT and Oracle9i Database Concepts for more information on contexts

Prerequisites

You must have the DROP ANY CONTEXT system privilege.

Syntax

drop_context::=

Text description of statements_845.gif follows
Text description of drop_context

Semantics

namespace

Specify the name of the context namespace to drop. You cannot drop the built-in namespace USERENV.

See Also:

SYS_CONTEXT for information on the USERENV namespace

Example

Dropping an Application Context: Example

The following statement drops the context created in CREATE CONTEXT :

DROP CONTEXT hr_context;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 10 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP DATABASE LINK

Purpose

Use the DROP DATABASE LINK statement to remove a database link from the database.

See Also:

CREATE DATABASE LINK for information on creating database links

Prerequisites

A private database link must be in your own schema. To drop a PUBLIC database link, you must have the DROP PUBLIC DATABASE LINK system privilege.

Syntax

drop_database_link::=

Text description of statements_846.gif follows
Text description of drop_database_link

Semantics

PUBLIC

You must specify PUBLIC to drop a PUBLIC database link.

dblink

Specify the name of the database link to be dropped.

Restriction on Dropping Database Links

You cannot drop a database link in another user's schema, and you cannot qualify dblink with the name of a schema, because periods are permitted in names of database links. Therefore, Oracle interprets the entire name, such as ralph.linktosales, as the name of a database link in your schema rather than as a database link named linktosales in the schema ralph.

Example

Dropping a Database Link: Example

The following statement drops the public database link named remote (created in "Defining a Public Database Link: Example" ):

DROP PUBLIC DATABASE LINK remote;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 11 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP DIMENSION

Purpose

Use the DROP DIMENSION statement to remove the named dimension.

Note:

This statement does not invalidate materialized views that use relationships specified in dimensions. However, requests that have been rewritten by query rewrite may be invalidated, and subsequent operations on such views may execute more slowly.
See Also:
  • CREATE DIMENSION for information on creating a dimension
  • ALTER DIMENSION for information on modifying a dimension
  • Oracle9i Database Concepts

Prerequisites

The dimension must be in your own schema or you must have the DROP ANY DIMENSION system privilege to use this statement.

Syntax

drop_dimension::=

Text description of statements_847.gif follows
Text description of drop_dimension

Semantics

schema

Specify the name of the schema in which the dimension is located. If you omit schema, Oracle assumes the dimension is in your own schema.

dimension

Specify the name of the dimension you want to drop. The dimension must already exist.

Example

Dropping a Dimension: Example

This example drops the sh.customers_dim dimension:

DROP DIMENSION customers_dim;
See Also:

"Creating a Dimension: Example" and "Modifying a Dimension: Examples" for examples of creating and modifying this dimension
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 12 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP DIRECTORY

Purpose

Use the DROP DIRECTORY statement to remove a directory object from the database.

See Also:

CREATE DIRECTORY for information on creating a directory

Prerequisites

To drop a directory, you must have the DROP ANY DIRECTORY system privilege.

Caution:

Do not drop a directory when files in the associated file system are being accessed by PL/SQL or OCI programs.

Syntax

drop_directory::=

Text description of statements_848.gif follows
Text description of drop_directory

Semantics

directory_name

Specify the name of the directory database object to be dropped.

Oracle removes the directory object but does not delete the associated operating system directory on the server's file system.

Example

Dropping a Directory: Example

The following statement drops the directory object bfile_dir:

DROP DIRECTORY bfile_dir;
See Also:

"Creating a Directory: Examples"

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 13 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP FUNCTION

Purpose

Use the DROP FUNCTION statement to remove a standalone stored function from the database.

Note:

Do not use this statement to remove a function that is part of a package. Instead, either drop the entire package using the DROP PACKAGE statement or redefine the package without the function using the CREATE PACKAGE statement with the OR REPLACE clause.
See Also:
  • CREATE FUNCTION for information on creating a function
  • ALTER FUNCTION for information on modifying a function

Prerequisites

The function must be in your own schema or you must have the DROP ANY PROCEDURE system privilege.

Syntax

drop_function::=

Text description of statements_849.gif follows
Text description of drop_function

Semantics

schema

Specify the schema containing the function. If you omit schema, Oracle assumes the function is in your own schema.

function_name

Specify the name of the function to be dropped.

Oracle invalidates any local objects that depend on, or call, the dropped function. If you subsequently reference one of these objects, Oracle tries to recompile the object and returns an error if you have not re-created the dropped function.

If any statistics types are associated with the function, Oracle disassociates the statistics types with the FORCE option and drops any user-defined statistics collected with the statistics type.

See Also:
  • Oracle9i Database Concepts for more information on how Oracle maintains dependencies among schema objects, including remote objects
  • ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations

Example

Dropping a Function: Example

The following statement drops the function SecondMax in the sample schema oe and invalidates all objects that depend upon SecondMax:

DROP FUNCTION oe.SecondMax;
See Also:

"Creating a Function: Examples" for information on creating the SecondMax function
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 14 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP INDEX

Purpose

Use the DROP INDEX statement to remove an index or domain index from the database.

When you drop an index, Oracle invalidates all objects that depend on the underlying table, including views, packages, package bodies, functions, and procedures.

When you drop a global partitioned index, a range-partitioned index, or a hash-partitioned index, all the index partitions are also dropped. If you drop a composite-partitioned index, all the index partitions and subpartitions are also dropped.

In addition, when you drop a domain index:

  • Oracle invokes the appropriate routine. For information on these routines, see Oracle9i Data Cartridge Developer's Guide.
  • If any statistics are associated with the domain index, Oracle disassociates the statistics types with the FORCE clause and removes the user-defined statistics collected with the statistics type.

    See Also:
    • CREATE INDEX for information on creating an index
    • ALTER INDEX for information on modifying an index
    • The domain_index_clause of CREATE INDEX for more information on domain indexes
    • ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations

Prerequisites

The index must be in your own schema or you must have the DROP ANY INDEX system privilege.

Syntax

drop_index::=

Text description of statements_850.gif follows
Text description of drop_index

Semantics

schema

Specify the schema containing the index. If you omit schema, Oracle assumes the index is in your own schema.

index

Specify the name of the index to be dropped. When the index is dropped, all data blocks allocated to the index are returned to the index's tablespace.

Restriction on Dropping Indexes

You cannot drop a domain index if the index or any of its index partitions is marked IN_PROGRESS.

FORCE

FORCE applies only to domain indexes. This clause drops the domain index even if the indextype routine invocation returns an error or the index is marked IN PROGRESS. Without FORCE, you cannot drop a domain index if its indextype routine invocation returns an error or the index is marked IN PROGRESS.

Example

Dropping an Index: Example

This statement drops an index named ord_customer_ix_demo (created in "General Index Examples" ):

DROP INDEX ord_customer_ix_demo;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 15 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP INDEXTYPE

Purpose

Use the DROP INDEXTYPE statement to drop an indextype, as well as any association with a statistics type.

See Also:

CREATE INDEXTYPE for more information on indextypes

Prerequisites

The indextype must be in your own schema or you must have the DROP ANY INDEXTYPE system privilege.

Syntax

drop_indextype::=

Text description of statements_851.gif follows
Text description of drop_indextype

Semantics

schema

Specify the schema containing the indextype. If you omit schema, Oracle assumes the indextype is in your own schema.

indextype

Specify the name of the indextype to be dropped.

If any statistics types have been associated with indextype, Oracle disassociates the statistics type from the indextype and drops any statistics that have been collected using the statistics type.

See Also:

ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics associations

FORCE

Specify FORCE to drop the indextype even if the indextype is currently being referenced by one or more domain indexes. Oracle marks those domain indexes INVALID. Without FORCE, you cannot drop an indextype if any domain indexes reference the indextype.

Example

Dropping an Indextype: Example

The following statement drops the indextype textindextype and marks INVALID any domain indexes defined on this indextype:

DROP INDEXTYPE textindextype FORCE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 16 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP JAVA

Purpose

Use the DROP JAVA statement to drop a Java source, class, or resource schema object.

See Also:
  • CREATE JAVA for information on creating Java objects
  • Oracle9i Java Stored Procedures Developer's Guide for more information on resolving Java sources, classes, and resources

Prerequisites

The Java source, class, or resource must be in your own schema or you must have the DROP ANY PROCEDURE system privilege. You also must have the EXECUTE object privilege on Java classes to use this command.

Syntax

drop_java::=

Text description of statements_852.gif follows
Text description of drop_java

Semantics

JAVA SOURCE

Specify SOURCE to drop a Java source schema object and all Java class schema objects derived from it.

JAVA CLASS

Specify CLASS to drop a Java class schema object.

JAVA RESOURCE

Specify RESOURCE to drop a Java resource schema object.

object_name

Specify the name of an existing Java class, source, or resource schema object. Enclose the object_name in double quotation marks to preserve lower- or mixed-case names.

Example

Dropping a Java Class Object: Example

The following statement drops the Java class MyClass:

DROP JAVA CLASS "MyClass";
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 17 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP LIBRARY

Purpose

Use the DROP LIBRARY statement to remove an external procedure library from the database.

See Also:

CREATE LIBRARY for information on creating a library

Prerequisites

You must have the DROP ANY LIBRARY system privilege.

Syntax

drop_library::=

Text description of statements_860a.gif follows
Text description of drop_library

Semantics

library_name

Specify the name of the external procedure library being dropped.

Example

Dropping a Library: Example

The following statement drops the ext_lib library (created in "Creating a Library: Examples" ):

DROP LIBRARY ext_lib;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 18 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP MATERIALIZED VIEW

Purpose

Use the DROP MATERIALIZED VIEW statement to remove an existing materialized view from the database.

Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.
See Also:
  • CREATE MATERIALIZED VIEW for more information on materialized views, including a description of the various types of materialized views
  • ALTER MATERIALIZED VIEW for information on modifying a materialized view
  • Oracle9i Advanced Replication for information on materialized views in a replication environment
  • Oracle9i Data Warehousing Guide for information on materialized views in a data warehousing environment

Prerequisites

The materialized view must be in your own schema or you must have the DROP ANY MATERIALIZED VIEW system privilege. You must also have the privileges to drop the internal table, views, and index that Oracle uses to maintain the materialized view's data.

See Also:

DROP TABLE , DROP VIEW , and DROP INDEX for information on privileges required to drop objects that Oracle uses to maintain the materialized view

Syntax

drop_materialized_view::=

Text description of statements_854.gif follows
Text description of drop_materialized_view

Semantics

schema

Specify the schema containing the materialized view. If you omit schema, Oracle assumes the materialized view is in your own schema.

materialized_view

Specify the name of the existing materialized view to be dropped.

  • If you drop a simple materialized view that is the least recently refreshed materialized view of a master table, Oracle automatically purges from the master table's materialized view log only the rows needed to refresh the dropped materialized view.
  • If you drop a master table, Oracle does not automatically drop materialized views based on the table. However, Oracle returns an error when it tries to refresh a materialized view based on a master table that has been dropped.
  • If you drop a materialized view, any compiled requests that were rewritten to use the materialized view will be invalidated and recompiled automatically. If the materialized view was prebuilt on a table, the table is not dropped, but it can no longer be maintained by the materialized view refresh mechanism.

Examples

Dropping a Materialized View: Examples

The following statement drops the materialized view emp_data in the sample schema hr:

DROP MATERIALIZED VIEW emp_data;

The following statement drops the sales_by_month_by_state materialized view and the underlying table of the materialized view (unless the underlying table was registered in the CREATE MATERIALIZED VIEW statement with the ON PREBUILT TABLE clause):

DROP MATERIALIZED VIEW sales_by_month_by_state;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 19 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP MATERIALIZED VIEW LOG

Purpose

Use the DROP MATERIALIZED VIEW LOG statement to remove a materialized view log from the database.

Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.
See Also:
  • CREATE MATERIALIZED VIEW and ALTER MATERIALIZED VIEW for more information on materialized views
  • CREATE MATERIALIZED VIEW LOG for information on materialized view logs
  • Oracle9i Advanced Replication for information on materialized views in a replication environment
  • Oracle9i Data Warehousing Guide for information on materialized views in a data warehousing environment

Prerequisites

To drop a materialized view log, you must have the privileges needed to drop a table.

See Also:

DROP TABLE

Syntax

drop_materialized_view_log::=

Text description of statements_855.gif follows
Text description of drop_materialized_view_log

Semantics

schema

Specify the schema containing the materialized view log and its master table. If you omit schema, Oracle assumes the materialized view log and master table are in your own schema.

table

Specify the name of the master table associated with the materialized view log to be dropped.

After you drop a materialized view log, some materialized views based on the materialized view log's master table can no longer be fast refreshed. These materialized views include rowid materialized views, primary key materialized views, and subquery materialized views.

See Also:

Oracle9i Data Warehousing Guide for a description of these types of materialized views

Example

Dropping a Materialized View Log: Example

The following statement drops the materialized view log on the oe.customers master table:

DROP MATERIALIZED VIEW LOG ON customers;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 20 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP OPERATOR

Purpose

Use the DROP OPERATOR statement to drop a user-defined operator.

See Also:
  • CREATE OPERATOR for information on creating operators
  • "User-Defined Operators" and Oracle9i Data Cartridge Developer's Guide for more information on operators in general
  • ALTER INDEXTYPE for information on dropping an operator of a user-defined indextype

Prerequisites

The operator must be in your schema or you must have the DROP ANY OPERATOR system privilege.

Syntax

drop_operator::=

Text description of statements_856.gif follows
Text description of drop_operator

Semantics

schema

Specify the schema containing the operator. If you omit schema, Oracle assumes the operator is in your own schema.

operator

Specify the name of the operator to be dropped.

FORCE

Specify FORCE to drop the operator even if it is currently being referenced by one or more schema objects (indextypes, packages, functions, procedures, and so on), and marks those dependent objects INVALID. Without FORCE, you cannot drop an operator if any schema objects reference it.

Example

Dropping a User-Defined Operator: Example

The following statement drops the operator eq_op:

DROP OPERATOR eq_op;

Because the FORCE clause is not specified, this operation will fail if any of the bindings of this operator are referenced by an indextype.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 21 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP OUTLINE

Purpose

Use the DROP OUTLINE statement to drop a stored outline.

See Also:
  • CREATE OUTLINE for information on creating an outline
  • Oracle9i Database Performance Tuning Guide and Reference for more information on outlines in general

Prerequisites

To drop an outline, you must have the DROP ANY OUTLINE system privilege.

Syntax

drop_outline::=

Text description of statements_857.gif follows
Text description of drop_outline

Semantics

outline

Specify the name of the outline to be dropped.

After the outline is dropped, if the SQL statement for which the stored outline was created is compiled, the optimizer generates a new execution plan without the influence of the outline.

Example

Dropping an Outline: Example

The following statement drops the stored outline called salaries.

DROP OUTLINE salaries;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 22 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP PACKAGE

Purpose

Use the DROP PACKAGE statement to remove a stored package from the database. This statement drops the body and specification of a package.

Note:

Do not use this statement to remove a single object from a package. Instead, re-create the package without the object using the CREATE PACKAGE and CREATE PACKAGE BODY statements with the OR REPLACE clause.
See Also:

CREATE PACKAGE

Prerequisites

The package must be in your own schema or you must have the DROP ANY PROCEDURE system privilege.

Syntax

drop_package::=

Text description of statements_858.gif follows
Text description of drop_package

Semantics

BODY

Specify BODY to drop only the body of the package. If you omit this clause, Oracle drops both the body and specification of the package.

When you drop only the body of a package but not its specification, Oracle does not invalidate dependent objects. However, you cannot call one of the procedures or stored functions declared in the package specification until you re-create the package body.

schema

Specify the schema containing the package. If you omit schema, Oracle assumes the package is in your own schema.

package

Specify the name of the package to be dropped.

Oracle invalidates any local objects that depend on the package specification. If you subsequently reference one of these objects, Oracle tries to recompile the object and returns an error if you have not re-created the dropped package.

If any statistics types are associated with the package, Oracle disassociates the statistics types with the FORCE clause and drops any user-defined statistics collected with the statistics types.

See Also:
  • Oracle9i Database Concepts for information on how Oracle maintains dependencies among schema objects, including remote objects
  • ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS

Example

Dropping a Package: Example

The following statement drops the specification and body of the emp_mgmt package (created in "Creating a Package: Example" ), invalidating all objects that depend on the specification:

DROP PACKAGE emp_mgmt;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 23 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP PROCEDURE

Purpose

Use the DROP PROCEDURE statement to remove a standalone stored procedure from the database. Do not use this statement to remove a procedure that is part of a package. Instead, either drop the entire package using the DROP PACKAGE statement, or redefine the package without the procedure using the CREATE PACKAGE statement with the OR REPLACE clause.

See Also:
  • CREATE PROCEDURE for information on creating a procedure
  • ALTER PROCEDURE for information on modifying a procedure

Prerequisites

The procedure must be in your own schema or you must have the DROP ANY PROCEDURE system privilege.

Syntax

drop_procedure::=

Text description of statements_859.gif follows
Text description of drop_procedure

Semantics

schema

Specify the schema containing the procedure. If you omit schema, Oracle assumes the procedure is in your own schema.

procedure

Specify the name of the procedure to be dropped.

When you drop a procedure, Oracle invalidates any local objects that depend upon the dropped procedure. If you subsequently reference one of these objects, Oracle tries to recompile the object and returns an error message if you have not re-created the dropped procedure.

See Also:

Oracle9i Database Concepts for information on how Oracle maintains dependencies among schema objects, including remote objects

Example

Dropping a Procedure: Example

The following statement drops the procedure remove_emp owned by the user hr and invalidates all objects that depend upon remove_emp:

DROP PROCEDURE hr.remove_emp;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 24 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP PROFILE

Purpose

Use the DROP PROFILE statement to remove a profile from the database.

See Also:
  • CREATE PROFILE on creating a profile
  • ALTER PROFILE on modifying a profile

Prerequisites

You must have the DROP PROFILE system privilege.

Syntax

drop_profile::=

Text description of statements_860.gif follows
Text description of drop_profile

Semantics

profile

Specify the name of the profile to be dropped.

Restriction on Dropping Profiles

You cannot drop the DEFAULT profile.

CASCADE

Specify CASCADE to deassign the profile from any users to whom it is assigned. Oracle automatically assigns the DEFAULT profile to such users. You must specify this clause to drop a profile that is currently assigned to users.

Example

Dropping a Profile: Example

The following statement drops the profile app_user (created in "Creating a Profile: Example" ):

DROP PROFILE app_user CASCADE;

Oracle drops the profile app_user and assigns the DEFAULT profile to any users currently assigned the app_user profile.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 25 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP ROLE

Purpose

Use the DROP ROLE statement to remove a role from the database. When you drop a role, Oracle revokes it from all users and roles to whom it has been granted and removes it from the database. User sessions in which the role is already enabled are not affected. However, no new user session can enable the role after it is dropped.

See Also:
  • CREATE ROLE for information on creating roles
  • ALTER ROLE for information on changing the authorization needed to enable a role
  • SET ROLE for information on disabling roles for the current session

Prerequisites

You must have been granted the role with the ADMIN OPTION or you must have the DROP ANY ROLE system privilege.

Syntax

drop_role::=

Text description of statements_8a.gif follows
Text description of drop_role

Semantics

role

Specify the name of the role to be dropped.

Example

Dropping a Role: Example

To drop the role dw_manager (created in "Creating a Role: Example" ), issue the following statement:

DROP ROLE dw_manager;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT, 26 of 26

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP ROLLBACK SEGMENT

Purpose

Use the DROP ROLLBACK SEGMENT to remove a rollback segment from the database. When you drop a rollback segment, all space allocated to the rollback segment returns to the tablespace.

Note:

If your database is running in Automatic Undo Management mode, this is the only valid operation on rollback segments. In that mode, you cannot create or alter a rollback segment.
See Also:
  • CREATE ROLLBACK SEGMENT for information on creating a rollback segment
  • ALTER ROLLBACK SEGMENT for information on modifying a rollback segment
  • CREATE TABLESPACE

Prerequisites

You must have the DROP ROLLBACK SEGMENT system privilege.

Syntax

drop_rollback_segment::=

Text description of statements_82.gif follows
Text description of drop_rollback_segment

Semantics

rollback_segment

Specify the name the rollback segment to be dropped.

Restrictions on Dropping Rollback Segments
  • You can drop a rollback segment only if it is offline. To determine whether a rollback segment is offline, query the data dictionary view DBA_ROLLBACK_SEGS. Offline rollback segments have the value AVAILABLE in the STATUS column. You can take a rollback segment offline with the OFFLINE clause of the ALTER ROLLBACK SEGMENT statement.
  • You cannot drop the SYSTEM rollback segment.

Example

Dropping a Rollback Segment: Example

The following statement drops the rollback segment rbs_ts:

DROP ROLLBACK SEGMENT rbs_ts;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 1 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

17
SQL Statements: DROP SEQUENCE to ROLLBACK

This chapter contains the following SQL statements:

  • DROP SEQUENCE
  • DROP SYNONYM
  • DROP TABLE
  • DROP TABLESPACE
  • DROP TRIGGER
  • DROP TYPE
  • DROP TYPE BODY
  • DROP USER
  • DROP VIEW
  • EXPLAIN PLAN
  • GRANT
  • INSERT
  • LOCK TABLE
  • MERGE
  • NOAUDIT
  • RENAME
  • REVOKE
  • ROLLBACK
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 2 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP SEQUENCE

Purpose

Use the DROP SEQUENCE statement to remove a sequence from the database.

You can also use this statement to restart a sequence by dropping and then re-creating it. For example, if you have a sequence with a current value of 150 and you would like to restart the sequence with a value of 27, then you can drop the sequence and then re-create it with the same name and a START WITH value of 27.

See Also:
  • CREATE SEQUENCE for information on creating a sequence
  • ALTER SEQUENCE for more information on modifying a sequence

Prerequisites

The sequence must be in your own schema or you must have the DROP ANY SEQUENCE system privilege.

Syntax

drop_sequence::=

Text description of statements_94.gif follows
Text description of drop_sequence

Semantics

schema

Specify the schema containing the sequence. If you omit schema, then Oracle assumes the sequence is in your own schema.

sequence_name

Specify the name of the sequence to be dropped.

Example

Dropping a Sequence: Example

The following statement drops the sequence customers_seq owned by the user oe (created in "Creating a Sequence: Example" ). To issue this statement, you must either be connected as user oe or have DROP ANY SEQUENCE system privilege:

DROP SEQUENCE oe.customers_seq;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 3 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP SYNONYM

Purpose

Use the DROP SYNONYM statement to remove a synonym from the database or to change the definition of a synonym by dropping and re-creating it.

See Also:

CREATE SYNONYM for more information on synonyms

Prerequisites

To drop a private synonym, either the synonym must be in your own schema or you must have the DROP ANY SYNONYM system privilege.

To drop a PUBLIC synonym, you must have the DROP PUBLIC SYNONYM system privilege.

Syntax

drop_synonym::=

Text description of statements_95.gif follows
Text description of drop_synonym

Semantics

PUBLIC

You must specify PUBLIC to drop a public synonym. You cannot specify schema if you have specified PUBLIC.

schema

Specify the schema containing the synonym. If you omit schema, then Oracle assumes the synonym is in your own schema.

synonym

Specify the name of the synonym to be dropped.

If you drop a synonym for a materialized view, or its containing table or materialized view, or any of its dependent tables, then Oracle invalidates the materialized view.

Restriction on Dropping Synonyms

You cannot drop a type synonym that has any dependent tables or user-defined types unless you also specify FORCE.

FORCE

Specify FORCE to drop the synonym even if it has dependent tables or user-defined types.

Caution:

Oracle does not recommend that you specify FORCE to drop object synonyms with dependencies. This operation can result in invalidation of other user-defined types or marking UNUSED the table columns that depend on the synonym. For information about type dependencies, see Oracle9i Application Developer's Guide - Object-Relational Features.

Example

Dropping a Synonym: Example

To drop the public synonym named customers (created in "Resolution of Synonyms Example" ), issue the following statement:

DROP PUBLIC SYNONYM customers;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 4 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP TABLE

Purpose

Use the DROP TABLE statement to remove a table or an object table and all its data from the database.

Caution:

You cannot roll back a DROP TABLE statement.
Note:

For an external table, this statement removes only the table metadata in the database. It has no affect on the actual data, which resides outside of the database.
Note:

You can perform DDL operations (such as ALTER TABLE, DROP TABLE, CREATE INDEX) on a temporary table only when no session is bound to it. A session becomes bound to a temporary table by performing an INSERT operation on the table. A session becomes unbound to the temporary table by issuing a TRUNCATE statement or at session termination, or, for a transaction-specific temporary table, by issuing a COMMIT or ABORT statement.

Dropping a table invalidates the table's dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the table's indexes, integrity constraints, and triggers, and respecify its storage parameters. Truncating has none of these effects. Therefore, removing rows with the TRUNCATE statement can be more efficient than dropping and re-creating a table.

See Also:
  • CREATE TABLE for information on creating tables
  • ALTER TABLE for information on modifying tables
  • TRUNCATE and DELETE for information on how to remove data from a table without dropping the table

Prerequisites

The table must be in your own schema or you must have the DROP ANY TABLE system privilege.

Syntax

drop_table::=

Text description of statements_96.gif follows
Text description of drop_table

Semantics

schema

Specify the schema containing the table. If you omit schema, then Oracle assumes the table is in your own schema.

table

Specify the name of the table, object table, or index-organized table to be dropped. Oracle automatically performs the following operations:

  • Removes all rows from the table.
  • Drops all the table's indexes and domain indexes, as well as any triggers defined on the table, regardless of who created them or whose schema contains them. If table is partitioned, then any corresponding local index partitions are also dropped.
  • Drops all the storage tables of table's nested tables and LOBs.
  • If you drop a range-partitioned or hash-partitioned table, then Oracle drops all the table partitions. If you drop a composite-partitioned table, then all the partitions and subpartitions are also dropped.
  • For an index-organized table, drops any mapping tables defined on the index-organized table.
  • For a domain index, this statement invokes the appropriate drop routines.

    See Also:

    Oracle9i Data Cartridge Developer's Guide for more information on these routines
  • If any statistic types are associated with the table, then Oracle disassociates the statistics types with the FORCE clause and removes any user-defined statistics collected with the statistics type.

    See Also:

    ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations
  • If the table is not part of a cluster, then Oracle returns all data blocks allocated to the table and its indexes to the tablespaces containing the table and its indexes.

    Note:

    To drop a cluster and all its the tables, use the DROP CLUSTER statement with the INCLUDING TABLES clause to avoid dropping each table individually. See DROP CLUSTER .
  • If the table is a base table for a view, a container or master table of a materialized view, or if it is referenced in a stored procedure, function, or package, then Oracle invalidates these dependent objects but does not drop them. You cannot use these objects unless you re-create the table or drop and re-create the objects so that they no longer depend on the table.
  • If you choose to re-create the table, then it must contain all the columns selected by the subqueries originally used to define the materialized views and all the columns referenced in the stored procedures, functions, or packages. Any users previously granted object privileges on the views, stored procedures, functions, or packages need not be regranted these privileges.
  • If the table is a master table for a materialized view, then the materialized view can still be queried, but it cannot be refreshed unless the table is re-created so that it contains all the columns selected by the materialized view's subquery.
  • If the table has a materialized view log, then Oracle drops this log and any other direct-path INSERT refresh information associated with the table.
Restriction on Dropping Tables

You cannot directly drop the storage table of a nested table. Instead, you must drop the nested table column using the ALTER TABLE ... DROP COLUMN clause.

CASCADE CONSTRAINTS

Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then Oracle returns an error and does not drop the table.

Example

Dropping a Table: Example

The following statement drops the oe.list_customers table created in "List Partitioning Example" .

DROP TABLE list_customers;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 5 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP TABLESPACE

Purpose

Use the DROP TABLESPACE statement to remove a tablespace from the database.

See Also:
  • CREATE TABLESPACE for information on creating a tablespace
  • ALTER TABLESPACE for information on modifying a tablespace

Prerequisites

You must have the DROP TABLESPACE system privilege. You cannot drop a tablespace if it contains any rollback segments holding active transactions.

Syntax

drop_tablespace::=

Text description of statements_97.gif follows
Text description of drop_tablespace

Semantics

tablespace

Specify the name of the tablespace to be dropped.

You can drop a tablespace regardless of whether it is online or offline. Oracle recommends that you take the tablespace offline before dropping it to ensure that no SQL statements in currently running transactions access any of the objects in the tablespace.

You may want to alert any users who have been assigned the tablespace as either a default or temporary tablespace. After the tablespace has been dropped, these users cannot allocate space for objects or sort areas in the tablespace. You can reassign users new default and temporary tablespaces with the ALTER USER statement.

Oracle removes from the data dictionary all metadata about the tablespace and all datafiles and tempfiles in the tablespace. Oracle also automatically drops from the operating system any Oracle-managed datafiles and tempfiles in the tablespace. Other datafiles and tempfiles are not removed from the operating system unless you specify INCLUDING CONTENTS AND DATAFILES.

Restrictions on Dropping Tablespaces
  • You cannot drop the SYSTEM tablespace.
  • You cannot drop a tablespace that contains a domain index or any objects created by a domain index.
  • You cannot drop an undo tablespace if it is being used by any instance or if it contains any undo data needed to roll back uncommitted transactions.

    See Also:

    Oracle9i Data Cartridge Developer's Guide and Oracle9i Database Concepts for more information on domain indexes

INCLUDING CONTENTS

Specify INCLUDING CONTENTS to drop all the contents of the tablespace. You must specify this clause to drop a tablespace that contains any database objects. If you omit this clause, and the tablespace is not empty, then Oracle returns an error and does not drop the tablespace.

For partitioned tables, DROP TABLESPACE will fail even if you specify INCLUDING CONTENTS, if the tablespace contains some, but not all:

  • Partitions of a range- or hash-partitioned table, or
  • Subpartitions of a composite-partitioned table.

    Note:

    If all the partitions of a partitioned table reside in tablespace, then DROP TABLESPACE ... INCLUDING CONTENTS will drop tablespace, as well as any associated index segments, LOB data segments, and LOB index segments in the other tablespace(s).

For a partitioned index-organized table, if all the primary key index segments are in this tablespace, then this clause will also drop any overflow segments that exist in other tablespaces, as well as any associated mapping table in other tablespaces. If some of the primary key index segments are not in this tablespace, then the statement will fail. In that case, before you can drop the tablespace, you must use ALTER TABLE ... MOVE PARTITION to move those primary key index segments into this tablespace, drop the partitions whose overflow data segments are not in this tablespace, and drop the partitioned index-organized table.

If the tablespace contains a master table of a materialized view, then Oracle invalidates the materialized view.

If the tablespace contains a materialized view log, then Oracle drops this log and any other direct-path INSERT refresh information associated with the table.

AND DATAFILES

When you specify INCLUDING CONTENTS, the AND DATAFILES clause lets you instruct Oracle to delete the associated operating system files as well. Oracle writes a message to the alert log for each operating system file deleted. This clause is not needed for Oracle-managed files.

CASCADE CONSTRAINTS

Specify CASCADE CONSTRAINTS to drop all referential integrity constraints from tables outside tablespace that refer to primary and unique keys of tables inside tablespace. If you omit this clause and such referential integrity constraints exist, then Oracle returns an error and does not drop the tablespace.

Example

Dropping a Tablespace: Example

The following statement drops the tbs_01 tablespace and drops all referential integrity constraints that refer to primary and unique keys inside tbs_01:

DROP TABLESPACE tbs_01
    INCLUDING CONTENTS
        CASCADE CONSTRAINTS;
Deleting Operating System Files: Example

The following example drops the tbs_02 tablespace and deletes all associated operating system datafiles:

DROP TABLESPACE tbs_02
   INCLUDING CONTENTS AND DATAFILES;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 6 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP TRIGGER

Purpose

Use the DROP TRIGGER statement to remove a database trigger from the database.

See Also:
  • CREATE TRIGGER for information on creating triggers
  • ALTER TRIGGER for information on enabling, disabling, and compiling triggers

Prerequisites

The trigger must be in your own schema or you must have the DROP ANY TRIGGER system privilege.

In addition, to drop a trigger on DATABASE in another user's schema, you must have the ADMINISTER DATABASE TRIGGER system privilege.

See Also:

CREATE TRIGGER for information on these privileges

Syntax

drop_trigger::=

Text description of statements_98.gif follows
Text description of drop_trigger

Semantics

schema

Specify the schema containing the trigger. If you omit schema, then Oracle assumes the trigger is in your own schema.

trigger

Specify the name of the trigger to be dropped. Oracle removes it from the database and does not fire it again.

Example

Dropping a Trigger: Example

The following statement drops the order trigger in the schema oe:

DROP TRIGGER hr.salary_check;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 7 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP TYPE

Purpose

Use the DROP TYPE statement to drop the specification and body of an object type, a varray, or nested table type.

See Also:
  • DROP TYPE BODY for information on dropping just the body of an object type
  • CREATE TYPE for information on creating types

Prerequisites

The object type, varray, or nested table type must be in your own schema or you must have the DROP ANY TYPE system privilege.

Syntax

drop_type::=

Text description of statements_99.gif follows
Text description of drop_type

Semantics

schema

Specify the schema containing the type. If you omit schema, then Oracle assumes the type is in your own schema.

type_name

Specify the name of the object, varray, or nested table type to be dropped. You can drop only types with no type or table dependencies.

If type_name is a supertype, then this statement will fail unless you also specify FORCE. If you specify FORCE, then Oracle invalidates all subtypes depending on this supertype.

If type_name is a statistics type, then this statement will fail unless you also specify FORCE. If you specify FORCE, then Oracle first disassociates all objects that are associated with type_name, and then drops type_name.

See Also:

ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics types

If type_name is an object type that has been associated with a statistics type, then Oracle first attempts to disassociate type_name from the statistics type and then drop type_name. However, if statistics have been collected using the statistics type, then Oracle will be unable to disassociate type_name from the statistics type, and this statement will fail.

If type_name is an implementation type for an indextype, then the indextype will be marked INVALID.

If type_name has a public synonym defined on it, then Oracle will also drop the synonym.

Unless you specify FORCE, you can drop only object types, nested tables, or varray types that are standalone schema objects with no dependencies. This is the default behavior.

See Also:

CREATE INDEXTYPE

FORCE

Specify FORCE to drop the type even if it has dependent database objects. Oracle marks UNUSED all columns dependent on the type to be dropped, and those columns become inaccessible.

Caution:

Oracle does not recommend that you specify FORCE to drop types with dependencies. This operation is not recoverable and could cause the data in the dependent tables or columns to become inaccessible. For information about type dependencies, see Oracle9i Application Developer's Guide - Fundamentals.

VALIDATE

If you specify VALIDATE when dropping a type, then Oracle checks for stored instances of this type within substitutable columns of any of its supertypes. If no such instances are found, then Oracle completes the drop operation.

This clause is meaningful only for subtypes. Oracle Corporation recommends the use of this option to safely drop subtypes that do not have any "explicit" type or table dependencies.

Example

Dropping an Object Type: Example

The following statement removes object type person_t (created in "Type Hierarchy Example" ):

DROP TYPE person_t;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 8 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP TYPE BODY

Purpose

Use the DROP TYPE BODY statement to drop the body of an object type, varray, or nested table type. When you drop a type body, the object type specification still exists, and you can re-create the type body. Prior to re-creating the body, you can still use the object type, although you cannot call the member functions.

See Also:
  • DROP TYPE for information on dropping the specification of an object along with the body
  • CREATE TYPE BODY for more information on type bodies

Prerequisites

The object type body must be in your own schema, and you must have

  • The CREATE TYPE or CREATE ANY TYPE system privilege, or
  • The DROP ANY TYPE system privilege

Syntax

drop_type_body::=

Text description of statements_910.gif follows
Text description of drop_type_body

Semantics

schema

Specify the schema containing the object type. If you omit schema, then Oracle assumes the object type is in your own schema.

type_name

Specify the name of the object type body to be dropped.

Restriction on Dropping Type Bodies

You can drop a type body only if it has no type or table dependencies.

Example

Dropping an Object Type Body: Example

The following statement removes object type body data_typ (created in "Updating a Type Body: Example" ):

DROP TYPE BODY data_typ;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 9 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP USER

Purpose

Use the DROP USER statement to remove a database user and optionally remove the user's objects.

See Also:
  • CREATE USER for information on creating a user
  • ALTER USER for information on modifying the definition of a user

Prerequisites

You must have the DROP USER system privilege.

Syntax

drop_user::=

Text description of statements_911.gif follows
Text description of drop_user

Semantics

user

Specify the user to be dropped. Oracle does not drop users whose schemas contain objects unless you specify CASCADE or unless you first explicitly drop the user's objects.

CASCADE

Specify CASCADE to drop all objects in the user's schema before dropping the user. You must specify this clause to drop a user whose schema contains any objects.

  • If the user's schema contains tables, then Oracle drops the tables and automatically drops any referential integrity constraints on tables in other schemas that refer to primary and unique keys on these tables.
  • If this clause results in tables being dropped, then Oracle also drops all domain indexes created on columns of those tables and invokes appropriate drop routines.

    See Also:

    Oracle9i Data Cartridge Developer's Guide for more information on these routines
  • Oracle invalidates, but does not drop, the following objects in other schemas: views or synonyms for objects in the dropped user's schema; and stored procedures, functions, or packages that query objects in the dropped user's schema.
  • Oracle does not drop materialized views in other schemas that are based on tables in the dropped user's schema. However, because the base tables no longer exist, the materialized views in the other schemas can no longer be refreshed.
  • Oracle drops all triggers in the user's schema.
  • Oracle does not drop roles created by the user.

    Caution:

    Oracle also drops with FORCE all types owned by the user. See the FORCE keyword of DROP TYPE .

Examples

Dropping a Database User: Example

If user Sidney's schema contains no objects, then you can drop sidney by issuing the statement:

DROP USER sidney;

If Sidney's schema contains objects, then you must use the CASCADE clause to drop sidney and the objects:

DROP USER sidney CASCADE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 10 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DROP VIEW

Purpose

Use the DROP VIEW statement to remove a view or an object view from the database. You can change the definition of a view by dropping and re-creating it.

See Also:
  • CREATE VIEW for information on creating a view
  • ALTER VIEW for information on modifying a view

Prerequisites

The view must be in your own schema or you must have the DROP ANY VIEW system privilege.

Syntax

drop_view::=

Text description of statements_912.gif follows
Text description of drop_view

Semantics

schema

Specify the schema containing the view. If you omit schema, then Oracle assumes the view is in your own schema.

view

Specify the name of the view to be dropped.

Oracle does not drop views, materialized views, and synonyms that refer to the view but marks them INVALID. You can drop them or redefine views and synonyms, or you can define other views in such a way that the invalid views and synonyms become valid again.

If any subviews have been defined on view, then Oracle invalidates the subviews as well. To learn if the view has any subviews, query the SUPERVIEW_NAME column of the USER_, ALL_, or DBA_VIEWS data dictionary views.

See Also:
  • CREATE TABLE and CREATE SYNONYM
  • ALTER MATERIALIZED VIEW for information on revalidating invalid materialized views

CASCADE CONSTRAINTS

Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the view to be dropped. If you omit this clause, and such constraints exist, then the DROP statement will fail.

Example

Dropping a View: Example

The following statement drops the emp_view view "Creating a View: Example" ):

DROP VIEW emp_view;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 11 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXPLAIN PLAN

Purpose

Use the EXPLAIN PLAN statement to determine the execution plan Oracle follows to execute a specified SQL statement. This statement inserts a row describing each step of the execution plan into a specified table. You can also issue the EXPLAIN PLAN statement as part of the SQL trace facility.

If you are using cost-based optimization, then this statement also determines the cost of executing the statement. If any domain indexes are defined on the table, then user-defined CPU and I/O costs will also be inserted.

The definition of a sample output table PLAN_TABLE is available in a SQL script on your distribution media. Your output table must have the same column names and datatypes as this table. The common name of this script is UTLXPLAN.SQL. The exact name and location depend on your operating system.

Note:

Oracle provides information on cached cursors through several dynamic performance views:

  • For information on the work areas used by SQL cursors, query V$SQL_WORKAREA.
  • For information on the execution plan for a cached cursor, query V$SQL_PLAN.
  • For execution statistics at each step or operation of an execution plan of cached cursors (for example, number of produced rows, number of blocks read), query V$SQL_PLAN_STATISTICS view.
  • For a selective precomputed join of the preceding three views, query V$SQL_PLAN_STATISTICS_ALL.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for information on the output of EXPLAIN PLAN, how to use the SQL trace facility, and how to generate and interpret execution plans
  • Oracle9i Database Reference for information on dynamic performance views

Prerequisites

To issue an EXPLAIN PLAN statement, you must have the privileges necessary to insert rows into an existing output table that you specify to hold the execution plan.

You must also have the privileges necessary to execute the SQL statement for which you are determining the execution plan. If the SQL statement accesses a view, then you must have privileges to access any tables and views on which the view is based. If the view is based on another view that is based on a table, then you must have privileges to access both the other view and its underlying table.

To examine the execution plan produced by an EXPLAIN PLAN statement, you must have the privileges necessary to query the output table.

The EXPLAIN PLAN statement is a data manipulation language (DML) statement, rather than a data definition language (DDL) statement. Therefore, Oracle does not implicitly commit the changes made by an EXPLAIN PLAN statement. If you want to keep the rows generated by an EXPLAIN PLAN statement in the output table, then you must commit the transaction containing the statement.

See Also:

INSERT and SELECT for information on the privileges you need to populate and query the plan table

Syntax

explain_plan::=

Text description of statements_913.gif follows
Text description of explain_plan

Semantics

SET STATEMENT_ID Clause

Specify the value of the STATEMENT_ID column for the rows of the execution plan in the output table. You can then use this value to identify these rows among others in the output table. Be sure to specify a STATEMENT_ID value if your output table contains rows from many execution plans. If you omit this clause, then the STATEMENT_ID value defaults to null.

INTO table Clause

Specify the name of the output table, and optionally its schema and database. This table must exist before you use the EXPLAIN PLAN statement.

If you omit schema, then Oracle assumes the table is in your own schema.

The dblink can be a complete or partial name of a database link to a remote Oracle database where the output table is located. You can specify a remote output table only if you are using Oracle's distributed functionality. If you omit dblink, then Oracle assumes the table is on your local database.

See Also:

"Referring to Objects in Remote Databases" for information on referring to database links

If you omit INTO altogether, then Oracle assumes an output table named PLAN_TABLE in your own schema on your local database.

FOR statement Clause

Specify a SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, CREATE INDEX, or ALTER INDEX ... REBUILD statement for which the execution plan is generated.

Notes on Using EXPLAIN PLAN
  • If statement includes the parallel_clause, then the resulting execution plan will indicate parallel execution. However, EXPLAIN PLAN actually inserts the statement into the plan table, so that the parallel DML statement you submit is no longer the first DML statement in the transaction. This violates the Oracle restriction of one parallel DML statement in a single transaction, and the statement will be executed serially. To maintain parallel execution of the statements, you must commit or roll back the EXPLAIN PLAN statement, and then submit the parallel DML statement.
  • To determine the execution plan for an operation on a temporary table, EXPLAIN PLAN must be run from the same session, because the data in temporary tables is session specific.

Examples

EXPLAIN PLAN Examples

The following statement determines the execution plan and cost for an UPDATE statement and inserts rows describing the execution plan into the specified plan_table table with the STATEMENT_ID value of 'Raise in Tokyo':

EXPLAIN PLAN
    SET STATEMENT_ID = 'Raise in Tokyo'
    INTO plan_table
    FOR UPDATE employees
        SET salary = salary * 1.10
        WHERE department_id =
           (SELECT department_id FROM departments
               WHERE location_id = 1200);

The following SELECT statement queries the plan_table table and returns the execution plan and the cost:

SELECT LPAD(' ',2*(LEVEL-1))||operation operation, options,
object_name, position
    FROM plan_table
    START WITH id = 0 AND statement_id = 'Raise in Tokyo'
    CONNECT BY PRIOR id = parent_id AND
    statement_id = 'Raise in Tokyo';

The query returns this execution plan:

OPERATION            OPTIONS         OBJECT_NAME       POSITION
-------------------- --------------- --------------- ----------
UPDATE STATEMENT                                              2
 UPDATE                              EMPLOYEES                1
  TABLE ACCESS       FULL            EMPLOYEES                1
   VIEW                              index$_join$_00          1
                                     2
    HASH JOIN                                                 1
     INDEX           RANGE SCAN      DEPT_LOCATION_I          1
                                     X
     INDEX           FAST FULL SCAN  DEPT_ID_PK               2

The value in the POSITION column of the first row shows that the statement has a cost of 1.

EXPLAIN PLAN: Partitioned Example

The sample table sh.sales is partitioned on the time_id column. Partition sales_q3_2000 contains time values less than Oct. 1, 2000, and there is a local index sales_time_bix on the time_id column.

Consider the query:

EXPLAIN PLAN FOR
   SELECT * FROM sales
      WHERE time_id BETWEEN :h AND '01-OCT-2000';

where :h represents an already declared bind variable. EXPLAIN PLAN executes this query with PLAN_TABLE as the output table. The basic execution plan, including partitioning information, is obtained with the following query:

SELECT operation, options, partition_start, partition_stop,
   partition_id FROM plan_table;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 12 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GRANT

Purpose

Use the GRANT statement to grant:

  • System privileges to users and roles
  • Roles to users and roles. Both privileges and roles are either local, global, or external. Table 17-1 lists the system privileges (organized by the database object operated upon). Table 17-2 lists Oracle predefined roles.
  • Object privileges for a particular object to users, roles, and PUBLIC. Table 17-3 summarizes the object privileges that you can grant on each type of object. Table 17-4 lists object privileges and the operations that they authorize.

    Note:

    You can authorize database users to use roles through means other than the database and the GRANT statement. For example, some operating systems have facilities that let you grant roles to Oracle users with the initialization parameter OS_ROLES. If you choose to grant roles to users through operating system facilities, then you cannot also grant roles to users with the GRANT statement, although you can use the GRANT statement to grant system privileges to users and system privileges and roles to other roles.
    See Also:
    • CREATE USER and CREATE ROLE for definitions of local, global, and external privileges
    • Oracle9i Database Administrator's Guide for information about other authorization methods
    • REVOKE for information on revoking grants

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Listings of System and Object Privileges
  • Examples

Prerequisites

To grant a system privilege, you must either have been granted the system privilege with the ADMIN OPTION or have been granted the GRANT ANY PRIVILEGE system privilege.

To grant a role, you must either have been granted the role with the ADMIN OPTION or have been granted the GRANT ANY ROLE system privilege, or you must have created the role.

To grant an object privilege, you must own the object, or the owner of the object must have granted you the object privileges with the GRANT OPTION, or you must have been granted the GRANT ANY OBJECT PRIVILEGE system privilege.

Syntax

grant::=

Text description of statements_940a.gif follows
Text description of grant

(grant_system_privileges::= , grant_object_privileges::= )

grant_system_privileges::=

Text description of statements_917.gif follows
Text description of grant_system_privileges

(grantee_clause::= )

grant_object_privileges::=

Text description of statements_918.gif follows
Text description of grant_object_privileges

(on_object_clause::= , grantee_clause::= )

on_object_clause::=

Text description of statements_919.gif follows
Text description of on_object_clause

grantee_clause::=

Text description of statements_920.gif follows
Text description of grantee_clause

Semantics

grant_system_privileges

system_privilege

Specify the system privilege you want to grant. Table 17-1 lists the system privileges (organized by the database object operated upon).

  • If you grant a privilege to a user, then Oracle adds the privilege to the user's privilege domain. The user can immediately exercise the privilege.

    See Also:

    Granting a System Privilege to a User: Example

  • If you grant a privilege to a role, then Oracle adds the privilege to the role's privilege domain. Users who have been granted and have enabled the role can immediately exercise the privilege. Other users who have been granted the role can enable the role and exercise the privilege.

    See Also:

    "Granting System Privileges to a Role: Example"

  • If you grant a privilege to PUBLIC, then Oracle adds the privilege to the privilege domains of each user. All users can immediately perform operations authorized by the privilege.

Oracle provides a shortcut for specifying all system privileges at once:

  • ALL PRIVILEGES: Specify ALL PRIVILEGES to grant all the system privileges listed in Table 17-1, " System Privileges" , except the SELECT ANY DICTIONARY privilege.
role

Specify the role you want to grant. You can grant an Oracle predefined role or a user-defined role. Table 17-2 lists the predefined roles.

  • If you grant a role to a user, then Oracle makes the role available to the user. The user can immediately enable the role and exercise the privileges in the role's privilege domain.
  • If you grant a role to another role, then Oracle adds the granted role's privilege domain to the grantee role's privilege domain. Users who have been granted the grantee role can enable it and exercise the privileges in the granted role's privilege domain.

    See Also:

    "Granting a Role to a Role: Example"

  • If you grant a role to PUBLIC, then Oracle makes the role available to all users. All users can immediately enable the role and exercise the privileges in the roles privilege domain.

    See Also:

    CREATE ROLE for information on creating a user-defined role
IDENTIFIED BY Clause

Use the IDENTIFIED BY clause to specifically identify an existing user by password or to create a nonexistent user. This clause is not valid if the grantee is a role or PUBLIC. If the user specified in the grantee_clause does not exist, then Oracle creates the user with the password and with the privileges and roles specified in this clause.

See Also:

CREATE USER for restrictions on usernames and passwords
WITH ADMIN OPTION

Specify WITH ADMIN OPTION to enable the grantee to:

  • Grant the role to another user or role, unless the role is a GLOBAL role
  • Revoke the role from another user or role
  • Alter the role to change the authorization needed to access it
  • Drop the role

If you grant a system privilege or role to a user without specifying WITH ADMIN OPTION, and then subsequently grant the privilege or role to the user WITH ADMIN OPTION, then the user has the ADMIN OPTION on the privilege or role.

To revoke the ADMIN OPTION on a system privilege or role from a user, you must revoke the privilege or role from the user altogether and then grant the privilege or role to the user without the ADMIN OPTION.

See Also:

"Granting a Role with the Admin Option: Example"

grantee_clause

TO grantee_clause identifies users or roles to which the system privilege, role, or object privilege is granted.

Restriction on Grantees

A user, role, or PUBLIC cannot appear more than once in TO grantee_clause.

PUBLIC

Specify PUBLIC to grant the privileges to all users.

Restrictions on Granting System Privileges and Roles
  • A privilege or role cannot appear more than once in the list of privileges and roles to be granted.
  • You cannot grant a role to itself.
  • You cannot grant a role IDENTIFIED GLOBALLY to anything.
  • You cannot grant a role IDENTIFIED EXTERNALLY to a global user or global role.
  • You cannot grant roles circularly. For example, if you grant the role banker to the role teller, then you cannot subsequently grant teller to banker.

grant_object_privileges

object_privilege

Specify the object privilege you want to grant. You can specify any of the values shown in Table 17-3. See also Table 17-4.

Restriction on Object Privileges

A privilege cannot appear more than once in the list of privileges to be granted.

ALL [PRIVILEGES]

Specify ALL to grant all the privileges for the object that you have been granted with the GRANT OPTION. The user who owns the schema containing an object automatically has all privileges on the object with the GRANT OPTION. (The keyword PRIVILEGES is provided for semantic clarity and is optional.)

column

Specify the table or view column on which privileges are to be granted. You can specify columns only when granting the INSERT, REFERENCES, or UPDATE privilege. If you do not list columns, then the grantee has the specified privilege on all columns in the table or view.

For information on existing column object grants, query the USER_,ALL_, and DBA_COL_PRIVS data dictionary view.

See Also:

Oracle9i Database Reference for information on the data dictionary views and "Granting Multiple Object Privileges on Individual Columns: Example"

on_object_clause

The on_object_clause identifies the object on which the privileges are granted. Directory schema objects and Java source and resource schema objects are identified separately because they reside in separate namespaces.

If you can make this grant only because you have the GRANT ANY OBJECT PRIVILEGE system privilege--that is, you are not the owner of object, nor do you have object_privilege on object WITH GRANT OPTION--then the effect of this grant is that you are acting on behalf of the object owner. The *_TAB_PRIVS data dictionary views will reflect that this grant was made by the owner of object.

See Also:
  • "Granting Object Privileges to a Role" Example"
  • "Revoke Operations that Use GRANT ANY OBJECT PRIVILEGE: Example" for more information on using the GRANT ANY OBJECT PRIVILEGE system privilege for revoke operations
WITH GRANT OPTION

Specify WITH GRANT OPTION to enable the grantee to grant the object privileges to other users and roles.

Restriction on Granting WITH GRANT OPTION

You can specify WITH GRANT OPTION only when granting to a user or to PUBLIC, not when granting to a role.

WITH HIERARCHY OPTION

Specify WITH HIERARCHY OPTION to grant the specified object privilege on all subobjects of object, including subobjects created subsequent to this statement (such as subviews created under a view).

Note:

This clause is meaningful only in combination with the SELECT object privilege.
object

Specify the schema object on which the privileges are to be granted. If you do not qualify object with schema, then Oracle assumes the object is in your own schema. The object can be one of the following types:

  • Table, view, or materialized view
  • Sequence
  • Procedure, function, or package
  • User-defined type
  • Synonym for any of the preceding items
  • Directory, library, operator, or indextype
  • Java source, class, or resource

    Note:

    You cannot grant privileges directly to a single partition of a partitioned table.
    See Also:

    "Granting Object Privileges on a Table to a User: Example" , "Granting Object Privileges on a View: Example" , and "Granting Object Privileges to a Sequence in Another Schema: Example"

DIRECTORY directory_name

Specify a directory schema object on which privileges are to be granted. You cannot qualify directory_name with a schema name.

See Also:

CREATE DIRECTORY and "Granting an Object Privilege on a Directory: Example"

JAVA SOURCE | RESOURCE

The JAVA clause lets you specify a Java source or resource schema object on which privileges are to be granted.

See Also:

CREATE JAVA

Listings of System and Object Privileges

Table 17-1 System Privileges
System Privilege Name Operations Authorized

Note: When you grant a privilege on "ANY" object (for example, CREATE ANY CLUSTER), you give the user access to that type of object in all schemas, including the SYS schema. If you want to prohibit access to objects in the SYS schema, set the initialization parameter O7_DICTIONARY_ACCESSIBILITY to FALSE. Then privileges granted on "ANY" object will allow access to any schema except SYS.

CLUSTERS:

CREATE CLUSTER

Create clusters in grantee's schema

CREATE ANY CLUSTER

Create a cluster in any schema. Behaves similarly to CREATE ANY TABLE.

ALTER ANY CLUSTER

Alter clusters in any schema

DROP ANY CLUSTER

Drop clusters in any schema

CONTEXTS:

CREATE ANY CONTEXT

Create any context namespace

DROP ANY CONTEXT

Drop any context namespace

DATABASE:

ALTER DATABASE

Alter the database

ALTER SYSTEM

Issue ALTER SYSTEM statements

AUDIT SYSTEM

Issue AUDIT sql_statements statements

DATABASE LINKS:

CREATE DATABASE LINK

Create private database links in grantee's schema

CREATE PUBLIC DATABASE LINK

Create public database links

DROP PUBLIC DATABASE LINK

Drop public database links

DEBUGGING:

DEBUG CONNECT SESSION

Connect the current session to a debugger that uses the Java Debug Wire Protocol (JDWP).

DEBUG ANY PROCEDURE

Debug all PL/SQL and Java code in any database object; display information on all SQL statements executed by the application

Note: Granting this privilege is equivalent to granting the DEBUG object privilege on all applicable objects in the database.

DIMENSIONS:

CREATE DIMENSION

Create dimensions in the grantee's schema

CREATE ANY DIMENSION

Create dimensions in any schema

ALTER ANY DIMENSION

Alter dimensions in any schema

DROP ANY DIMENSION

Drop dimensions in any schema

DIRECTORIES

CREATE ANY DIRECTORY

Create directory database objects

DROP ANY DIRECTORY

Drop directory database objects

INDEXTYPES:

CREATE INDEXTYPE

Create an indextype in the grantee's schema

CREATE ANY INDEXTYPE

Create an indextype in any schema

ALTER ANY INDEXTYPE

Modify indextypes in any schema

DROP ANY INDEXTYPE

Drop an indextype in any schema

EXECUTE ANY INDEXTYPE

Reference an indextype in any schema

INDEXES:

CREATE ANY INDEX

Create in any schema a domain index or an index on any table in any schema

ALTER ANY INDEX

Alter indexes in any schema

DROP ANY INDEX

Drop indexes in any schema

QUERY REWRITE

Enable rewrite using a materialized view, or create a function-based index, when that materialized view or index references tables and views that are in the grantee's own schema

GLOBAL QUERY REWRITE

Enable rewrite using a materialized view, or create a function-based index, when that materialized view or index references tables or views in any schema

LIBRARIES:

CREATE LIBRARY

Create external procedure/function libraries in grantee's schema

CREATE ANY LIBRARY

Create external procedure/function libraries in any schema

DROP ANY LIBRARY

Drop external procedure/function libraries in any schema

MATERIALIZED VIEWS:

CREATE MATERIALIZED VIEW

Create a materialized view in the grantee's schema

CREATE ANY MATERIALIZED VIEW

Create materialized views in any schema

ALTER ANY MATERIALIZED VIEW

Alter materialized views in any schema

DROP ANY MATERIALIZED VIEW

Drop materialized views in any schema

QUERY REWRITE

Enable rewrite using a materialized view, or create a function-based index, when that materialized view or index references tables and views that are in the grantee's own schema

GLOBAL QUERY REWRITE

Enable rewrite using a materialized view, or create a function-based index, when that materialized view or index references tables or views in any schema

ON COMMIT REFRESH

Create a refresh-on-commit materialized view on any table in the database

Alter a refresh-on-demand materialized on any table in the database to refresh-on-commit

FLASHBACK ANY TABLE

Issue a SQL flashback query on any table, view, or materialized view in any schema. (This privilege is not needed to execute the DBMS_FLASHBACK procedures.)

OPERATORS:

CREATE OPERATOR

Create an operator and its bindings in the grantee's schema

CREATE ANY OPERATOR

Create an operator and its bindings in any schema

DROP ANY OPERATOR

Drop an operator in any schema

EXECUTE ANY OPERATOR

Reference an operator in any schema

OUTLINES:

CREATE ANY OUTLINE

Create public outlines that can be used in any schema that uses outlines

ALTER ANY OUTLINE

Modify outlines

DROP ANY OUTLINE

Drop outlines

PROCEDURES:

CREATE PROCEDURE

Create stored procedures, functions, and packages in grantee's schema

CREATE ANY PROCEDURE

Create stored procedures, functions, and packages in any schema

ALTER ANY PROCEDURE

Alter stored procedures, functions, or packages in any schema

DROP ANY PROCEDURE

Drop stored procedures, functions, or packages in any schema

EXECUTE ANY PROCEDURE

Execute procedures or functions (standalone or packaged)

Reference public package variables in any schema

PROFILES:

CREATE PROFILE

Create profiles

ALTER PROFILE

Alter profiles

DROP PROFILE

Drop profiles

ROLES:

CREATE ROLE

Create roles

ALTER ANY ROLE

Alter any role in the database

DROP ANY ROLE

Drop roles

GRANT ANY ROLE

Grant any role in the database

ROLLBACK SEGMENTS:

CREATE ROLLBACK SEGMENT

Create rollback segments

ALTER ROLLBACK SEGMENT

Alter rollback segments

DROP ROLLBACK SEGMENT

Drop rollback segments

SEQUENCES:

CREATE SEQUENCE

Create sequences in grantee's schema

CREATE ANY SEQUENCE

Create sequences in any schema

ALTER ANY SEQUENCE

Alter any sequence in the database

DROP ANY SEQUENCE

Drop sequences in any schema

SELECT ANY SEQUENCE

Reference sequences in any schema

SESSIONS:

CREATE SESSION

Connect to the database

ALTER RESOURCE COST

Set costs for session resources

ALTER SESSION

Issue ALTER SESSION statements

RESTRICTED SESSION

Logon after the instance is started using the SQL*Plus STARTUP RESTRICT statement

SNAPSHOTS: See MATERIALIZED VIEWS

SYNONYMS:

CREATE SYNONYM

Create synonyms in grantee's schema

CREATE ANY SYNONYM

Create private synonyms in any schema

CREATE PUBLIC SYNONYM

Create public synonyms

DROP ANY SYNONYM

Drop private synonyms in any schema

DROP PUBLIC SYNONYM

Drop public synonyms

TABLES:

Note: For external tables, the only valid privileges are CREATE ANY TABLE, ALTER ANY TABLE, DROP ANY TABLE, and SELECT ANY TABLE.

CREATE TABLE

Create tables in grantee's schema

CREATE ANY TABLE

Create tables in any schema. The owner of the schema containing the table must have space quota on the tablespace to contain the table.

ALTER ANY TABLE

Alter any table or view in any schema

BACKUP ANY TABLE

Use the Export utility to incrementally export objects from the schema of other users

DELETE ANY TABLE

Delete rows from tables, table partitions, or views in any schema

DROP ANY TABLE

Drop or truncate tables or table partitions in any schema

INSERT ANY TABLE

Insert rows into tables and views in any schema

LOCK ANY TABLE

Lock tables and views in any schema

SELECT ANY TABLE

Query tables, views, or materialized views in any schema

FLASHBACK ANY TABLE

Issue a SQL flashback query on any table, view, or materialized view in any schema. (This privilege is not needed to execute the DBMS_FLASHBACK procedures.)

UPDATE ANY TABLE

Update rows in tables and views in any schema

TABLESPACES:

CREATE TABLESPACE

Create tablespaces

ALTER TABLESPACE

Alter tablespaces

DROP TABLESPACE

Drop tablespaces

MANAGE TABLESPACE

Take tablespaces offline and online and begin and end tablespace backups

UNLIMITED TABLESPACE

Use an unlimited amount of any tablespace. This privilege overrides any specific quotas assigned. If you revoke this privilege from a user, then the user's schema objects remain but further tablespace allocation is denied unless authorized by specific tablespace quotas. You cannot grant this system privilege to roles.

TRIGGERS:

CREATE TRIGGER

Create a database trigger in grantee's schema

CREATE ANY TRIGGER

Create database triggers in any schema

ALTER ANY TRIGGER

Enable, disable, or compile database triggers in any schema

DROP ANY TRIGGER

Drop database triggers in any schema

ADMINISTER DATABASE TRIGGER

Create a trigger on DATABASE. (You must also have the CREATE TRIGGER or CREATE ANY TRIGGER privilege.)

TYPES:

CREATE TYPE

Create object types and object type bodies in grantee's schema

CREATE ANY TYPE

Create object types and object type bodies in any schema

ALTER ANY TYPE

Alter object types in any schema

DROP ANY TYPE

Drop object types and object type bodies in any schema

EXECUTE ANY TYPE

Use and reference object types and collection types in any schema, and invoke methods of an object type in any schema if you make the grant to a specific user. If you grant EXECUTE ANY TYPE to a role, then users holding the enabled role will not be able to invoke methods of an object type in any schema.

UNDER ANY TYPE

Create subtypes under any nonfinal object types.

USERS:

CREATE USER

Create users. This privilege also allows the creator to:

  • Assign quotas on any tablespace
  • Set default and temporary tablespaces
  • Assign a profile as part of a CREATE USER statement

ALTER USER

Alter any user. This privilege authorizes the grantee to:

  • Change another user's password or authentication method
  • Assign quotas on any tablespace
  • Set default and temporary tablespaces
  • Assign a profile and default roles

BECOME USER

Become another user. (Required by any user performing a full database import.)

DROP USER

Drop users

VIEWS:

CREATE VIEW

Create views in grantee's schema

CREATE ANY VIEW

Create views in any schema

DROP ANY VIEW

Drop views in any schema

UNDER ANY VIEW

Create subviews under any object views

FLASHBACK ANY TABLE

Issue a SQL flashback query on any table, view, or materialized view in any schema. (This privilege is not needed to execute the DBMS_FLASHBACK procedures.)

MISCELLANEOUS:

ANALYZE ANY

Analyze any table, cluster, or index in any schema

AUDIT ANY

Audit any object in any schema using AUDIT schema_objects statements

COMMENT ANY TABLE

Comment on any table, view, or column in any schema

EXEMPT ACCESS POLICY

Bypass fine-grained access control

Caution: This is a very powerful system privilege, as it lets the grantee bypass application-driven security policies. Database administrators should use caution when granting this privilege.

FORCE ANY TRANSACTION

Force the commit or rollback of any in-doubt distributed transaction in the local database

Induce the failure of a distributed transaction

FORCE TRANSACTION

Force the commit or rollback of grantee's in-doubt distributed transactions in the local database

GRANT ANY OBJECT PRIVILEGE

Grant any object privilege

Revoke any object privilege that was granted by the object owner or by some other user with the GRANT ANY OBJECT PRIVILEGE privilege

GRANT ANY PRIVILEGE

Grant any system privilege

RESUMABLE

Enable resumable space allocation

SELECT ANY DICTIONARY

Query any data dictionary object in the SYS schema. This privilege lets you selectively override the default FALSE setting of the O7_DICTIONARY_ACCESSIBILITY initialization parameter.

SYSDBA

Perform STARTUP and SHUTDOWN operations

ALTER DATABASE: open, mount, back up, or change character set

CREATE DATABASE

ARCHIVELOG and RECOVERY

CREATE SPFILE

Includes the RESTRICTED SESSION privilege

SYSOPER

Perform STARTUP and SHUTDOWN operations

ALTER DATABASE OPEN | MOUNT | BACKUP

ARCHIVELOG and RECOVERY

CREATE SPFILE

Includes the RESTRICTED SESSION privilege

Note: When you grant a privilege on "ANY" object (for example, CREATE ANY CLUSTER), you give the user access to that type of object in all schemas, including the SYS schema. If you want to prohibit access to objects in the SYS schema, set the initialization parameter O7_DICTIONARY_ACCESSIBILITY to FALSE. Then privileges granted on "ANY" object will allow access to any schema except SYS.
Table 17-2 Oracle Predefined Roles
Predefined Role Purpose

CONNECT, RESOURCE, and DBA

These roles are provided for compatibility with previous versions of Oracle. You can determine the privileges encompassed by these roles by querying the DBA_SYS_PRIVS data dictionary view.

Note: Oracle Corporation recommends that you design your own roles for database security rather than relying on these roles. These roles may not be created automatically by future versions of Oracle.

See Also: Oracle9i Database Reference for a description of this view

DELETE_CATALOG_ROLE EXECUTE_CATALOG_ROLE SELECT_CATALOG_ROLE

These roles are provided for accessing data dictionary views and packages.

See Also: Oracle9i Database Administrator's Guide for more information on these roles

EXP_FULL_DATABASE IMP_FULL_DATABASE

These roles are provided for convenience in using the Import and Export utilities.

See Also: Oracle9i Database Utilities for more information on these roles

AQ_USER_ROLE

AQ_ADMINISTRATOR_ROLE

You need these roles to use Oracle's Advanced Queuing functionality.

See Also: Oracle9i Application Developer's Guide - Advanced Queuing for more information on these roles

SNMPAGENT

This role is used by Enterprise Manager/Intelligent Agent.

See Also: Oracle Enterprise Manager Administrator's Guide

RECOVERY_CATALOG_OWNER

You need this role to create a user who owns a recovery catalog.

See Also: Oracle9i User-Managed Backup and Recovery Guide for more information on recovery catalogs

HS_ADMIN_ROLE

A DBA using Oracle's heterogeneous services feature needs this role to access appropriate tables in the data dictionary.

See Also: Oracle9i Heterogeneous Connectivity Administrator's Guide and Oracle9i Supplied PL/SQL Packages and Types Reference for more information
Table 17-3 Object Privileges Available for Particular Objects
Object Privilege | Table | View | Sequence | Procedures, Functions, Packagesa | Materialized View | Directory | Library | User- defined Type | Operator | Indextype
ALTER | X | -- | X | -- | -- | -- | -- | -- | -- | --
DELETE | X | X | -- | -- | Xb | -- | -- | -- | -- | --
EXECUTE | -- | -- | -- | X | -- | -- | X | X | X | X
DEBUG | X | X | -- | X | -- | -- | -- | X | -- | --
FLASHBACK | X | X | -- | -- | X | -- | -- | -- | -- | --
INDEX | X | -- | -- | -- | -- | -- | -- | -- | -- | --
INSERT | X | X | -- | -- | Xb | -- | -- | -- | -- | --
ON COMMIT REFRESH | X | -- | -- | -- | -- | -- | -- | -- | -- | --
QUERY REWRITE | X | -- | -- | -- | -- | -- | -- | -- | -- | --
READ | -- | -- | -- | -- | -- | X | -- | -- | -- | --
REFERENCES | X | X | -- | -- | -- | -- | -- | -- | -- | --
SELECT | X | X | X | -- | X | -- | -- | -- | -- | --
UNDER | -- | X | -- | -- | -- | -- | -- | X | -- | --
UPDATE | X | X | -- | -- | Xb | -- | -- | -- | -- | --
WRITE | -- | -- | -- | -- | -- | X | -- | -- | -- | --
aOracle treats a Java class, source, or resource as if it were a procedure for purposes of granting object privileges. bThe DELETE, INSERT, and UPDATE privileges can be granted only to updatable materialized views.
Table 17-4 Object Privileges and the Operations They Authorize
Object Privilege Operations Authorized

The following table privileges authorize operations on a table. Any one of following object privileges allows the grantee to lock the table in any lock mode with the LOCK TABLE statement.

Note: For external tables, the only valid object privileges are ALTER and SELECT.

ALTER

Change the table definition with the ALTER TABLE statement.

DELETE

Remove rows from the table with the DELETE statement.

Note: You must grant the SELECT privilege on the table along with the DELETE privilege if the table is on a remote database.

DEBUG

Access, through a debugger:

  • PL/SQL code in the body of any triggers defined on the table
  • Information on SQL statements that reference the table directly

INDEX

Create an index on the table with the CREATE INDEX statement.

INSERT

Add new rows to the table with the INSERT statement.

REFERENCES

Create a constraint that refers to the table. You cannot grant this privilege to a role.

SELECT

Query the table with the SELECT statement.

UPDATE

Change data in the table with the UPDATE statement.

Note: You must grant the SELECT privilege on the table along with the UPDATE privilege if the table is on a remote database.

The following view privileges authorize operations on a view. Any one of the following object privileges allows the grantee to lock the view in any lock mode with the LOCK TABLE statement.

To grant a privilege on a view, you must have that privilege with the GRANT OPTION on all of the view's base tables.

DEBUG

Access, through a debugger:

  • PL/SQL code in the body of any triggers defined on the view
  • Information on SQL statements that reference the view directly

DELETE

Remove rows from the view with the DELETE statement.

INSERT

Add new rows to the view with the INSERT statement.

REFERENCES

Define foreign key constraints on the view.

SELECT

Query the view with the SELECT statement.

UNDER

Create a subview under this view. You can grant this object privilege only if you have the UNDER ANY VIEW privilege WITH GRANT OPTION on the immediate superview of this view.

UPDATE

Change data in the view with the UPDATE statement.

The following sequence privileges authorize operations on a sequence.

ALTER

Change the sequence definition with the ALTER SEQUENCE statement.

SELECT

Examine and increment values of the sequence with the CURRVAL and NEXTVAL pseudocolumns.

The following procedure, function, and package privilege authorizes operations on procedures, functions, and packages. This privilege also applies to Java sources, classes, and resources, which Oracle treats as though they were procedures for purposes of granting object privileges.

DEBUG

Access, through a debugger, all public and nonpublic variables, methods, and types defined on the procedure, function, or package.

Place a breakpoint or stop at a line or instruction boundary within the procedure, function, or package. This privilege grants access to the declarations in the method or package specification and body.

EXECUTE

Compile the procedure or function or execute it directly, or access any program object declared in the specification of a package.

Access, through a debugger, public variables, types, and methods defined on the procedure, function, or package. This privilege grants access to the declarations in the method or package specification only.

Note: Users do not need this privilege to execute a procedure, function, or package indirectly.

See Also: Oracle9i Database Concepts and Oracle9i Application Developer's Guide - Fundamentals

The following materialized view privileges authorize operations on a materialized view.

ON COMMIT REFRESH

Create a refresh-on-commit materialized on the specified table.

QUERY REWRITE

Create a materialized view for query rewrite using the specified table.

SELECT

Query the materialized view with the SELECT statement.

Synonym privileges are the same as the privileges for the base object. Granting a privilege on a synonym is equivalent to granting the privilege on the base object. Similarly, granting a privilege on a base object is equivalent to granting the privilege on all synonyms for the object. If you grant to a user a privilege on a synonym, then the user can use either the synonym name or the base object name in the SQL statement that exercises the privilege.

The following directory privileges provide secured access to the files stored in the operating system directory to which the directory object serves as a pointer. The directory object contains the full path name of the operating system directory where the files reside. Because the files are actually stored outside the database, Oracle server processes also need to have appropriate file permissions on the file system server. Granting object privileges on the directory database object to individual database users, rather than on the operating system, allows Oracle to enforce security during file operations.

READ

Read files in the directory.

WRITE

Write files in the directory. This privilege is useful only in connection with external tables. It allows the grantee to determine whether the external table agent can write a log file, or a bad file to the directory.

Restriction: This privilege does not allow the grantee to write to a BFILE.

The following library privileges authorize operations on a library

EXECUTE

Use and reference the specified object and to invoke its methods.

The following object type privilege authorizes operations on a database object type

DEBUG

Access, through a debugger, all public and nonpublic variables, methods, and types defined on the object type.

Place a breakpoint or stop at a line or instruction boundary within the type body.

EXECUTE

Use and reference the specified object and to invoke its methods.

Access, through a debugger, public variables, types, and methods defined on the object type.

UNDER

Create a subtype under this type. You can grant this object privilege only if you have the UNDER ANY TYPE privilege WITH GRANT OPTION on the immediate supertype of this type.

The following indextype privilege authorizes operations on indextypes.

EXECUTE

Reference an indextype.

The following operator privilege authorizes operations on user-defined operators.

EXECUTE

Reference an operator.

Examples

Granting a System Privilege to a User: Example

To grant the CREATE SESSION system privilege to the sample user hr, allowing hr to log on to Oracle, issue the following statement:

GRANT CREATE SESSION
   TO hr;
Granting System Privileges to a Role: Example

To grant appropriate system privileges to a data warehouse manager role (which was created in the "Creating a Role: Example" ) :

GRANT
     CREATE ANY MATERIALIZED VIEW
   , ALTER ANY MATERIALIZED VIEW
   , DROP ANY MATERIALIZED VIEW
   , QUERY REWRITE
   , GLOBAL QUERY REWRITE
   TO dw_manager
   WITH ADMIN OPTION;

dw_manager's privilege domain now contains the system privileges related to materialized views.

Granting a Role with the Admin Option: Example

To grant the dw_manager role with the ADMIN OPTION to the sample user sh, issue the following statement:

GRANT dw_manager
   TO sh
   WITH ADMIN OPTION;

User sh can now perform the following operations with the dw_manager role:

  • Enable the role and exercise any privileges in the role's privilege domain, including the CREATE MATERIALIZED VIEW system privilege
  • Grant and revoke the role to and from other users
  • Drop the role
Granting Object Privileges to a Role" Example

To grant the SELECT object privileges to a data warehouse user role (which was created in the "Creating a Role: Example" ) :

GRANT SELECT ON sh.sales TO warehouse_user;
Granting a Role to a Role: Example

The following statement grants the warehouse_user role to the dw_manager role (both roles were created in the "Creating a Role: Example" ):

GRANT warehouse_user TO dw_manager;

The dw_manager role now contains all of the privileges in the domain of the warehouse_user role.

Granting an Object Privilege on a Directory: Example

To grant READ on directory bfile_dir to user hr, with the GRANT OPTION, issue the following statement:

GRANT READ ON DIRECTORY bfile_dir TO hr
   WITH GRANT OPTION;
Granting Object Privileges on a Table to a User: Example

To grant all privileges on the table oe.bonuses (created in "Merging into a Table: Example" ) to the user hr with the GRANT OPTION, issue the following statement:

GRANT ALL ON bonuses TO hr
   WITH GRANT OPTION;

hr can subsequently perform the following operations:

  • Exercise any privilege on the bonuses table
  • Grant any privilege on the bonuses table to another user or role
Granting Object Privileges on a View: Example

To grant SELECT and UPDATE privileges on the view emp_view (created in "Creating a View: Example" ) to all users, issue the following statement:

GRANT SELECT, UPDATE
   ON emp_view TO PUBLIC;

All users can subsequently query and update the view of employee details.

Granting Object Privileges to a Sequence in Another Schema: Example

To grant SELECT privilege on the customers_seq sequence in the schema oe to the user hr, issue the following statement:

GRANT SELECT
   ON oe.customers_seq TO hr;

hr can subsequently generate the next value of the sequence with the following statement:

SELECT oe.customers_seq.NEXTVAL
   FROM DUAL;
Granting Multiple Object Privileges on Individual Columns: Example

To grant to user oe the REFERENCES privilege on the employee_id column and the UPDATE privilege on the employee_id, salary, and commission_pct columns of the employees table in the schema hr, issue the following statement:

GRANT REFERENCES (employee_id),
      UPDATE (employee_id, salary, commission_pct)
   ON hr.employees
   TO oe;

oe can subsequently update values of the employee_id, salary, and commission_pct columns. oe can also define referential integrity constraints that refer to the employee_id column. However, because the GRANT statement lists only these columns, oe cannot perform operations on any of the other columns of the employees table.

For example, oe can create a table with a constraint:

CREATE TABLE dependent
   (dependno   NUMBER,
    dependname VARCHAR2(10),
    employee   NUMBER
   CONSTRAINT in_emp REFERENCES hr.employees(employee_id) );

The constraint in_emp ensures that all dependents in the dependent table correspond to an employee in the employees table in the schema hr.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 13 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INSERT

Purpose

Use the INSERT statement to add rows to a table, a view's base table, a partition of a partitioned table or a subpartition of a composite-partitioned table, or an object table or an object view's base table.

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

For you to insert rows into a table, the table must be in your own schema or you must have INSERT privilege on the table.

For you to insert rows into the base table of a view, the owner of the schema containing the view must have INSERT privilege on the base table. Also, if the view is in a schema other than your own, then you must have INSERT privilege on the view.

If you have the INSERT ANY TABLE system privilege, then you can also insert rows into any table or any view's base table.

Conventional and Direct-Path INSERT

You can use the INSERT statement to insert data into a table, partition, or view in two ways: conventional INSERT and direct-path INSERT. When you issue a conventional INSERT statement, Oracle reuses free space in the table into which you are inserting and maintains referential integrity constraints. With direct-path INSERT, Oracle appends the inserted data after existing data in the table. Data is written directly into datafiles, bypassing the buffer cache. Free space in the existing data is not reused. This alternative enhances performance during insert operations and is similar to the functionality of Oracle's direct-path loader utility, SQL*Loader.

Direct-path INSERT is subject to a number of restrictions. If any of these restrictions is violated, then Oracle executes conventional INSERT serially without returning any message (unless otherwise noted):

  • You can have multiple direct-path INSERT statements in a single transaction, with or without other DML statements. However, after one DML statement alters a particular table, partition, or index, no other DML statement in the transaction can access that table, partition, or index.
  • Queries that access the same table, partition, or index are allowed before the direct-path INSERT statement, but not after it.
  • If any serial or parallel statement attempts to access a table that has already been modified by a direct-path INSERT in the same transaction, then Oracle returns an error and rejects the statement.
  • The ROW_LOCKING initialization parameter cannot be set to INTENT.
  • The target table cannot be index organized or clustered.
  • The target table cannot contain object type or LOB columns.
  • The target table cannot have any triggers or referential integrity constraints defined on it.
  • The target table cannot be replicated.
  • A transaction containing a direct-path INSERT statement cannot be or become distributed.

    See Also:
    • Oracle9i Database Concepts for a more complete description of direct-path INSERT
    • Oracle9i Database Utilities for information on SQL*Loader
    • Oracle9i Database Performance Tuning Guide and Reference for information on how to tune parallel direct-path INSERT

Syntax

insert::=

Text description of statements_921.gif follows
Text description of insert

(single_table_insert::= , multi_table_insert::= )

single_table_insert::=

Text description of statements_927.gif follows
Text description of single_table_insert

(insert_into_clause::= , values_clause::= , returning_clause::= , subquery::= )

insert_into_clause::=

Text description of statements_922.gif follows
Text description of insert_into_clause

(DML_table_expression_clause::= )

values_clause::=

Text description of statements_941a.gif follows
Text description of values_clause

returning_clause::=

Text description of statements_926.gif follows
Text description of returning_clause

multi_table_insert::=

Text description of statements_923.gif follows
Text description of multi_table_insert

(insert_into_clause::= , values_clause::= , conditional_insert_clause::= , subquery::= )

conditional_insert_clause::=

Text description of statements_925.gif follows
Text description of conditional_insert_clause

(insert_into_clause::= , values_clause::= )

DML_table_expression_clause::=

Text description of statements_928.gif follows
Text description of DML_table_expression_clause

(subquery::= --part of SELECT syntax, subquery_restriction_clause::= , table_collection_expression::= )

subquery_restriction_clause::=

Text description of statements_929.gif follows
Text description of subquery_restriction_clause

table_collection_expression::=

Text description of statements_930.gif follows
Text description of table_collection_expression

Semantics

hint

Specify a comment that passes instructions to the optimizer on choosing an execution plan for the statement.

For a multitable insert, if you specify the PARALLEL hint for any target table, then the entire multitable insert statement is parallelized even if the target tables have not been created or altered with PARALLEL specified. If you do not specify the PARALLEL hint, then the insert operation will not be parallelized unless all target tables were created or altered with PARALLEL specified.

See Also:
  • "Hints" and Oracle9i Database Performance Tuning Guide and Reference for the syntax and description of hints
  • "Restrictions on Multitable Inserts"

single_table_insert

In a single-table insert, you insert values into one row of a table, view, or materialized view by specifying values explicitly or by retrieving the values through a subquery.

You can use the flashback_clause in subquery to insert past data into table.

See Also:

the flashback_clause of SELECT for more information on this clause
Restriction on Single-table Inserts

If you retrieve values through a subquery, then the select list of the subquery must have the same number of columns as the column list of the INSERT statement. If you omit the column list, then the subquery must provide values for every column in the table.

See Also:

"Inserting Values into Tables: Examples"

insert_into_clause

Use the INSERT INTO clause to specify the target object or objects into which Oracle is to insert data.

DML_table_expression_clause

Use the INTO dml_table_expression_clause to specify the objects into which data is being inserted.

Restrictions on the dml_table_expression_clause
  • You cannot execute this statement if table (or the base table of view) contains any domain indexes marked IN_PROGRESS or FAILED.
  • You cannot insert into a partition if any affected index partitions are marked UNUSABLE.
  • With regard to the ORDER BY clause of the subquery in the dml_table_expression_clause, ordering is guaranteed only for the rows being inserted, and only within each extent of the table. Ordering of new rows with respect to existing rows is not guaranteed.
  • If a view was created using the WITH CHECK OPTION, then you can insert into the view only rows that satisfy the view's defining query.
  • If a view was created using a single base table, then you can insert rows into the view and then retrieve those values using the returning_clause.
  • You cannot insert rows into a view except with INSTEAD OF triggers if the view's defining query contains one of the following constructs:
    • A set operator
    • A DISTINCT operator
    • An aggregate or analytic function
    • A GROUP BY, ORDER BY, CONNECT BY, or START WITH clause
    • A collection expression in a SELECT list
    • A subquery in a SELECT list
    • Joins (with some exceptions--see Oracle9i Database Administrator's Guide for more information)
  • If you specify an index, index partition, or index subpartition that has been marked UNUSABLE, then the INSERT statement will fail unless the SKIP_UNUSABLE_INDEXES session parameter has been set to TRUE.

    See Also:

    ALTER SESSION for information on the SKIP_UNUSABLE_INDEXES session parameter
schema

Specify the schema containing the table, view, or materialized view. If you omit schema, then Oracle assumes the object is in your own schema.

table | view | subquery

Specify the name of the table or object table, view or object view, materialized view, or the column or columns returned by a subquery, into which rows are to be inserted. If you specify a view or object view, then Oracle inserts rows into the view's base table.

If any value to be inserted is a REF to an object table, and if the object table has a primary key object identifier, then the column into which you insert the REF must be a REF column with a referential integrity or SCOPE constraint to the object table.

If table (or the base table of view) contains one or more domain index columns, then this statement executes the appropriate indextype insert routine.

Issuing an INSERT statement against a table fires any INSERT triggers defined on the table.

See Also:

Oracle9i Data Cartridge Developer's Guide for more information on these routines
PARTITION (partition_name) | SUBPARTITION (subpartition_name)

Specify the name of the partition or subpartition within table (or the base table of view) targeted for inserts.

If a row to be inserted does not map into a specified partition or subpartition, then then Oracle returns an error.

Restriction on Target Partitions and Subpartitions

This clause is not valid for object tables or object views.

dblink

Specify a complete or partial name of a database link to a remote database where the table or view is located. You can insert rows into a remote table or view only if you are using Oracle's distributed functionality.

If you omit dblink, then Oracle assumes that the table or view is on the local database.

See Also:

"Syntax for Schema Objects and Parts in SQL Statements" for information on referring to database links and "Inserting into a Remote Database: Example"

subquery_restriction_clause

Use the subquery_restriction_clause to restrict the subquery in one of the following ways:

WITH READ ONLY

Specify WITH READ ONLY to indicate that the table or view cannot be updated.

WITH CHECK OPTION

Specify WITH CHECK OPTION to indicate that Oracle prohibits any changes to the table or view that would produce rows that are not included in the subquery.

CONSTRAINT constraint

Specify the name of the CHECK OPTION constraint. If you omit this identifier, Oracle automatically assigns the constraint a name of the form SYS_C n, where n is an integer that makes the constraint name unique within the database.

See Also:

"Using the WITH CHECK OPTION Clause: Example"

table_collection_expression

The table_collection_expression lets you inform Oracle that the value of collection_expression should be treated as a table for purposes of query and DML operations. The collection_expression can be a subquery, a column, a function, or a collection constructor. Regardless of its form, it must return a collection value (that is, a value whose type is nested table or varray). This process of extracting the elements of a collection is called collection unnesting.

Note:

In earlier releases of Oracle, when collection_expression was a subquery, table_collection_expression was expressed as "THE subquery". That usage is now deprecated.
See Also:

"Table Collections: Examples"

t_alias

Specify a correlation name (alias) for the table, view, or subquery to be referenced elsewhere in the statement.

Restriction on Table Aliases

You cannot specify t_alias during a multitable insert.

column

Specify a column of the table or view. In the inserted row, each column in this list is assigned a value from the values_clause or the subquery.

If you omit one or more of the table's columns from this list, then the column's value for the inserted row is the column's default value as specified when the table was created or last altered. If any omitted column has a NOT NULL constraint and no default value, then Oracle returns an error indicating that the constraint has been violated and rolls back the INSERT statement.

If you omit the column list altogether, then the values_clause or query must specify values for all columns in the table.

See Also:

CREATE TABLE for more information on default column values

values_clause

For a single-table insert operation, specify a row of values to be inserted into the table or view. You must specify a value in the values_clause for each column in the column list. If you omit the column list, then the values_clause must provide values for every column in the table.

For a multitable insert operation, each expression in the values_clause must refer to columns returned by the select list of the subquery. If you omit the values_clause, then the select list of the subquery determines the values to be inserted, so it must have the same number of columns as the column list of the corresponding insert_into_clause. If you do not specify a column list in the insert_into_clause, then the computed row must provide values for all columns in the target table.

For both types of insert operations, if you specify a column list in the insert_into_clause, then Oracle assigns to each column in the list a corresponding value from the values clause or the subquery. You can specify DEFAULT for any value in the values_clause. If you have specified a default value for the corresponding column of the table or view, then that value is inserted. If no default value for the corresponding column has been specified, then Oracle inserts null.

Note:

Parallel direct-path INSERT supports only the subquery syntax of the INSERT statement, not the values_clause. Please refer to Oracle9i Database Concepts for information on serial and parallel direct-path INSERT.
Restrictions on Inserted Values
  • You cannot initialize an internal LOB attribute in an object with a value other than empty or null. That is, you cannot use a literal.
  • You cannot insert a BFILE value until you have initialized the BFILE locator to null or to a directory alias and filename.
  • When inserting into a list-partitioned table, you cannot insert a value into the partitioning key column that does not already exist in the partition_value list of one of the partitions.
  • You cannot specify DEFAULT when inserting into a view.

    Note:

    If you insert string literals into a RAW column, then during subsequent queries Oracle will perform a full table scan rather than using any index that might exist on the RAW column.
    See Also:
    • Oracle Call Interface Programmer's Guide and Oracle9i Application Developer's Guide - Fundamentals for information on initializing BFILE locators
    • "About SQL Expressions" and SELECT for syntax of valid expressions
    • "Using XML in SQL Statements" for information on inserting values into an XMLType table
    • "Inserting into a BFILE: Example" , "Inserting into a Substitutable Tables and Columns: Examples", "Inserting Using the TO_LOB Function: Example" , "Inserting Sequence Values: Example" and "Inserting Using Bind Variables: Example"

returning_clause

The returning clause retrieves the rows affected by a DML (INSERT, UPDATE, or DELETE) statement. You can specify this clause for tables and materialized views, and for views with a single base table.

When operating on a single row, a DML statement with a returning_clause can retrieve column expressions using the affected row, rowid, and REFs to the affected row and store them in host variables or PL/SQL variables.

When operating on multiple rows, a DML statement with the returning_clause stores values from expressions, rowids, and REFs involving the affected rows in bind arrays.

expr

Each item in the expr list must be a valid expression syntax. All forms are valid except scalar subquery expressions.

INTO

The INTO clause indicates that the values of the changed rows are to be stored in the variable(s) specified in data_item list.

data_item

Each data_item is a host variable or PL/SQL variable that stores the retrieved expr value.

For each expression in the RETURNING list, you must specify a corresponding type-compatible PL/SQL variable or host variable in the INTO list.

Restrictions on the RETURNING Clause

You cannot:

  • Specify the returning_clause for a multitable insert.
  • Use this clause with parallel DML or with remote objects.
  • Retrieve LONG types with this clause.
  • Specify this clause for a view on which an INSTEAD OF trigger has been defined.

    See Also:

    PL/SQL User's Guide and Reference for information on using the BULK COLLECT clause to return multiple values to collection variables

multi_table_insert

In a multitable insert, you insert computed rows derived from the rows returned from the evaluation of a subquery into one or more tables.

Note:

Table aliases are not defined by the select list of the subquery. Therefore, they are not visible in the clauses dependent on the select list. For example, this can happen when trying to refer to an object column in an expression. To use an expression with a table alias, you must put the expression into the select list with a column alias, and then refer to the column alias in the VALUES clause or WHEN condition of the multitable insert
ALL into_clause

Specify ALL followed by multiple insert_into_clauses to perform an unconditional multitable insert. Oracle executes each insert_into_clause once for each row returned by the subquery.

conditional_insert_clause

Specify the conditional_insert_clause to perform a conditional multitable insert. Oracle filters each insert_into_clause through the corresponding WHEN condition, which determines whether that insert_into_clause is executed. Each expression in the WHEN condition must refer to columns returned by the select list of the subquery. A single multitable insert statement can contain up to 127 WHEN clauses.

ALL

If you specify ALL, then Oracle evaluates each WHEN clause regardless of the results of the evaluation of any other WHEN clause. For each WHEN clause whose condition evaluates to true, Oracle executes the corresponding INTO clause list.

FIRST

If you specify FIRST, then Oracle evaluates each WHEN clause in the order in which it appears in the statement. For the first WHEN clause that evaluates to true, Oracle executes the corresponding INTO clause and skips subsequent WHEN clauses for the given row.

ELSE clause

For a given row, if no WHEN clause evaluates to true:

  • If you have specified an ELSE clause, then Oracle executes the INTO clause list associated with the ELSE clause.
  • If you did not specify an else clause, then Oracle takes no action for that row.

    See Also:

    "Multitable Inserts: Examples"

Restrictions on Multitable Inserts
  • You can perform multitable inserts only on tables, not on views or materialized views.
  • You cannot perform a multitable insert into a remote table.
  • You cannot specify a table collection expression when performing a multitable insert.
  • In a multitable insert, all of the insert_into_clauses cannot combine to specify more than 999 target columns.
  • Multitable inserts are not parallelized in a Real Application Clusters environment, or if any target table is index organized, or if any target table has a bitmap index defined on it.
  • Plan stability is not supported for multitable insert statements.
  • The subquery of the multitable insert statement cannot use a sequence.

subquery

Specify a subquery that returns rows that are inserted into the table. The subquery can refer to any table, view, or materialized view, including the target tables of the INSERT statement. If the subquery selects no rows, then Oracle inserts no rows into the table.

You can use subquery in combination with the TO_LOB function to convert the values in a LONG column to LOB values in another column in the same or another table. To migrate LONGs to LOBs in a view, you must perform the migration on the base table, and then add the LOB to the view.

Notes on Inserts Using a Subquery
  • If subquery returns (in part or totally) the equivalent of an existing materialized view, then Oracle may use the materialized view (for query rewrite) in place of one or more tables specified in subquery.

    See Also:

    Oracle9i Data Warehousing Guide for more information on materialized views and query rewrite
  • If subquery refers to remote objects, then the INSERT operation can run in parallel as long as the reference does not loop back to an object on the local database. However, if the subquery in the dml_table_expression_clause refers to any remote objects, then the INSERT operation will run serially without notification. See parallel_clause (in CREATE TABLE) for more information

    See Also:
    • "Inserting Values with a Subquery: Example"
    • "Inserting into a BFILE: Example"
    • Oracle Call Interface Programmer's Guide and Oracle9i Application Developer's Guide - Fundamentals for information on initializing BFILEs
    • "About SQL Expressions" and SELECT for syntax of valid expressions

Examples

Inserting Values into Tables: Examples

The following statement inserts a row into the sample table departments:

INSERT INTO departments
   VALUES (280, 'Recreation', 121, 1700);

If the departments table had been created with a default value of 121 for the manager_id column, then you could issue the same statement as follows:

INSERT INTO departments
   VALUES (280, 'Recreation', DEFAULT, 1700);

The following statement inserts a row with six columns into the employees table. One of these columns is assigned NULL and another is assigned a number in scientific notation:

INSERT INTO employees (employee_id, last_name, email,
      hire_date, job_id, salary, commission_pct)
   VALUES (207, 'Gregory', 'pgregory@oracle.com',
      sysdate, 'PU_CLERK', 1.2E3, NULL);

The following statement has the same effect as the preceding example, but uses a subquery in the dml_table_expression_clause:

INSERT INTO
   (SELECT employee_id, last_name, email, hire_date, job_id,
      salary, commission_pct FROM employees)
   VALUES (207, 'Gregory', 'pgregory@oracle.com',
      sysdate, 'PU_CLERK', 1.2E3, NULL);
Inserting Values with a Subquery: Example

The following statement copies employees whose commission exceeds 25% of their salary into the bonuses table (which is created in "Merging into a Table: Example" ):

INSERT INTO bonuses
   SELECT employee_id, salary*1.1
   FROM employees
   WHERE commission_pct > 0.25 * salary;
Inserting into a Remote Database: Example

The following statement inserts a row into the employees table owned by the user hr on the database accessible by the database link remote:

INSERT INTO employees@remote
   VALUES (8002, 'Juan', 'Fernandez', 'juanf@hr.com', NULL,
   TO_DATE('04-OCT-1992', 'DD-MON-YYYY'), 'SH_CLERK', 3000,
   NULL, 121, 20);
Inserting Sequence Values: Example

The following statement inserts a new row containing the next value of the departments sequence into the departments table:

INSERT INTO departments
   VALUES  (departments_seq.nextval, 'Entertainment', 162, 1400);
Inserting Using Bind Variables: Example

The following example returns the values of the inserted rows into output bind variables :bnd1 and :bnd2. (The bind variables must first be declared.)

INSERT INTO employees
      (employee_id, last_name, email, hire_date, job_id, salary)
   VALUES
   (employees_seq.nextval, 'Doe', 'john.doe@oracle.com',
       SYSDATE, 'SH_CLERK', 2400)
   RETURNING salary*12, job_id INTO :bnd1, :bnd2;
Inserting into a Substitutable Tables and Columns: Examples

The following example inserts into the persons table, which is created in "Substitutable Table and Column Examples" . The first statement uses the root type person_t. The second insert uses the employee_t subtype person_t, and the third insert uses the part_time_emp_t subtype of employee_t:

INSERT INTO persons VALUES (person_t('Bob', 1234));
INSERT INTO persons VALUES (employee_t('Joe', 32456, 12, 100000));
INSERT INTO persons VALUES (
   part_time_emp_t('Tim', 5678, 13, 1000, 20));

The following example inserts into the books table, which was created in "Substitutable Table and Column Examples" . Notice that specification of the attribute values is identical to that for the substitutable table example:

INSERT INTO books VALUES (
   'An Autobiography', person_t('Bob', 1234));
INSERT INTO books VALUES (
   'Business Rules', employee_t('Joe', 3456, 12, 10000));
INSERT INTO books VALUES (
   'Mixing School and Work',
   part_time_emp_t('Tim', 5678, 13, 1000, 20));

You can extract data from substitutable tables and columns using built-in functions and conditions. For examples, see the functions TREAT and SYS_TYPEID , and "IS OF type Conditions" .

Inserting Using the TO_LOB Function: Example

The following example copies LONG data to a LOB column in the following long_tab table:

CREATE TABLE long_tab (pic_id NUMBER, long_pics LONG RAW);

First you must create a table with a LOB.

CREATE TABLE lob_tab (pic_id NUMBER, lob_pics BLOB);

Next, use an INSERT ... SELECT statement to copy the data in all rows for the LONG column into the newly created LOB column:

INSERT INTO lob_tab
   SELECT pic_id, TO_LOB(long_pics) FROM long_tab;

Once you are confident that the migration has been successful, you can drop the long_pics table. Alternatively, if the table contains other columns, then you can simply drop the LONG column from the table as follows:

ALTER TABLE long_tab DROP COLUMN long_pics;
Inserting into a BFILE: Example

The following example inserts a row into the sample table pm.print_media. The example uses the BFILENAME function to identify a binary file on the server's file system:

CREATE DIRECTORY media_dir AS '/demo/schema/product_media';

INSERT INTO print_media (product_id, ad_id, ad_graphic)
   VALUES (3000, 31001,
      bfilename('MEDIA_DIR', 'modem_comp_ad.gif'));
Multitable Inserts: Examples

The following example uses the multitable insert syntax to insert into the sample table sh.sales some data from an input table with a different structure.

Note:

A number of constraints on the sales table have been disabled for purposes of this example, because the example ignores a number of table columns for the sake of brevity.

The input table looks like this:

SELECT * FROM sales_input_table;

PRODUCT_ID CUSTOMER_ID WEEKLY_ST  SALES_SUN  SALES_MON  SALES_TUE  SALES_WED SALES_THU  SALES_FRI  SALES_SAT
---------- ----------- --------- ---------- ---------- ---------- -------------------- ---------- ----------
       111         222 01-OCT-00        100        200        300        400       500        600        700
       222         333 08-OCT-00        200        300        400        500       600        700        800
       333         444 15-OCT-00        300        400        500        600       700        800        900

The multitable insert statement looks like this:

INSERT ALL
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date, sales_sun)
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date+1, sales_mon)
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date+2, sales_tue)
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date+3, sales_wed)
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date+4, sales_thu)
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date+5, sales_fri)
      INTO sales (prod_id, cust_id, time_id, amount)
      VALUES (product_id, customer_id, weekly_start_date+6, sales_sat)
   SELECT product_id, customer_id, weekly_start_date, sales_sun,
      sales_mon, sales_tue, sales_wed, sales_thu, sales_fri, sales_sat
      FROM sales_input_table;

Assuming these are the only rows in the sales table, the contents now look like this:

SELECT * FROM sales;

   PROD_ID    CUST_ID TIME_ID   C   PROMO_ID QUANTITY_SOLD     AMOUNT       COST
---------- ---------- --------- - ---------- ------------- ---------- ----------
       111        222 01-OCT-00                                   100
       111        222 02-OCT-00                                   200
       111        222 03-OCT-00                                   300
       111        222 04-OCT-00                                   400
       111        222 05-OCT-00                                   500
       111        222 06-OCT-00                                   600
       111        222 07-OCT-00                                   700
       222        333 08-OCT-00                                   200
       222        333 09-OCT-00                                   300
       222        333 10-OCT-00                                   400
       222        333 11-OCT-00                                   500
       222        333 12-OCT-00                                   600
       222        333 13-OCT-00                                   700
       222        333 14-OCT-00                                   800
       333        444 15-OCT-00                                   300
       333        444 16-OCT-00                                   400
       333        444 17-OCT-00                                   500
       333        444 18-OCT-00                                   600
       333        444 19-OCT-00                                   700
       333        444 20-OCT-00                                   800
       333        444 21-OCT-00                                   900

The next examples insert into multiple tables. Suppose you want to provide to sales representatives some information on orders of various sizes. The following example creates tables for small, medium, large, and "special" (very large) orders and populates those tables with data from the sample table oe.orders:

CREATE TABLE small_orders
   (order_id       NUMBER(12)   NOT NULL,
    customer_id    NUMBER(6)    NOT NULL,
    order_total    NUMBER(8,2),
    sales_rep_id   NUMBER(6)
   );

CREATE TABLE medium_orders AS SELECT * FROM small_orders;

CREATE TABLE large_orders AS SELECT * FROM small_orders;

CREATE TABLE special_orders
   (order_id       NUMBER(12)    NOT NULL,
    customer_id    NUMBER(6)     NOT NULL,
    order_total    NUMBER(8,2),
    sales_rep_id   NUMBER(6),
    credit_limit   NUMBER(9,2),
    cust_email     VARCHAR2(30)
   );

The first multitable insert populates only the tables for small, medium, and large orders:

INSERT ALL
   WHEN order_total < 1000000 THEN
      INTO small_orders
   WHEN order_total > 1000000 AND order_total < 2000000 THEN
      INTO medium_orders
   WHEN order_total > 2000000 THEN
      INTO large_orders
   SELECT order_id, order_total, sales_rep_id, customer_id
      FROM orders;

You can accomplish the same thing using the ELSE clause in place of the insert into the large_orders table:

INSERT ALL
   WHEN order_total < 100000 THEN
      INTO small_orders
   WHEN order_total > 100000 AND order_total < 200000 THEN
      INTO medium_orders
   ELSE
      INTO large_orders
   SELECT order_id, order_total, sales_rep_id, customer_id
      FROM orders;

The next example inserts into the small, medium, and large tables, as in the preceding example, and also puts orders greater than 2,900,000 into the special_orders table. This table also shows how to use column aliases to simplify the statement:

INSERT ALL
   WHEN ottl < 100000 THEN
      INTO small_orders
         VALUES(oid, ottl, sid, cid)
   WHEN ottl > 100000 and ottl < 200000 THEN
      INTO medium_orders
         VALUES(oid, ottl, sid, cid)
   WHEN ottl > 200000 THEN
      into large_orders
         VALUES(oid, ottl, sid, cid)
   WHEN ottl > 290000 THEN
      INTO special_orders
   SELECT o.order_id oid, o.customer_id cid, o.order_total ottl,
      o.sales_rep_id sid, c.credit_limit cl, c.cust_email cem
      FROM orders o, customers c
      WHERE o.customer_id = c.customer_id;

Finally, the next example uses the FIRST clause to put orders greater than 2,900,000 into the special_orders table and exclude those orders from the large_orders table:

INSERT FIRST
   WHEN ottl < 100000 THEN
      INTO small_orders
         VALUES(oid, ottl, sid, cid)
   WHEN ottl > 100000 and ottl < 200000 THEN
      INTO medium_orders
         VALUES(oid, ottl, sid, cid)
   WHEN ottl > 290000 THEN
      INTO special_orders
   WHEN ottl > 200000 THEN
      INTO large_orders
         VALUES(oid, ottl, sid, cid)
   SELECT o.order_id oid, o.customer_id cid, o.order_total ottl,
      o.sales_rep_id sid, c.credit_limit cl, c.cust_email cem
      FROM orders o, customers c
      WHERE o.customer_id = c.customer_id;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 14 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOCK TABLE

Purpose

Use the LOCK TABLE statement to lock one or more tables (or table partitions or subpartitions) in a specified mode. This lock manually overrides automatic locking and permits or denies access to a table or view by other users for the duration of your operation.

Some forms of locks can be placed on the same table at the same time. Other locks allow only one lock for a table.

A locked table remains locked until you either commit your transaction or roll it back, either entirely or to a savepoint before you locked the table.

A lock never prevents other users from querying the table. A query never places a lock on a table. Readers never block writers and writers never block readers.

See Also:
  • Oracle9i Database Concepts for a complete description of the interaction of lock modes
  • COMMIT
  • ROLLBACK
  • SAVEPOINT

Prerequisites

The table or view must be in your own schema or you must have the LOCK ANY TABLE system privilege, or you must have any object privilege on the table or view.

Syntax

lock_table::=

Text description of statements_932.gif follows
Text description of lock_table

Semantics

schema

Specify the schema containing the table or view. If you omit schema, then Oracle assumes the table or view is in your own schema.

table / view

Specify the name of the table to be locked.

If you specify view, then Oracle locks the view's base tables.

If you specify PARTITION (partition) or SUBPARTITION (subpartition), then Oracle first acquires an implicit lock on the table. The table lock is the same as the lock you specify for partition or subpartition, with two exceptions:

  • If you specify a SHARE lock for the subpartition, then Oracle acquires an implicit ROW SHARE lock on the table.
  • If you specify an EXCLUSIVE lock for the subpartition, then Oracle acquires an implicit ROW EXCLUSIVE lock on the table.

If you specify PARTITION and table is composite-partitioned, then Oracle acquires locks on all the subpartitions of partition.

Restriction on Locking Tables

If table is part of a hierarchy, then it must be the root of the hierarchy.

dblink

Specify a database link to a remote Oracle database where the table or view is located. You can lock tables and views on a remote database only if you are using Oracle's distributed functionality. All tables locked by a LOCK TABLE statement must be on the same database.

If you omit dblink, then Oracle assumes the table or view is on the local database.

See Also:

"Referring to Objects in Remote Databases" for information on specifying database links

lockmode Clause

Specify one of the following modes:

ROW SHARE

ROW SHARE permits concurrent access to the locked table, but prohibits users from locking the entire table for exclusive access. ROW SHARE is synonymous with SHARE UPDATE, which is included for compatibility with earlier versions of Oracle.

ROW EXCLUSIVE

ROW EXCLUSIVE is the same as ROW SHARE, but also prohibits locking in SHARE mode. ROW EXCLUSIVE locks are automatically obtained when updating, inserting, or deleting.

SHARE UPDATE

See ROW SHARE.

SHARE

SHARE permits concurrent queries but prohibits updates to the locked table.

SHARE ROW EXCLUSIVE

SHARE ROW EXCLUSIVE is used to look at a whole table and to allow others to look at rows in the table but to prohibit others from locking the table in SHARE mode or updating rows.

EXCLUSIVE

EXCLUSIVE permits queries on the locked table but prohibits any other activity on it.

NOWAIT

Specify NOWAIT if you want Oracle to return control to you immediately if the specified table (or specified partition or subpartition) is already locked by another user. In this case, Oracle returns a message indicating that the table, partition, or subpartition is already locked by another user.

If you omit this clause, then Oracle waits until the table is available, locks it, and returns control to you.

Examples

Locking a Table: Example

The following statement locks the employees table in exclusive mode, but does not wait if another user already has locked the table:

LOCK TABLE employees
   IN EXCLUSIVE MODE
   NOWAIT;

The following statement locks the remote employees table that is accessible through the database link remote:

LOCK TABLE employees@remote
   IN SHARE MODE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 15 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MERGE

Purpose

Use the MERGE statement to select rows from one table for update or insertion into another table. The decision whether to update or insert into the target table is based on a condition in the ON clause.

This statement is a convenient way to combine at least two operations. It lets you avoid multiple INSERT and UPDATE DML statements.

MERGE is a deterministic statement. That is, you cannot update the same row of the target table multiple times in the same MERGE statement.

Prerequisites

You must have INSERT and UPDATE object privileges on the target table and SELECT privilege on the source table.

Syntax

merge::=

Text description of statements_9a.gif follows
Text description of merge

merge_update_clause::=

Text description of statements_92.gif follows
Text description of merge_update_clause

merge_insert_clause::=

Text description of statements_93.gif follows
Text description of merge_insert_clause

Semantics

INTO Clause

Use the INTO clause to specify the target table you are updating or inserting into.

USING Clause

Use the USING clause to specify the source of the data to be updated or inserted. The source can be a table, view, or the result of a subquery.

ON Clause

Use the ON clause to specify the condition upon which the MERGE operation either updates or inserts. For each row in the target table for which the search condition is true, Oracle updates the row based with corresponding data from the source table. If the condition is not true for any rows, then Oracle inserts into the target table based on the corresponding source table row.

WHEN MATCHED | NOT MATCHED

Use these clauses to instruct Oracle how to respond to the results of the join condition in the ON clause. You can specify these two clauses in either order.

merge_update_clause

The merge_update_clause specifies the new column values of the target table. Oracle performs this update if the condition of the ON clause is true. If the update clause is executed, then all update triggers defined on the target table are activated.

Restrictions on Updating a View
  • You cannot specify DEFAULT when updating a view.
  • You cannot update a column that is referenced in the ON condition clause.
merge_insert_clause

The merge_insert_clause specifies values to insert into the column of the target table if the condition of the ON clause is false. If the insert clause is executed, then all insert triggers defined on the target table are activated.

Restriction on Merging into a View

You cannot specify DEFAULT when updating a view.

Examples

Merging into a Table: Example

The following example creates a bonuses table in the sample schema oe with a default bonus of 100. It then inserts into the bonuses table all employees who made sales (based on the sales_rep_id column of the oe.orders table). Finally, the Human Resources manager decides that all employees should receive a bonus. Those who have not made sales get a bonus of 1% of their salary. Those who already made sales get an increase in their bonus equal to 1% of their salary. The MERGE statement implements these changes in one step:

CREATE TABLE bonuses (employee_id NUMBER, bonus NUMBER DEFAULT 100);

INSERT INTO bonuses(employee_id)
   (SELECT e.employee_id FROM employees e, orders o
   WHERE e.employee_id = o.sales_rep_id
   GROUP BY e.employee_id);

SELECT * FROM bonuses;

EMPLOYEE_ID      BONUS
----------- ----------
        153        100
        154        100
        155        100
        156        100
        158        100
        159        100
        160        100
        161        100
        163        100

MERGE INTO bonuses D
   USING (SELECT employee_id, salary, department_id FROM employees
   WHERE department_id = 80) S
   ON (D.employee_id = S.employee_id)
   WHEN MATCHED THEN UPDATE SET D.bonus = D.bonus + S.salary*.01
   WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus)
   VALUES (S.employee_id, S.salary*0.1);

EMPLOYEE_ID      BONUS
----------- ----------
        153        180
        154        175
        155        170
        156        200
        158        190
        159        180
        160        175
        161        170
        163        195
        157        950
        145       1400
        170        960
        179        620
        152        900
        169       1000
.
.
.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 16 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NOAUDIT

Purpose

Use the NOAUDIT statement to stop auditing previously enabled by the AUDIT statement.

The NOAUDIT statement must have the same syntax as the previous AUDIT statement. Further, it reverses the effects only of that particular statement. For example, suppose one AUDIT statement (statement A) enables auditing for a specific user. A second (statement B) enables auditing for all users. A NOAUDIT statement to disable auditing for all users (statement C) reverses statement B. However, statement C leaves statement A in effect and continues to audit the user that statement A specified.

See Also:

AUDIT for more information on auditing

Prerequisites

To stop auditing of SQL statements, you must have the AUDIT SYSTEM system privilege.

To stop auditing of schema objects, you must be the owner of the object on which you stop auditing or you must have the AUDIT ANY system privilege. In addition, if the object you chose for auditing is a directory, then even if you created it, you must have the AUDIT ANY system privilege.

Syntax

noaudit::=

Text description of statements_933.gif follows
Text description of noaudit

(sql_statement_clause::= , schema_object_clause::= )

sql_statement_clause::=

Text description of statements_934.gif follows
Text description of sql_statement_clause

auditing_by_clause::=

Text description of statements_935.gif follows
Text description of auditing_by_clause

schema_object_clause::=

Text description of statements_936.gif follows
Text description of schema_object_clause

auditing_on_clause::=

Text description of statements_937.gif follows
Text description of auditing_on_clause

Semantics

sql_statement_clause

Use the sql_statement_clause to stop auditing of a particular SQL statement.

statement_option

For statement_option, specify the statement option for which auditing is to be stopped.

See Also:

Table 12-1 and Table 12-2 for a list of the statement options and the SQL statements they audit
ALL

Specify ALL to stop auditing of all statement options currently being audited.

system_privilege

For system_privilege, specify the system privilege for which auditing is to be stopped.

See Also:

Table 17-1 for a list of the system privileges and the statements they authorize
ALL PRIVILEGES

Specify ALL PRIVILEGES to stop auditing of all system privileges currently being audited.

auditing_by_clause

Use the auditing_by_clause to stop auditing only those SQL statements issued by particular users. If you omit this clause, then Oracle stops auditing all users' statements.

  • Specify BY user to stop auditing only for SQL statements issued by the specified users in their subsequent sessions. If you omit this clause, then Oracle stops auditing for all users' statements, except for the situation described for WHENEVER SUCCESSFUL.
  • Specify BY proxy to stop auditing only for the SQL statements issued by the specified proxy, on behalf of a specific user or any user.

schema_object_clause

Use the schema_object_clause to stop auditing of a particular database object.

object_option

For object_option, specify the type of operation for which auditing is to be stopped on the object specified in the ON clause.

See Also:

Table 12-3 for a list of these options
ALL

Specify ALL as a shortcut equivalent to specifying all object options applicable for the type of object.

auditing_on_clause

The auditing_on_clause lets you specify the particular schema object for which auditing is to be stopped.

  • For object, specify the object name of a table, view, sequence, stored procedure, function, or package, materialized view, or library. If you do not qualify object with schema, then Oracle assumes the object is in your own schema.

    See Also:

    AUDIT for information on auditing specific schema objects
  • The DIRECTORY clause lets you specify the name of the directory on which auditing is to be stopped.
  • Specify DEFAULT to remove the specified object options as default object options for subsequently created objects.
WHENEVER [NOT] SUCCESSFUL

Specify WHENEVER SUCCESSFUL to stop auditing only for SQL statements and operations on schema objects that complete successfully.

Specify WHENEVER NOT SUCCESSFUL to stop auditing only for statements and operations that result in Oracle errors.

If you omit this clause, then Oracle stops auditing for all statements or operations, regardless of success or failure.

Examples

Stop Auditing of SQL Statements Related to Roles: Example

If you have chosen auditing for every SQL statement that creates or drops a role, then you can stop auditing of such statements by issuing the following statement:

NOAUDIT ROLE;
Stop Auditing of Updates or Queries on Objects Owned by a Particular User: Example

If you have chosen auditing for any statement that queries or updates any table issued by the users hr and oe, then you can stop auditing for queries by hr by issuing the following statement:

NOAUDIT SELECT TABLE BY hr;

The preceding statement stops auditing only queries by hr, so Oracle continues to audit queries and updates by oe as well as updates by hr.

Stop Auditing of Statements Authorized by a Particular Object Privilege: Example

To stop auditing on all statements that are authorized by DELETE ANY TABLE system privilege, issue the following statement:

NOAUDIT DELETE ANY TABLE;
Stop Auditing of Queries on a Particular Object: Example

If you have chosen auditing for every SQL statement that queries the employees table in the schema hr, then you can stop auditing for such queries by issuing the following statement:

NOAUDIT SELECT
   ON hr.employees;
Stop Auditing of Queries that Complete Successfully: Example

You can stop auditing for queries that complete successfully by issuing the following statement:

NOAUDIT SELECT
   ON hr.employees
   WHENEVER SUCCESSFUL;

This statement stops auditing only for successful queries. Oracle continues to audit queries resulting in Oracle errors.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 17 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RENAME

Purpose

Caution:

You cannot roll back a RENAME statement.

Use the RENAME statement to rename a table, view, sequence, or private synonym.

  • Oracle automatically transfers integrity constraints, indexes, and grants on the old object to the new object.
  • Oracle invalidates all objects that depend on the renamed object, such as views, synonyms, and stored procedures and functions that refer to a renamed table.

    See Also:

    CREATE SYNONYM and DROP SYNONYM

Prerequisites

The object must be in your own schema.

Syntax

rename::=

Text description of statements_914.gif follows
Text description of rename

Semantics

old_name

Specify the name of an existing table, view, sequence, or private synonym.

new_name

Specify the new name to be given to the existing object. The new name must not already be used by another schema object in the same namespace and must follow the rules for naming schema objects.

Restrictions on Renaming Objects
  • You cannot rename a public synonym. Instead, drop the public synonym and then re-create the public synonym with the new name.
  • You cannot rename a type synonym that has any dependent tables or dependent valid user-defined object types.

    See Also:

    "Schema Object Naming Rules"

Example

Renaming a Database Object: Example

The following example uses a copy of the sample table hr.departments. To change the name of table departments_new to emp_departments, issue the following statement:

RENAME departments_new TO emp_departments;

You cannot use this statement directly to rename columns. However, you can rename a column using the ALTER TABLE ... rename_column_clause.

See Also:

rename_column_clause

Another way to rename a column is to use the RENAME statement together with the CREATE TABLE statement with AS subquery. This method is useful is you are changing the structure of a table rather than only renaming a column. The following statements re-create the sample table hr.job_history, renaming a column from department_id to dept_id:

CREATE TABLE temporary
   (employee_id, start_date, end_date, job_id, dept_id)
AS SELECT
     employee_id, start_date, end_date, job_id, department_id
FROM job_history;

DROP TABLE job_history;

RENAME temporary TO job_history;
Note:

Any integrity constraints defined on table job_history will be lost in the preceding example. You will have to redefine them on the new job_history table using an ALTER TABLE statement.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 18 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REVOKE

Purpose

Use the REVOKE statement to:

  • Revoke system privileges from users and roles
  • Revoke roles from users and roles
  • Revoke object privileges for a particular object from users and roles

    See Also:
    • GRANT for information on granting system privileges and roles
    • Table 17-3 for a summary of the object privileges for each type of object

Prerequisites

To revoke a system privilege or role, you must have been granted the privilege with the ADMIN OPTION.

To revoke a role, you must have been granted the role with the ADMIN OPTION. You can revoke any role if you have the GRANT ANY ROLE system privilege.

To revoke an object privilege, you must previously have granted the object privilege to the user and role or you must have the GRANT ANY OBJECT PRIVILEGE system privilege. In the latter case, you can revoke any object privilege that was granted by the object owner or on behalf of the owner (that is, by a user with the GRANT ANY OBJECT PRIVILEGE). However, you cannot revoke an object privilege that was granted by way of a WITH GRANT OPTION grant.

See Also:

"Revoke Operations that Use GRANT ANY OBJECT PRIVILEGE: Example"

The REVOKE statement can revoke only privileges and roles that were previously granted directly with a GRANT statement. You cannot use this statement to revoke:

  • Privileges or roles not granted to the revokee
  • Roles or object privileges granted through the operating system
  • Privileges or roles granted to the revokee through roles

Syntax

revoke::=

Text description of statements_915.gif follows
Text description of revoke

(revoke_system_privileges::= , revoke_object_privileges::= )

revoke_system_privileges::=

Text description of statements_938.gif follows
Text description of revoke_system_privileges

(grantee_clause::= )

revoke_object_privileges::=

Text description of statements_939.gif follows
Text description of revoke_object_privileges

(on_object_clause::= , grantee_clause::= )

grantee_clause::=

Text description of statements_940.gif follows
Text description of grantee_clause

on_object_clause::=

Text description of statements_931.gif follows
Text description of on_object_clause

Semantics

revoke_system_privileges

system_privilege

Specify the system privilege to be revoked.

See Also:

Table 17-1 for a list of the system privileges
  • If you revoke a privilege from a user, then Oracle removes the privilege from the user's privilege domain. Effective immediately, the user cannot exercise the privilege.

    See Also:

    "Revoking a System Privilege from a User: Example"

  • If you revoke a privilege from a role, then Oracle removes the privilege from the role's privilege domain. Effective immediately, users with the role enabled cannot exercise the privilege. Also, other users who have been granted the role and subsequently enable the role cannot exercise the privilege.

    See Also:

    "Revoking a System Privilege from a Role: Example"

  • If you revoke a privilege from PUBLIC, then Oracle removes the privilege from the privilege domain of each user who has been granted the privilege through PUBLIC. Effective immediately, such users can no longer exercise the privilege. However, the privilege is not revoked from users who have been granted the privilege directly or through roles.
Restriction on Revoking System Privileges

A system privilege cannot appear more than once in the list of privileges to be revoked.

Oracle provides a shortcut for specifying all system privileges at once:

  • ALL PRIVILEGES: Specify ALL PRIVILEGES to revoke all the system privileges listed in Table 17-1 .
role

Specify the role to be revoked.

  • If you revoke a role from a user, then Oracle makes the role unavailable to the user. If the role is currently enabled for the user, the user can continue to exercise the privileges in the role's privilege domain as long as it remains enabled. However, the user cannot subsequently enable the role.

    See Also:

    "Revoking a Role from a User: Example"

  • If you revoke a role from another role, then Oracle removes the revoked role's privilege domain from the revokee role's privilege domain. Users who have been granted and have enabled the revokee role can continue to exercise the privileges in the revoked role's privilege domain as long as the revokee role remains enabled. However, other users who have been granted the revokee role and subsequently enable it cannot exercise the privileges in the privilege domain of the revoked role.

    See Also:

    "Revoking a Role from a Role: Example"

  • If you revoke a role from PUBLIC, then Oracle makes the role unavailable to all users who have been granted the role through PUBLIC. Any user who has enabled the role can continue to exercise the privileges in its privilege domain as long as it remains enabled. However, users cannot subsequently enable the role. The role is not revoked from users who have been granted the role directly or through other roles.
Restriction on Revoking System Roles

A system role cannot appear more than once in the list of roles to be revoked.

See Also:

Table 17-2 for a list of the roles predefined by Oracle
grantee_clause

FROM grantee_clause identifies users or roles from which the system privilege, role, or object privilege is to be revoked.

PUBLIC

Specify PUBLIC to revoke the privileges or roles from all users.

revoke_object_privileges

object_privilege

Specify the object privilege to be revoked. You can substitute any of the following values: ALTER, DELETE, EXECUTE, INDEX, INSERT, READ, REFERENCES, SELECT, UPDATE.

Note:

Each privilege authorizes some operation. By revoking a privilege, you prevent the revokee from performing that operation. However, multiple users may grant the same privilege to the same user, role, or PUBLIC. To remove the privilege from the grantee's privilege domain, all grantors must revoke the privilege. If even one grantor does not revoke the privilege, then the grantee can still exercise the privilege by virtue of that grant.

If you revoke a privilege from a user, then Oracle removes the privilege from the user's privilege domain. Effective immediately, the user cannot exercise the privilege.

  • If that user has granted that privilege to other users or roles, then Oracle also revokes the privilege from those other users or roles.
  • If that user's schema contains a procedure, function, or package that contains SQL statements that exercise the privilege, then the procedure, function, or package can no longer be executed.
  • If that user's schema contains a view on that object, then Oracle invalidates the view.
  • If you revoke the REFERENCES privilege from a user who has exercised the privilege to define referential integrity constraints, then you must specify the CASCADE CONSTRAINTS clause.

    See Also:

    "Revoking an Object Privilege from a User: Example"

If you revoke a privilege from a role, then Oracle removes the privilege from the role's privilege domain. Effective immediately, users with the role enabled cannot exercise the privilege. Other users who have been granted the role cannot exercise the privilege after enabling the role.

If you revoke a privilege from PUBLIC, then Oracle removes the privilege from the privilege domain of each user who has been granted the privilege through PUBLIC. Effective immediately, all such users are restricted from exercising the privilege. However, the privilege is not revoked from users who have been granted the privilege directly or through roles.

See Also:

"Revoking Object Privileges from PUBLIC: Example"

Restriction on Revoking Object Privileges

A privilege cannot appear more than once in the list of privileges to be revoked. A user, a role, or PUBLIC cannot appear more than once in the FROM clause.

ALL [PRIVILEGES]

Specify ALL to revoke all object privileges that you have granted to the revokee. (The keyword PRIVILEGES is provided for semantic clarity and is optional.)

Note:

If no privileges have been granted on the object, then Oracle takes no action and does not return an error.
See Also:

"Revoking All Object Privileges from a User: Example"

CASCADE CONSTRAINTS

This clause is relevant only if you revoke the REFERENCES privilege or ALL [PRIVILEGES]. It drops any referential integrity constraints that the revokee has defined using the REFERENCES privilege (which might have been granted either explicitly or implicitly through a grant of ALL [PRIVILEGES]).

See Also:

"Revoking an Object Privilege with CASCADE CONSTRAINTS: Example"

FORCE

Specify FORCE to revoke the EXECUTE object privilege on user-defined type objects with table or type dependencies. You must use FORCE to revoke the EXECUTE object privilege on user-defined type objects with table dependencies.

If you specify FORCE, then all privileges will be revoked, but all dependent objects are marked INVALID, data in dependent tables becomes inaccessible, and all dependent function-based indexes are marked UNUSABLE. (Regranting the necessary type privilege will revalidate the table.)

See Also:

Oracle9i Database Concepts for detailed information about type dependencies and user-defined object privileges
on_object_clause

The on_object_clause identifies the objects on which privileges are to be revoked.

object

Specify the object on which the object privileges are to be revoked. This object can be:

  • A table, view, sequence, procedure, stored function, or package, materialized view
  • A synonym for a table, view, sequence, procedure, stored function, package, materialized view, or user-defined type
  • A library, indextype, or user-defined operator

If you do not qualify object with schema, then Oracle assumes the object is in your own schema.

See Also:

"Revoking an Object Privilege on a Sequence from a User: Example"

If you revoke the SELECT object privilege (with or without the GRANT OPTION) on the containing table or materialized view of a materialized view, then Oracle invalidates the materialized view.

If you revoke the SELECT object privilege (with or without the GRANT OPTION) on any of the master tables of a materialized view, then Oracle invalidates both the materialized view and its containing table or materialized view.

DIRECTORY directory_name

Specify the directory object on which privileges are to be revoked. You cannot qualify directory_name with schema. The object must be a directory.

See Also:

CREATE DIRECTORY and "Revoking an Object Privilege on a Directory from a User: Example"

JAVA SOURCE | RESOURCE

The JAVA clause lets you specify a Java source or resource schema object on which privileges are to be revoked.

Examples

Revoking a System Privilege from a User: Example

The following statement revokes the DROP ANY TABLE system privilege from the users hr and oe:

REVOKE DROP ANY TABLE
    FROM hr, oe;

The users hr and oe can no longer drop tables in schemas other than their own.

Revoking a Role from a User: Example

The following statement revokes the role dw_manager from the user sh:

REVOKE dw_manager
    FROM sh;

sh can no longer enable the dw_manager role.

Revoking a System Privilege from a Role: Example

The following statement revokes the CREATE TABLESPACE system privilege from the dw_manager role:

REVOKE CREATE TABLESPACE
   FROM dw_manager;

Enabling the dw_manager role no longer allows users to create tablespaces.

Revoking a Role from a Role: Example

To revoke the role dw_user from the role dw_manager, issue the following statement:

REVOKE dw_user
  FROM dw_manager;

dw_user privileges are no longer granted to dw_manager

Revoking an Object Privilege from a User: Example

You can grant DELETE, INSERT, SELECT, and UPDATE privileges on the table orders to the user hr with the following statement:

GRANT ALL
   ON orders TO hr;

To revoke the DELETE privilege on orders from hr, issue the following statement:

REVOKE DELETE
   ON orders FROM hr;
Revoking All Object Privileges from a User: Example

To revoke the remaining privileges on orders that you granted to hr, issue the following statement:

REVOKE ALL
   ON orders FROM hr;
Revoking Object Privileges from PUBLIC: Example

You can grant SELECT and UPDATE privileges on the view emp_details_view to all users by granting the privileges to the role PUBLIC:

GRANT SELECT, UPDATE
    ON emp_details_view TO public;

The following statement revokes UPDATE privilege on emp_details_view from all users:

REVOKE UPDATE
    ON emp_details_view FROM public;

Users can no longer update the emp_details_view view, although users can still query it. However, if you have also granted the UPDATE privilege on emp_details_view to any users, either directly or through roles, then these users retain the privilege.

Revoking an Object Privilege on a Sequence from a User: Example

You can grant the user oe the SELECT privilege on the departments_seq sequence in the schema hr with the following statement:

GRANT SELECT
    ON hr.departments_seq TO oe;

To revoke the SELECT privilege on departments_seq from oe, issue the following statement:

REVOKE SELECT
    ON hr.departments_seq FROM oe;

However, if the user hr has also granted SELECT privilege on departments to sh, then sh can still use departments by virtue of hr's grant.

Revoking an Object Privilege with CASCADE CONSTRAINTS: Example

You can grant oe the privileges REFERENCES and UPDATE on the employees table in the schema hr with the following statement:

GRANT REFERENCES, UPDATE
    ON hr.employees TO oe;

oe can exercise the REFERENCES privilege to define a constraint in his own dependent table that refers to the employees table in the schema hr:

CREATE TABLE dependent
(dependno   NUMBER,
 dependname VARCHAR2(10),
 employee   NUMBER
    CONSTRAINT in_emp REFERENCES hr.employees(employee_id) );

You can revoke the REFERENCES privilege on hr.employees from oe by issuing the following statement that contains the CASCADE CONSTRAINTS clause:

REVOKE REFERENCES
    ON hr.employees
    FROM oe
    CASCADE CONSTRAINTS;

Revoking oe's REFERENCES privilege on hr.employees causes Oracle to drop the in_emp constraint, because oe required the privilege to define the constraint.

However, if oe has also been granted the REFERENCES privilege on hr.employees by a user other than you, then Oracle does not drop the constraint. oe still has the privilege necessary for the constraint by virtue of the other user's grant.

Revoking an Object Privilege on a Directory from a User: Example

You can revoke READ privilege on directory bfile_dir from hr, by issuing the following statement:

REVOKE READ ON DIRECTORY bfile_dir FROM hr;
Revoke Operations that Use GRANT ANY OBJECT PRIVILEGE: Example

Suppose that the database administrator has granted GRANT ANY OBJECT PRIVILEGE to user sh. Now suppose that user hr grants the update privilege on the employees table to oe:

CONNECT hr/hr
GRANT UPDATE ON employees TO oe WITH GRANT OPTION;

This grant gives user oe the right to pass the object privilege along to another user:

CONNECT oe/oe
GRANT UPDATE ON hr.employees TO pm;

User sh, who has the GRANT ANY OBJECT PRIVILEGE, can now act on behalf of user hr and revoke the update privilege from user oe, because oe was granted the privilege by hr:

CONNECT sh/sh
REVOKE UPDATE ON hr.employees FROM oe;

User sh cannot revoke the update privilege from user pm explicitly, because pm received the grant neither from the object owner (hr), nor from sh, nor from another user with GRANT ANY OBJECT PRIVILEGE, but from user oe. However, the preceding statement cascades, removing all privileges that depend on the one revoked. Therefore the object privilege is implicitly revoked from pm as well.

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº««««««««


SQL Statements: DROP SEQUENCE to ROLLBACK, 19 of 19

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROLLBACK

Purpose

Use the ROLLBACK statement to undo work done in the current transaction, or to manually undo the work done by an in-doubt distributed transaction.

Note:

Oracle recommends that you explicitly end transactions in application programs using either a COMMIT or ROLLBACK statement. If you do not explicitly commit the transaction and the program terminates abnormally, then Oracle rolls back the last uncommitted transaction.
See Also:
  • Oracle9i Database Concepts for information on transactions
  • Oracle9i Heterogeneous Connectivity Administrator's Guide for information on distributed transactions
  • SET TRANSACTION for information on setting characteristics of the current transaction
  • COMMIT
  • SAVEPOINT

Prerequisites

To roll back your current transaction, no privileges are necessary.

To manually roll back an in-doubt distributed transaction that you originally committed, you must have the FORCE TRANSACTION system privilege. To manually roll back an in-doubt distributed transaction originally committed by another user, you must have the FORCE ANY TRANSACTION system privilege.

Syntax

rollback::=

Text description of statements_941.gif follows
Text description of rollback

Semantics

WORK

The keyword WORK is optional and is provided for ANSI compatibility.

TO SAVEPOINT Clause

Specify the savepoint to which you want to roll back the current transaction. If you omit this clause, then the ROLLBACK statement rolls back the entire transaction.

Using ROLLBACK without the TO SAVEPOINT clause performs the following operations:

  • Ends the transaction
  • Undoes all changes in the current transaction
  • Erases all savepoints in the transaction
  • Releases the transaction's locks

    See Also:

    SAVEPOINT

Using ROLLBACK with the TO SAVEPOINT clause performs the following operations:

  • Rolls back just the portion of the transaction after the savepoint.
  • Erases all savepoints created after that savepoint. The named savepoint is retained, so you can roll back to the same savepoint multiple times. Prior savepoints are also retained.
  • Releases all table and row locks acquired since the savepoint. Other transactions that have requested access to rows locked after the savepoint must continue to wait until the transaction is committed or rolled back. Other transactions that have not already requested the rows can request and access the rows immediately.
Restrictions on In-doubt Transactions

You cannot manually roll back an in-doubt transaction to a savepoint.

FORCE Clause

Specify FORCE to manually roll back an in-doubt distributed transaction. The transaction is identified by the 'text' containing its local or global transaction ID. To find the IDs of such transactions, query the data dictionary view DBA_2PC_PENDING.

A ROLLBACK statement with a FORCE clause rolls back only the specified transaction. Such a statement does not affect your current transaction.

Restriction on Forcing Rollback

ROLLBACK statements with the FORCE clause are not supported in PL/SQL.

See Also:

Oracle9i Heterogeneous Connectivity Administrator's Guide for more information on distributed transactions and rolling back in-doubt transactions

Examples

Rolling Back Transactions: Examples

The following statement rolls back your entire current transaction:

ROLLBACK;

The following statement rolls back your current transaction to savepoint banda_sal:

ROLLBACK TO SAVEPOINT banda_sal;
See Also:

"Creating Savepoints: Example" for a full version of this example

The following statement manually rolls back an in-doubt distributed transaction:

ROLLBACK WORK
    FORCE '25.32.87';
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 1 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

18
SQL Statements: SAVEPOINT to UPDATE

This chapter contains the following SQL statements:

  • SAVEPOINT
  • SELECT
  • SET CONSTRAINT[S]
  • SET ROLE
  • SET TRANSACTION
  • TRUNCATE
  • UPDATE
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 2 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SAVEPOINT

Purpose

Use the SAVEPOINT statement to identify a point in a transaction to which you can later roll back.

See Also:
  • Oracle9i Database Concepts for information on savepoints.
  • ROLLBACK for information on rolling back transactions
  • SET TRANSACTION for information on setting characteristics of the current transaction

Prerequisites

None.

Syntax

savepoint::=

Text description of statements_104.gif follows
Text description of savepoint

Semantics

savepoint

Specify the name of the savepoint to be created.

Savepoint names must be distinct within a given transaction. If you create a second savepoint with the same identifier as an earlier savepoint, then the earlier savepoint is erased. After a savepoint has been created, you can either continue processing, commit your work, roll back the entire transaction, or roll back to the savepoint.

Example

Creating Savepoints: Example

To update Banda's and Greene's salary in the sample table hr.employees, check that the total department salary does not exceed 314,000, then reenter Greene's salary, enter:

UPDATE employees
    SET salary = 7000
    WHERE last_name = 'Banda';
SAVEPOINT banda_sal;

UPDATE employees
    SET salary = 12000
    WHERE last_name = 'Greene';
SAVEPOINT greene_sal;

SELECT SUM(salary) FROM employees;

ROLLBACK TO SAVEPOINT banda_sal;

UPDATE employees
    SET salary = 11000
    WHERE last_name = 'Greene';

COMMIT;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý ðº ðº ðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 3 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SELECT

Purpose

Use a SELECT statement or subquery to retrieve data from one or more tables, object tables, views, object views, or materialized views.

Note:

If the result (or part of the result) of a SELECT statement is equivalent to an existing materialized view, then Oracle may use the materialized view in place of one or more tables specified in the SELECT statement. This substitution is called query rewrite, and takes place only if cost optimization is enabled and the QUERY_REWRITE_ENABLED parameter is set to TRUE. To determine whether query write has occurred, use the EXPLAIN PLAN statement.
See Also:
  • Chapter 8, "SQL Queries and Subqueries" for general information on queries and subqueries
  • Oracle9i Data Warehousing Guide for more information on materialized views and query rewrite
  • EXPLAIN PLAN

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

For you to select data from a table or materialized view, the table or materialized view must be in your own schema or you must have the SELECT privilege on the table or materialized view.

For you to select rows from the base tables of a view,

  • You must have the SELECT privilege on the view, and
  • Whoever owns the schema containing the view must have the SELECT privilege on the base tables.

The SELECT ANY TABLE system privilege also allows you to select data from any table or any materialized view or any view's base table.

To issue a flashback query (using the flashback_clause), either you must have FLASHBACK object privilege on the objects in the select list, or you must have FLASHBACK ANY TABLE system privilege.

Syntax

select::=

Text description of statements_1012.gif follows
Text description of select

(for_update_clause::= )

subquery::=

Text description of statements_1013.gif follows
Text description of subquery

(subquery_factoring_clause::= , select_list::= , table_reference::= , hierarchical_query_clause::= , group_by_clause::= , order_by_clause::= )

subquery_factoring_clause::=

Text description of statements_10a.gif follows
Text description of subquery_factoring_clause

select_list::=

Text description of statements_1031a.gif follows
Text description of select_list

table_reference::=

Text description of statements_1011.gif follows
Text description of table_reference

(query_table_expression::= , flashback_clause::= )

flashback_clause::=

Text description of statements_1033.gif follows
Text description of flashback_clause

query_table_expression::=

Text description of statements_1014.gif follows
Text description of query_table_expression

(subquery_restriction_clause::= , table_collection_expression::= )

sample_clause::=

Text description of statements_1015.gif follows
Text description of sample_clause

subquery_restriction_clause::=

Text description of statements_1016.gif follows
Text description of subquery_restriction_clause

table_collection_expression::=

Text description of statements_1017.gif follows
Text description of table_collection_expression

joined_table::=

Text description of statements_1032b.gif follows
Text description of joined_table

(table_reference::= )

join_type::=

Text description of statements_1010.gif follows
Text description of join_type

where_clause::=

Text description of where_clause.gif follows
Text description of where_clause

hierarchical_query_clause::=

Text description of statements_1018.gif follows
Text description of hierarchical_query_clause

group_by_clause::=

Text description of statements_1029.gif follows
Text description of group_by_clause

(rollup_cube_clause::= , grouping_sets_clause::= )

rollup_cube_clause::=

Text description of statements_1030a.gif follows
Text description of rollup_cube_clause

(grouping_expression_list::= )

grouping_sets_clause::=

Text description of statements_109.gif follows
Text description of grouping_sets_clause

(rollup_cube_clause::= , grouping_expression_list::= )

grouping_expression_list::=

Text description of statements_1031.gif follows
Text description of grouping_expression_list

expression_list::=

Text description of statements_1032.gif follows
Text description of expression_list

order_by_clause::=

Text description of statements_1020.gif follows
Text description of order_by_clause

for_update_clause::=

Text description of statements_1021.gif follows
Text description of for_update_clause

Semantics

subquery_factoring_clause

The subquery_factoring_clause (WITH query_name) lets you assign names to subquery blocks. You can then reference the subquery block multiple places in the query by specifying the query name. Oracle optimizes the query by treating the query name as either an inline view or as a temporary table.

You can specify this clause in any top-level SELECT statement and in most types of subqueries. The query name is visible to all subsequent subqueries (except the subquery that defines the query name itself) and to the main query.

Restrictions on Subquery Factoring
  • You cannot nest this clause. That is, you cannot specify the subquery_factoring_clause as a subquery within another subquery_factoring_clause.
  • In a query with set operators, the set operator subquery cannot contain the subquery_factoring_clause, but the FROM subquery can contain the subquery_factoring_clause.

    See Also:
    • Oracle9i Database Concepts for information about inline views
    • Oracle9i Data Warehousing Guide and Oracle9i Application Developer's Guide - Fundamentals for information on using the subquery factoring feature
    • "Subquery Factoring: Example"

hint

Specify a comment that passes instructions to the optimizer on choosing an execution plan for the statement.

See Also:

"Hints" and Oracle9i Database Performance Tuning Guide and Reference for the syntax and description of hints

DISTINCT | UNIQUE

Specify DISTINCT or UNIQUE if you want Oracle to return only one copy of each set of duplicate rows selected (these two keywords are synonymous). Duplicate rows are those with matching values for each expression in the select list.

Restrictions on DISTINCT and UNIQUE Queries
  • When you specify DISTINCT or UNIQUE, the total number of bytes in all select list expressions is limited to the size of a data block minus some overhead. This size is specified by the initialization parameter DB_BLOCK_SIZE.
  • You cannot specify DISTINCT if the select_list contains LOB columns.

ALL

Specify ALL if you want Oracle to return all rows selected, including all copies of duplicates. The default is ALL.

* (asterisk)

Specify the asterisk to select all columns from all tables, views, or materialized views listed in the FROM clause.

Note:

If you are selecting from a table (that is, you specify a table in the FROM clause rather than a view or a materialized view), then then columns that have been marked as UNUSED by the ALTER TABLE SET UNUSED statement are not selected.
See Also:

ALTER TABLE , "Simple Query Examples" , and "Selecting from the DUAL Table: Example"

select_list

The select_list lets you specify the columns you want to retrieve from the database.

query_name

For query_name, specify a name already specified in the subquery_factoring_clause. You must have specified the subquery_factoring_clause in order to specify query_name in the select_list. If you specify query_name in the select_list, then you also must specify query_name in the query_table_expression (FROM clause).

table.* | view.* | materialized view.*

Specify the object name followed by a period and the asterisk to select all columns from the specified table, view, or materialized view. A query that selects rows from two or more tables, views, or materialized views is a join.

You can use the schema qualifier to select from a table, view, or materialized view in a schema other than your own. If you omit schema, then Oracle assumes the table, view, or materialized view is in your own schema.

See Also:

"Joins"

expr

Specify an expression representing the information you want to select. A column name in this list can be qualified with schema only if the table, view, or materialized view containing the column is qualified with schema in the FROM clause. If you specify a member method of an object type, then you must follow the method name with parentheses even if the method takes no arguments.

See Also:

"Selecting Sequence Values: Examples"

c_alias

Specify a different name (alias) for the column expression. Oracle will use this alias in the column heading. The AS keyword is optional. The alias effectively renames the select list item for the duration of the query. The alias can be used in the order_by_clause, but not other clauses in the query.

See Also:
  • Oracle9i Data Warehousing Guide for information on using the expr AS c_alias syntax with the UNION ALL operator in queries of multiple materialized views
  • "About SQL Expressions" for the syntax of expr
Restrictions on the Select List
  • If you also specify a group_by_clause in this statement, then this select list can contain only the following types of expressions:
    • Constants
    • Aggregate functions and the functions USER, UID, and SYSDATE
    • Expressions identical to those in the group_by_clause
    • Expressions involving the preceding expressions that evaluate to the same value for all rows in a group
  • You can select a rowid from a join view only if the join has one and only one key-preserved table. The rowid of that table becomes the rowid of the view.

    See Also:

    Oracle9i Database Administrator's Guide for information on key-preserved tables
  • If two or more tables have some column names in common, then you must qualify column names with names of tables.

FROM Clause

The FROM clause lets you specify the objects from which data is selected.

query_table_expression

Use the query_table_expression clause to identify a table, view, materialized view, or partition, or to specify a subquery that identifies the objects.

See Also:

"Using Subqueries: Examples"

ONLY

The ONLY clause applies only to views. Specify ONLY if the view in the FROM clause is a view belonging to a hierarchy and you do not want to include rows from any of its subviews.

flashback_clause

Use the flashback_clause to query past data from a table, view, or materialized view. If you specify SCN, then expr must evaluate to a number. If you specify TIMESTAMP, then expr must evaluate to a timestamp value. Oracle returns rows as they existed at the specified system change number or time.

Note:

This clause implements SQL-driven flashback, which lets you specify a different system change number or timestamp for each object in the select list. You can also implement session-level flashback using the DBMS_FLASHBACK package. For information on session-level flashback, please refer to Oracle9i Application Developer's Guide - Fundamentals and Oracle9i Supplied PL/SQL Packages and Types Reference.
Restrictions on Flashback Queries
  • You cannot apply the flashback_clause to a remote database object. However, you can include remote objects in a join with local objects to which you apply the flashback_clause.
  • You cannot specify this clause if you have specify query_name in the query_table_expression.

    See Also:
    • Oracle9i Application Developer's Guide - Fundamentals for more information on flashback queries
    • "Using Flashback Queries: Example"
PARTITION | SUBPARTITION

For PARTITION or SUBPARTITION, specify the name of the partition or subpartition within table from which you want to retrieve data.

For range- and list-partitioned data, as an alternative to this clause, you can specify a condition in the WHERE clause that restricts the retrieval to one or more partitions of table. Oracle will interpret the condition and fetch data from only those partitions. (It is not possible to formulate such a WHERE condition for hash-partitioned data.)

See Also:

"Selecting from a Partition: Example"

dblink

For dblink, specify the complete or partial name for a database link to a remote database where the table, view, or materialized view is located. This database need not be an Oracle database.

See Also:
  • "Referring to Objects in Remote Databases" for more information on referring to database links
  • "Distributed Queries" for more information about distributed queries and "Using Distributed Queries: Example"

If you omit dblink, then Oracle assumes that the table, view, or materialized view is on the local database.

Restrictions on Database Links
  • You cannot query a user-defined type or an object REF on a remote table.
  • You cannot query columns of type AnyType, AnyData, or AnyDataSet from remote tables.
table | view | materialized view

For table, view, or materialized view, specify the name of a table, view, or materialized view from which data is selected.

sample_clause

The sample_clause lets you instruct Oracle to select from a random sample of rows from the table, rather than from the entire table.

See Also:

"Selecting a Sample: Examples"

BLOCK

BLOCK instructs Oracle to perform random block sampling instead of random row sampling.

See Also:

Oracle9i Database Concepts for a discussion of the difference
sample_percent

sample_percent is a number specifying the percentage of the total row or block count to be included in the sample. The value must be in the range .000001 to (but not including) 100.

Restrictions on Sampling During Queries
  • You can specify SAMPLE only in a query that selects from a single table. Joins are not supported. However, you can achieve the same results by using a CREATE TABLE ... AS SELECT query to materialize a sample of an underlying table and then rewrite the original query to refer to the newly created table sample. If you wish, you can write additional queries to materialize samples for other tables.

    See Also:

    "Selecting a Sample: Examples"

  • When you specify SAMPLE, Oracle automatically uses cost-based optimization. Rule-based optimization is not supported with this clause.

    Caution:

    The use of statistically incorrect assumptions when using this feature can lead to incorrect or undesirable results.
subquery_restriction_clause

The subquery_restriction_clause lets you restrict the subquery in one of the following ways:

WITH READ ONLY

Specify WITH READ ONLY to indicate that the table or view cannot be updated.

WITH CHECK OPTION

Specify WITH CHECK OPTION to indicate that Oracle prohibits any changes to the table or view that would produce rows that are not included in the subquery.

CONSTRAINT constraint

Specify the name of the CHECK OPTION constraint. If you omit this identifier, Oracle automatically assigns the constraint a name of the form SYS_C n, where n is an integer that makes the constraint name unique within the database.

See Also:

"Using the WITH CHECK OPTION Clause: Example"

table_collection_expression

The table_collection_expression lets you inform Oracle that the value of collection_expression should be treated as a table for purposes of query and DML operations. The collection_expression can be a subquery, a column, a function, or a collection constructor. Regardless of its form, it must return a collection value (that is, a value whose type is nested table or varray). This process of extracting the elements of a collection is called collection unnesting.

Note:

In earlier releases of Oracle, when collection_expression was a subquery, table_collection_expression was expressed as "THE subquery". That usage is now deprecated.

The collection_expression can reference columns of tables defined to its left in the FROM clause. This is called left correlation. Left correlation can occur only in table_collection_expression. Other subqueries cannot contains references to columns defined outside the subquery.

The optional "(+)" lets you specify that table_collection_expression should return a row with all fields set to NULL if the collection is null or empty. The "(+)" is valid only if collection_expression uses left correlation. The result is similar to that of an outer join.

Note:

When you use the "(+)" syntax in the WHERE clause of a subquery in an UPDATE or DELETE operation, you must specify two tables in the FROM clause of the subquery. Oracle ignores the outer join syntax unless there is a join in the subquery itself.
See Also:
  • "Outer Joins"
  • "Table Collections: Examples" and "Collection Unnesting: Examples"
t_alias

Specify a correlation name (alias) for the table, view, materialized view, or subquery for evaluating the query. Correlation names are most often used in a correlated query. Other references to the table, view, or materialized view throughout the query must refer to this alias.

Note:

This alias is required if the query_table_expr_clause references any object type attributes or object type methods.
See Also:

"Using Correlated Subqueries: Examples"

joined_table

Use the joined_table syntax to identify tables that are part of a join from which to select data.

See Also:

"Joins" for more information on joins, "Using Join Queries: Examples" , "Using Self Joins: Example" , and "Using Outer Joins: Examples"

join_type

The join_type indicates the kind of join being performed:

  • Specify INNER to indicate explicitly that an inner join is being performed. This is the default.
  • Specify RIGHT to indicate a right outer join.
  • Specify LEFT to indicate a left outer join.
  • Specify FULL to indicate a full or two-sided outer join. In addition to the inner join, rows from both tables that have not been returned in the result of the inner join will be preserved and extended with nulls.
  • You can specify the optional OUTER keyword following RIGHT, LEFT, or FULL to explicitly clarify that an outer join is being performed.
JOIN

The JOIN keyword explicitly states that a join is being performed. You can use this syntax to replace the comma-delimited table expressions used in WHERE clause joins with FROM clause join syntax.

ON condition

Use the ON clause to specify a join condition. Doing so lets you specify join conditions separate from any search or filter conditions in the WHERE clause.

USING column

When you are specifying an equijoin of columns that have the same name in both tables, the USING column clause indicates the columns to be used. You can use this clause only if the join columns in both tables have the same name. Do not qualify the column name with a table name or table alias.

In an outer join with the USING clause, the query returns a single column which is a coalesce of the two matching columns in the join. The coalesce functions as follows:

COALESCE (a, b) = a if a NOT NULL, else b.

Therefore:

  • A left outer join returns all the common column values from the left table in the FROM clause.
  • A right outer join returns all the common column values from the right table in the FROM clause.
  • A full outer join returns all the common column values from both joined tables.
Restriction on Columns Used in Joins

You cannot specify a LOB column or a collection column in the USING column clause.

See Also:

"Using Outer Joins: Examples"

CROSS JOIN

The CROSS keyword indicates that a cross join is being performed. A cross join produces the cross-product of two relations and is essentially the same as the comma-delimited Oracle notation.

NATURAL JOIN

The NATURAL keyword indicates that a natural join is being performed. A natural join is based on all columns in the two tables that have the same name. It selects rows from the two tables that have equal values in the relevant columns. When specifying columns that are involved in the natural join, do not qualify the column name with a table name or table alias.

Note:

On occasion, the table pairings in natural or cross joins may be ambiguous. For example:

   a NATURAL LEFT JOIN b LEFT JOIN c ON b.c1 = c.c1

can be interpreted in either of the following ways:

   a NATURAL LEFT JOIN (b LEFT JOIN c ON b.c1 = c.c1)
  (a NATURAL LEFT JOIN b) LEFT JOIN c ON b.c1 = c.c1

To avoid this ambiguity, you can use parentheses to specify the pairings of joined tables. In the absence of such parentheses, Oracle uses left associativity, pairing the tables from left to right.
Restriction on Natural Joins

You cannot specify a LOB column, columns of AnyType, AnyData, or AnyDataSet, or a collection column as part of a natural join.

where_clause

The WHERE condition lets you restrict the rows selected to those that satisfy one or more conditions. For condition, specify any valid SQL condition.

If you omit this clause, then Oracle returns all rows from the tables, views, or materialized views in the FROM clause.

Note:

If this clause refers to a DATE column of a partitioned table or index, then Oracle performs partition pruning only if (1) you created the table or index partitions by fully specifying the year using the TO_DATE function with a 4-digit format mask, and (2) you specify the date in the query's where_clause using the TO_DATE function and either a 2- or 4-digit format mask.
See Also:
  • Chapter 5, "Conditions" for the syntax description of condition
  • "Selecting from a Partition: Example"

hierarchical_query_clause

The hierarchical_query_clause lets you select rows in a hierarchical order.

SELECT statements that contain hierarchical queries can contain the LEVEL pseudocolumn in the select list. LEVEL returns the value 1 for a root node, 2 for a child node of a root node, 3 for a grandchild, and so on. The number of levels returned by a hierarchical query may be limited by available user memory.

If you specify this clause, do not specify either ORDER BY or GROUP BY, as they will destroy the hierarchical order of the CONNECT BY results. If you want to order rows of siblings of the same parent, use the ORDER SIBLINGS BY clause.

See Also:

"Hierarchical Queries" for a discussion of hierarchical queries and "Using the LEVEL Pseudocolumn: Examples"

START WITH Clause

Specify a condition that identifies the row(s) to be used as the root(s) of a hierarchical query. Oracle uses as root(s) all rows that satisfy this condition. If you omit this clause, then Oracle uses all rows in the table as root rows. The START WITH condition can contain a subquery, but it cannot contain a scalar subquery expression.

CONNECT BY Clause

Specify a condition that identifies the relationship between parent rows and child rows of the hierarchy. The connect_by_condition can be any condition as described in Chapter 5, "Conditions". However, it must use the PRIOR operator to refer to the parent row.

Restriction on the CONNECT BY Clause

The connect_by_condition cannot contain a regular subquery or a scalar subquery expression.

See Also:
  • "Pseudocolumns" for more information on LEVEL
  • "Hierarchical Queries" for general information on hierarchical queries
  • "Hierarchical Query Examples"
Notes on Hierarchical Queries

If you specify a hierarchical query and also specify the ORDER BY clause, then the ORDER BY clause takes precedence over any ordering specified by the hierarchical query, unless you specify the SIBLINGS keyword in the ORDER BY clause.

The manner in which Oracle processes a WHERE clause (if any) in a hierarchical query depends on whether the WHERE clause contains a join:

  • If the WHERE predicate contains a join, Oracle applies the join predicates before doing the CONNECT BY processing.
  • If the WHERE clause does not contain a join, Oracle applies all predicates other than the CONNECT BY predicates after doing the CONNECT BY processing without affecting the other rows of the hierarchy.

group_by_clause

Specify the GROUP BY clause if you want Oracle to group the selected rows based on the value of expr(s) for each row and return a single row of summary information for each group. If this clause contains CUBE or ROLLUP extensions, then Oracle produces superaggregate groupings in addition to the regular groupings.

Expressions in the GROUP BY clause can contain any columns of the tables, views, or materialized views in the FROM clause, regardless of whether the columns appear in the select list.

The GROUP BY clause groups rows but does not guarantee the order of the result set. To order the groupings, use the ORDER BY clause.

See Also:
  • Oracle9i Data Warehousing Guide for an expanded discussion and examples of using SQL grouping syntax for data aggregation
  • the GROUP_ID, GROUPING, and GROUPING_ID functions for examples
  • "Using the GROUP BY Clause: Examples"
ROLLUP

The ROLLUP operation in the simple_grouping_clause groups the selected rows based on the values of the first n, n-1, n-2, ... 0 expressions in the GROUP BY specification, and returns a single row of summary for each group. You can use the ROLLUP operation to produce subtotal values by using it with the SUM function. When used with SUM, ROLLUP generates subtotals from the most detailed level to the grand total. Aggregate functions such as COUNT can be used to produce other kinds of superaggregates.

For example, given three expressions (n=3) in the ROLLUP clause of the simple_grouping_clause, the operation results in n+1 = 3+1 = 4 groupings.

Rows grouped on the values of the first 'n' expressions are called regular rows, and the others are called superaggregate rows.

See Also:

Oracle9i Data Warehousing Guide for information on using ROLLUP with materialized views
CUBE

The CUBE operation in the simple_grouping_clause groups the selected rows based on the values of all possible combinations of expressions in the specification, and returns a single row of summary information for each group. You can use the CUBE operation to produce cross-tabulation values.

For example, given three expressions (n=3) in the CUBE clause of the simple_grouping_clause, the operation results in 2n = 23 = 8 groupings. Rows grouped on the values of 'n' expressions are called regular rows, and the rest are called superaggregate rows.

See Also:
  • Oracle9i Data Warehousing Guide for information on using CUBE with materialized views
  • "Using the GROUP BY CUBE Clause: Example"
GROUPING SETS

GROUPING SETS are a further extension of the GROUP BY clause that let you specify multiple groupings of data. Doing so facilitates efficient aggregation by pruning the aggregates you do not need. You specify just the desired groups, and Oracle does not need to perform the full set of aggregations generated by CUBE or ROLLUP. Oracle computes all groupings specified in the GROUPING SETS clause and combines the results of individual groupings with a UNION ALL operation. The UNION ALL means that the result set can include duplicate rows.

Within the GROUP BY clause, you can combine expressions in various ways:

  • To specify composite columns, you group columns within parentheses so that Oracle treats them as a unit while computing ROLLUP or CUBE operations.
  • To specify concatenated grouping sets, you separate multiple grouping sets, ROLLUP, and CUBE operations with commas so that Oracle combines them into a single GROUP BY clause. The result is a cross-product of groupings from each grouping set.

    See Also:

    "Using the GROUPING SETS Clause: Example"

HAVING Clause

Use the HAVING clause to restrict the groups of returned rows to those groups for which the specified condition is TRUE. If you omit this clause, then Oracle returns summary rows for all groups.

Specify GROUP BY and HAVING after the where_clause and hierarchical_query_clause. If you specify both GROUP BY and HAVING, then they can appear in either order.

Restriction on the HAVING Clause

The HAVING condition cannot contain a scalar subquery expression.

See Also:

"Using the HAVING Condition: Example"

Restrictions on the GROUP BY Clause:

The expressions can be of any form except scalar subquery expressions.

  • You cannot specify LOB columns, nested tables, or varrays as part of expr.
  • If the group_by_clause references any object type columns, then the query will not be parallelized.

    See Also:

    the syntax description of expr in "About SQL Expressions" and the syntax description of condition in Chapter 5, "Conditions"

Set Operators: UNION, UNION ALL, INTERSECT, MINUS

These set operators combine the rows returned by two SELECT statements into a single result. The number and datatypes of the columns selected by each component query must be the same, but the column lengths can be different. The names of the columns in the result set are the names of the expressions in the select list preceding the set operator.

If you combine more than two queries with set operators, then Oracle evaluates adjacent queries from left to right. You can use parentheses to specify a different order of evaluation.

See Also:

"The UNION [ALL], INTERSECT, MINUS Operators" for information on these operators
Restrictions on Set Operators
  • The set operators are not valid on columns of type BLOB, CLOB, BFILE, VARRAY, or nested table.
  • The UNION, INTERSECT, and MINUS operators are not valid on LONG columns.
  • If the select list preceding the set operator contains an expression, then you must provide a column alias for the expression in order to refer to it in the order_by_clause.
  • You cannot also specify the for_update_clause with these set operators.
  • You cannot specify the order_by_clause in the subquery of these operators.
  • You cannot use these operators in SELECT statements containing TABLE collection expressions.

    Note:

    To comply with emerging SQL standards, a future release of Oracle will give the INTERSECT operator greater precedence than the other set operators. Therefore, you should use parentheses to specify order of evaluation in queries that use the INTERSECT operator with other set operators.

order_by_clause

Use the ORDER BY clause to order rows returned by the statement. Without an order_by_clause, no guarantee exists that the same query executed more than once will retrieve rows in the same order.

SIBLINGS

The SIBLINGS keyword is valid only if you also specify the hierarchical_query_clause (CONNECT BY). ORDER SIBLINGS BY preserves any ordering specified in the hierarchical query clause and then applies the order_by_clause to the siblings of the hierarchy.

expr

expr orders rows based on their value for expr. The expression is based on columns in the select list or columns in the tables, views, or materialized views in the FROM clause.

position

Specify position to order rows based on their value for the expression in this position of the select list; position must be an integer.

See Also:

"Sorting Query Results" for a discussion of ordering query results

You can specify multiple expressions in the order_by_clause. Oracle first sorts rows based on their values for the first expression. Rows with the same value for the first expression are then sorted based on their values for the second expression, and so on. Oracle sorts nulls following all others in ascending order and preceding all others in descending order.

ASC | DESC

Specify whether the ordering sequence is ascending or descending. ASC is the default.

NULLS FIRST | NULLS LAST

Specify whether returned rows containing null values should appear first or last in the ordering sequence.

NULLS LAST is the default for ascending order, and NULLS FIRST is the default for descending order.

Restrictions on the ORDER BY Clause
  • If you have specified the DISTINCT operator in this statement, then this clause cannot refer to columns unless they appear in the select list.
  • An order_by_clause can contain no more than 255 expressions.
  • You cannot order by a LOB column, nested table, or varray.
  • If you specify a group_by_clause in the same statement, then this order_by_clause is restricted to the following expressions:
    • Constants
    • Aggregate functions
    • Analytic functions
    • The functions USER, UID, and SYSDATE
    • Expressions identical to those in the group_by_clause
    • Expressions comprising the preceding expressions that evaluate to the same value for all rows in a group.

      See Also:

      "Using the ORDER BY Clause: Examples"

for_update_clause

The FOR UPDATE clause lets you lock the selected rows so that other users cannot lock or update the rows until you end your transaction. You can specify this clause only in a top-level SELECT statement (not in subqueries).

Note:

Prior to updating a LOB value, you must lock the row containing the LOB. One way to lock the row is with an embedded SELECT ... FOR UPDATE statement. You can do this using one of the programmatic languages or DBMS_LOB package. For more information on lock rows before writing to a LOB, see Oracle9i Application Developer's Guide - Large Objects (LOBs).

Nested table rows are not locked as a result of locking the parent table rows. If you want the nested table rows to be locked, then you must lock them explicitly.

Restrictions on the FOR UPDATE Clause
  • You cannot specify this clause with the following other constructs: the DISTINCT operator, CURSOR expression, set operators, group_by_clause, or aggregate functions.
  • The tables locked by this clause must all be located on the same database, and on the same database as any LONG columns and sequences referenced in the same statement.

    See Also:

    "Using the FOR UPDATE Clause: Examples"

OF ... column

Use the OF ... column clause to lock the select rows only for a particular table or view in a join. The columns in the OF clause only indicate which table or view rows are locked. The specific columns that you specify are not significant. However, you must specify an actual column name, not a column alias. If you omit this clause, then Oracle locks the selected rows from all the tables in the query.

NOWAIT | WAIT

The NOWAIT and WAIT clauses let you tell Oracle how to proceed if the SELECT statement attempts to lock a row that is locked by another user.

NOWAIT

Specify NOWAIT to return control to you immediately if a lock exists.

WAIT

Specify WAIT to instruct Oracle to wait integer seconds for the row to become available, and then return control to you.

If you specify neither WAIT nor NOWAIT, then Oracle waits until the row is available and then returns the results of the SELECT statement.

Examples

Subquery Factoring: Example

The following statement creates the query names dept_costs and avg_cost for the initial query block containing a join, and then uses the query names in the body of the main query.

WITH
   dept_costs AS (
      SELECT department_name, SUM(salary) dept_total
         FROM employees e, departments d
         WHERE e.department_id = d.department_id
      GROUP BY department_name),
   avg_cost AS (
      SELECT SUM(dept_total)/COUNT(*) avg
      FROM dept_costs)
SELECT * FROM dept_costs
   WHERE dept_total >
      (SELECT avg FROM avg_cost)
      ORDER BY department_name;

DEPARTMENT_NAME                DEPT_TOTAL
------------------------------ ----------
Sales                              313800
Shipping                           156400
Simple Query Examples

The following statement selects rows from the employees table with the department number of 30:

SELECT *
   FROM employees
   WHERE department_id = 30;

The following statement selects the name, job, salary and department number of all employees except purchase clerks from department number 30:

SELECT last_name, job_id, salary, department_id
   FROM employees
   WHERE NOT (job_id = 'PU_CLERK' AND department_id = 30);

The following statement selects from subqueries in the FROM clause and gives departments' total employees and salaries as a decimal value of all the departments:

SELECT a.department_id "Department",
   a.num_emp/b.total_count "%_Employees",
   a.sal_sum/b.total_sal "%_Salary"
FROM
(SELECT department_id, COUNT(*) num_emp, SUM(salary) sal_sum
   FROM employees
   GROUP BY department_id) a,
(SELECT COUNT(*) total_count, SUM(salary) total_sal
   FROM employees) b;
Selecting from a Partition: Example

You can select rows from a single partition of a partitioned table by specifying the keyword PARTITION in the FROM clause. This SQL statement assigns an alias for and retrieves rows from the sales_q2_2000 partition of the sample table sh.sales:

SELECT * FROM sales PARTITION (sales_q2_2000) s
   WHERE s.amount_sold > 10000;

The following example selects rows from the oe.orders table for orders earlier
than a specified date: SELECT * FROM orders
   WHERE order_date < TO_DATE('2000-06-15', 'YYYY-MM-DD');
Selecting a Sample: Examples

The following query estimates the number of orders in the oe.orders table:

SELECT COUNT(*) * 100 FROM orders SAMPLE (1);

The following example creates a sampled subset of the sample table hr.employees table and then joins the resulting sampled table with departments. This operation circumvents the restriction that you cannot specify the sample_clause in join queries:

CREATE TABLE sample_emp AS
   SELECT employee_id, department_id FROM employees SAMPLE(10);

SELECT e.employee_id FROM sample_emp e, departments d
   WHERE e.department_id = d.department_id
   AND d.department_name = 'Sales';
Using Flashback Queries: Example

The following statements show a current value from the sample table hr.employees and then changes the value:

SELECT salary FROM employees
   WHERE last_name = 'Chung';

    SALARY
----------
      3800

UPDATE employees SET salary = 4000
   WHERE last_name = 'Chung';
1 row updated.

SELECT salary FROM employees
   WHERE last_name = 'Chung';

    SALARY
----------
      4000

To learn what the value was before the update, you can use the following flashback query:

SELECT salary FROM employees
   AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '1' DAY)
   WHERE last_name = 'Chung';

    SALARY
----------
      3800

To revert to the earlier value, use the flashback query as the subquery of another UPDATE statement:

UPDATE employees SET salary =
   (SELECT salary FROM employees
   AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '1' DAY)
   WHERE last_name = 'Chung')
   WHERE last_name = 'Chung';
1 row updated.

SELECT salary FROM employees
   WHERE last_name = 'Chung';

    SALARY
----------
      3800
Using the GROUP BY Clause: Examples

To return the minimum and maximum salaries for each department in the employees table, issue the following statement:

SELECT department_id, MIN(salary), MAX (salary)
     FROM employees
     GROUP BY department_id;

To return the minimum and maximum salaries for the clerks in each department, issue the following statement:

SELECT department_id, MIN(salary), MAX (salary)
     FROM employees
     WHERE job_id = 'PU_CLERK'
     GROUP BY department_id;
Using the GROUP BY CUBE Clause: Example

To return the number of employees and their average yearly salary across all possible combinations of department and job category, issue the following query on the sample tables hr.employees and hr.departments:

SELECT DECODE(GROUPING(department_name), 1, 'All Departments',
      department_name) AS department_name,
   DECODE(GROUPING(job_id), 1, 'All Jobs', job_id) AS job_id,
   COUNT(*) "Total Empl", AVG(salary) * 12 "Average Sal"
   FROM employees e, departments d
   WHERE d.department_id = e.department_id
   GROUP BY CUBE (department_name, job_id);

DEPARTMENT_NAME                JOB_ID     Total Empl Average Sal
------------------------------ ---------- ---------- -----------
Accounting                     AC_ACCOUNT          1       99600
Accounting                     AC_MGR              1      144000
Accounting                     All Jobs            2      121800
Administration                 AD_ASST             1       52800
.
.
.
All Departments                ST_MAN              5       87360
All Departments                All Jobs          107  77798.1308
Using the GROUPING SETS Clause: Example

The following example finds the sum of sales aggregated for three precisely specified groups:

  • (channel_desc, calendar_month_desc, country_id)
  • (channel_desc, country_id)
  • (calendar_month_desc, country_id)

Without the GROUPING SETS syntax, you would have to write less efficient queries with more complicated SQL. For example, you could run three separate queries and UNION them, or run a query with a CUBE(channel_desc, calendar_month_desc, country_id) operation and filter out 5 of the 8 groups it would generate.

SELECT channel_desc, calendar_month_desc, co.country_id,
      TO_CHAR(sum(amount_sold) , '9,999,999,999') SALES$
   FROM sales, customers, times, channels, countries co
   WHERE sales.time_id=times.time_id
      AND sales.cust_id=customers.cust_id
      AND sales.channel_id= channels.channel_id
      AND customers.country_id = co.country_id
      AND channels.channel_desc IN ('Direct Sales', 'Internet')
      AND times.calendar_month_desc IN ('2000-09', '2000-10')
      AND co.country_id IN ('UK', 'US')
  GROUP BY GROUPING SETS(
      (channel_desc, calendar_month_desc, co.country_id),
      (channel_desc, co.country_id),
      ( calendar_month_desc, co.country_id) );

CHANNEL_DESC         CALENDAR CO SALES$
-------------------- -------- -- --------------
Direct Sales         2000-09  UK      1,378,126
Direct Sales         2000-10  UK      1,388,051
Direct Sales         2000-09  US      2,835,557
Direct Sales         2000-10  US      2,908,706
Internet             2000-09  UK        911,739
Internet             2000-10  UK        876,571
Internet             2000-09  US      1,732,240
Internet             2000-10  US      1,893,753
Direct Sales                  UK      2,766,177
Direct Sales                  US      5,744,263
Internet                      UK      1,788,310
Internet                      US      3,625,993
                     2000-09  UK      2,289,865
                     2000-09  US      4,567,797
                     2000-10  UK      2,264,622
                     2000-10  US      4,802,459
See Also:

the functions GROUP_ID, GROUPING, and GROUPING_ID for more information on those functions
Hierarchical Query Examples

The following query with a CONNECT BY clause defines a hierarchical relationship in which the employee_id value of the parent row is equal to the manager_id value of the child row:

SELECT last_name, employee_id, manager_id FROM employees
   CONNECT BY employee_id = manager_id;

In the following CONNECT BY clause, the PRIOR operator applies only to the employee_id value. To evaluate this condition, Oracle evaluates employee_id values for the parent row and manager_id, salary, and commission_pct values for the child row:

SELECT last_name, employee_id, manager_id FROM employees
   CONNECT BY PRIOR employee_id = manager_id
   AND salary > commission_pct;

To qualify as a child row, a row must have a manager_id value equal to the employee_id value of the parent row and it must have a salary value greater than its commission_pct value.

Using the HAVING Condition: Example

To return the minimum and maximum salaries for the employees in each department whose lowest salary is less than $5,000, issue the next statement:

SELECT department_id, MIN(salary), MAX (salary)
   FROM employees
   GROUP BY department_id
   HAVING MIN(salary) < 5000;

DEPARTMENT_ID MIN(SALARY) MAX(SALARY)
------------- ----------- -----------
           10        4400        4400
           30        2500       11000
           50        2100        8200
           60        4200        9000
Using the ORDER BY Clause: Examples

To select all salesmen's records from employees, and order the results by commission in descending order, issue the following statement:

SELECT *
   FROM employees
   WHERE job_id = 'PU_CLERK'
   ORDER BY commission_pct DESC;

To select information from employees ordered first by ascending department number and then by descending salary, issue the following statement:

SELECT last_name, department_id, salary
   FROM employees
   ORDER BY department_id ASC, salary DESC;

To select the same information as the previous SELECT and use the positional ORDER BY notation, issue the following statement:

SELECT last_name, department_id, salary
   FROM employees
   ORDER BY 2 ASC, 3 DESC;
Using the FOR UPDATE Clause: Examples

The following statement locks rows in the employees table with purchasing clerks located in Oxford (location_id 2500) and locks rows in the departments table with departments in Oxford that have purchasing clerks:

SELECT e.employee_id, e.salary, e.commission_pct
   FROM employees e, departments d
   WHERE job_id = 'SA_REP'
   AND e.department_id = d.department_id
   AND location_id = 2500
   FOR UPDATE;

The following statement locks only those rows in the employees table with purchasing clerks located in Oxford (location_id 2500). No rows are locked in the departments table:

SELECT e.employee_id, e.salary, e.commission_pct
   FROM employees e, departments d
   WHERE job_id = 'SA_REP'
   AND e.department_id = d.department_id
   AND location_id = 2500
   FOR UPDATE OF e.salary;
Using the WITH CHECK OPTION Clause: Example

The following statement is legal even though the third value inserted violates the condition of the subquery where_clause:

INSERT INTO (SELECT department_id, department_name, location_id
   FROM departments WHERE location_id < 2000)
   VALUES (9999, 'Entertainment', 2500);

However, the following statement is illegal because it contains the WITH CHECK OPTION clause:

INSERT INTO (SELECT department_id, department_name, location_id
   FROM departments WHERE location_id < 2000 WITH CHECK OPTION)
   VALUES (9999, 'Entertainment', 2500);
     *
ERROR at line 2:
ORA-01402: view WITH CHECK OPTION where-clause violation
Using Join Queries: Examples

The following examples show various ways of joining tables in a query. In the first example, an equijoin returns the name and job of each employee and the number and name of the department in which the employee works:

SELECT last_name, job_id, departments.department_id, department_name
   FROM employees, departments
   WHERE employees.department_id = departments.department_id;

LAST_NAME           JOB_ID     DEPARTMENT_ID DEPARTMENT_NAME
------------------- ---------- ------------- ----------------------
...
Sciarra             FI_ACCOUNT           100 Finance
Urman               FI_ACCOUNT           100 Finance
Popp                FI_ACCOUNT           100 Finance
...

You must use a join to return this data because employee names and jobs are stored in a different table than department names. Oracle combines rows of the two tables according to this join condition:

employees.department_id = departments.department_id

The following equijoin returns the name, job, department number, and department name of all sales managers:

SELECT last_name, job_id, departments.department_id, department_name
   FROM employees, departments
   WHERE employees.department_id = departments.department_id
   AND job_id = 'SA_MAN';

LAST_NAME           JOB_ID     DEPARTMENT_ID DEPARTMENT_NAME
------------------- ---------- ------------- -----------------------
Russell             SA_MAN                80 Sales
Partners            SA_MAN                80 Sales
Errazuriz           SA_MAN                80 Sales
Cambrault           SA_MAN                80 Sales
Zlotkey             SA_MAN                80 Sales

This query is identical to the preceding example, except that it uses an additional where_clause condition to return only rows with a job value of 'SA_MAN'.

Using Subqueries: Examples

To determine who works in the same department as employee 'Lorentz', issue the following statement:

SELECT last_name, department_id FROM employees
   WHERE department_id =
     (SELECT department_id FROM employees
      WHERE last_name = 'Lorentz');

To give all employees in the employees table a 10% raise if they have changed jobs (that is, if they appear in the job_history table), issue the following statement:

UPDATE employees
    SET salary = salary * 1.1
    WHERE employee_id IN (SELECT employee_id FROM job_history);

To create a second version of the departments table new_departments, with only three of the columns of the original table, issue the following statement:

CREATE TABLE new_departments
   (department_id, department_name, location_id)
   AS SELECT department_id, department_name, location_id
   FROM departments;
Using Self Joins: Example

The following query uses a self join to return the name of each employee along with the name of the employee's manager. (A WHERE clause is added to shorten the output.)

SELECT e1.last_name||' works for '||e2.last_name
   "Employees and Their Managers"
   FROM employees e1, employees e2
   WHERE e1.manager_id = e2.employee_id
      AND e1.last_name LIKE 'R%';

Employees and Their Managers
-------------------------------
Rajs works for Mourgos
Raphaely works for King
Rogers works for Kaufling
Russell works for King

The join condition for this query uses the aliases e1 and e2 for the sample table employees:

e1.manager_id = e2.employee_id
Using Outer Joins: Examples

The following example uses a left outer join to return the names of all departments in the sample schema hr, even if no employees have been assigned to the departments:

SELECT d.department_id, e.last_name
   FROM departments d LEFT OUTER JOIN employees e
   ON d.department_id = e.department_id
   ORDER BY d.department_id;

DEPARTMENT_ID LAST_NAME
------------- -------------------------
           10 Whalen
           20 Hartstein
           20 Fay
           30 Raphaely
...
          250
          260
          270

Users familiar with the traditional Oracle outer joins syntax will recognize the same query in this form:

SELECT d.department_id, e.last_name
   FROM departments d, employees e
   WHERE d.department_id = e.department_id(+)
   ORDER BY d.department_id;

Oracle Corporation strongly recommends that you use the more flexible Oracle9i FROM clause join syntax shown in the former example.

The left outer join returns all departments, including those without any employees. The same statement with a right outer join returns all employees, including those not yet assigned to a department:

Note:

The employee Zeuss was added to the employees table for these examples, and is not part of the sample data.

SELECT d.department_id, e.last_name
   FROM departments d RIGHT OUTER JOIN employees e
   ON d.department_id = e.department_id
   ORDER BY d.department_id;

DEPARTMENT_ID LAST_NAME
------------- -------------------------
...
          110 Higgins
          110 Gietz
              Grant
              Zeuss

It is not clear from this result whether employees Grant and Zeuss have department_id NULL, or whether their department_id is not in the departments table. To determine this requires a full outer join:

SELECT d.department_id as d_dept_id, e.department_id as e_dept_id,
      e.last_name
   FROM departments d FULL OUTER JOIN employees e
   ON d.department_id = e.department_id
   ORDER BY d.department_id;

 D_DEPT_ID  E_DEPT_ID LAST_NAME
---------- ---------- -------------------------
  ...
       110        110 Gietz
       110        110 Higgins
  ...
       260
       270
                  999 Zeuss
                      Grant

Because the column names in this example are the same in both tables in the join, you can also use the common column feature (the USING clause) of the join syntax, which coalesces the two matching columns department_id. The output is the same as for the preceding example:

SELECT department_id AS d_e_dept_id, e.last_name
   FROM departments d FULL OUTER JOIN employees e
   USING (department_id)
   ORDER BY department_id;

D_E_DEPT_ID LAST_NAME
----------- -------------------------
  ...
        110 Higgins
        110 Gietz
  ...
        260
        270
            Grant
            Zeuss
Table Collections: Examples

You can perform DML operations on nested tables only if they are defined as columns of a table. Therefore, when the query_table_expr_clause of an INSERT, DELETE, or UPDATE statement is a table_collection_expression, the collection expression must be a subquery that uses the TABLE function to select the table's nested table column. The examples that follow are based on the following scenario:

Suppose the database contains a table hr_info with columns department_id, location, and manager_id, and a column of nested table type people which has last_name, department_id, and salary columns for all the employees of each respective manager:

CREATE TYPE people_typ AS OBJECT (
   last_name      VARCHAR2(25),
   department_id  NUMBER(4),
   salary         NUMBER(8,2));
/
CREATE TYPE people_tab_typ AS TABLE OF people_typ;
/
CREATE TABLE hr_info (
   department_id   NUMBER(4),
   location_id     NUMBER(4),
   manager_id      NUMBER(6),
   people          people_tab_typ)
   NESTED TABLE people STORE AS people_stor_tab;

INSERT INTO hr_info VALUES (280, 1800, 999, people_tab_typ());

The following example inserts into the people nested table column of hr_info table's department numbered 280:

INSERT INTO TABLE(SELECT h.people FROM hr_info h
   WHERE h.department_id = 280)
   VALUES ('Smith', 280, 1750);

The next example updates Department 280's people nested table:

UPDATE TABLE(SELECT h.people FROM hr_info h
   WHERE h.department_id = 280) p
   SET p.salary = p.salary + 100;

The next example deletes from Department 280's people nested table:

DELETE TABLE(SELECT h.people FROM hr_info h
   WHERE h.department_id = 280) p
   WHERE p.salary > 1700;
Collection Unnesting: Examples

To select data from a nested table column you again use the TABLE function to treat the nested table as columns of a table. This process is called "collection unnesting.

You could get all the rows from hr_info (created in the preceding example) and all
the rows from the people nested table column of hr_info using the following
statement:

SELECT t1.department_id, t2.* FROM hr_info t1, TABLE(t1.people) t2
   WHERE t2.department_id = t1.department_id;

Now suppose that people is not a nested table column of hr_info, but is instead a separate table with columns last_name, department_id, address, hiredate, and salary. You can extract the same rows as in the preceding example with this statement:

SELECT t1.department_id, t2.*
   FROM hr_info t1, TABLE(CAST(MULTISET(
      SELECT t3.last_name, t3.department_id, t3.salary
         FROM people t3
      WHERE t3.department_id = t1.department_id)
      AS people_tab_typ)) t2;

Finally, suppose that people is neither a nested table column of table hr_info nor a table itself. Instead, you have created a function people_func that extracts from various sources the name, department, and salary of all employees. You can get the same information as in the preceding examples with the following query:

SELECT t1.department_id, t2.* FROM hr_info t1, TABLE(CAST
   (people_func( ... ) AS people_tab_typ)) t2;
See Also:

Oracle9i Application Developer's Guide - Fundamentals for more examples of collection unnesting.
Using the LEVEL Pseudocolumn: Examples

The following statement returns all employees in hierarchical order. The root row is defined to be the employee whose job is 'AD_VP'. The child rows of a parent row are defined to be those who have the employee number of the parent row as their manager number.

SELECT LPAD(' ',2*(LEVEL-1)) || last_name org_chart,
        employee_id, manager_id, job_id
    FROM employees
    START WITH job_id = 'AD_VP'
    CONNECT BY PRIOR employee_id = manager_id;

ORG_CHART          EMPLOYEE_ID MANAGER_ID JOB_ID
------------------ ----------- ---------- ----------
Kochhar                    101        100 AD_VP
  Greenberg                108        101 FI_MGR
    Faviet                 109        108 FI_ACCOUNT
    Chen                   110        108 FI_ACCOUNT
    Sciarra                111        108 FI_ACCOUNT
    Urman                  112        108 FI_ACCOUNT
    Popp                   113        108 FI_ACCOUNT
  Whalen                   200        101 AD_ASST
  Mavris                   203        101 HR_REP
  Baer                     204        101 PR_REP
  Higgins                  205        101 AC_MGR
    Gietz                  206        205 AC_ACCOUNT
De Haan                    102        100 AD_VP
  Hunold                   103        102 IT_PROG
    Ernst                  104        103 IT_PROG
    Austin                 105        103 IT_PROG
    Pataballa              106        103 IT_PROG
    Lorentz                107        103 IT_PROG

The following statement is similar to the previous one, except that it does not select employees with the job 'FI_MAN'.

SELECT LPAD(' ',2*(LEVEL-1)) || last_name org_chart,
        employee_id, manager_id, job_id
    FROM employees
    WHERE job_id != 'FI_MGR'
    START WITH job_id = 'AD_VP'
    CONNECT BY PRIOR employee_id = manager_id;

ORG_CHART          EMPLOYEE_ID MANAGER_ID JOB_ID
------------------ ----------- ---------- ----------
Kochhar                    101        100 AD_VP
    Faviet                 109        108 FI_ACCOUNT
    Chen                   110        108 FI_ACCOUNT
    Sciarra                111        108 FI_ACCOUNT
    Urman                  112        108 FI_ACCOUNT
    Popp                   113        108 FI_ACCOUNT
  Whalen                   200        101 AD_ASST
  Mavris                   203        101 HR_REP
  Baer                     204        101 PR_REP
  Higgins                  205        101 AC_MGR
    Gietz                  206        205 AC_ACCOUNT
De Haan                    102        100 AD_VP
  Hunold                   103        102 IT_PROG
    Ernst                  104        103 IT_PROG
    Austin                 105        103 IT_PROG
    Pataballa              106        103 IT_PROG
    Lorentz                107        103 IT_PROG

Oracle does not return the manager greenberg, although it does return employees who are managed by greenberg.

The following statement is similar to the first one, except that it uses the LEVEL pseudocolumn to select only the first two levels of the management hierarchy:

SELECT LPAD(' ',2*(LEVEL-1)) || last_name org_chart,
employee_id, manager_id, job_id
    FROM employees
    START WITH job_id = 'AD_PRES'
    CONNECT BY PRIOR employee_id = manager_id AND LEVEL <= 2;

ORG_CHART          EMPLOYEE_ID MANAGER_ID JOB_ID
------------------ ----------- ---------- ----------
King                       100            AD_PRES
  Kochhar                  101        100 AD_VP
  De Haan                  102        100 AD_VP
  Raphaely                 114        100 PU_MAN
  Weiss                    120        100 ST_MAN
  Fripp                    121        100 ST_MAN
  Kaufling                 122        100 ST_MAN
  Vollman                  123        100 ST_MAN
  Mourgos                  124        100 ST_MAN
  Russell                  145        100 SA_MAN
  Partners                 146        100 SA_MAN
  Errazuriz                147        100 SA_MAN
  Cambrault                148        100 SA_MAN
  Zlotkey                  149        100 SA_MAN
  Hartstein                201        100 MK_MAN
Using Distributed Queries: Example

This example shows a query that joins the departments table on the local database with the employees table on the remote database:

SELECT last_name, department_name
   FROM employees@remote, departments
   WHERE employees.department_id = departments.department_id;
Using Correlated Subqueries: Examples

The following examples show the general syntax of a correlated subquery:

SELECT select_list
    FROM table1 t_alias1
    WHERE expr operator
        (SELECT column_list
            FROM table2 t_alias2
            WHERE t_alias1.column
               operator t_alias2.column);

UPDATE table1 t_alias1
    SET column =
        (SELECT expr
            FROM table2 t_alias2
            WHERE t_alias1.column = t_alias2.column);

DELETE FROM table1 t_alias1
    WHERE column operator
        (SELECT expr
            FROM table2 t_alias2
            WHERE t_alias1.column = t_alias2.column);

The following statement returns data about employees whose salaries exceed their department average. The following statement assigns an alias to employees, the table containing the salary information, and then uses the alias in a correlated subquery:

SELECT department_id, last_name, salary
   FROM employees x
   WHERE salary > (SELECT AVG(salary)
      FROM employees
      WHERE x.department_id = department_id)
   ORDER BY department_id;

For each row of the employees table, the parent query uses the correlated subquery to compute the average salary for members of the same department. The correlated subquery performs the following steps for each row of the employees table:

  1. The department_id of the row is determined.
  2. The department_id is then used to evaluate the parent query.
  3. If that row's salary is greater than the average salary for that row's department, then the row is returned.

The subquery is evaluated once for each row of the employees table.

Selecting from the DUAL Table: Example

The following statement returns the current date:

SELECT SYSDATE FROM DUAL;

You could select SYSDATE from the employees table, but Oracle would return 14 rows of the same SYSDATE, one for every row of the employees table. Selecting from DUAL is more convenient.

Selecting Sequence Values: Examples

The following statement increments the employees_seq sequence and returns the new value:

SELECT employees_seq.nextval
    FROM dual;

The following statement selects the current value of employees_seq:

SELECT employees_seq.currval
    FROM dual;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 4 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SET CONSTRAINT[S]

Purpose

Use the SET CONSTRAINTS statement to specify, for a particular transaction, whether a deferrable constraint is checked following each DML statement or when the transaction is committed.

Prerequisites

To specify when a deferrable constraint is checked, you must have SELECT privilege on the table to which the constraint is applied unless the table is in your schema.

Syntax

set_constraints::=

Text description of statements_1022.gif follows
Text description of set_constraints

Semantics

constraint

Specify the name of one or more integrity constraints.

ALL

Specify ALL to set all deferrable constraints for this transaction.

IMMEDIATE

Specify IMMEDIATE to indicate that the conditions specified by the deferrable constraint are checked immediately after each DML statement.

DEFERRED

Specify DEFERRED to indicate that the conditions specified by the deferrable constraint are checked when the transaction is committed.

Note:

You can verify the success of deferrable constraints prior to committing them by issuing a SET CONSTRAINTS ALL IMMEDIATE statement.

Examples

Setting Constraints: Examples

The following statement sets all deferrable constraints in this transaction to be checked immediately following each DML statement:

SET CONSTRAINTS ALL IMMEDIATE;

The following statement checks three deferred constraints when the transaction is committed. This example fails if the constraints were specified to be NOT DEFERRABLE.

SET CONSTRAINTS emp_job_nn, emp_salary_min ,
   hr.jhist_dept_fk@remote DEFERRED;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýý««««««««


SQL Statements: SAVEPOINT to UPDATE, 5 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SET ROLE

Purpose

Use the SET ROLE statement to enable and disable roles for your current session.

When a user logs on, Oracle enables all privileges granted explicitly to the user and all privileges in the user's default roles. During the session, the user or an application can use the SET ROLE statement any number of times to change the roles currently enabled for the session. The number of roles that can be concurrently enabled is limited by the initialization parameter MAX_ENABLED_ROLES.

You can see which roles are currently enabled by examining the SESSION_ROLES data dictionary view.

See Also:
  • CREATE ROLE for information on creating roles
  • ALTER USER for information on changing a user's default roles
  • Oracle9i Database Reference for information on the SESSION_ROLES session parameter

Prerequisites

You must already have been granted the roles that you name in the SET ROLE statement.

Syntax

set_role::=

Text description of statements_1023.gif follows
Text description of set_role

Semantics

role

Specify a role to be enabled for the current session. Any roles not listed and not already enabled are disabled for the current session.

In the IDENTIFIED BY password clause, specify the password for a role. If the role has a password, then you must specify the password to enable the role.

Restriction on Setting Roles

You cannot specify a role unless it was granted to you either directly or through other roles.

ALL Clause

Specify ALL to enable all roles granted to you for the current session except those optionally listed in the EXCEPT clause.

Roles listed in the EXCEPT clause must be roles granted directly to you. They cannot be roles granted to you through other roles.

If you list a role in the EXCEPT clause that has been granted to you both directly and through another role, then the role remains enabled by virtue of the role to which it has been granted.

Restriction on the ALL Clause

You cannot use this clause to enable roles with passwords that have been granted directly to you.

NONE

Specify NONE to disable all roles for the current session, including the DEFAULT role.

Examples

Setting Roles: Examples

To enable the role dw_manager identified by the password warehouse for your current session, issue the following statement:

SET ROLE dw_manager IDENTIFIED BY warehouse;

To enable all roles granted to you for the current session, issue the following statement:

SET ROLE ALL;

To enable all roles granted to you except dw_manager, issue the following statement:

SET ROLE ALL EXCEPT dw_manager;

To disable all roles granted to you for the current session, issue the following statement:

SET ROLE NONE;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 6 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SET TRANSACTION

Purpose

Use the SET TRANSACTION statement to establish the current transaction as read only or read write, establish its isolation level, or assign it to a specified rollback segment.

The operations performed by a SET TRANSACTION statement affect only your current transaction, not other users or other transactions. Your transaction ends whenever you issue a COMMIT or ROLLBACK statement. Oracle implicitly commits the current transaction before and after executing a data definition language (DDL) statement.

See Also:

COMMIT and ROLLBACK

Prerequisites

If you use a SET TRANSACTION statement, then it must be the first statement in your transaction. However, a transaction need not have a SET TRANSACTION statement.

Syntax

set_transaction::=

Text description of statements_1024.gif follows
Text description of set_transaction

Semantics

READ ONLY

The READ ONLY clause establishes the current transaction as a read-only transaction. This clause established transaction-level read consistency.

All subsequent queries in that transaction only see changes committed before the transaction began. Read-only transactions are useful for reports that run multiple queries against one or more tables while other users update these same tables.

Note:

This clause is not supported for the user SYS. That is, queries by SYS will return changes made during the transaction even if SYS has set the transaction to be READ ONLY.
Restriction on Read-only Transactions

Only the following statements are permitted in a read-only transaction:

  • Subqueries (that is, SELECT statements without the for_update_clause)
  • LOCK TABLE
  • SET ROLE
  • ALTER SESSION
  • ALTER SYSTEM

    See Also:

    Oracle9i Database Concepts

READ WRITE

Specify READ WRITE to establish the current transaction as a read/write transaction. This clause establishes statement-level read consistency, which is the default.

Restriction on Read/Write Transactions

You cannot toggle between transaction-level and statement-level read consistency in the same transaction.

ISOLATION LEVEL Clause

Use the ISOLATION LEVEL clause to specify how transactions containing database modifications are handled.

  • The SERIALIAZBLE setting specifies serializable transaction isolation mode as defined in the SQL92 standard. If a serializable transaction contains data manipulation language (DML) that attempts to update any resource that may have been updated in a transaction uncommitted at the start of the serializable transaction, then the DML statement fails.

    Note:

    The COMPATIBLE initialization parameter must be set to 7.3.0 or higher for SERIALIZABLE mode to work.
  • The READ COMMITTED setting is the default Oracle transaction behavior. If the transaction contains DML that requires row locks held by another transaction, then the DML statement waits until the row locks are released.

USE ROLLBACK SEGMENT Clause

Specify USE ROLLBACK SEGMENT to assign the current transaction to the specified rollback segment. This clause also implicitly establishes the transaction as a read/write transaction.

This clause lets you to assign transactions of different types to rollback segments of different sizes. For example:

  • If no long-running queries are concurrently reading the same tables, then you can assign small transactions to small rollback segments, which are more likely to remain in memory.
  • You can assign transactions that modify tables that are concurrently being read by long-running queries to large rollback segments, so that the rollback information needed for the read-consistent queries is not overwritten.
  • You can assign transactions that insert, update, or delete large amounts of data to rollback segments large enough to hold the rollback information for the transaction.

You cannot use the READ ONLY clause and the USE ROLLBACK SEGMENT clause in a single SET TRANSACTION statement or in different statements in the same transaction. Read-only transactions do not generate rollback information and therefore are not assigned rollback segments.

NAME Clause

Use the NAME clause to assign a name to the current transaction. This clause is especially useful in distributed database environments when you must identify and resolve in-doubt transactions. The text string is limited to 255 bytes.

If you specify a name for a distributed transaction, then when the transaction commits, the name becomes the commit comment, overriding any comment specified explicitly in the COMMIT statement.

Examples

Setting Transactions: Examples

The following statements could be run at midnight of the last day of every month to count the products and quantities on hand in the Toronto warehouse in the sample Order Entry (oe) schema. This report would not be affected by any other user who might be adding or removing inventory to a different warehouse.

COMMIT;

SET TRANSACTION READ ONLY NAME 'Toronto';

SELECT product_id, quantity_on_hand FROM inventories
   WHERE warehouse_id = 5;

COMMIT;

The first COMMIT statement ensures that SET TRANSACTION is the first statement in the transaction. The last COMMIT statement does not actually make permanent any changes to the database. It simply ends the read-only transaction.

The following statement assigns your current transaction to the rollback segment rs_one:

SET TRANSACTION USE ROLLBACK SEGMENT rs_one;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 7 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRUNCATE

Caution:

You cannot roll back a TRUNCATE statement.

Purpose

Use the TRUNCATE statement to remove all rows from a table or cluster. By default, Oracle also deallocates all space used by the removed rows except that specified by the MINEXTENTS storage parameter and sets the NEXT storage parameter to the size of the last extent removed from the segment by the truncation process.

Removing rows with the TRUNCATE statement can be more efficient than dropping and re-creating a table. Dropping and re-creating a table invalidates the table's dependent objects, requires you to regrant object privileges on the table, and requires you to re-create the table's indexes, integrity constraints, and triggers and respecify its storage parameters. Truncating has none of these effects.

See Also:
  • DELETE and DROP TABLE for information on other ways to drop table data from the database
  • DROP CLUSTER for information on dropping cluster tables

Prerequisites

To truncate a table or cluster, the table or cluster must be in your schema or you must have DROP ANY TABLE system privilege.

Syntax

truncate::=

Text description of statements_1025.gif follows
Text description of truncate

Semantics

TABLE Clause

Specify the schema and name of the table to be truncated. This table cannot be part of a cluster. If you omit schema, then Oracle assumes the table is in your own cluster.

  • You can truncate index-organized tables and temporary tables. When you truncate a temporary table, only the rows created during the current session are removed.
  • Oracle changes the NEXT storage parameter of table to be the size of the last extent deleted from the segment in the process of truncation.
  • Oracle also automatically truncates and resets any existing UNUSABLE indicators for the following indexes on table: range and hash partitions of local indexes and subpartitions of local indexes.
  • If table is not empty, then Oracle marks UNUSABLE all nonpartitioned indexes and all partitions of global partitioned indexes on the table.
  • For a domain index, this statement invokes the appropriate truncate routine to truncate the domain index data.

    See Also:

    Oracle9i Data Cartridge Developer's Guide for more information on domain indexes
  • If table (whether it is a regular or index-organized table) contains LOB columns, then all LOB data and LOB index segments are truncated.
  • If table is partitioned, then all partitions or subpartitions, as well as the LOB data and LOB index segments for each partition or subpartition, are truncated.

    Note:

    When you truncate a table, Oracle automatically removes all data in the table's indexes and any materialized view direct-path INSERT information held in association with the table. (This information is independent of any materialized view log.) If this direct-path INSERT information is removed, then an incremental refresh of the materialized view may lose data.
Restrictions on Truncating Tables
  • You cannot individually truncate a table that is part of a cluster. You must either truncate the cluster, delete all rows from the table, or drop and re-create the table.
  • You cannot truncate the parent table of an enabled referential integrity constraint. You must disable the constraint before truncating the table. (An exception is that you may truncate the table if the integrity constraint is self-referential.)
  • If table belongs to a hierarchy, then it must be the root of the hierarchy.
  • If a domain index is defined on table, then neither the index nor any index partitions can be marked IN_PROGRESS.

MATERIALIZED VIEW LOG Clause

The MATERIALIZED VIEW LOG clause lets you specify whether a materialized view log defined on the table is to be preserved or purged when the table is truncated. This clause permits materialized view master tables to be reorganized through export/import without affecting the ability of primary-key materialized views defined on the master to be fast refreshed. To support continued fast refresh of primary-key materialized views, the materialized view log must record primary-key information.

Note:

The keyword SNAPSHOT is supported in place of MATERIALIZED VIEW for backward compatibility.
PRESERVE

Specify PRESERVE if any materialized view log should be preserved when the master table is truncated. This is the default.

PURGE

Specify PURGE if any materialized view log should be purged when the master table is truncated.

See Also:

Oracle9i Advanced Replication for more information about materialized view logs and the TRUNCATE statement

CLUSTER Clause

Specify the schema and name of the cluster to be truncated. You can truncate only an indexed cluster, not a hash cluster. If you omit schema, then Oracle assumes the cluster is in your own schema.

When you truncate a cluster, Oracle also automatically deletes all data in the indexes of the cluster tables.

STORAGE Clauses

The STORAGE clauses let you determine what happens to the space freed by the truncated rows. The DROP STORAGE clause and REUSE STORAGE clause also apply to the space freed by the data deleted from associated indexes.

DROP STORAGE

Specify DROP STORAGE to deallocate all space from the deleted rows from the table or cluster except the space allocated by the MINEXTENTS parameter of the table or cluster. This space can subsequently be used by other objects in the tablespace. Oracle also sets the NEXT storage parameter to the size of the last extent removed from the segment in the truncation process. This is the default.

REUSE STORAGE

Specify REUSE STORAGE to retain the space from the deleted rows allocated to the table or cluster. Storage values are not reset to the values when the table or cluster was created. This space can subsequently be used only by new data in the table or cluster resulting from insert or update operations. This clause leaves storage parameters at their current settings.

Note:

If you have specified more than one free list for the object you are truncating, then the REUSE STORAGE clause also removes any mapping of free lists to instances and resets the high-water mark to the beginning of the first extent.

Examples

Truncating a Table: Example

The following statement removes all rows from a copy of the sample table hr.employees and returns the freed space to the tablespace containing employees:

TRUNCATE TABLE employees_demo;

The preceding statement also removes all data from all indexes on employees and returns the freed space to the tablespaces containing them.

Retaining Free Space After Truncate: Example

The following statement removes all rows from all tables in the personnel cluster, but leaves the freed space allocated to the tables:

TRUNCATE CLUSTER personnel REUSE STORAGE;

The preceding statement also removes all data from all indexes on the tables in the personnel cluster.

Preserving Materialized View Logs After Truncate: Example

The following statements are examples of truncate statements that preserve materialized view logs:

TRUNCATE TABLE sales_demo PRESERVE MATERIALIZED VIEW LOG;

TRUNCATE TABLE orders_demo;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


SQL Statements: SAVEPOINT to UPDATE, 8 of 8

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UPDATE

Purpose

Use the UPDATE statement to change existing values in a table or in a view's base table.

Additional Topics

  • Prerequisites
  • Syntax
  • Semantics
  • Examples

Prerequisites

For you to update values in a table, the table must be in your own schema or you must have UPDATE privilege on the table.

For you to update values in the base table of a view:

  • You must have UPDATE privilege on the view, and
  • Whoever owns the schema containing the view must have UPDATE privilege on the base table.

The UPDATE ANY TABLE system privilege also allows you to update values in any table or any view's base table.

You must also have the SELECT privilege on the object you want to update if:

  • The object is on a remote database or
  • The SQL92_SECURITY initialization parameter is set to TRUE and the UPDATE operation references table columns (such as the columns in a where_clause).

Syntax

update::=

Text description of statements_1026.gif follows
Text description of update

(DML_table_expression_clause::= , update_set_clause::= , where_clause::= , returning_clause::= )

DML_table_expression_clause::=

Text description of statements_1027.gif follows
Text description of DML_table_expression_clause

(subquery::= --part of SELECT syntax, subquery_restriction_clause::= , table_collection_expression::= )

subquery_restriction_clause::=

Text description of statements_1028.gif follows
Text description of subquery_restriction_clause

table_collection_expression::=

Text description of statements_1032a.gif follows
Text description of table_collection_expression

update_set_clause::=

Text description of statements_105.gif follows
Text description of update_set_clause

where_clause::=

Text description of statements_102.gif follows
Text description of where_clause

returning_clause::=

Text description of statements_1030.gif follows
Text description of returning_clause

Semantics

hint

Specify a comment that passes instructions to the optimizer on choosing an execution plan for the statement.

You can place a parallel hint immediately after the UPDATE keyword to parallelize both the underlying scan and UPDATE operations.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference and "Hints" for the syntax and description of hints
  • Oracle9i Database Performance Tuning Guide and Reference and Oracle9i Database Concepts for detailed information about parallel DML

DML_table_expression_clause

The ONLY clause applies only to views. Specify ONLY syntax if the view in the UPDATE clause is a view that belongs to a hierarchy and you do not want to update rows from any of its subviews.

See Also:

"Restrictions on the dml_table_expression_clause" and "Updating a Table: Examples"

schema

Specify the schema containing the table or view. If you omit schema, then Oracle assumes the table or view is in your own schema.

table | view | subquery

Specify the name of the table, view, materialized view, or the columns returned by a subquery, to be updated. Issuing an UPDATE statement against a table fires any UPDATE triggers associated with the table.

If you specify view, then Oracle updates the view's base table. You cannot update a view except with INSTEAD OF triggers if the view's defining query contains one of the following constructs:

  • A set operator
  • A DISTINCT operator
  • An aggregate or analytic function
  • A GROUP BY, ORDER BY, CONNECT BY, or START WITH clause
  • A collection expression in a SELECT list
  • A subquery in a SELECT list
  • Joins (with some exceptions--see Oracle9i Database Administrator's Guide for more information)

In addition, if the view was created with the WITH CHECK OPTION, then you can update the view only if the resulting data satisfies the view's defining query.

If table (or the base table of view) contains one or more domain index columns, then this statement executes the appropriate indextype update routine.

If you specify materialized view, then Oracle updates the data in the materialized view if it using the FOR UPDATE clause.

See Also:
  • Oracle9i Data Cartridge Developer's Guide for more information on the indextype update routines
  • CREATE MATERIALIZED VIEW for information on creating updatable materialized views
PARTITION (partition) | SUBPARTITION (subpartition)

Specify the name of the partition or subpartition within table targeted for updates. You need not specify the partition name when updating values in a partitioned table. However in some cases specifying the partition name can be more efficient than a complicated where_clause.

See Also:

"Updating a Partition: Example"

dblink

Specify a complete or partial name of a database link to a remote database where the table or view is located. You can use a database link to update a remote table or view only if you are using Oracle's distributed functionality.

If you omit dblink, then Oracle assumes the table or view is on the local database.

See Also:

"Referring to Objects in Remote Databases" for information on referring to database links
subquery_restriction_clause

Use the subquery_restriction_clause to restrict the subquery in one of the following ways:

WITH READ ONLY

Specify WITH READ ONLY to indicate that the table or view cannot be updated.

WITH CHECK OPTION

Specify WITH CHECK OPTION to indicate that Oracle prohibits any changes to the table or view that would produce rows that are not included in the subquery.

CONSTRAINT constraint

Specify the name of the CHECK OPTION constraint. If you omit this identifier, Oracle automatically assigns the constraint a name of the form SYS_C n, where n is an integer that makes the constraint name unique within the database.

See Also:

"Using the WITH CHECK OPTION Clause: Example"

table_collection_expression

The table_collection_expression lets you inform Oracle that the value of collection_expression should be treated as a table for purposes of query and DML operations. The collection_expression can be a subquery, a column, a function, or a collection constructor. Regardless of its form, it must return a collection value (that is, a value whose type is nested table or varray). This process of extracting the elements of a collection is called collection unnesting.

Note:

In earlier releases of Oracle, when collection_expression was a subquery, table_collection_expression was expressed as "THE subquery". That usage is now deprecated.

You can use a table_collection_expression to update rows in one table based on rows from another table. For example, you could roll up four quarterly sales tables into a yearly sales table.

t_alias

Specify a correlation name (alias) for the table, view, or subquery to be referenced elsewhere in the statement.

Note:

This alias is required if the dml_table_expression_clause references any object type attributes or object type methods.
See Also:

"Correlated Update: Example"

Restrictions on the dml_table_expression_clause
  • You cannot execute this statement if table (or the base table of view) contains any domain indexes marked IN_PROGRESS or FAILED.
  • You cannot insert into a partition if any affected index partitions are marked UNUSABLE.
  • You cannot specify the order_by_clause in the subquery of the dml_table_expression_clause.
  • If you specify an index, index partition, or index subpartition that has been marked UNUSABLE, then the UPDATE statement will fail unless the SKIP_UNUSABLE_INDEXES session parameter has been set to TRUE.

    See Also:

    ALTER SESSION for information on the SKIP_UNUSABLE_INDEXES session parameter

update_set_clause

The update_set_clause lets you set column values.

column

Specify the name of a column of the table or view that is to be updated. If you omit a column of the table from the update_set_clause, then that column's value remains unchanged.

If column refers to a LOB object attribute, then you must first initialize it with a value of empty or null. You cannot update it with a literal. Also, if you are updating a LOB value using some method other than a direct UPDATE SQL statement, then you must first lock the row containing the LOB.

See Also:

for_update_clause

If column is part of the partitioning key of a partitioned table, then UPDATE will fail if you change a value in the column that would move the row to a different partition or subpartition, unless you enable row movement.

See Also:

the row_movement_clause of CREATE TABLE or ALTER TABLE

In addition, if column is part of the partitioning key of a list-partitioned table, then UPDATE will fail if you specify a value for the column that does not already exist in the partition_value list of one of the partitions.

subquery

Specify a subquery that returns exactly one row for each row updated.

  • If you specify only one column in the update_set_clause, then the subquery can return only one value.
  • If you specify multiple columns in the update_set_clause, then the subquery must return as many values as you have specified columns.

You can use the flashback_clause of within the subquery to update table with past data.

See Also:

the flashback_clause of SELECT for more information on this clause

If the subquery returns no rows, then the column is assigned a null.

Note:

If this subquery refers to remote objects, then the UPDATE operation can run in parallel as long as the reference does not loop back to an object on the local database. However, if the subquery in the dml_table_expression_clause refers to any remote objects, then the UPDATE operation will run serially without notification.
See Also:
  • SELECT and "Using Subqueries"
  • parallel_clause of CREATE TABLE
expr

Specify an expression that resolves to the new value assigned to the corresponding column.

See Also:

Chapter 4, "Expressions" for the syntax of expr and "Updating an Object Table: Example"

DEFAULT

Specify DEFAULT to set the column to the value previously specified as the default value for the column. If no default value for the corresponding column has been specified, then Oracle sets the column to null.

Restriction on Updating to Default Values

You cannot specify DEFAULT if you are updating a view.

VALUE Clause

The VALUE clause lets you specify the entire row of an object table.

Restriction on the VALUE clause

You can specify this clause only for an object table.

Note:

If you insert string literals into a RAW column, during subsequent queries, then Oracle will perform a full table scan rather than using any index that might exist on the RAW column.
See Also:

"Updating an Object Table: Example"

where_clause

The where_clause lets you restrict the rows updated to those for which the specified condition is true. If you omit this clause, then Oracle updates all rows in the table or view.

The where_clause determines the rows in which values are updated. If you do not specify the where_clause, then all rows are updated. For each row that satisfies the where_clause, the columns to the left of the equals (=) operator in the update_set_clause are set to the values of the corresponding expressions on the right. The expressions are evaluated as the row is updated.

See Also:

Chapter 5, "Conditions" for the syntax of condition

returning_clause

The returning clause retrieves the rows affected by a DML (INSERT, UPDATE, or DELETE) statement. You can specify this clause for tables and materialized views, and for views with a single base table.

When operating on a single row, a DML statement with a returning_clause can retrieve column expressions using the affected row, rowid, and REFs to the affected row and store them in host variables or PL/SQL variables.

When operating on multiple rows, a DML statement with the returning_clause stores values from expressions, rowids, and REFs involving the affected rows in bind arrays.

expr

Each item in the expr list must be a valid expression syntax. All forms are valid except scalar subquery expressions.

INTO

The INTO clause indicates that the values of the changed rows are to be stored in the variable(s) specified in data_item list.

data_item

Each data_item is a host variable or PL/SQL variable that stores the retrieved expr value.

For each expression in the RETURNING list, you must specify a corresponding type-compatible PL/SQL variable or host variable in the INTO list.

Restrictions on the RETURNING Clause

You cannot:

  • Specify the returning_clause for a multitable insert.
  • Use this clause with parallel DML or with remote objects.
  • Retrieve LONG types with this clause.
  • Specify this clause for a view on which an INSTEAD OF trigger has been defined.

    See Also:

    PL/SQL User's Guide and Reference for information on using the BULK COLLECT clause to return multiple values to collection variables

Examples

Updating a Table: Examples

The following statement gives null commissions to all employees with the job SH_CLERK:

UPDATE employees
   SET commission_pct = NULL
   WHERE job_id = 'SH_CLERK';

The following statement promotes Douglas Grant to manager of Department 20 with a $1,000 raise:

UPDATE employees SET
    job_id = 'SA_MAN', salary = salary + 1000, department_id = 120
    WHERE first_name||' '||last_name = 'Douglas Grant';

The following statement increases the salary of an employee in the employees table on the remote database:

UPDATE employees@remote
   SET salary = salary*1.1
   WHERE last_name = 'Baer';

The next example shows the following syntactic constructs of the UPDATE statement:

  • Both forms of the update_set_clause together in a single statement
  • A correlated subquery
  • A where_clause to limit the updated rows
    UPDATE employees a
    SET department_id =
        (SELECT department_id
            FROM departments
            WHERE location_id = '2100'),
        (salary, commission_pct) =
        (SELECT 1.1*AVG(salary), 1.5*AVG(commission_pct)
          FROM employees b
          WHERE a.department_id = b.department_id)
    WHERE department_id IN
        (SELECT department_id
          FROM departments
          WHERE location_id = 2900
              OR location_id = 2700);

The preceding UPDATE statement performs the following operations:

  • Updates only those employees who work in Geneva or Munich (locations 2900 and 2700)
  • Sets department_id for these employees to the department_id corresponding to Bombay (location_id 2100)
  • Sets each employee's salary to 1.1 times the average salary of their department
  • Sets each employee's commission to 1.5 times the average commission of their department
Updating a Partition: Example

The following example updates values in a single partition of the sales table:

UPDATE sales PARTITION (sales_q1_1999) s
   SET s.promo_id = 494
   WHERE amount_sold > 9000;
Updating an Object Table: Example

The following statement updates a row of object table table1 by selecting a row from another object table table2:

UPDATE table1 p SET VALUE(p) =
   (SELECT VALUE(q) FROM table2 q WHERE p.id = q.id)
   WHERE p.id = 10;

The example uses the VALUE object reference function in both the SET clause and the subquery..

Correlated Update: Example

The following example updates particular rows of the projs nested table corresponding to the department whose department equals 123:

UPDATE TABLE(SELECT projs
           FROM dept d WHERE d.dno = 123)  p
  SET p.budgets = p.budgets + 1
  WHERE p.pno IN (123, 456);
Using the RETURNING Clause During UPDATE: Example

The following example returns values from the updated row and stores the result in PL/SQL variables bnd1, bnd2, bnd3:

UPDATE employees
  SET job_id ='SA_MAN', salary = salary + 1000, department_id = 140
  WHERE last_name = 'Jones'
  RETURNING salary*0.25, last_name, department_id
    INTO :bnd1, :bnd2, :bnd3;
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº ðº««««««««


How to Read Syntax Diagrams, 1 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

A
How to Read Syntax Diagrams

This reference presents Oracle SQL syntax in both graphic diagrams and in text (Backus-Naur Form--BNF). This appendix contains these sections:

  • Graphic Syntax Diagrams
  • Backus-Naur Form Syntax
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº««««««««


How to Read Syntax Diagrams, 2 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Graphic Syntax Diagrams

Syntax diagrams are drawings that illustrate valid SQL syntax. To read a diagram, trace it from left to right, in the direction shown by the arrows.

Commands and other keywords appear in UPPERCASE inside rectangles. Type them exactly as shown in the rectangles. Parameters appear in lowercase inside ovals. Variables are used for the parameters. Punctuation, operators, delimiters, and terminators appear inside circles.

If the syntax diagram has more than one path, you can choose any path to travel. For example, in the following syntax you can specify either NOPARALLEL or PARALLEL:

parallel_clause::=

Text description of ap_syntx7a.gif follows
Text description of parallel_clause

If you have the choice of more than one keyword, operator, or parameter, your options appear in a vertical list. For example, in the following syntax diagram, you can specify one or more of the five parameters in the stack:

physical_attributes_clause::=

Text description of ap_syntx7.gif follows
Text description of physical_attributes_clause

The following table shows parameters that appear in the syntax diagrams and provides examples of the values you might substitute for them in your statements:

Parameter | Description | Examples
table | The substitution value must be the name of an object of the type specified by the parameter. For a list of all types of objects, see the section, "Schema Objects" . | employees
c | The substitution value must be a single character from your database character set. | T s
'text' | The substitution value must be a text string in single quotes. See the syntax description of 'text' in "Text Literals" . | 'Employee records'
char | The substitution value must be an expression of datatype CHAR or VARCHAR2 or a character literal in single quotes. | last_name 'Smith'
condition | The substitution value must be a condition that evaluates to TRUE or FALSE. See the syntax description of condition in Chapter 5, "Conditions". | last_name >'A'
date d | The substitution value must be a date constant or an expression of DATE datatype. | TO_DATE( '01-Jan-2002', 'DD-MON-YYYY')
expr | The substitution value can be an expression of any datatype as defined in the syntax description of expr in "About SQL Expressions" . | salary + 1000
integer | The substitution value must be an integer as defined by the syntax description of integer in "Integer Literals" . | 72
number m n | The substitution value must be an expression of NUMBER datatype or a number constant as defined in the syntax description of number in "Number Literals" . | AVG(salary) 15 * 7
raw | The substitution value must be an expression of datatype RAW. | HEXTORAW('7D')
subquery | The substitution value must be a SELECT statement that will be used in another SQL statement. See SELECT . | SELECT last_name FROM employees
db_name | The substitution value must be the name of a nondefault database in an embedded SQL program. | sales_db
db_string | The substitution value must be the database identification string for an Oracle Net database connection. For details, see the user's guide for your specific Oracle Net protocol. | --

Required Keywords and Parameters

Required keywords and parameters can appear singly or in a vertical list of alternatives. Single required keywords and parameters appear on the main path, that is, on the horizontal line you are currently traveling. In the following example, library_name is a required parameter:

drop_library::=

Text description of ap_syntxa.gif follows
Text description of drop_library

If there is a library named HQ_LIB, then, according to the diagram, the following statement is valid:

DROP LIBRARY hq_lib;

If multiple keywords or parameters appear in a vertical list that intersects the main path, one of them is required. That is, you must choose one of the keywords or parameters, but not necessarily the one that appears on the main path. In the following example, you must choose one of the two settings:

key_compression::=

Text description of ap_syntx5.gif follows
Text description of key_compression

Optional Keywords and Parameters

If keywords and parameters appear in a vertical list above the main path, they are optional. In the following example, instead of traveling down a vertical line, you can continue along the main path:

deallocate_unused_clause::=

Text description of ap_syntx2.gif follows
Text description of deallocate_unused_clause

According to the diagram, all of the following statements are valid:

DEALLOCATE UNUSED;
DEALLOCATE UNUSED KEEP 1000;
DEALLOCATE UNUSED KEEP 10M;

Syntax Loops

Loops let you repeat the syntax within them as many times as you like. In the following example, after choosing one value expression, you can go back repeatedly to choose another, separated by commas.

query_partition_clause::=

Text description of ap_syntx3.gif follows
Text description of query_partition_clause

Multipart Diagrams

Read a multipart diagram as if all the main paths were joined end to end. The following example is a two-part diagram:

alter_java::=

Text description of ap_syntx4.gif follows
Text description of alter_java

According to the diagram, the following statement is valid:

ALTER JAVA SOURCE jsource_1 COMPILE;

Database Objects

The names of Oracle identifiers, such as tables and columns, must not exceed 30 characters in length. The first character must be a letter, but the rest can be any combination of letters, numerals, dollar signs ($), pound signs (#), and underscores (_).

However, if an Oracle identifier is enclosed by double quotation marks ("), it can contain any combination of legal characters, including spaces but excluding quotation marks.

Oracle identifiers are not case sensitive except when enclosed by double quotation marks.

For more information, see "Schema Object Naming Rules" .

Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº««««««««


How to Read Syntax Diagrams, 3 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Backus-Naur Form Syntax

Each graphic syntax diagram in this reference is followed by a link to a text description of the graphic. The text descriptions consist of a simple variant of Backus-Naur Form (BNF) that includes the following symbols and conventions:

Symbol or Convention | Meaning
[ ] | Brackets enclose optional items.
{ } | Braces enclose items only one of which is required.
| | A vertical bar separates alternatives within brackets or braces.
... | Ellipsis points show that the preceding syntactic element can be repeated.
delimiters | Delimiters other than brackets, braces, vertical bars, and ellipses must be entered as shown.
boldface | Words appearing in boldface are keywords. They must be typed as shown. (Keywords are case-sensitive in some, but not all, operating systems.) Words that are not in boldface are placeholders for which you must substitute a name or value.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Oracle and Standard SQL

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

B
Oracle and Standard SQL

This appendix discusses Oracle's conformance with the SQL:1999 standards. The mandatory portion of SQL:1999 is known as Core SQL:1999 and is found in SQL:1999 Part 2 (Foundation) and Part 5 (Bindings). The Foundation features are analyzed in Annex F of Part 2 in the table "SQL/Foundation feature taxonomy and definition for Core SQL". The Bindings features are analyzed in Annex F of Part 5 in the table "SQL/Bindings feature taxonomy and definition for Core SQL".

This appendix declares Oracle's conformance to the SQL standards established by the American National Standards Institute (ANSI) and the International Standards Organization (ISO). (The ANSI and ISO SQL standards are identical.) It contains the following sections:

  • ANSI Standards
  • ISO Standards
  • Oracle Compliance
  • FIPS Compliance

ANSI Standards

The following documents of the American National Standards Institute (ANSI) relate to SQL:

  • ANSI/ISO/IEC 9075-1:1999, Information technology--Database languages--SQL--Part 1: Framework (SQL/Framework)
    • ANSI/ISO/IEC 9075-1:1999/Amd.1:2000
  • ANSI/ISO/IEC 9075-2:1999, Information technology--Database languages--SQL--Part 2: Foundation (SQL/Foundation)
  • ANSI/ISO/IEC 9075-5:1999, Information technology--Database languages--SQL--Part 5: Host Language Bindings (SQL/Bindings)

You can obtain a copy of ANSI standards from this address:

American National Standards Institute
11 West 42nd Street
New York, NY 10036 USA
Telephone: +1.212.642.4900
Fax: +1.212.398.0023

or from their Web site:

http://webstore.ansi.org/ansidocstore/default.asp

A subset of ANSI standards, including the SQL standard, are X3 or NCITS standards. You can obtain these from the National Committee for Information Technology Standards (NCITS) at:

http://www.cssinfo.com/ncitsgate.html

ISO Standards

The following documents of the International Organization for Standardization (ISO) relate to SQL:

  • ISO/IEC 9075-1:1999, Information technology--Database languages--SQL--Part 1: Framework (SQL/Framework)
    • ISO/IEC 9075-1:1999/Amd.1:2000
  • ISO/IEC 9075-2:1999, Information technology--Database languages--SQL--Part 2: Foundation (SQL/Foundation)
  • ISO/IEC 9075-5:1999, Information technology--Database languages--SQL--Part 5: Host Language Bindings (SQL/Bindings)

You can obtain a copy of ISO standards from this address:

International Organization for Standardization
1 Rue de Varembé
Case postale 56
CH-1211, Geneva 20, Switzerland
Phone: +41.22.749.0111
Fax: +41.22.733.3430
Web site: http://www.iso.ch/

or from their web store:

http://www.iso.ch/cate/cat.html

Oracle Compliance

The ANSI and ISO SQL standards require conformance claims to state the type of conformance and the implemented facilities. The following products provide full or partial conformance with the ANSI and ISO standards as described in the tables that follow:

  • Oracle9i database server
  • Pro*C/C++, release 9.2.0
  • Pro*COBOL, release 9.2.0
  • Pro*Fortran, release 1.8.77
  • SQL Module for Ada (Mod*Ada), release 9.2.0
  • Pro*COBOL 1.8, release 1.8.77
  • Pro*PL/I, release 1.6.28
  • OTT, release 9.2.0.
  • OTT8, release 8.1.8

The Core SQL:1999 features that Oracle fully supports are listed in Table B-1:

Table B-1 Fully Supported Core SQL:1999 Features
Feature ID | Feature
E011 | Numeric data types
E031 | Identifiers
E061 | Basic predicates and search conditions
E081 | Basic privileges
E091 | Set functions
E101 | Basic data manipulation
E111 | Single row SELECT statement
E131 | Null value support (nulls in lieu of values)
E141 | Basic integrity constraints
E151 | Transaction support
E152 | Basic SET TRANSACTION statement
E153 | Updatable queries with subqueries
E161 | SQL comments using leading double minus
E171 | SQLSTATE support
F041 | Basic joined table
F051 | Basic date and time
F081 | UNION and EXCEPT in views
F131 | Grouped operations
F181 | Multiple module support
F201 | CAST function
F221 | Explicit defaults
F261 | CASE expressions
F311 | Schema definition statement
F471 | Scalar subquery values
F481 | Expanded NULL predicate
B011 | Embedded Ada
B012 | Embedded C
B013 | Embedded COBOL
B014 | Embedded Fortran
T431 | Extended grouping capabilities
T611 | Elementary OLAP operators
T621 | Enhanced numeric functions

The Core SQL:1999 features that Oracle partially supports are listed in Table B-2:

Table B-2 Partially Supported Core SQL:1999 Features
Feature ID, Feature Partial Support

E021, Character data types

Oracle fully supports these subfeatures:

  • E021-01, CHARACTER data type
  • E021-07, Character concatenation
  • E021-08, UPPER and LOWER functions
  • E021-09, TRIM function
  • E021-10, Implicit casting among character data types
  • E021-11, Character comparison

Oracle partially supports these subfeatures:

  • E021-02, CHARACTER VARYING data type (Oracle does not distinguish a zero-length VARCHAR string from NULL)
  • E021-03, Character literals (Oracle regards the zero-length literal '' as being null)

Oracle has equivalent functionality for these subfeatures:

  • E021-04, CHARACTER_LENGTH function: use LENGTH function instead
  • E021-05, OCTET_LENGTH function: use LENGTHB function instead
  • E021-06, SUBSTRING function: use SUBSTR function instead
  • E021-11, POSITION function: use INSTR function instead

F031, Basic schema manipulation

Oracle fully supports these subfeatures:

  • F031-01, CREATE TABLE statement to create persistent base tables
  • F031-02, CREATE VIEW statement
  • F031-03, GRANT statement

Oracle partially supports this subfeature:

  • F031-04, ALTER TABLE statement: ADD COLUMN clause (Oracle does not support the optional keyword COLUMN in this syntax)

Oracle does not support these subfeatures (because Oracle does not support the keyword RESTRICT):

  • F031-13, DROP TABLE statement: RESTRICT clause
  • F031-16, DROP VIEW statement: RESTRICT clause
  • F031-19, REVOKE statement: RESTRICT clause

E051, Basic query specification

Oracle fully supports the following subfeatures:

  • E051-01, SELECT DISTINCT
  • E051-02, GROUP BY clause
  • E051-04, GROUP BY can contain columns not in <select list>
  • E051-05, Select list items can be renamed
  • E051-06, HAVING clause
  • E051-07, Qualified * in select list

Oracle partially supports the following subfeatures:

  • E051-08, Correlation names in FROM clause (Oracle supports correlation names, but not the optional AS keyword)

Oracle does not support the following subfeature:

  • E051-09, Rename columns in the FROM clause

E071, Basic query expressions

Oracle fully supports the following subfeatures:

  • E071-01, UNION DISTINCT table operator
  • E071-02, UNION ALL able operator
  • E071-05, Columns combined by table operators need not have exactly the same type
  • E071-06, table operators in subqueries

Oracle has equivalent functionality for the following subfeature:

  • E071-03, EXCEPT DISTINCT table operator: Use MINUS instead of EXCEPT DISTINCT

E121, Basic cursor support

Oracle fully supports the following subfeatures:

  • E121-01, DECLARE CURSOR
  • E121-02, ORDER BY columns need not be in select list
  • E121-03, Value expressions in ORDER BY clause
  • E121-04, OPEN statement
  • E121-06, Positioned UPDATE statement
  • E121-07, Positioned DELETE statement
  • E121-08, CLOSE statement
  • E121-10, FETCH statement, implicit NEXT

Oracle does not support the following subfeatures:

  • E121-17, WITH HOLD cursors (in the standard, a cursor is not held through a ROLLBACK, but Oracle does hold through ROLLBACK)

F812, Basic flagging

Oracle has a flagger, but it flags SQL-92 compliance rather than SQL:1999 compliance

T321, Basic SQL-invoked routines

Oracle fully supports these subfeatures:

  • T321-03, function invocation
  • T321-04, CALL statement

Oracle supports these subfeatures with syntactic differences:

  • T321-01, user-defined functions with no overloading
  • T321-02, user-defined procedures with no overloading

The Oracle syntax for CREATE FUNCTION and CREATE PROCEDURE differs from the standard as follows:

  • In the standard, the mode of a parameter (IN, OUT or INOUT) comes before the parameter name, whereas in Oracle it comes after the parameter name.
  • The standard uses INOUT, whereas Oracle uses IN OUT.
  • Oracle requires either IS or AS after the return type and before the definition of the routine body, while the standard lacks these keywords.
  • If the routine body is in C (for example), then the standard uses the keywords LANGUAGE C EXTERNAL NAME to name the routine, whereas Oracle uses LANGUAGE C NAME.
  • If the routine body is in SQL, then Oracle uses its proprietary procedural extension called PL/SQL.

Oracle supports the following subfeatures in PL/SQL but not in Oracle SQL:

  • T321-05, RETURN statement

Oracle has equivalent functionality for the features listed in Table B-3:

Table B-3 Equivalent Functionality for Core SQL:1999 Features
Feature ID, Feature Equivalent Functionality

F021, Basic information schema

Oracle does not have any of the views in this feature. However, Oracle makes the same information available in other metadata views:

  • Instead of TABLES, use ALL_TABLES.
  • Instead of COLUMNS, use ALL_TAB_COLUMNS.
  • Instead of VIEWS, use ALL_VIEWS.

    However, Oracle's ALL_VIEWS does not display whether a user view was defined WITH CHECK OPTION or if it is updatable. To see whether a view has WITH CHECK OPTION, use ALL_CONSTRAINTS, with TABLE_NAME equal to the view name and look for CONSTRAINT_TYPE equal to 'V'.

  • Instead of TABLE_CONSTRAINTS, REFERENTIAL_CONSTRAINTS and CHECK_CONSTRAINTS, use ALL_CONSTRAINTS.

    However, Oracle's ALL_CONSTRAINTS does not display whether a constraint is deferrable or initially deferred.

The Core SQL:1999 features that Oracle does not support are listed in Table B-4:

Table B-4 Unsupported Core SQL:1999 Features
Feature ID | Feature
F501 | Features and conformance views
S011 | Distinct data types
Note:

Oracle does not support E182, Module language. Although this feature is listed in Table 31 in the standard, it merely indicates that Core consists of a choice between Module language and embedded language. Module language and embedded language are completely equivalent in capability, differing only in the manner in which SQL statements are associated with the host programming language. Oracle supports embedded language.

FIPS Compliance

Oracle complied fully with last Federal Information Processing Standard (FIPS), which was FIPS PUB 127-2. That standard is no longer published. However, for users whose applications depend on information about the sizes of some database constructs that were defined in FIPS 127-2, we list the details of our compliance in Table B-5.

Table B-5 Sizing for Database Constructs
Database Constructs | FIPS | Oracle9i
Length of an identifier (in bytes) | 18 | 30
Length of CHARACTER datatype (in bytes) | 240 | 2000
Decimal precision of NUMERIC datatype | 15 | 38
Decimal precision of DECIMAL datatype | 15 | 38
Decimal precision of INTEGER datatype | 9 | 38
Decimal precision of SMALLINT datatype | 4 | 38
Binary precision of FLOAT datatype | 20 | 126
Binary precision of REAL datatype | 20 | 63
Binary precision of DOUBLE PRECISION datatype | 30 | 126
Columns in a table | 100 | 1000
Values in an INSERT statement | 100 | 1000
SET clauses in an UPDATE statement(a) | 20 | 1000
Length of a row(b,c) | 2,000 | 2,000,000
Columns in a UNIQUE constraint | 6 | 32
Length of a UNIQUE constraint(b) | 120 | (d)
Length of foreign key column list(b) | 120 | (d)
Columns in a GROUP BY clause | 6 | 255(e)
Length of GROUP BY column list | 120 | (e)
Sort specifications in ORDER BY clause | 6 | 255(e)
Length of ORDER BY column list | 120 | (e)
Columns in a referential integrity constraint | 6 | 32
Tables referenced in a SQL statement | 15 | No limit
Cursors simultaneously open | 10 | (f)
Items in a SELECT list | 100 | 1000

Notes to Table B-5:

(a) The number of SET clauses in an UPDATE statement refers to the number items separated by commas following the SET keyword.

(b) The FIPS PUB defines the length of a collection of columns to be the sum of: twice the number of columns, the length of each character column in bytes, decimal precision plus 1 of each exact numeric column, binary precision divided by 4 plus 1 of each approximate numeric column.

(c) The Oracle limit for the maximum row length is based on the maximum length of a row containing a LONG value of length 2 gigabytes and 999 VARCHAR2 values, each of length 4000 bytes: 2(254) + 231 + (999(4000)).

(d) The Oracle limit for a UNIQUE key is half the size of an Oracle data block (specified by the initialization parameter DB_BLOCK_SIZE) minus some overhead.

(e) Oracle places no limit on the number of columns in a GROUP BY clause or the number of sort specifications in an ORDER BY clause. However, the sum of the sizes of all the expressions in either a GROUP BY clause or an ORDER BY clause is limited to the size of an Oracle data block (specified by the initialization parameter DB_BLOCK_SIZE) minus some overhead.

(f) The Oracle limit for the number of cursors simultaneously opened is specified by the initialization parameter OPEN_CURSORS. The maximum value of this parameter depends on the memory available on your operating system and exceeds 100 in all cases.

Oracle Extensions to Standard SQL

Oracle supports numerous features that extend beyond standard SQL. In your Oracle applications, you can use these extensions just as you can use Core SQL:1999.

If you are concerned with the portability of your applications to other implementations of SQL, use Oracle's FIPS Flagger to help identify the use of Oracle extensions to Entry SQL92 in your embedded SQL programs. The FIPS Flagger is part of the Oracle precompilers and the SQL*Module compiler.

See Also:

Pro*COBOL Precompiler Programmer's Guide and Pro*C/C++ Precompiler Programmer's Guide for information on how to use the FIPS Flagger.

Character Set Support

Oracle supports most national, international, and vendor-specific encoded character set standards. A complete list of character sets supported by Oracle Appears in Appendix A, "Locale Data", in Oracle9i Database Globalization Support Guide.

Unicode is a universal encoded character set that lets you store information from any language using a single character set. Unicode is required by modern standards such as XML, Java, JavaScript, and LDAP. Unicode is compliant with ISO/IEC standard 10646. You can obtain a copy of ISO/IEC standard 10646 from this address:

International Organization for Standardization
1 Rue de Varembé
Case postale 56
CH-1211, Geneva 20, Switzerland
Phone: +41.22.749.0111
Fax: +41.22.733.3430
Web site: http://www.iso.ch/

Oracle9i complies fully with Unicode 3.0, the third and most recent version of the Unicode standard. For up-to-date information on this standard, visit the Web site of the Unicode Consortium:

http://www.unicode.org

Oracle uses UTF-8 (8-bit) encoding by way of three database character sets, two for ASCII-based platforms (UTF8 and AL32UTF8) and one for EBCDIC platforms (UTFE). If you prefer to implement Unicode support incrementally, you can store Unicode data in either the UTF-16 or UTF-8 encoding form, in the national character set, for the SQL NCHAR datatypes (NCHAR, NVARCHAR2, and NCLOB).

See Also:

Oracle9i Database Globalization Support Guide for details on Oracle character set support.
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº««««««««


Oracle Reserved Words

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

C
Oracle Reserved Words

This appendix lists Oracle reserved words. Words followed by an asterisk (*) are also ANSI reserved words.

Note:

In addition to the following reserved words, Oracle uses system- generated names beginning with "SYS_" for implicitly generated schema objects and subobjects. Oracle discourages you from using this prefix in the names you explicitly provide to your schema objects and subobjects to avoid possible conflict in name resolution.
ACCESS
ADD *
ALL *
ALTER *
AND *
ANY *
AS *
ASC *
AUDIT
BETWEEN *
BY *
CHAR *
CHECK *
CLUSTER
COLUMN
COMMENT
COMPRESS
CONNECT *
CREATE *
CURRENT *
DATE *
DECIMAL *
DEFAULT *
DELETE *
DESC *
DISTINCT *
DROP *
ELSE *
EXCLUSIVE
EXISTS
FILE
FLOAT *
FOR *
FROM *
GRANT *
GROUP *
HAVING *
IDENTIFIED
IMMEDIATE *
IN *
INCREMENT
INDEX
INITIAL
INSERT *
INTEGER *
INTERSECT *
INTO *
IS *
LEVEL *
LIKE *
LOCK
LONG
MAXEXTENTS
MINUS
MLSLABEL
MODE
MODIFY
NOAUDIT
NOCOMPRESS
NOT *
NOWAIT
NULL *
NUMBER
OF *
OFFLINE
ON *
ONLINE
OPTION *
OR *
ORDER *
PCTFREE
PRIOR *
PRIVILEGES *
PUBLIC *
RAW
RENAME
RESOURCE
REVOKE *
ROW
ROWID
ROWNUM
ROWS *
SELECT *
SESSION *
SET *
SHARE
SIZE *
SMALLINT *
START
SUCCESSFUL
SYNONYM
SYSDATE
TABLE *
THEN *
TO *
TRIGGER
UID
UNION *
UNIQUE *
UPDATE *
USER *
VALIDATE
VALUES *
VARCHAR *
VARCHAR2
VIEW *
WHENEVER *
WHERE
WITH *
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Examples, 1 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

D
Examples

The body of the SQL Reference contains examples for almost every reference topic. This appendix contains lengthy examples that are appropriate in the context of a single SQL statement. These examples are intended to provide uninterrupted the series of steps that you would use to take advantage of particular Oracle functionality. They do not replace the syntax diagrams and semantics found for each individual SQL statement in the body of the reference. Please use the cross-reference links provided to access additional information, such as privileges required and restrictions, as well as syntax.

This appendix contains the following sections:

  • Using Extensible Indexing
  • Using XML in SQL Statements
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Examples, 2 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Using Extensible Indexing

This section provides examples of the steps entailed in a simple but realistic extensible indexing scenario.

Suppose you want to rank the salaries in the HR.employees table and then find those that rank between 10 and 20. You could use the DENSE_RANK function, as follows:

SELECT last_name, salary FROM
   (SELECT last_name, DENSE_RANK() OVER
      (ORDER BY salary DESC) rank_val, salary FROM employees)
   WHERE rank_val BETWEEN 10 AND 20;
See Also:

DENSE_RANK

This nested query is somewhat complex, and it requires a full scan of the employees table as well as a sort. An alternative would be to use extensible indexing to achieve the same goal. The resulting query will be simpler. The query will require only an index scan and a table access by rowid, and will therefore perform much more efficiently.

The first step is to create the implementation type position_im, including method headers for index definition, maintenance, and creation. (Most of the type body uses PL/SQL, which is shown in italics.)

See Also:
  • CREATE TYPE and CREATE TYPE BODY
  • Oracle9i Data Cartridge Developer's Guide for complete information on the ODCI routines in this statement
  • PL/SQL User's Guide and Reference

CREATE OR REPLACE TYPE position_im AS OBJECT
(
  curnum  NUMBER,
  howmany NUMBER,
  lower_bound NUMBER,  --lower_bound and upper_bound are used for the
  upper_bound NUMBER,  --index-based functional implementation.
  STATIC FUNCTION ODCIGETINTERFACES(ifclist OUT SYS.ODCIOBJECTLIST) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXCREATE
    (ia SYS.ODCIINDEXINFO, parms VARCHAR2, env SYS.ODCIEnv) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXTRUNCATE (ia SYS.ODCIINDEXINFO,
                                     env SYS.ODCIEnv) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXDROP(ia SYS.ODCIINDEXINFO,
                                env SYS.ODCIEnv) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXINSERT(ia SYS.ODCIINDEXINFO, rid ROWID,
                                  newval NUMBER, env SYS.ODCIEnv) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXDELETE(ia SYS.ODCIINDEXINFO, rid ROWID, oldval NUMBER,
                                  env SYS.ODCIEnv) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXUPDATE(ia SYS.ODCIINDEXINFO, rid ROWID, oldval NUMBER,
                                  newval NUMBER, env SYS.ODCIEnv) RETURN NUMBER,
  STATIC FUNCTION ODCIINDEXSTART(SCTX IN OUT position_im, ia SYS.ODCIINDEXINFO,
                                 op SYS.ODCIPREDINFO, qi SYS.ODCIQUERYINFO,
                                 strt NUMBER, stop NUMBER, lower_pos NUMBER,
                                 upper_pos NUMBER, env SYS.ODCIEnv) RETURN NUMBER,
  MEMBER FUNCTION ODCIINDEXFETCH(SELF IN OUT position_im, nrows NUMBER,
                                 rids OUT SYS.ODCIRIDLIST, env SYS.ODCIEnv)
                                 RETURN NUMBER,
  MEMBER FUNCTION ODCIINDEXCLOSE(env SYS.ODCIEnv) RETURN NUMBER
);
/

CREATE OR REPLACE TYPE BODY position_im
IS
   STATIC FUNCTION ODCIGETINTERFACES(ifclist OUT SYS.ODCIOBJECTLIST)
       RETURN NUMBER IS
 BEGIN
     ifclist := SYS.ODCIOBJECTLIST(SYS.ODCIOBJECT('SYS','ODCIINDEX2'));
     RETURN ODCICONST.SUCCESS;
 END ODCIGETINTERFACES;
  STATIC FUNCTION ODCIINDEXCREATE (ia SYS.ODCIINDEXINFO, parms VARCHAR2, env SYS.ODCIEnv) RETURN
NUMBER
 IS
 stmt   VARCHAR2(2000);
 BEGIN
 -- construct the sql statement
 stmt := 'Create Table ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
         '_STORAGE_TAB' || '(col_val, base_rowid, constraint pk PRIMARY KEY ' ||
         '(col_val, base_rowid)) ORGANIZATION INDEX AS SELECT ' ||
         ia.INDEXCOLS(1).COLNAME || ', ROWID FROM ' ||
         ia.INDEXCOLS(1).TABLESCHEMA || '.' || ia.INDEXCOLS(1).TABLENAME;

 EXECUTE IMMEDIATE stmt;
 RETURN ODCICONST.SUCCESS;
 END;

 STATIC FUNCTION ODCIINDEXDROP(ia SYS.ODCIINDEXINFO, env SYS.ODCIEnv) RETURN NUMBER IS
 stmt VARCHAR2(2000);
 BEGIN
  -- construct the sql statement
 stmt := 'DROP TABLE ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
 '_STORAGE_TAB';

 EXECUTE IMMEDIATE stmt;
 RETURN ODCICONST.SUCCESS;
 END;

 STATIC FUNCTION ODCIINDEXTRUNCATE(ia SYS.ODCIINDEXINFO, env SYS.ODCIEnv) RETURN NUMBER IS
 stmt VARCHAR2(2000);
 BEGIN
 -- construct the sql statement
 stmt := 'TRUNCATE TABLE ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME || '_STORAGE_TAB';

 EXECUTE IMMEDIATE stmt;
 RETURN ODCICONST.SUCCESS;
 END;

 STATIC FUNCTION ODCIINDEXINSERT(ia SYS.ODCIINDEXINFO, rid ROWID,
                        newval NUMBER, env SYS.ODCIEnv) RETURN NUMBER IS
 stmt VARCHAR2(2000);
 BEGIN
  -- construct the sql statement
 stmt := 'INSERT INTO ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
        '_STORAGE_TAB  VALUES (''' || newval || ''' , ''' || rid || ''' )';

 -- execute the statement
 EXECUTE IMMEDIATE stmt;

 RETURN ODCICONST.SUCCESS;
 END;
  STATIC FUNCTION ODCIINDEXDELETE(ia SYS.ODCIINDEXINFO, rid ROWID, oldval NUMBER,
                                env SYS.ODCIEnv)
   RETURN NUMBER IS
 stmt VARCHAR2(2000);
 BEGIN
  -- construct the sql statement
 stmt := 'DELETE FROM ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
        '_STORAGE_TAB WHERE col_val = ''' || oldval || ''' AND base_rowid = ''' || rid ||
'''';

 -- execute the statement
 EXECUTE IMMEDIATE stmt;

 RETURN ODCICONST.SUCCESS;
 END;

 STATIC FUNCTION ODCIINDEXUPDATE(ia SYS.ODCIINDEXINFO, rid ROWID, oldval NUMBER,
                        newval NUMBER, env SYS.ODCIEnv) RETURN NUMBER IS
 stmt VARCHAR2(2000);
 BEGIN
  -- construct the sql statement
 stmt := 'UPDATE ' || ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
        '_STORAGE_TAB SET col_val = ''' || newval || ''' WHERE f2 = '''|| rid ||'''';

 -- execute the statement
 EXECUTE IMMEDIATE stmt;

 RETURN ODCICONST.SUCCESS;
 END;

 STATIC FUNCTION ODCIINDEXSTART(SCTX IN OUT position_im, ia SYS.ODCIINDEXINFO,
                       op SYS.ODCIPREDINFO, qi SYS.ODCIQUERYINFO,
                       strt NUMBER, stop NUMBER, lower_pos NUMBER,
                       upper_pos NUMBER, env SYS.ODCIEnv) RETURN NUMBER IS

  rid              VARCHAR2(5072);
  storage_tab_name VARCHAR2(65);
  lower_bound_stmt VARCHAR2(2000);
  upper_bound_stmt VARCHAR2(2000);
  range_query_stmt VARCHAR2(2000);
  lower_bound      NUMBER;
  upper_bound      NUMBER;
  cnum             INTEGER;
  nrows            INTEGER;

 BEGIN
  -- Take care of some error cases.
  -- The only predicates in which position operator can appear are
  --    op() = 1     OR
  --    op() = 0     OR
  --    op() between 0 and 1
  IF (((strt != 1) AND (strt != 0)) OR
      ((stop != 1) AND (stop != 0)) OR
      ((strt = 1) AND (stop = 0))) THEN
    RAISE_APPLICATION_ERROR(-20101,
                            'incorrect predicate for position_between operator');
  END IF;

  IF (lower_pos > upper_pos) THEN
    RAISE_APPLICATION_ERROR(-20101, 'Upper Position must be greater than or
    equal to Lower Position');
  END IF;

  IF (lower_pos <= 0) THEN
    RAISE_APPLICATION_ERROR(-20101, 'Both Positions must be greater than zero');
  END IF;

  storage_tab_name := ia.INDEXSCHEMA || '.' || ia.INDEXNAME ||
                      '_STORAGE_TAB';
  upper_bound_stmt := 'Select MIN(col_val) FROM (Select /*+ INDEX_DESC(' ||
                      storage_tab_name || ') */ DISTINCT ' ||
                      'col_val FROM ' || storage_tab_name || ' ORDER BY ' ||
                      'col_val DESC) WHERE rownum <= ' || lower_pos;
  EXECUTE IMMEDIATE upper_bound_stmt INTO upper_bound;

  IF (lower_pos != upper_pos) THEN
    lower_bound_stmt := 'Select MIN(col_val) FROM (Select /*+ INDEX_DESC(' ||
                        storage_tab_name || ') */ DISTINCT ' ||
                        'col_val FROM ' || storage_tab_name ||
                        ' WHERE col_val < ' || upper_bound || ' ORDER BY ' ||
                        'col_val DESC) WHERE rownum <= ' ||
                        (upper_pos - lower_pos);
    EXECUTE IMMEDIATE lower_bound_stmt INTO lower_bound;
  ELSE
    lower_bound := upper_bound;
  END IF;

  IF (lower_bound IS NULL) THEN
    lower_bound := upper_bound;
  END IF;

  range_query_stmt := 'Select base_rowid FROM ' || storage_tab_name ||
                      ' WHERE col_val BETWEEN ' || lower_bound || ' AND ' ||
                      upper_bound;

  cnum := DBMS_SQL.OPEN_CURSOR;
  DBMS_SQL.PARSE(cnum, range_query_stmt, DBMS_SQL.NATIVE);

  -- set context as the cursor number
  SCTX := position_im(cnum, 0, 0, 0);

  -- return success
  RETURN ODCICONST.SUCCESS;
 END;

 MEMBER FUNCTION ODCIINDEXFETCH(SELF IN OUT position_im, nrows NUMBER,
                               rids OUT SYS.ODCIRIDLIST, env SYS.ODCIEnv)
 RETURN NUMBER IS
  cnum    INTEGER;
  rid_tab DBMS_SQL.Varchar2_table;
  rlist   SYS.ODCIRIDLIST := SYS.ODCIRIDLIST();
  i       INTEGER;
  d       INTEGER;
 BEGIN
  cnum := SELF.curnum;

  IF self.howmany = 0 THEN
    dbms_sql.define_array(cnum, 1, rid_tab, nrows, 1);
    d := DBMS_SQL.EXECUTE(cnum);
  END IF;

  d := DBMS_SQL.FETCH_ROWS(cnum);

  IF d = nrows THEN
    rlist.extend(d);
  ELSE
    rlist.extend(d+1);
  END IF;

  DBMS_SQL.COLUMN_VALUE(cnum, 1, rid_tab);

  for i in 1..d loop
    rlist(i) := rid_tab(i+SELF.howmany);
  end loop;

  SELF.howmany := SELF.howmany + d;
  rids := rlist;

  RETURN ODCICONST.SUCCESS;
 END;
  MEMBER FUNCTION ODCIINDEXCLOSE(env SYS.ODCIEnv) RETURN NUMBER IS
  cnum INTEGER;
 BEGIN
  cnum := SELF.curnum;
  DBMS_SQL.CLOSE_CURSOR(cnum);
  RETURN ODCICONST.SUCCESS;
 END;

END;
/

The next step is to create the functional implementation function_for_position_between for the operator that will be associated with the indextype. (The PL/SQL blocks are shown in parentheses.)

This function is for use with an index-based function evaluation. Therefore, it takes an index context and scan context as parameters.

See Also:
  • Oracle9i Data Cartridge Developer's Guide for information on creating index-based functional implementation
  • CREATE FUNCTION and PL/SQL User's Guide and Reference

CREATE OR REPLACE FUNCTION function_for_position_between
                           (col NUMBER, lower_pos NUMBER, upper_pos NUMBER,
                            indexctx IN SYS.ODCIIndexCtx,
                            scanctx IN OUT position_im,
                            scanflg IN NUMBER)
RETURN NUMBER AS
  rid              ROWID;
  storage_tab_name VARCHAR2(65);
  lower_bound_stmt VARCHAR2(2000);
  upper_bound_stmt VARCHAR2(2000);
  col_val_stmt     VARCHAR2(2000);
  lower_bound      NUMBER;
  upper_bound      NUMBER;
  column_value     NUMBER;
BEGIN
 IF (indexctx.IndexInfo IS NOT NULL) THEN
  storage_tab_name := indexctx.IndexInfo.INDEXSCHEMA || '.' ||
                      indexctx.IndexInfo.INDEXNAME || '_STORAGE_TAB';
  IF (scanctx IS NULL) THEN
    --This is the first call.  Open a cursor for future calls.
    --First, do some error checking
    IF (lower_pos > upper_pos) THEN
      RAISE_APPLICATION_ERROR(-20101,
        'Upper Position must be greater than or equal to Lower Position');
    END IF;
    IF (lower_pos <= 0) THEN
      RAISE_APPLICATION_ERROR(-20101,
        'Both Positions must be greater than zero');
    END IF;
    --Obtain the upper and lower value bounds for the range we're interested
    --in.
    upper_bound_stmt := 'Select MIN(col_val) FROM (Select /*+ INDEX_DESC(' ||
                      storage_tab_name || ') */ DISTINCT ' ||
                      'col_val FROM ' || storage_tab_name || ' ORDER BY ' ||
                      'col_val DESC) WHERE rownum <= ' || lower_pos;
    EXECUTE IMMEDIATE upper_bound_stmt INTO upper_bound;
    IF (lower_pos != upper_pos) THEN
      lower_bound_stmt := 'Select MIN(col_val) FROM (Select /*+ INDEX_DESC(' ||
                          storage_tab_name || ') */ DISTINCT ' ||
                          'col_val FROM ' || storage_tab_name ||
                          ' WHERE col_val < ' || upper_bound || ' ORDER BY ' ||
                          'col_val DESC) WHERE rownum <= ' ||
                          (upper_pos - lower_pos);
      EXECUTE IMMEDIATE lower_bound_stmt INTO lower_bound;
    ELSE
      lower_bound := upper_bound;
    END IF;
    IF (lower_bound IS NULL) THEN
      lower_bound := upper_bound;
    END IF;
    --Store the lower and upper bounds for future function invocations for
    --the positions.
    scanctx := position_im(0, 0, lower_bound, upper_bound);
  END IF;
  --Fetch the column value corresponding to the rowid, and see if it falls
  --within the determined range.
  col_val_stmt := 'Select col_val FROM ' || storage_tab_name ||
                  ' WHERE base_rowid = ''' || indexctx.Rid || '''';
  EXECUTE IMMEDIATE col_val_stmt INTO column_value;
  IF (column_value <= scanctx.upper_bound AND
      column_value >= scanctx.lower_bound AND
      scanflg = ODCICONST.RegularCall) THEN
    RETURN 1;
  ELSE
    RETURN 0;
  END IF;
 ELSE
  RAISE_APPLICATION_ERROR(-20101, 'A column that has a domain index of' ||
                          'Position indextype must be the first argument');
 END IF;
END;
/

Next, create the position_between operator, which uses the function_for_position_between function. The operator takes an indexed NUMBER column as the first argument, followed by a NUMBER lower and upper bound as the second and third arguments.

See Also:

CREATE OPERATOR

CREATE OR REPLACE OPERATOR position_between
   BINDING (NUMBER, NUMBER, NUMBER) RETURN NUMBER
   WITH INDEX CONTEXT, SCAN CONTEXT position_im
   USING function_for_position_between;

In this CREATE OPERATOR statement, the WITH INDEX CONTEXT, SCAN CONTEXT position_im clause is included so that the index context and scan context are passed in to the functional evaluation, which is index based.

Now create the position_indextype indextype for the position_operator:

See Also:

CREATE INDEXTYPE

CREATE INDEXTYPE position_indextype
   FOR position_between(NUMBER, NUMBER, NUMBER)
   USING position_im;

The operator position_between uses an index-based functional implementation. Therefore, a domain index must be defined on the referenced column so that the index information can be passed into the functional evaluation. So the final step is to create the domain index salary_index using the position_indextype indextype:

See Also:

CREATE INDEX

CREATE INDEX salary_index ON employees(salary)
   INDEXTYPE IS position_indextype;

Now you can use the position_between operator function to rewrite the original query as follows:

SELECT last_name, salary FROM employees
   WHERE position_between(salary, 10, 20)=1
   ORDER BY salary DESC;

LAST_NAME                     SALARY
------------------------- ----------
Tucker                         10000
King                           10000
Baer                           10000
Bloom                          10000
Fox                             9600
Bernstein                       9500
Sully                           9500
Greene                          9500
Hunold                          9000
Faviet                          9000
McEwen                          9000
Hall                            9000
Hutton                          8800
Taylor                          8600
Livingston                      8400
Gietz                           8300
Chen                            8200
Fripp                           8200
Weiss                           8000
Olsen                           8000
Smith                           8000
Kaufling                        7900
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýðº ðº ðº ðº««««««««


Examples, 3 of 3

Oracle9i SQL Reference
Part Number A96540-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Using XML in SQL Statements

This section describes some of the ways you can use XMLType data in the database.

XMLType Tables

The sample schema oe contains a table warehouses, which contains an XMLType column warehouse_spec. Suppose you want to create a separate table with the warehouse_spec information. The following example creates a very simple XMLType table with one implicit CLOB column:

CREATE TABLE xwarehouses OF XMLTYPE;

You can insert into such a table using XMLType syntax, as shown in the next statement. (The data inserted in this example corresponds to the data in the warehouse_spec column of the sample table oe.warehouses where warehouse_id = 1.)

INSERT INTO xwarehouses VALUES
  (xmltype('<?xml version="1.0"?>
  <Warehouse>
    <WarehouseId>1</WarehouseId>
    <WarehouseName>Southlake, Texas</WarehouseName>
    <Building>Owned</Building>
    <Area>25000</Area>
    <Docks>2</Docks>
    <DockType>Rear load</DockType>
    <WaterAccess>true</WaterAccess>
    <RailAccess>N</RailAccess>
    <Parking>Street</Parking>
    <VClearance>10</VClearance>
  </Warehouse>'));
See Also:

Oracle9i XML Database Developer's Guide - Oracle XML DB for information on XMLType and its member methods

You can query this table with the following statement:

SELECT e.getClobVal() FROM xwarehouses e;

Because Oracle implicitly stores the data in a CLOB column, it is subject to all of the restrictions on LOB columns. To avoid these restrictions, create an XMLSchema-based table. The XMLSchema maps the XML elements to their object-relational equivalents. The following example registers an XMLSchema locally. The XMLSchema (xwarhouses.xsd) reflects the same structure as the xwarehouses table. (XMLSchema declarations use PL/SQL and the DBMS_XMLSCHEMA package, so the example is shown in italics.)

See Also:

Oracle9i XML Database Developer's Guide - Oracle XML DB for information on creating XMLSchemas

begin
 dbms_xmlschema.registerSchema(
 'http://www.oracle.com/xwarehouses.xsd',
 '<schema xmlns="http://www.w3.org/2001/XMLSchema"
     targetNamespace="http://www.oracle.com/xwarehouses.xsd"
     xmlns:who="http://www.oracle.com/xwarehouses.xsd"
     version="1.0">
  <simpleType name="RentalType">
 <restriction base="string">
  <enumeration value="Rented"/>
  <enumeration value="Owned"/>
 </restriction>
 </simpleType>
  <simpleType name="ParkingType">
 <restriction base="string">
  <enumeration value="Street"/>
  <enumeration value="Lot"/>
 </restriction>
 </simpleType>
  <element name = "Warehouse">
  <complexType>
   <sequence>
    <element name = "WarehouseId"   type = "positiveInteger"/>
    <element name = "WarehouseName" type = "string"/>
    <element name = "Building"      type = "who:RentalType"/>
    <element name = "Area"          type = "positiveInteger"/>
    <element name = "Docks"         type = "positiveInteger"/>
    <element name = "DockType"      type = "string"/>
    <element name = "WaterAccess"   type = "boolean"/>
    <element name = "RailAccess"    type = "boolean"/>
    <element name = "Parking"       type = "who:ParkingType"/>
    <element name = "VClearance"    type = "positiveInteger"/>
   </sequence>
  </complexType>
 </element>
</schema>',
 TRUE, TRUE, FALSE, FALSE);
end;
/

Now you can create an XMLSchema-based table, as shown in the following example:

CREATE TABLE xwarehouses OF XMLTYPE
   XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
   ELEMENT "Warehouse";

By default, Oracle stores this as an object-relational table. Therefore, you can insert into it as shown in the example that follows. (The data inserted in this example corresponds to the data in the warehouse_spec column of the sample table oe.warehouses where warehouse_id = 1.)

INSERT INTO xwarehouses VALUES(
   xmltype.createxml('<?xml version="1.0"?>
   <who:Warehouse xmlns:who="http://www.oracle.com/xwarehouse.xsd"
   xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
   xsi:schemaLocation="http://www.oracle.com/xwarehouse.xsd
   http://www.oracle.com/xwarehouse.xsd">
      <WarehouseId>1</WarehouseId>
      <WarehouseName>Southlake, Texas</WarehouseName>
      <Building>Owned</Building>
      <Area>25000</Area>
      <Docks>2</Docks>
      <DockType>Rear load</DockType>
      <WaterAccess>true</WaterAccess>
      <RailAccess>false</RailAccess>
      <Parking>Street</Parking>
      <VClearance>10</VClearance>
      </who:Warehouse>'));
...

You can define constraints on an XMLSchema-based table. To do so, you use the XMLDATA pseudocolumn to refer to the appropriate attribute within the Warehouse XML element:

ALTER TABLE xwarehouses ADD (PRIMARY KEY(XMLDATA."WarehouseId"));

Because the data in xwarehouses is stored object relationally, Oracle rewrites queries to this XMLType table to go to the underlying storage when possible. Therefore the following queries would use the index created by the primary key constraint in the preceding example:

SELECT * FROM xwarehouses x
   WHERE EXISTSNODE(VALUE(x), '/Warehouse[WarehouseId="1"]') = 1;

SELECT * FROM xwarehouses x
   WHERE EXTRACTVALUE(VALUE(x), '/Warehouse/WarehouseId') = 1;

You can also explicitly create indexes on XMLSchema-based tables, which greatly enhance the performance of subsequent queries. You can create object-relational views on XMLType tables, and you can create XMLType views on object-relational tables.

See Also:
  • "XMLDATA" for information on the XMLDATA pseudocolumn
  • "Creating an XMLType View: Example"
  • "Create an Index on an XMLType Table: Example"

XMLType Columns

The sample table oe.warehouses was created with a warehouse_spec column of type XMLType. No storage was specified, so the XMLType column was implicitly stored as a CLOB. The examples in this section create a shortened form of the oe.warehouses table, using two different types of storage.

The first example creates a table with an XMLType table stored as a CLOB. This table does not require an XMLSchema, so the content structure is not predetermined:

CREATE TABLE xwarehouses (
   warehouse_id        NUMBER,
   warehouse_spec      XMLTYPE)
   XMLTYPE warehouse_spec STORE AS CLOB
   (TABLESPACE example
    STORAGE (INITIAL 6144 NEXT 6144)
    CHUNK 4000
    NOCACHE LOGGING);

The following example creates a similar table, but stores the XMLType data in an object-relational XMLType column whose structure is determined by the specified XMLSchema:

CREATE TABLE xwarehouses (
   warehouse_id    NUMBER,
   warehouse_spec  XMLTYPE)
   XMLTYPE warehouse_spec STORE AS OBJECT RELATIONAL
      XMLSCHEMA "http://www.oracle.com/xwarehouses.xsd"
      ELEMENT "Warehouse";
Go to previous page Go to next page
Oracle
Copyright © 2000, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Oracle9i Database Reference -- Index

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page
View PDF

Index

A B C D E F G H I J L M N O P Q R S T U V W

A

ACTIVE_INSTANCE_COUNT initialization parameter, 1-15
ALL_ALL_TABLES view, 2-6
ALL_APPLY view, 2-8
ALL_APPLY_CONFLICT_COLUMNS view, 2-9
ALL_APPLY_DML_HANDLERS view, 2-10
ALL_APPLY_ERROR view, 2-10
ALL_APPLY_KEY_COLUMNS view, 2-11
ALL_APPLY_PARAMETERS view, 2-12
ALL_APPLY_PROGRESS view, 2-12
ALL_ARGUMENTS view, 2-13
ALL_ASSOCIATIONS view, 2-14
ALL_AUDIT_POLICIES view, 2-15
ALL_BASE_TABLE_MVIEWS view, 2-16
ALL_CAPTURE view, 2-17
ALL_CAPTURE_PARAMETERS view, 2-18
ALL_CAPTURE_PREPARED_DATABASE view, 2-18
ALL_CAPTURE_PREPARED_SCHEMAS view, 2-19
ALL_CAPTURE_PREPARED_TABLES view, 2-19
ALL_CATALOG view, 2-20
ALL_CLUSTER_HASH_EXPRESSIONS view, 2-20
ALL_CLUSTERS view, 2-21
ALL_COL_COMMENTS view, 2-22
ALL_COL_PRIVS view, 2-22
ALL_COL_PRIVS_MADE view, 2-23
ALL_COL_PRIVS_RECD view, 2-24
ALL_COLL_TYPES view, 2-25
ALL_CONS_COLUMNS view, 2-25
ALL_CONS_OBJ_COLUMNS view, 2-26
ALL_CONSTRAINTS view, 2-27
ALL_CONTEXT view, 2-28
ALL_DB_LINKS view, 2-29
ALL_DEF_AUDIT_OPTS view, 2-29
ALL_DEPENDENCIES view, 2-30
ALL_DIM_ATTRIBUTES view, 2-31
ALL_DIM_CHILD_OF view, 2-32
ALL_DIM_HIERARCHIES view, 2-32
ALL_DIM_JOIN_KEY view, 2-33
ALL_DIM_LEVEL_KEY view, 2-33
ALL_DIM_LEVELS view, 2-34
ALL_DIMENSIONS view, 2-34
ALL_DIRECTORIES view, 2-35
ALL_ERRORS view, 2-35
ALL_EVALUATION_CONTEXT_TABLES view, 2-36
ALL_EVALUATION_CONTEXT_VARS view, 2-36
ALL_EVALUATION_CONTEXTS view, 2-37
ALL_EXTERNAL_LOCATIONS view, 2-38
ALL_EXTERNAL_TABLES view, 2-39
ALL_IND_COLUMNS view, 2-40
ALL_IND_EXPRESSIONS view, 2-41
ALL_IND_PARTITIONS view, 2-41
ALL_IND_SUBPARTITIONS view, 2-43
ALL_INDEXES view, 2-45
ALL_INDEXTYPE_COMMENTS view, 2-48
ALL_INDEXTYPE_OPERATORS view, 2-49
ALL_INDEXTYPES view, 2-50
ALL_INTERNAL_TRIGGERS view, 2-50
ALL_JAVA_ARGUMENTS view, 2-51
ALL_JAVA_CLASSES view, 2-52
ALL_JAVA_DERIVATIONS view, 2-53
ALL_JAVA_FIELDS view, 2-54
ALL_JAVA_IMPLEMENTS view, 2-55
ALL_JAVA_INNERS view, 2-56
ALL_JAVA_LAYOUTS view, 2-57
ALL_JAVA_METHODS view, 2-58
ALL_JAVA_NCOMPS view, 2-59
ALL_JAVA_RESOLVERS view, 2-60
ALL_JAVA_THROWS view, 2-61
ALL_JOBS view, 2-61
ALL_JOIN_IND_COLUMNS view, 2-63
ALL_LIBRARIES view, 2-63
ALL_LOB_PARTITIONS view, 2-64
ALL_LOB_SUBPARTITIONS view, 2-65
ALL_LOB_TEMPLATES view, 2-66
ALL_LOBS view, 2-67
ALL_LOG_GROUP_COLUMNS view, 2-68
ALL_LOG_GROUPS view, 2-69
ALL_METHOD_PARAMS view, 2-69
ALL_METHOD_RESULTS view, 2-70
ALL_MVIEW_AGGREGATES view, 2-71
ALL_MVIEW_ANALYSIS view, 2-72
ALL_MVIEW_DETAIL_RELATIONS view, 2-73
ALL_MVIEW_JOINS view, 2-74
ALL_MVIEW_KEYS view, 2-75
ALL_MVIEW_LOGS view, 2-76
ALL_MVIEW_REFRESH_TIMES view, 2-77
ALL_MVIEWS view, 2-77
ALL_NESTED_TABLES view, 2-82
ALL_OBJ_COLATTRS view, 2-82
ALL_OBJECT_TABLES view, 2-83
ALL_OBJECTS view, 2-85
ALL_OPANCILLARY view, 2-86
ALL_OPARGUMENTS view, 2-87
ALL_OPBINDINGS view, 2-87
ALL_OPERATOR_COMMENTS view, 2-88
ALL_OPERATORS view, 2-89
ALL_OUTLINE_HINTS view, 2-89
ALL_OUTLINES view, 2-90
ALL_PART_COL_STATISTICS view, 2-91
ALL_PART_HISTOGRAMS view, 2-92
ALL_PART_INDEXES view, 2-92
ALL_PART_KEY_COLUMNS view, 2-94
ALL_PART_LOBS view, 2-95
ALL_PART_TABLES view, 2-96
ALL_PARTIAL_DROP_TABS view, 2-98
ALL_PENDING_CONV_TABLES view, 2-98
ALL_POLICIES view, 2-99
ALL_POLICY_CONTEXTS view, 2-100
ALL_POLICY_GROUPS view, 2-101
ALL_PROCEDURES view, 2-101
ALL_PROPAGATION view, 2-102
ALL_PUBLISHED_COLUMNS view, 2-103
ALL_QUEUE_TABLES view, 2-103
ALL_QUEUES view, 2-105
ALL_REFRESH view, 2-105
ALL_REFRESH_CHILDREN view, 2-106
ALL_REFRESH_DEPENDENCIES view, 2-107
ALL_REFS view, 2-108
ALL_REGISTERED_MVIEWS view, 2-108
ALL_REGISTRY_BANNERS view, 2-109
ALL_REPAUDIT_ATTRIBUTE view, 2-2
ALL_REPAUDIT_COLUMN view, 2-2
ALL_REPCAT view, 2-2
ALL_REPCAT_REFRESH_TEMPLATES view, 2-2
ALL_REPCAT_TEMPLATE_OBJECTS view, 2-2
ALL_REPCAT_TEMPLATE_PARMS view, 2-2
ALL_REPCAT_TEMPLATE_SITES view, 2-2
ALL_REPCAT_USER_AUTHORIZATIONS view, 2-2
ALL_REPCAT_USER_PARM_VALUES view, 2-2
ALL_REPCATLOG view, 2-2
ALL_REPCOLUMN view, 2-2
ALL_REPCOLUMN_GROUP view, 2-2
ALL_REPCONFLICT view, 2-2
ALL_REPDDL view, 2-2
ALL_REPFLAVOR_COLUMNS view, 2-2
ALL_REPFLAVOR_OBJECTS view, 2-2
ALL_REPFLAVORS view, 2-2
ALL_REPGENERATED view, 2-2
ALL_REPGENOBJECTS view, 2-2
ALL_REPGROUP view, 2-2
ALL_REPGROUP_PRIVILEGES view, 2-2
ALL_REPGROUPED_COLUMN view, 2-2
ALL_REPKEY_COLUMNS view, 2-2
ALL_REPOBJECT view, 2-2
ALL_REPPARAMETER_COLUMN view, 2-2
ALL_REPPRIORITY view, 2-2
ALL_REPPRIORITY_GROUP view, 2-2
ALL_REPPROP view, 2-2
ALL_REPRESOL_STATS_CONTROL view, 2-2
ALL_REPRESOLUTION view, 2-2
ALL_REPRESOLUTION_METHOD view, 2-2
ALL_REPRESOLUTION_STATISTICS view, 2-2
ALL_REPSCHEMA view, 2-2
ALL_REPSITES view, 2-2
ALL_RULE_SET_RULES view, 2-110
ALL_RULE_SETS view, 2-110
ALL_RULES view, 2-111
ALL_SEQUENCES view, 2-112
ALL_SOURCE view, 2-112
ALL_SOURCE_TABLES view, 2-113
ALL_SQLJ_TYPE_ATTRS view, 2-113
ALL_SQLJ_TYPE_METHODS view, 2-114
ALL_SQLJ_TYPES view, 2-115
ALL_STORED_SETTINGS view, 2-116
ALL_STREAMS_GLOBAL_RULES view, 2-117
ALL_STREAMS_SCHEMA_RULES view, 2-118
ALL_STREAMS_TABLE_RULES view, 2-119
ALL_SUBPART_COL_STATISTICS view, 2-121
ALL_SUBPART_HISTOGRAMS view, 2-122
ALL_SUBPART_KEY_COLUMNS view, 2-123
ALL_SUBPARTITION_TEMPLATES view, 2-124
ALL_SUBSCRIBED_COLUMNS view, 2-124
ALL_SUBSCRIBED_TABLES view, 2-125
ALL_SUBSCRIPTIONS view, 2-125
ALL_SUMDELTA view, 2-126
ALL_SYNONYMS view, 2-126
ALL_TAB_COL_STATISTICS view, 2-127
ALL_TAB_COLUMNS view, 2-128
ALL_TAB_COMMENTS view, 2-130
ALL_TAB_HISTOGRAMS view, 2-130
ALL_TAB_MODIFICATIONS view, 2-131
ALL_TAB_PARTITIONS view, 2-132
ALL_TAB_PRIVS view, 2-133
ALL_TAB_PRIVS_MADE view, 2-134
ALL_TAB_PRIVS_RECD view, 2-135
ALL_TAB_SUBPARTITIONS view, 2-136
ALL_TABLES view, 2-137
ALL_TRIGGER_COLS view, 2-140
ALL_TRIGGERS view, 2-141
ALL_TYPE_ATTRS view, 2-142
ALL_TYPE_METHODS view, 2-143
ALL_TYPE_VERSIONS view, 2-144
ALL_TYPES view, 2-144
ALL_UNUSED_COL_TABS view, 2-145
ALL_UPDATABLE_COLUMNS view, 2-146
ALL_USERS view, 2-146
ALL_USTATS view, 2-147
ALL_VARRAYS view, 2-148
ALL_VERSION_HVIEW view, 2-3
ALL_VIEWS view, 2-148
ALL_WM_LOCKED_TABLES view, 2-3
ALL_WM_MODIFIED_TABLES view, 2-3
ALL_WM_RIC_INFO view, 2-3
ALL_WM_TAB_TRIGGERS view, 2-3
ALL_WM_VERSIONED_TABLES view, 2-3
ALL_WM_VT_ERRORS view, 2-3
ALL_WORKSPACE_PRIVS view, 2-3
ALL_WORKSPACE_SAVEPOINTS view, 2-3
ALL_WORKSPACES view, 2-3
ALL_XML_SCHEMAS view, 2-149
ALL_XML_TAB_COLS view, 2-150
ALL_XML_TABLES view, 2-151
ALL_XML_VIEW_COLS view, 2-151
ALL_XML_VIEWS view, 2-152
ALLOCATE EXTENT clause
of ALTER TABLE
instance number, 1-67
allocation
PCM locks, 1-60
ALTER DATABASE statement
ADD LOGFILE, 1-160
database name, 1-44
ENABLE THREAD, 1-160
THREAD, 1-160
ALTER SESSION statement
SET HASH_AREA_SIZE clause, 1-63
SET HASH_JOIN_ENABLED clause, 1-64
ALTER TABLE statement
allocating extents, 1-67
ANALYZE statement, 2-45, 2-128, 2-130, 2-137, 2-183, 2-226, 2-227, 2-289, 2-291
AQ_TM_PROCESSES initialization parameter, 1-15
ARCHIVE LOG START statement
automatic archiving, 1-75
ARCHIVE_LAG_TARGET initialization parameter, 1-16
archived redo logs
automatic versus manual, 1-83
destination file, 1-75
storage device, 1-75, 1-80
ARCHIVELOG mode, 1-75
archiving destination, 1-75, 1-80
automatic archiving, 1-83
AUDIT_ACTIONS table, 2-153
AUDIT_FILE_DEST initialization parameter, 1-17
AUDIT_SYS_OPERATIONS initialization parameter, 1-17
AUDIT_TRAIL initialization parameter, 1-17
authenticating remote clients, 1-140
authenticating users, 1-119

B

BACKGROUND_CORE_DUMP initialization parameter, 1-18
BACKGROUND_DUMP_DEST initialization parameter, 1-18
BACKUP_TAPE_IO_SLAVES initialization parameter, 1-19
BITMAP_MERGE_AREA_SIZE initialization parameter, 1-20
BLANK_TRIMMING initialization parameter, 1-21
blocks
PCM lock, 1-60
redo log, 1-86
size, 1-32, 1-36, 1-44, 4-2
BUFFER_POOL_KEEP initialization parameter, 1-21
BUFFER_POOL_RECYCLE initialization parameter, 1-22

C

cache
dictionary, 3-98, 3-123, 3-124, 3-126, 3-127
statistics, 1-86
CAT synonym for USER_CATALOG view, 2-153
CATALOG view, 2-153
CATALOG.SQL script, 5-2
creating V$ views, 3-1
CATAUDIT.SQL script
audit trail records created by, 2-264
audit trails for connections and disconnections, 2-264
auditing characteristics described by, 2-278
CATBLOCK.SQL script, 5-3
CATCLUST.SQL script, 5-2
CATEXP7.SQL script, 5-3
CATHS.SQL script, 5-3
CATIO.SQL script, 5-3
CATJAVA.SQL script, 5-8
CATNOADT.SQL script, 5-6
CATNOAUD.SQL script, 5-6
CATNOHS.SQL script, 5-6
CATNOPRT.SQL script, 5-6
CATNOQUE.SQL script, 5-6
CATNORMN.SQL script, 5-6
CATNOSVM.SQL script, 5-6
CATNSNMP.SQL script, 5-6
CATOCTK.SQL script, 5-3
CATPROC.SQL script, 5-2
CATQUEUE.SQL script, 5-3
CATREP.SQL script, 5-3
CATRMAN.SQL script, 5-3
CHAINED_ROWS table, 2-153
CHANGE_SETS view, 2-154
CHANGE_SOURCES view, 2-154
CHANGE_TABLES view, 2-155
characters
numeric group separators, 1-101
checkpoints
checkpoint interval, 1-86
statistics, 1-86
CIRCUITS initialization parameter, 1-24
CLU synonym for USER_CLUSTERS view, 2-155
CLUSTER_DATABASE initialization parameter, 1-24
CLUSTER_DATABASE_INSTANCES initialization parameter, 1-25
CLUSTER_INTERCONNECTS initialization parameter, 1-25
CMPDBMIG.SQL script, 5-7
CODE_PIECES view, 2-156
CODE_SIZE view, 2-156
COL view, 2-156
COLS synonym for USER_TAB_COLUMNS view, 2-156
COLUMN_PRIVILEGES view, 2-156
COMMIT_POINT_STRENGTH initialization parameter, 1-26
COMPATIBLE initialization parameter, 1-27
concurrency
ROW_LOCKING initialization parameter, 1-144
contention
block-level, 3-189
control files
names, 1-28
specifying, 1-28
CONTROL_FILE_RECORD_KEEP_TIME initialization parameter, 1-28
CONTROL_FILES initialization parameter, 1-28
CORE_DUMP_DEST initialization parameter, 1-29
cost-based optimization, 1-114
favoring IN-list iterators, 1-112
CPU_COUNT initialization parameter, 1-29
CREATE DATABASE statement
database name, 1-44
setting the log mode, 1-83
CREATE TABLE statement
FREELIST GROUPS clause, 1-67
CREATE_BITMAP_AREA_SIZE initialization parameter, 1-30
creating
a database
setting block size, 1-32, 1-36, 1-44
currency, 1-96
international currency symbol, 1-99
CURSOR_SHARING initialization parameter, 1-31
CURSOR_SPACE_FOR_TIME initialization parameter, 1-31
cursors
OPEN_CURSORS initialization parameter, 1-107
shared pool, 1-64, 1-149, 1-151

D

D0801070.SQL script, 5-7
D0900010.SQL script, 5-7
data blocks
reading multiple, 1-40
size of, 1-32, 1-36, 1-44
data dictionary, 2-1
cache, 3-98, 3-123, 3-124, 3-126, 3-127
datafiles, 1-60
scripts, 5-3
SQL scripts, 5-2
tables, 2-1
views, 1-60
overview, 2-1
user views, 2-1
database migration
scripts, 5-7
database writer process (DBWR)
checkpoint, 1-86
DATABASE_PROPERTIES view, 2-156
databases
block size, 4-2
database limits, 4-1
default language, 1-99
name, 1-44, 1-45
resource limits, 1-141, 1-142
valid characters for database name, 1-44
datafiles
mapping blocks to PCM locks, 1-60
maximum number, 1-43
parameter, 1-43
unspecified for PCM locks, 1-60
dates
language used for, 1-98, 1-103, 1-104
setting SYSDATE, 1-60
TO_CHAR function, 1-97
TO_DATE function, 1-97
DB_BLOCK_BUFFERS initialization parameter, 1-33
DB_BLOCK_CHECKING initialization parameter, 1-35
DB_BLOCK_CHECKSUM initialization parameter, 1-35
DB_BLOCK_SIZE initialization parameter, 1-36
DB_CACHE_ADVICE initialization parameter, 1-37
DB_CACHE_SIZE initialization parameter, 1-38
DB_CREATE_FILE_DEST initialization parameter, 1-38
DB_CREATE_ONLINE_LOG_DEST_n initialization parameter, 1-39
DB_DOMAIN initialization parameter, 1-39
DB_FILE_MULTIBLOCK_READ_COUNT initialization parameter, 1-40
DB_FILE_NAME_CONVERT initialization parameter, 1-41
DB_FILES initialization parameter, 1-43
DB_KEEP_CACHE_SIZE initialization parameter, 1-44
DB_NAME initialization parameter, 1-44
DB_nK_CACHE_SIZE initialization parameter, 1-32
DB_RECYCLE_CACHE_SIZE initialization parameter, 1-45
DB_WRITER_PROCESSES initialization parameter, 1-45
DBA_2PC_NEIGHBORS view, 2-157
DBA_2PC_PENDING view, 2-157
DBA_ALL_TABLES view, 2-158
DBA_APPLICATION_ROLES view, 2-158
DBA_APPLY view, 2-158
DBA_APPLY_CONFLICT_COLUMNS view, 2-159
DBA_APPLY_DML_HANDLERS view, 2-159
DBA_APPLY_ERROR view, 2-159
DBA_APPLY_INSTANTIATED_OBJECTS view, 2-159
DBA_APPLY_KEY_COLUMNS view, 2-160
DBA_APPLY_PARAMETERS view, 2-160
DBA_APPLY_PROGRESS view, 2-160
DBA_AQ_AGENT_PRIVS view, 2-160
DBA_AQ_AGENTS view, 2-161
DBA_ASSOCIATIONS view, 2-161
DBA_ATTRIBUTE_TRANSFORMATIONS view, 2-161
DBA_AUDIT_EXISTS view, 2-162
DBA_AUDIT_OBJECT view, 2-163
DBA_AUDIT_POLICIES view, 2-164
DBA_AUDIT_SESSION view, 2-164
DBA_AUDIT_STATEMENT view, 2-165
DBA_AUDIT_TRAIL view, 2-167
DBA_AW_PS view, 2-169
DBA_AWS view, 2-169
DBA_BASE_TABLE_MVIEWS view, 2-170
DBA_BLOCKERS view, 2-170
DBA_CAPTURE view, 2-170
DBA_CAPTURE_PARAMETERS view, 2-171
DBA_CAPTURE_PREPARED_DATABASE view, 2-171
DBA_CAPTURE_PREPARED_SCHEMAS view, 2-171
DBA_CAPTURE_PREPARED_TABLES view, 2-171
DBA_CATALOG view, 2-171
DBA_CLU_COLUMNS view, 2-172
DBA_CLUSTER_HASH_EXPRESSIONS view, 2-172
DBA_CLUSTERS view, 2-172
DBA_COL_COMMENTS view, 2-172
DBA_COL_PRIVS view, 2-172
DBA_COLL_TYPES view, 2-173
DBA_CONS_COLUMNS view, 2-173
DBA_CONS_OBJ_COLUMNS view, 2-173
DBA_CONSTRAINTS view, 2-174
DBA_CONTEXT view, 2-174
DBA_DATA_FILES view, 1-60, 2-174, 2-239
DBA_DB_LINKS view, 2-174
DBA_DDL_LOCKS view, 2-175
DBA_DEPENDENCIES view, 2-175
DBA_DIM_ATTRIBUTES view, 2-176
DBA_DIM_CHILD_OF view, 2-176
DBA_DIM_HIERARCHIES view, 2-176
DBA_DIM_JOIN_KEY view, 2-176
DBA_DIM_LEVEL_KEY view, 2-176
DBA_DIM_LEVELS view, 2-176
DBA_DIMENSIONS view, 2-177
DBA_DIRECTORIES view, 2-177
DBA_DML_LOCKS view, 2-177
DBA_DMT_FREE_SPACE view, 2-178
DBA_DMT_USED_EXTENTS view, 2-178
DBA_ERRORS view, 2-178
DBA_EVALUATION_CONTEXT_TABLES view, 2-178
DBA_EVALUATION_CONTEXT_VARS view, 2-179
DBA_EVALUATION_CONTEXTS view, 2-179
DBA_EXP_FILES view, 2-179
DBA_EXP_OBJECTS view, 2-179
DBA_EXP_VERSION view, 2-180
DBA_EXTENTS view, 2-180
DBA_EXTERNAL_LOCATIONS view, 2-181
DBA_EXTERNAL_TABLES view, 2-181
DBA_FGA_AUDIT_TRAIL view, 2-181
DBA_FREE_SPACE view, 2-182
DBA_FREE_SPACE_COALESCED view, 2-182
DBA_IND_COLUMNS view, 2-183
DBA_IND_EXPRESSIONS view, 2-183
DBA_IND_PARTITIONS view, 2-183
DBA_IND_SUBPARTITIONS view, 2-183
DBA_INDEXES view, 2-183
collecting statistics for, 2-183
DBA_INDEXTYPE_COMMENTS view, 2-183
DBA_INDEXTYPE_OPERATORS view, 2-184
DBA_INDEXTYPES view, 2-184
DBA_INTERNAL_TRIGGERS view, 2-184
DBA_JAVA_ARGUMENTS view, 2-184
DBA_JAVA_CLASSES view, 2-184
DBA_JAVA_DERIVATIONS view, 2-184
DBA_JAVA_FIELDS view, 2-185
DBA_JAVA_IMPLEMENTS view, 2-185
DBA_JAVA_INNERS view, 2-185
DBA_JAVA_LAYOUTS view, 2-185
DBA_JAVA_METHODS view, 2-185
DBA_JAVA_NCOMPS view, 2-185
DBA_JAVA_POLICY view, 2-186
DBA_JAVA_RESOLVERS view, 2-186
DBA_JAVA_THROWS view, 2-187
DBA_JOBS view, 2-187
DBA_JOBS_RUNNING view, 2-187
DBA_JOIN_IND_COLUMNS view, 2-187
DBA_KGLLOCK view, 2-188
DBA_LIBRARIES view, 2-188
DBA_LMT_FREE_SPACE view, 2-188
DBA_LMT_USED_EXTENTS view, 2-188
DBA_LOB_PARTITIONS view, 2-189
DBA_LOB_SUBPARTITIONS view, 2-189
DBA_LOB_TEMPLATES view, 2-189
DBA_LOBS view, 2-189
DBA_LOCK view, 2-189
DBA_LOCKS synonym, 2-190
DBA_LOCK_INTERNAL view, 2-190
DBA_LOCKS synonym for DBA_LOCK view, 2-190
DBA_LOG_GROUP_COLUMNS view, 2-191
DBA_LOG_GROUPS view, 2-191
DBA_LOGSTDBY_EVENTS view, 2-191
DBA_LOGSTDBY_LOG view, 2-191
DBA_LOGSTDBY_NOT_UNIQUE view, 2-192
DBA_LOGSTDBY_PARAMETERS view, 2-193
DBA_LOGSTDBY_PROGRESS view, 2-194
DBA_LOGSTDBY_SKIP view, 2-195
DBA_LOGSTDBY_SKIP_TRANSACTION view, 2-195
DBA_LOGSTDBY_UNSUPPORTED view, 2-196
DBA_METHOD_PARAMS view, 2-196
DBA_METHOD_RESULTS view, 2-196
DBA_MVIEW_AGGREGATES view, 2-196
DBA_MVIEW_ANALYSIS view, 2-197
DBA_MVIEW_DETAIL_RELATIONS view, 2-197
DBA_MVIEW_JOINS view, 2-197
DBA_MVIEW_KEYS view, 2-197
DBA_MVIEW_LOG_FILTER_COLS view, 2-197
DBA_MVIEW_LOGS view, 2-198
DBA_MVIEW_REFRESH_TIMES view, 2-198
DBA_MVIEWS view, 2-198
DBA_NESTED_TABLES view, 2-198
DBA_OBJ_AUDIT_OPTS view, 2-198
DBA_OBJ_COLATTRS view, 2-199
DBA_OBJECT_SIZE view, 2-200
DBA_OBJECT_TABLES view, 2-200
DBA_OBJECTS view, 2-200
DBA_OPANCILLARY view, 2-200
DBA_OPARGUMENTS view, 2-201
DBA_OPBINDINGS view, 2-201
DBA_OPERATOR_COMMENTS view, 2-201
DBA_OPERATORS view, 2-201
DBA_OUTLINE_HINTS view, 2-202
DBA_OUTLINES view, 2-202
DBA_PART_COL_STATISTICS view, 2-202
DBA_PART_HISTOGRAMS view, 2-202
DBA_PART_INDEXES view, 2-202
DBA_PART_KEY_COLUMNS view, 2-203
DBA_PART_LOBS view, 2-203
DBA_PART_TABLES view, 2-203
DBA_PARTIAL_DROP_TABS view, 2-203
DBA_PENDING_CONV_TABLES view, 2-203
DBA_PENDING_TRANSACTIONS view, 2-203
DBA_POLICIES view, 2-204
DBA_POLICY_CONTEXTS view, 2-204
DBA_POLICY_GROUPS view, 2-204
DBA_PRIV_AUDIT_OPTS view, 2-204
DBA_PROCEDURES view, 2-205
DBA_PROFILES view, 2-205
DBA_PROPAGATION view, 2-205
DBA_PROXIES view, 2-205
DBA_PUBLISHED_COLUMNS view, 2-206
DBA_QUEUE_SCHEDULES view, 2-207
DBA_QUEUE_TABLES view, 2-208
DBA_QUEUES view, 2-208
DBA_RCHILD view, 2-209
DBA_REFRESH view, 2-209
DBA_REFRESH_CHILDREN view, 2-209
DBA_REFS view, 2-209
DBA_REGISTERED_MVIEW_GROUPS view, 2-209
DBA_REGISTERED_MVIEWS view, 2-210
DBA_REGISTRY view, 2-210
DBA_REGISTRY_HIERARCHY view, 2-211
DBA_REPAIR_TABLE view, 2-212
DBA_REPAUDIT_ATTRIBUTE view, 2-2
DBA_REPAUDIT_COLUMN view, 2-2
DBA_REPCAT view, 2-2
DBA_REPCAT_EXCEPTIONS view, 2-2
DBA_REPCAT_REFRESH_TEMPLATES view, 2-2
DBA_REPCAT_TEMPLATE_OBJECTS view, 2-2
DBA_REPCAT_TEMPLATE_PARMS view, 2-2
DBA_REPCAT_TEMPLATE_SITES view, 2-2
DBA_REPCAT_USER_AUTHORIZATIONS view, 2-2
DBA_REPCAT_USER_PARM_VALUES view, 2-2
DBA_REPCATLOG view, 2-2
DBA_REPCOLUMN view, 2-2
DBA_REPCOLUMN_GROUP view, 2-2
DBA_REPCONFLICT view, 2-2
DBA_REPDDL view, 2-2
DBA_REPEXTENSIONS view, 2-2
DBA_REPFLAVOR_COLUMNS view, 2-2
DBA_REPFLAVOR_OBJECTS view, 2-2
DBA_REPFLAVORS view, 2-2
DBA_REPGENERATED view, 2-2
DBA_REPGENOBJECTS view, 2-2
DBA_REPGROUP view, 2-2
DBA_REPGROUP_PRIVILEGES view, 2-2
DBA_REPGROUPED_COLUMN view, 2-2
DBA_REPKEY_COLUMNS view, 2-2
DBA_REPOBJECT view, 2-2
DBA_REPPARAMETER_COLUMN view, 2-2
DBA_REPPRIORITY view, 2-2
DBA_REPPRIORITY_GROUP view, 2-2
DBA_REPPROP view, 2-2
DBA_REPRESOL_STATS_CONTROL view, 2-2
DBA_REPRESOLUTION view, 2-2
DBA_REPRESOLUTION_METHOD view, 2-2
DBA_REPRESOLUTION_STATISTICS view, 2-2
DBA_REPSCHEMA view, 2-2
DBA_REPSITES view, 2-2
DBA_REPSITES_NEW view, 2-2
DBA_RESUMABLE view, 2-213
DBA_RGROUP view, 2-214
DBA_ROLE_PRIVS view, 2-215
DBA_ROLES view, 2-215
DBA_ROLLBACK_SEGS view, 2-215
DBA_RSRC_CONSUMER_GROUP_PRIVS view, 2-216
DBA_RSRC_CONSUMER_GROUPS view, 2-217
DBA_RSRC_MANAGER_SYSTEM_PRIVS view, 2-217
DBA_RSRC_PLAN_DIRECTIVES view, 2-218
DBA_RSRC_PLANS view, 2-219
DBA_RULE_SET_RULES view, 2-220
DBA_RULE_SETS view, 2-220
DBA_RULES view, 2-220
DBA_SEGMENTS view, 2-220
DBA_SEQUENCES view, 2-221
DBA_SOURCE view, 2-222
DBA_SOURCE_TABLES view, 2-222
DBA_SQLJ_TYPE_ATTRS view, 2-222
DBA_SQLJ_TYPE_METHODS view, 2-222
DBA_SQLJ_TYPES view, 2-222
DBA_STMT_AUDIT_OPTS view, 2-222
DBA_STORED_SETTINGS view, 2-223
DBA_STREAMS_GLOBAL_RULES view, 2-223
DBA_STREAMS_SCHEMA_RULES view, 2-223
DBA_STREAMS_TABLE_RULES view, 2-224
DBA_SUBPART_COL_STATISTICS view, 2-224
DBA_SUBPART_HISTOGRAMS view, 2-224
DBA_SUBPART_KEY_COLUMNS view, 2-224
DBA_SUBPARTITION_TEMPLATES view, 2-224
DBA_SUBSCRIBED_COLUMNS view, 2-224
DBA_SUBSCRIBED_TABLES view, 2-225
DBA_SUBSCRIPTIONS view, 2-225
DBA_SYNONYMS view, 2-225
DBA_SYS_PRIVS view, 2-225
DBA_TAB_COL_STATISTICS view, 2-226
DBA_TAB_COLUMNS view, 2-226
DBA_TAB_COMMENTS view, 2-226
DBA_TAB_HISTOGRAMS view, 2-226
DBA_TAB_MODIFICATIONS view, 2-226
DBA_TAB_PARTITIONS view, 2-226
DBA_TAB_PRIVS view, 2-227
DBA_TAB_SUBPARTITIONS view, 2-227
DBA_TABLES view, 2-227
DBA_TABLESPACES view, 2-228
DBA_TEMP_FILES view, 2-229
DBA_TRANSFORMATIONS view, 2-230
DBA_TRIGGER_COLS view, 2-230
DBA_TRIGGERS view, 2-230
DBA_TS_QUOTAS view, 2-230
DBA_TYPE_ATTRS view, 2-231
DBA_TYPE_METHODS view, 2-231
DBA_TYPE_VERSIONS view, 2-231
DBA_TYPES view, 2-231
DBA_UNDO_EXTENTS view, 2-232
DBA_UNUSED_COL_TABS view, 2-232
DBA_UPDATABLE_COLUMNS view, 2-232
DBA_USERS view, 2-233
DBA_USTATS view, 2-234
DBA_VARRAYS view, 2-234
DBA_VIEWS view, 2-234
DBA_WAITERS view, 2-234
DBA_WORKSPACE_SESSIONS view, 2-3
DBA_XML_SCHEMAS view, 2-234
DBA_XML_TAB_COLS view, 2-235
DBA_XML_TABLES view, 2-235
DBA_XML_VIEW_COLS view, 2-235
DBA_XML_VIEWS view, 2-235
DBLINK_ENCRYPT_LOGIN initialization parameter, 1-46
DBMS_ALERT_INFO view, 2-235
DBMS_LOCK_ALLOCATED view, 2-236
DBMSIOTC.SQL script, 5-3
DBMSOTRC.SQL script, 5-3
DBMSPOOL.SQL script, 5-4
DBWR_IO_SLAVES initialization parameter, 1-46
DEFCALL view, 2-2
DEFCALLDEST view, 2-2
DEFDEFAULTDEST view, 2-2
DEFERRCOUNT view, 2-2
DEFERROR view, 2-2
DEFLOB view, 2-2
DEFPROPAGATOR view, 2-2
DEFSCHEDULE view, 2-2
DEFTRAN view, 2-2
DEFTRANDEST view, 2-2
DEPTREE view, 2-236
destination
archiving redo log files, 1-75
overriding default, 1-75
USER_DUMP_DEST, 1-169
DG_BROKER_CONFIG_FILEn initialization parameter, 1-47
DG_BROKER_START initialization parameter, 1-48
DICT synonym for DICTIONARY, 2-236
DICT_COLUMNS view, 2-236
DICTIONARY view, 2-237
DICT synonym, 2-236
disk drives
archiving destination, 1-75
DISK_ASYNCH_IO initialization parameter, 1-48
dispatcher processes
maximum number, 1-92
DISPATCHERS initialization parameter, 1-49
distinguished name, 1-135
DISTRIBUTED_LOCK_TIMEOUT initialization parameter, 1-53
DML_LOCKS initialization parameter, 1-53
DRS_START initialization parameter, 1-54
dump files, 1-93
dynamic performance tables
CATALOG.SQL script, 3-1
public synonyms (V$), 3-2
views (V_$), 3-2

E

embedded parameter files, 1-65
ENQUEUE_RESOURCES initialization parameter, 1-55
enqueues
being written redo log, B-1
bind, B-1
buffer cache management, B-1
controlfile transaction, B-1
cross-instance call invocation, B-1
database mount, B-1
datafile, B-1
direct loader index creation, B-1
disabling, 1-53
distributed recovery, B-1
distributed TX, B-1
DML, B-1
ENQUEUE_RESOURCES initialization parameter, 1-55
file set, B-1
instance attribute lock, B-1
instance number, B-1
instance recovery, B-1
instance registration lock, B-1
instance state, B-1
job queue, B-1
library cache invalidation, B-1
library cache lock, B-1
library cache pin, B-1
media recovery, B-1
parallel slave synchronization, B-1
parallel slaves, B-1
password file, B-1
process startup, B-1
redo log "kick", B-1
redo thread, B-1
row cache, B-1
sequence number, B-1
SMON, B-1
sort segment, B-1
space management transaction, B-1
synchronized replication, B-1
system commit number, B-1
temporary segment, B-1
temporary table, B-1
transaction, B-1
transaction recovery, B-1
undo segment, serialization, B-1
user name, B-1
user-defined locks, B-1
enterprise roles, 1-135
ERROR_SIZE view, 2-237
errors
archiving, 1-83
EVENT initialization parameter, 1-56
EXCEPTIONS view, 2-237
exclusive mode
specifying instance number, 1-67
extent
allocating to instance, 1-67

F

FAL_CLIENT initialization parameter, 1-56
FAL_SERVER initialization parameter, 1-57
FAST_START_IO_TARGET initialization parameter, 1-57
FAST_START_MTTR_TARGET initialization parameter, 1-58
FAST_START_PARALLEL_ROLLBACK initialization parameter, 1-59
FILE_LOCK view, 2-237
FILE_MAPPING initialization parameter, 1-59
FILE_PING view, 2-238
filenames
case significance, 1-5
name and number, 1-60
FILESYSTEMIO_OPTIONS initialization parameter, 1-60
FILEXT$ view, 2-239
FIXED_DATE initialization parameter, 1-60
free space list
locating space, 1-67
FREELIST GROUPS clause, 1-67

G

GC_FILES_TO_LOCKS initialization parameter, 1-60
GLOBAL_CONTEXT_POOL_SIZE initialization parameter, 1-62
GLOBAL_NAME view, 2-240
GLOBAL_NAMES initialization parameter, 1-62
GV$ views
for parallel servers, 3-2

H

HASH_AREA_SIZE initialization parameter, 1-63
HASH_JOIN_ENABLED initialization parameter, 1-64
Heterogeneous Services
agents, 1-64
HI_SHARED_MEMORY_ADDRESS initialization parameter, 1-64
hints
RULE, 1-114
HS_ALL_CAPS view, 2-240
HS_ALL_DD view, 2-240
HS_ALL_INITS view, 2-241
HS_AUTOREGISTER initialization parameter, 1-64
HS_BASE_CAPS view, 2-241
HS_BASE_DD view, 2-241
HS_CLASS_CAPS view, 2-242
HS_CLASS_DD view, 2-242
HS_CLASS_INIT view, 2-243
HS_EXTERNAL_OBJECT_PRIVILEGES view, 2-243
HS_EXTERNAL_OBJECTS view, 2-243
HS_EXTERNAL_USER_PRIVILEGES view, 2-244
HS_FDS_CLASS view, 2-244
HS_FDS_INST view, 2-244
HS_INST_CAPS view, 2-245
HS_INST_DD view, 2-245
HS_INST_INIT view, 2-246

I

IDEPTREE view, 2-246
IFILE initialization parameter, 1-6, 1-65
IND synonym for USER_INDEXES view, 2-247
INDEX_HISTOGRAM view, 2-247
INDEX_STATS view, 2-247
initialization parameter file
common file, 1-65
embedded, 1-65
INITDW.ORA, 1-4
line continuation character (), 1-6
overview, 1-4
initialization parameters
ACTIVE_INSTANCE_COUNT, 1-15
altering, 1-7
AQ_TM_PROCESSES, 1-15
ARCHIVE_LAG_TARGET, 1-16
AUDIT_FILE_DEST, 1-17
AUDIT_SYS_OPERATIONS, 1-17
AUDIT_TRAIL, 1-17
BACKGROUND_CORE_DUMP, 1-18
BACKGROUND_DUMP_DEST, 1-18
BACKUP_TAPE_IO_SLAVES, 1-19
BITMAP_MERGE_AREA_SIZE, 1-20
BLANK_TRIMMING, 1-21
BUFFER_POOL_KEEP, 1-21
BUFFER_POOL_RECYCLE, 1-22
case significance in filenames, 1-5
CIRCUITS, 1-24
CLUSTER_DATABASE, 1-24
CLUSTER_DATABASE_INSTANCES, 1-25
CLUSTER_INTERCONNECTS, 1-25
COMMIT_POINT_STRENGTH, 1-26
COMPATIBLE, 1-27
CONTROL_FILE_RECORD_KEEP_TIME, 1-28
CONTROL_FILES, 1-28
CORE_DUMP_DEST, 1-29
CPU_COUNT, 1-29
CREATE_BITMAP_AREA_SIZE, 1-30
CURSOR_SHARING, 1-31
CURSOR_SPACE_FOR_TIME, 1-31
database creation, 1-44
DB_BLOCK_BUFFERS, 1-33
DB_BLOCK_CHECKING, 1-35
DB_BLOCK_CHECKSUM, 1-35
DB_BLOCK_SIZE, 1-36
DB_CACHE_ADVICE, 1-37
DB_CACHE_SIZE, 1-38
DB_CREATE_FILE_DEST, 1-38
DB_CREATE_ONLINE_LOG_DEST_n, 1-39
DB_DOMAIN, 1-39
DB_FILE_MULTIBLOCK_READ_COUNT, 1-40
DB_FILE_NAME_CONVERT, 1-41
DB_FILES, 1-43
DB_KEEP_CACHE_SIZE, 1-44
DB_NAME, 1-44
DB_nK_CACHE_SIZE, 1-32
DB_RECYCLE_CACHE_SIZE, 1-45
DB_WRITER_PROCESSES, 1-45
DBLINK_ENCRYPT_LOGIN, 1-46
DBWR_IO_SLAVES, 1-46
derived, 1-3
DG_BROKER_CONFIG_FILEn, 1-47
DG_BROKER_START, 1-48
DISK_ASYNCH_IO, 1-48
DISPATCHERS, 1-49
display current settings, 1-11
DISTRIBUTED_LOCK_TIMEOUT, 1-53
DML_LOCKS, 1-53
DRS_START, 1-54
dynamic, 1-8
embedded initialization parameter files, 1-6
ENQUEUE_RESOURCES, 1-55
EVENT, 1-56
FAL_CLIENT, 1-56
FAL_SERVER, 1-57
FAST_START_IO_TARGET, 1-57
FAST_START_MTTR_TARGET, 1-58
FAST_START_PARALLEL_ROLLBACK, 1-59
FILE_MAPPING, 1-59
FILESYSTEMIO_OPTIONS, 1-60
FIXED_DATE, 1-60
GC_FILES_TO_LOCKS, 1-60
GLOBAL_CONTEXT_POOL_SIZE, 1-62
GLOBAL_NAMES, 1-62
HASH_AREA_SIZE, 1-63
HASH_JOIN_ENABLED, 1-64
HI_SHARED_MEMORY_ADDRESS, 1-64
HS_AUTOREGISTER, 1-64
IFILE, 1-6, 1-65
INSTANCE_GROUPS, 1-66
INSTANCE_NAME, 1-67
INSTANCE_NUMBER, 1-67
JAVA_MAX_SESSIONSPACE_SIZE, 1-68
JAVA_POOL_SIZE, 1-68
JAVA_SOFT_SESSIONSPACE_LIMIT, 1-69
JOB_QUEUE_PROCESSES, 1-69
LARGE_POOL_SIZE, 1-70
LICENSE_MAX_SESSIONS, 1-71
LICENSE_MAX_USERS, 1-72
LICENSE_SESSIONS_WARNING, 1-72
LOCAL_LISTENER, 1-73
LOCK_NAME_SPACE, 1-74
LOCK_SGA, 1-74
LOG_ARCHIVE_DEST, 1-75
LOG_ARCHIVE_DEST_n, 1-76
LOG_ARCHIVE_DEST_STATE_n, 1-78
LOG_ARCHIVE_DUPLEX_DEST, 1-79
LOG_ARCHIVE_FORMAT, 1-80
LOG_ARCHIVE_MAX_PROCESSES, 1-81
LOG_ARCHIVE_MIN_SUCCEED_DEST, 1-82
LOG_ARCHIVE_START, 1-83
LOG_ARCHIVE_TRACE, 1-84
LOG_BUFFER, 1-85
LOG_CHECKPOINT_INTERVAL, 1-86
LOG_CHECKPOINT_TIMEOUT, 1-87
LOG_CHECKPOINTS_TO_ALERT, 1-88
LOG_FILE_NAME_CONVERT, 1-88
LOG_PARALLELISM, 1-90
LOGMNR_MAX_PERSISTENT_SESSIONS, 1-90
MAX_COMMIT_PROPAGATION_DELAY, 1-91
MAX_DISPATCHERS, 1-92
MAX_DUMP_FILE_SIZE, 1-93
MAX_ENABLED_ROLES, 1-94
MAX_ROLLBACK_SEGMENTS, 1-94
MAX_SHARED_SERVERS, 1-94
NLS_CALENDAR, 1-95
NLS_COMP, 1-96
NLS_CURRENCY, 1-96
NLS_DATE_FORMAT, 1-97
NLS_DATE_LANGUAGE, 1-98
NLS_DUAL_CURRENCY, 1-98
NLS_ISO_CURRENCY, 1-99
NLS_LANGUAGE, 1-99
NLS_LENGTH_SEMANTICS, 1-100
NLS_NCHAR_CONV_EXCP, 1-100
NLS_NUMERIC_CHARACTERS, 1-101
NLS_SORT, 1-101
NLS_TERRITORY, 1-102
NLS_TIMESTAMP_FORMAT, 1-103
NLS_TIMESTAMP_TZ_FORMAT, 1-104
O7_DICTIONARY_ACCESSIBILITY, 1-104
OBJECT_CACHE_MAX_SIZE_PERCENT, 1-105
OBJECT_CACHE_OPTIMAL_SIZE, 1-106
OLAP_PAGE_POOL_SIZE, 1-106
OPEN_CURSORS, 1-107
OPEN_LINKS, 1-107
operating system-dependent values, 1-3
OPTIMIZER_DYNAMIC_SAMPLING, 1-109
OPTIMIZER_FEATURES_ENABLE, 1-109
OPTIMIZER_INDEX_CACHING, 1-112
OPTIMIZER_INDEX_COST_ADJ, 1-113
OPTIMIZER_MAX_PERMUTATIONS, 1-113
OPTIMIZER_MODE, 1-114
ORACLE_TRACE_COLLECTION_NAME, 1-115
ORACLE_TRACE_COLLECTION_PATH, 1-116
ORACLE_TRACE_COLLECTION_SIZE, 1-116
ORACLE_TRACE_ENABLE, 1-117
ORACLE_TRACE_FACILITY_NAME, 1-117
ORACLE_TRACE_FACILITY_PATH, 1-118
OS_AUTHENT_PREFIX, 1-119
OS_ROLES, 1-120
PARALLEL_ADAPTIVE_MULTI_USER, 1-120
PARALLEL_AUTOMATIC_TUNING, 1-121
PARALLEL_EXECUTION_MESSAGE_SIZE, 1-122
PARALLEL_INSTANCE_GROUP, 1-122
PARALLEL_MAX_SERVERS, 1-123
PARALLEL_MIN_PERCENT, 1-124
PARALLEL_MIN_SERVERS, 1-125
PARALLEL_THREADS_PER_CPU, 1-126
parameter files, 1-4
PARTITION_VIEW_ENABLED, 1-126
performance tuning, 1-3
PGA_AGGREGATE_TARGET, 1-127
PLSQL_COMPILER_FLAGS, 1-128
PLSQL_NATIVE_C_COMPILER, 1-129
PLSQL_NATIVE_LIBRARY_DIR, 1-129
PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT, 1-129
PLSQL_NATIVE_LINKER, 1-130
PLSQL_NATIVE_MAKE_FILE_NAME, 1-130
PLSQL_NATIVE_MAKE_UTILITY, 1-131
PLSQL_V2_COMPATIBILITY, 1-131
PRE_PAGE_SGA, 1-132
PROCESSES, 1-133
QUERY_REWRITE_ENABLED, 1-133
QUERY_REWRITE_INTEGRITY, 1-134
RDBMS_SERVER_DN, 1-135
READ_ONLY_OPEN_DELAYED, 1-136
RECOVERY_PARALLELISM, 1-136
REMOTE_ARCHIVE_ENABLE, 1-137
REMOTE_DEPENDENCIES_MODE, 1-138
REMOTE_LISTENER, 1-138
REMOTE_LOGIN_PASSWORDFILE, 1-139
REMOTE_OS_AUTHENT, 1-140
REMOTE_OS_ROLES, 1-140
REPLICATION_DEPENDENCY_TRACKING, 1-141
RESOURCE_LIMIT, 1-141
RESOURCE_MANAGER_PLAN, 1-142
ROLLBACK_SEGMENTS, 1-143
ROW_LOCKING, 1-144
SERIAL_REUSE, 1-145
SERVICE_NAMES, 1-146
SESSION_CACHED_CURSORS, 1-146
SESSION_MAX_OPEN_FILES, 1-147
SESSIONS, 1-148
SGA_MAX_SIZE, 1-148
SHADOW_CORE_DUMP, 1-149
SHARED_MEMORY_ADDRESS, 1-149
SHARED_POOL_RESERVED_SIZE, 1-150, 3-142
SHARED_POOL_SIZE, 1-151
SHARED_SERVER_SESSIONS, 1-151
SHARED_SERVERS, 1-152
SORT_AREA_RETAINED_SIZE, 1-152
SORT_AREA_SIZE, 1-153
specifying in initialization parameter files, 1-5
SPFILE, 1-155
SQL_TRACE, 1-156
SQL92_SECURITY, 1-157
STANDBY_ARCHIVE_DEST, 1-157
STANDBY_FILE_MANAGEMENT, 1-158
STAR_TRANSFORMATION_ENABLED, 1-159
STATISTICS_LEVEL, 1-159
TAPE_ASYNCH_IO, 1-160
THREAD, 1-160
TIMED_OS_STATISTICS, 1-161
TIMED_STATISTICS, 1-162
TRACE_ENABLED, 1-163
TRACEFILE_IDENTIFIER, 1-163
TRANSACTION_AUDITING, 1-164
TRANSACTIONS, 1-165
TRANSACTIONS_PER_ROLLBACK_SEGMENT, 1-165
UNDO_MANAGEMENT, 1-166
UNDO_RETENTION, 1-166
UNDO_SUPPRESS_ERRORS, 1-167
UNDO_TABLESPACE, 1-168
USE_INDIRECT_DATA_BUFFERS, 1-168
USER_DUMP_DEST, 1-169
UTL_FILE_DIR, 1-169
variable, 1-3
WORKAREA_SIZE_POLICY, 1-170
INITJVM.SQL script, 5-8
INIT.ORA file. See initialization parameter file
IN-list iterators
optimizer use of, 1-112
inserts
locating free space, 1-67
INST_ID column, 3-2
INSTANCE clause
of ALTER TABLE
allocating extents, 1-67
INSTANCE_GROUPS initialization parameter, 1-66
INSTANCE_NAME initialization parameter, 1-67
INSTANCE_NUMBER initialization parameter, 1-67
exclusive or parallel mode, 1-67
instances
checkpoint, 1-86
startup order, 1-67
I/O
reading multiple blocks, 1-40
redo log files, 1-85

J

Java initialization parameters
JAVA_MAX_SESSIONSPACE_SIZE, 1-68
JAVA_POOL_SIZE, 1-68
JAVA_SOFT_SESSIONSPACE_LIMIT, 1-69
Java scripts, 5-8
JAVA_MAX_SESSIONSPACE_SIZE initialization parameter, 1-68
JAVA_POOL_SIZE initialization parameter, 1-68
JAVA_SOFT_SESSIONSPACE_LIMIT initialization parameter, 1-69
JOB_QUEUE_PROCESSES initialization parameter, 1-69

L

language
database default language, 1-99
LARGE_POOL_SIZE initialization parameter, 1-70
LICENSE_MAX_SESSIONS initialization parameter, 1-71
LICENSE_MAX_USERS initialization parameter, 1-72
LICENSE_SESSIONS_WARNING initialization parameter, 1-72
licenses
maximum sessions, 1-71
maximum users, 1-72
warning for concurrent user sessions, 1-72
limits on the database, 4-1
linguistic sorts, 1-101
local currency, 1-96
LOCAL_LISTENER initialization parameter, 1-73
lock
conversion, 3-26
LOCK_NAME_SPACE initialization parameter, 1-74
LOCK_SGA initialization parameter, 1-74
locks
conversion, 3-22, 3-25, 3-29, 3-56
names, A-16
on KGL objects, 2-188
table lock, 1-144
LOG_ARCHIVE_DEST initialization parameter, 1-75
LOG_ARCHIVE_DEST_n initialization parameter, 1-76
LOG_ARCHIVE_DEST_STATE_n initialization parameter, 1-78
LOG_ARCHIVE_DUPLEX_DEST initialization parameter, 1-79
LOG_ARCHIVE_FORMAT initialization parameter, 1-80
LOG_ARCHIVE_MAX_PROCESSES initialization parameter, 1-81
LOG_ARCHIVE_MIN_SUCCEED_DEST initialization parameter, 1-82
LOG_ARCHIVE_START initialization parameter, 1-83
LOG_ARCHIVE_TRACE initialization parameter, 1-84
LOG_BUFFER initialization parameter, 1-85
LOG_CHECKPOINT_INTERVAL initialization parameter, 1-86
LOG_CHECKPOINT_TIMEOUT initialization parameter, 1-87
LOG_CHECKPOINTS_TO_ALERT initialization parameter, 1-88
LOG_FILE_NAME_CONVERT initialization parameter, 1-88
LOG_PARALLELISM initialization parameter, 1-90
LOGMNR_MAX_PERSISTENT_SESSIONS initialization parameter, 1-90
lowercase significance, 1-5

M

manual archiving, 1-83
MAP_OBJECT table, 2-248
MAX_COMMIT_PROPAGATION_DELAY initialization parameter, 1-91
MAX_DISPATCHERS initialization parameter, 1-92
MAX_DUMP_FILE_SIZE initialization parameter, 1-93
MAX_ENABLED_ROLES initialization parameter, 1-94
MAX_ROLLBACK_SEGMENTS initialization parameter, 1-94
MAX_SHARED_SERVERS initialization parameter, 1-94
memory
amount used for sorting, 1-152
virtual, 1-3
modes
archiving, 1-83
monitor
performance, 1-86
multiple-process systems
number of processes, 1-133

N

nested files, 1-65
NLS_CALENDAR initialization parameter, 1-95
NLS_COMP initialization parameter, 1-96
NLS_CURRENCY initialization parameter, 1-96
defined by NLS_TERRITORY, 1-102
NLS_DATABASE_PARAMETERS view, 2-249
NLS_DATE_FORMAT initialization parameter, 1-97
defined by NLS_NUMERIC_CHARACTERS, 1-102
defined by NLS_TERRITORY, 1-102
NLS_DATE_LANGUAGE initialization parameter, 1-98
NLS_DUAL_CURRENCY initialization parameter, 1-98
NLS_INSTANCE_PARAMETERS view, 2-249
NLS_ISO_CURRENCY initialization parameter, 1-99
defined by NLS_TERRITORY, 1-102
NLS_LANGUAGE initialization parameter, 1-99
NLS_LENGTH_SEMANTICS initialization parameter, 1-100
NLS_NCHAR_CONV_EXCP initialization parameter, 1-100
NLS_NUMERIC_CHARACTERS initialization parameter, 1-101
NLS_SESSION_PARAMETERS view, 2-249
NLS_SORT initialization parameter, 1-101
NLS_TERRITORY initialization parameter, 1-102
NLS_TIMESTAMP_FORMAT initialization parameter, 1-103
NLS_TIMESTAMP_TZ_FORMAT initialization parameter, 1-104
NOARCHIVELOG mode
creating a database, 1-83
numeric group separators, 1-101

O

O7_DICTIONARY_ACCESSIBILITY initialization parameter, 1-104
OBJ synonym for USER_OBJECTS view, 2-250
OBJECT_CACHE_MAX_SIZE_PERCENT initialization parameter, 1-105
OBJECT_CACHE_OPTIMAL_SIZE initialization parameter, 1-106
objects
data dictionary, 2-1
OLAP_PAGE_POOL_SIZE initialization parameter, 1-106
online redo log
archiving, 1-83
archiving mode, 1-75
block, 1-86
file size, 1-86
number of files, 1-83
setting checkpoint interval, 1-86
OPEN_CURSORS initialization parameter, 1-107
OPEN_LINKS initialization parameter, 1-107
operating system
authenticating remote clients, 1-140
authenticating users and passwords, 1-119
dependent parameters, 1-3
roles for remote clients, 1-140
optimization
trading cursor space for time, 1-31
OPTIMIZER_DYNAMIC_SAMPLING initialization parameter, 1-109
OPTIMIZER_FEATURES_ENABLE initialization parameter, 1-109
OPTIMIZER_INDEX_CACHING initialization parameter, 1-112
OPTIMIZER_INDEX_COST_ADJ initialization parameter, 1-113
OPTIMIZER_MAX_PERMUTATIONS initialization parameter, 1-113
OPTIMIZER_MODE initialization parameter, 1-114
ORACLE_TRACE_COLLECTION_NAME initialization parameter, 1-115
ORACLE_TRACE_COLLECTION_PATH initialization parameter, 1-116
ORACLE_TRACE_COLLECTION_SIZE initialization parameter, 1-116
ORACLE_TRACE_ENABLE initialization parameter, 1-117
ORACLE_TRACE_FACILITY_NAME initialization parameter, 1-117
ORACLE_TRACE_FACILITY_PATH initialization parameter, 1-118
Oracle9i Real Application Clusters
dynamic performance views, 3-2
initialization parameters
CIRCUITS, 1-24
CLUSTER_DATABASE, 1-24
CLUSTER_DATABASE_INSTANCES, 1-25
CLUSTER_INTERCONNECTS, 1-25
DISPATCHERS, 1-49
FAST_START_PARALLEL_ROLLBACK, 1-59
PARALLEL_ADAPTIVE_MULTI_USER, 1-120
PARALLEL_AUTOMATIC_TUNING, 1-121
PARALLEL_EXECUTION_MESSAGE_SIZE, 1-122
PARALLEL_INSTANCE_GROUP, 1-122
PARALLEL_MAX_SERVERS, 1-123
PARALLEL_MIN_PERCENT, 1-124
PARALLEL_MIN_SERVERS, 1-125
PARALLEL_THREADS_PER_CPU, 1-126
ORPHAN_KEY_TABLE view. See DBA_ORPHAN_KEY_TABLE. DBA_ORPHAN_KEY_TABLE view, 2-201
OS_AUTHENT_PREFIX initialization parameter, 1-119
OS_ROLES initialization parameter, 1-120

P

parallel mode
instance number, 1-67
parallel query
maximum number of instances, 1-122
maximum number of servers, 1-123
minimum number of queries, 1-125
PARALLEL_ADAPTIVE_MULTI_USER initialization parameter, 1-120
PARALLEL_AUTOMATIC_TUNING initialization parameter, 1-121
PARALLEL_EXECUTION_MESSAGE_SIZE initialization parameter, 1-122
PARALLEL_INSTANCE_GROUP initialization parameter, 1-122
PARALLEL_MAX_SERVERS initialization parameter, 1-123
PARALLEL_MIN_PERCENT initialization parameter, 1-124
PARALLEL_MIN_SERVERS initialization parameter, 1-125
PARALLEL_THREADS_PER_CPU initialization parameter, 1-126
PARSED_PIECES view, 2-250
PARSED_SIZE view, 2-250
PARTITION_VIEW_ENABLED initialization parameter, 1-126
partitions
raw, 1-75
passwords
authenticating, 1-119, 1-140
REMOTE_LOGIN_PASSWORDFILE initialization parameter, 1-139
PCM lock
mapping blocks to, 1-60
performance, 1-3
rule-based optimization, 1-114
shared pool, 1-64, 1-149, 1-151
PGA_AGGREGATE_TARGET initialization parameter, 1-127
pins
on KGL objects, 2-188
PLAN_TABLE execution plan table, 2-250
PLSQL_COMPILER_FLAGS initialization parameter, 1-128
PLSQL_NATIVE_C_COMPILER initialization parameter, 1-129
PLSQL_NATIVE_LIBRARY_DIR initialization parameter, 1-129
PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT initialization parameter, 1-129
PLSQL_NATIVE_LINKER initialization parameter, 1-130
PLSQL_NATIVE_MAKE_FILE_NAME initialization parameter, 1-130
PLSQL_NATIVE_MAKE_UTILITY initialization parameter, 1-131
PLSQL_V2_COMPATIBILITY initialization parameter, 1-131
PLUGGABLE_SET_CHECK view, 2-252
PRE_PAGE_SGA initialization parameter, 1-132
privileges
remote login, 1-139
RESTRICTED_SESSION privilege, 1-71, 1-72
table-level select privileges, 1-157, 1-159
procedures
shared pool, 1-64, 1-149, 1-151
processes
derived parameter values, 1-165
dispatcher process maximum number, 1-92
maximum shared server processes, 1-94
number of server processes, 1-68, 1-69, 1-133, 1-151, 1-152
recovery, 1-134, 1-136
trace files, 1-169
user processes, 1-133
PROCESSES initialization parameter, 1-133
PRODUCT_COMPONENT_VERSION view, 2-253
profiles
resource limits, 1-141, 1-142
PROXY_USERS view, 2-253
PSTUBTBL view, 2-254
PUBLIC clause
of ALTER DATABASE
thread of redo, 1-160
PUBLIC_DEPENDENCY view, 2-254
PUBLICSYN view, 2-254

Q

queries
dictionary views, 1-60
hints, 1-114
QUERY_REWRITE_ENABLED initialization parameter, 1-133
QUERY_REWRITE_INTEGRITY initialization parameter, 1-134
QUEUE_PRIVILEGES view, 2-255

R

raw partition
LOG_ARCHIVE_DEST initialization parameter, 1-75
RC_ARCHIVED_LOG view, 2-4
RC_BACKUP_CONTROLFILE view, 2-4
RC_BACKUP_CORRUPTION view, 2-4
RC_BACKUP_DATAFILE view, 2-4
RC_BACKUP_PIECE view, 2-4
RC_BACKUP_REDOLOG view, 2-4
RC_BACKUP_SET view, 2-4
RC_BACKUP_SPFILE view, 2-4
RC_CHECKPOINT view, 2-4
RC_CONTROLFILE_COPY view, 2-4
RC_COPY_CORRUPTION view, 2-4
RC_DATABASE view, 2-4
RC_DATABASE_BLOCK_CORRUPTION view, 2-4
RC_DATABASE_INCARNATION view, 2-4
RC_DATAFILE view, 2-4
RC_DATAFILE_COPY view, 2-4
RC_LOG_HISTORY view, 2-4
RC_OFFLINE_RANGE view, 2-4
RC_PROXY_CONTROLFILE view, 2-4
RC_PROXY_DATAFILE view, 2-4
RC_REDO_LOG view, 2-4
RC_REDO_THREAD view, 2-4
RC_RESYNC view, 2-4
RC_RMAN_CONFIGURATION view, 2-4
RC_STORED_SCRIPT view, 2-4
RC_STORED_SCRIPT_LINE view, 2-4
RC_TABLESPACE view, 2-4
RDBMS_SERVER_DN initialization parameter, 1-135
READ_ONLY_OPEN_DELAYED initialization parameter, 1-136
recovery
number of required processes, 1-134, 1-136
RECOVERY_PARALLELISM initialization parameter, 1-136
redo logs
buffer size, 1-85
redo thread, 1-160
remote clients
authenticating, 1-140
remote logins, 1-139
REMOTE_ARCHIVE_ENABLE initialization parameter, 1-137
REMOTE_DEPENDENCIES_MODE initialization parameter, 1-138
REMOTE_LISTENER initialization parameter, 1-138
REMOTE_LOGIN_PASSWORDFILE initialization parameter, 1-139
REMOTE_OS_AUTHENT initialization parameter, 1-140
REMOTE_OS_ROLES initialization parameter, 1-140
REPAIR_TABLE view. See DBA_REPAIR_TABLE view.
REPLICATION_DEPENDENCY_TRACKING initialization parameter, 1-141
resource limits for profiles, 1-141, 1-142
RESOURCE_COST view, 2-255
RESOURCE_LIMIT initialization parameter, 1-141
RESOURCE_MANAGER_PLAN initialization parameter, 1-142
RESOURCE_MAP table, 2-255
RMJVM.SQL script, 5-8
ROLE_ROLE_PRIVS view, 2-256
ROLE_SYS_PRIVS view, 2-256
ROLE_TAB_PRIVS view, 2-256
ROLE_WM_PRIVS view, 2-3
roles, 1-120
remote clients, 1-140
rollback segments
maximum size, 1-94
ROLLBACK_SEGMENTS initialization parameter, 1-143
ROW_LOCKING initialization parameter, 1-144
rule-based optimization, 1-114

S

scripts
CATALOG.SQL, 5-2
CATBLOCK.SQL, 5-3
CATCLUST.SQL, 5-2
CATEXP7.SQL, 5-3
CATHS.SQL, 5-3
CATIO.SQL, 5-3
CATJAVA.SQL, 5-8
CATNOADT.SQL, 5-6
CATNOAUD.SQL, 5-6
CATNOHS.SQL, 5-6
CATNOPRT.SQL, 5-6
CATNOQUE.SQL, 5-6
CATNORMN.SQL, 5-6
CATNOSVM.SQL, 5-6
CATNSNMP.SQL, 5-6
CATOCTK.SQL, 5-3
CATPROC.SQL, 5-2
CATQUEUE.SQL, 5-3
CATREP.SQL, 5-3
CATRMAN.SQL, 5-3
CMPDBMIG.SQL, 5-7
D0801070.SQL, 5-7
D0900010.SQL, 5-7
data dictionary, 5-3
database migration, 5-7
DBMSIOTC.SQL, 5-3
DBMSOTRC.SQL, 5-3
DBMSPOOL.SQL, 5-4
INITJVM.SQL, 5-8
Java, 5-8
RMJVM.SQL, 5-8
SQL scripts, 5-2
U0703040.SQL, 5-7
U0800060.SQL, 5-7
U0801070.SQL, 5-7
U0900010.SQL, 5-7
USERLOCK.SQL, 5-4
UTLBSTAT.SQL, 5-4
UTLCHN1.SQL, 5-4
UTLCONST.SQL, 5-4
UTLDTREE.SQL, 5-4
UTLESTAT.SQL, 5-4
UTLEXPT1.SQL, 5-4
UTLINCMP.SQL, 5-7
UTLIP.SQL, 5-4
UTLIRP.SQL, 5-5
UTLLOCKT.SQL, 5-5
UTLPWDMG.SQL, 5-5
UTLRP.SQL, 5-5
UTLSAMPL.SQL, 5-5
UTLSCLN.SQL, 5-5
UTLTKPRF.SQL, 5-5
UTLVALID.SQL, 5-5
UTLXPLAN.SQL, 5-5
SEQ synonym for USER_SEQUENCES view, 2-256
SERIAL_REUSE initialization parameter, 1-145
server parameter file
overview, 1-4
server processes
number, 1-68, 1-69, 1-133, 1-151, 1-152
SERVICE_NAMES initialization parameter, 1-146
SESSION_CACHED_CURSORS initialization parameter, 1-146
SESSION_CONTEXT view, 2-257
SESSION_MAX_OPEN_FILES initialization parameter, 1-147
SESSION_PRIVS view, 2-257
SESSION_ROLES view, 2-257
SESSIONS initialization parameter, 1-148
SGA_MAX_SIZE initialization parameter, 1-148
SHADOW_CORE_DUMP initialization parameter, 1-149
shared server
SESSIONS initialization parameter, 1-148
shared server dispatcher request statistics, 3-119
shared server processes
maximum number, 1-94
SHARED_MEMORY_ADDRESS initialization parameter, 1-149
SHARED_POOL_RESERVED_SIZE initialization parameter, 1-150
V$SHARED_POOL_RESERVED, 3-142
SHARED_POOL_SIZE initialization parameter, 1-151
SHARED_SERVER_SESSIONS initialization parameter, 1-151
SHARED_SERVERS initialization parameter, 1-152
SHOW PARAMETERS command, 1-11
SORT_AREA_RETAINED_SIZE initialization parameter, 1-152
SORT_AREA_SIZE initialization parameter, 1-153
sorting
maximum memory, 1-152
ORDER BY queries, 1-101
SOURCE_SIZE view, 2-257
SPFILE initialization parameter, 1-155
SQL scripts
creating the data dictionary, 5-2
optional, 5-3
required, 5-2
SQL_TRACE initialization parameter, 1-156
SQL92_SECURITY initialization parameter, 1-157
STANDBY_ARCHIVE_DEST initialization parameter, 1-157
STANDBY_FILE_MANAGEMENT initialization parameter, 1-158
STAR_TRANSFORMATION_ENABLED initialization parameter, 1-159
starting up
database name, 1-44
instance number, 1-67
startup order, 1-67
STARTUP statement
database name, 1-44
statistics
background checkpoints completed, C-3
background checkpoints started, C-3
branch node splits, C-3
buffer is not pinned count, C-3
buffer is pinned count, C-3
bytes received via SQL*Net from client, C-3
bytes received via SQL*Net from dblink, C-3
bytes sent via SQL*Net to client, C-3
bytes sent via SQL*Net to dblink, C-3
Cached Commit SCN referenced, C-3
calls to get snapshot scn
kcmgss, C-3
calls to kcmgas, C-3
calls to kcmgcs, C-4
calls to kcmgrs, C-4
change write time, C-4
cleanouts and rollbacks - consistent read gets, C-4
cleanouts only - consistent read gets, C-4
cluster key scan block gets, C-4
cluster key scans, C-4
cold recycle reads, C-4
commit cleanout failures
block lost, C-4
buffer being written, C-4
callback failure, C-4
cannot pin, C-4
hot backup in progress, C-4
write disabled, C-4
commit cleanouts, C-4
commit cleanouts successfully completed, C-5
Commit SCN cached, C-5
consistent changes, C-5
consistent gets, C-5
CPU used by this session, C-5
CPU used when call started, C-5
CR blocks created, C-5
cross instance CR read, C-6
current blocks converted for CR, C-5
cursor authentication, C-5
data blocks consistent reads - undo records applied, C-5
db block changes, C-6
db block gets, C-6
DBWR buffers scanned, C-6
DBWR checkpoint buffers written, C-6
DBWR checkpoints, 1-86, C-6
DBWR cross instance writes, C-6
DBWR free buffers found, C-6
DBWR lru scans, C-6
DBWR make free requests, C-6
DBWR revisited being-written buffer, C-7
DBWR summed scan depth, C-7
DBWR transaction table writes, C-7
DBWR undo block writes, C-7
DDL statements parallelized, C-7
deferred (CURRENT) block cleanout applications, C-7
DFO trees parallelized, C-7
dirty buffers inspected, C-7
DML statements parallelized, C-7
enqueue conversions, C-7
enqueue deadlocks, C-7
enqueue releases, C-7
enqueue requests, C-7
enqueue timeouts, C-8
enqueue waits, C-8
exchange deadlocks, C-8
execute count, C-8
free buffer inspected, C-8
free buffer requested, C-8
global cache blocks corrupt, C-8
global cache cr block log flush time, C-9
global cache cr block send time, C-9
global cache cr timeouts, C-9
global cache defers, C-9
global cache freelist waits, C-9
global cache get time, C-9
global cache gets, C-9
global cache prepare failures, C-9
global lock async converts, C-9
global lock async gets, C-9
global lock convert time, C-9
global lock get time, C-9
global lock release time, C-10
global lock releases, C-10
global lock sync converts, C-10
global lock sync gets, C-10
hot buffers moved to head of LRU, C-10
immediate (CR) block cleanout applications, C-10
immediate (CURRENT) block cleanout applications, C-10
index fast full scans (direct read), C-10
index fast full scans (full), C-10
index fast full scans (rowid ranges), C-10
instance recovery database freeze count, C-10
kcmccs called get current scn, C-10
kcmccs read scn without going to DLM, C-10
kcmggs waited for batching, C-10
leaf node splits, C-10
logons cumulative, C-10
logons current, C-10
messages received, C-10
messages sent, C-10
native hash arithmetic execute, C-11
native hash arithmetic fail, C-11
next scns gotten without going to DLM, C-11
no buffer to keep pinned count, C-11
no work - consistent read gets, C-11
opened cursors cumulative, C-11
opened cursors current, C-11
opens of replaced files, C-11
opens requiring cache replacement, C-11
operating system
OS All other sleep time, C-11
OS Chars read and written, C-11
OS Data page fault sleep time, C-11
OS Input blocks, C-11
OS Involuntary context switches, C-12
OS Kernel page fault sleep time, C-12
OS Major page faults, C-12
OS Messages received, C-12
OS Messages sent, C-12
OS Minor page faults, C-12
OS Other system trap CPU time, C-12
OS Output blocks, C-12
OS Process heap time, C-12
OS Signals received, C-12
OS Swaps, C-12
OS System call CPU time, C-12
OS System calls, C-12
OS Text page fault sleep time, C-12
OS User level CPU time, C-12
OS User lock wait sleep time, C-12
OS Voluntary context switches, C-12
OS Wait-cpu (latency) time, C-12
Process stack size, C-12
OS Input blocks, C-12
Parallel operations downgraded 1 to 25 pct, C-13
Parallel operations downgraded 25 to 50 pct, C-13
Parallel operations downgraded 50 to 75 pct, C-13
Parallel operations downgraded 75 to 99 pct, C-13
Parallel operations downgraded to serial, C-13
Parallel operations not downgraded, C-13
parse count (hard), C-13
parse count (total), C-13
parse time cpu, C-13
parse time elapsed, C-13
physical reads, C-13
physical reads direct, C-13
physical writes, C-14
physical writes direct, C-14
physical writes non checkpoint, C-14
pinned buffers inspected, C-14
prefetched blocks, C-14
prefetched blocks aged out before use, C-14
process last non-idle time, C-14
PX local messages recv'd, C-14
PX local messages sent, C-14
PX remote messages recv'd, C-14
PX remote messages sent, C-14
queries parallelized, C-14
recovery array read time, C-14
recovery array reads, C-14
recovery blocks read, C-15
recursive calls, C-15
recursive cpu usage, C-15
redo blocks written, C-15
redo buffer allocation retries, C-15
redo entries, C-15
redo log space requests, C-15
redo log space wait time, C-15
redo log switch interrupts, C-15
redo ordering marks, C-16
redo size, C-16
redo sync writes, C-16
redo synch time, C-16
redo wastage, C-16
redo write time, C-16
redo writer latching time, C-16
redo writes, C-16
remote instance undo block writes, C-16
remote instance undo header writes, C-16
rollback changes - undo records applied, C-16
rollbacks only - consistent read gets, C-16
rows fetched via callback, C-16
serializable aborts, C-17
session connect time, C-17
session cursor cache count, C-17
session cursor cache hits, C-17
session logical reads, C-17
session pga memory, C-17
session pga memory max, C-17
session stored procedure space, C-17
session uga memory, C-17
session uga memory max, C-17
sorts (disk), C-17
sorts (memory), C-18
sorts (rows), C-18
SQL*Net roundtrips to/from client, C-18
SQL*Net roundtrips to/from dblink, C-18
summed dirty queue length, C-18
switch current to new buffer, C-18
table fetch by rowid, C-18
table fetch continued row, C-18
table scan blocks gotten, C-19
table scan rows gotten, C-19
table scans (cache partitions), C-19
table scans (direct read), C-19
table scans (long tables), C-19
table scans (rowid ranges), C-19
table scans (short tables), C-19
timed, 1-162
total file opens, C-19
transaction lock background get time, C-19
transaction lock background gets, C-19
transaction lock foreground requests, C-19
transaction lock foreground wait time, C-19
transaction rollbacks, C-19
transaction tables consistent read rollbacks, C-20
transaction tables consistent reads - undo records applied, C-20
Unnecessary process cleanup for SCN batching, C-20
user calls, C-20
user commits, C-20
user rollbacks, C-20
write clones created in background, C-20
write clones created in foreground, C-20
STATISTICS_LEVEL initialization parameter, 1-159
STMT_AUDIT_OPTION_MAP table, 2-258
switch redo log file, 1-86
SYN synonym for USER_SYNONYMS view, 2-258
SYNONYMS view, 2-258
SYS_OBJECTS view, 2-259
SYSCATALOG view, 2-258
SYSFILES view, 2-258
SYSSEGOBJ view, 2-258
system global area, 1-3
buffer areas, 1-85
maximum concurrent transactions, 1-165
rollback segment size, 1-94
system performance, 1-3
SYSTEM_PRIVILEGE_MAP table, 2-258

T

TAB view, 2-259
TABLE_PRIVILEGE_MAP table, 2-259
TABLE_PRIVILEGES view, 2-259
tables
data dictionary, 2-1
DML locks, 1-53
locating free space, 1-67
row locking, 1-144
TABQUOTAS view, 2-260
TABS synonym for USER_TABLES view, 2-260
tape archiving destination, 1-75
TAPE_ASYNCH_IO initialization parameter, 1-160
territory, 1-98, 1-102
THREAD initialization parameter, 1-160
TIMED_OS_STATISTICS initialization parameter, 1-161
TIMED_STATISTICS initialization parameter, 1-162
file read/write statistics, 3-58, 3-182
TO_CHAR function, 1-97
TO_DATE function, 1-97
trace files
destination, 1-169
maximum size, 1-93
TRACE_ENABLED initialization parameter, 1-163
TRACEFILE_IDENTIFIER initialization parameter, 1-163
TRANSACTION_AUDITING initialization parameter, 1-164
transactions
concurrent, 1-165
data locking, 1-53
TRANSACTIONS initialization parameter, 1-165
DML locks, 1-53
TRANSACTIONS_PER_ROLLBACK_SEGMENT initialization parameter, 1-165
TRUSTED_SERVERS view, 2-260
TS_PITR_CHECK view, 2-261
TS_PITR_OBJECTS TO_BE_DROPPED view, 2-262

U

U0703040.SQL script, 5-7
U0800060.SQL script, 5-7
U0801070.SQL script, 5-7
U0900010.SQL script, 5-7
UNDO_MANAGEMENT initialization parameter, 1-166
UNDO_RETENTION initialization parameter, 1-166
UNDO_SUPPRESS_ERRORS initialization parameter, 1-167
UNDO_TABLESPACE initialization parameter, 1-168
UNI_PLUGGABLE_SET_CHECK view, 2-262
updates
locating free space, 1-67
transaction processing option, 1-144
uppercase characters, 1-5
USE_INDIRECT_DATA_BUFFERS initialization parameter, 1-168
user processes
trace files, 1-169
USER_ALL_TABLES view, 2-263
USER_AQ_AGENT_PRIVS view, 2-263
USER_ARGUMENTS view, 2-263
USER_ASSOCIATIONS view, 2-264
USER_ATTRIBUTE_TRANSFORMATIONS view, 2-264
USER_AUDIT_OBJECT view, 2-264
USER_AUDIT_POLICIES view, 2-264
USER_AUDIT_SESSION view, 2-264
USER_AUDIT_STATEMENT view, 2-264
USER_AUDIT_TRAIL view, 2-265
USER_AW_PS view, 2-265
USER_AWS view, 2-265
USER_BASE_TABLE_MVIEWS view, 2-265
USER_CATALOG view, 2-266
CAT synonym, 2-153
USER_CLU_COLUMNS view, 2-266
USER_CLUSTER_HASH_EXPRESSIONS view, 2-266
USER_CLUSTERS view, 2-266
CLU synonym, 2-155
USER_COL_COMMENTS view, 2-266
USER_COL_PRIVS view, 2-266
USER_COL_PRIVS_MADE view, 2-267
USER_COL_PRIVS_RECD view, 2-267
USER_COLL_TYPES view, 2-267
USER_CONS_COLUMNS view, 2-267
USER_CONS_OBJ_COLUMNS view, 2-267
USER_CONSTRAINTS view, 2-268
USER_DB_LINKS view, 2-268
USER_DEPENDENCIES view, 2-268
USER_DIM_ATTRIBUTES view, 2-268
USER_DIM_CHILD_OF view, 2-268
USER_DIM_HIERARCHIES view, 2-268
USER_DIM_JOIN_KEY view, 2-269
USER_DIM_LEVEL_KEY view, 2-269
USER_DIM_LEVELS view, 2-269
USER_DIMENSIONS view, 2-269
USER_DUMP_DEST initialization parameter, 1-169
USER_ERRORS view, 2-269
USER_EVALUATION_CONTEXT_TABLES view, 2-269
USER_EVALUATION_CONTEXT_VARS view, 2-270
USER_EVALUATION_CONTEXTS view, 2-270
USER_EXTENTS view, 2-270
USER_EXTERNAL_LOCATIONS view, 2-270
USER_EXTERNAL_TABLES view, 2-270
USER_FREE_SPACE view, 2-271
USER_IND_COLUMNS view, 2-271
USER_IND_EXPRESSIONS view, 2-271
USER_IND_PARTITIONS view, 2-271
USER_IND_SUBPARTITIONS view, 2-271
USER_INDEXES view, 2-271
IND synonym, 2-247
USER_INDEXTYPE_COMMENTS view, 2-272
USER_INDEXTYPE_OPERATORS view, 2-272
USER_INDEXTYPES view, 2-272
USER_INTERNAL_TRIGGERS view, 2-272
USER_JAVA_ARGUMENTS view, 2-272
USER_JAVA_CLASSES view, 2-273
USER_JAVA_DERIVATIONS view, 2-273
USER_JAVA_FIELDS view, 2-273
USER_JAVA_IMPLEMENTS view, 2-273
USER_JAVA_INNERS view, 2-273
USER_JAVA_LAYOUTS view, 2-274
USER_JAVA_METHODS view, 2-274
USER_JAVA_NCOMPS view, 2-274
USER_JAVA_POLICY view, 2-274
USER_JAVA_RESOLVERS view, 2-274
USER_JAVA_THROWS view, 2-275
USER_JOBS view, 2-275
USER_JOIN_IND_COLUMNS view, 2-275
USER_LIBRARIES view, 2-275
USER_LOB_PARTITIONS view, 2-275
USER_LOB_SUBPARTITIONS view, 2-275
USER_LOB_TEMPLATES view, 2-276
USER_LOBS view, 2-276
USER_LOG_GROUP_COLUMNS view, 2-276
USER_LOG_GROUPS view, 2-276
USER_METHOD_PARAMS view, 2-276
USER_METHOD_RESULTS view, 2-276
USER_MVIEW_AGGREGATES view, 2-277
USER_MVIEW_ANALYSIS view, 2-277
USER_MVIEW_DETAIL_RELATIONS view, 2-277
USER_MVIEW_JOINS view, 2-277
USER_MVIEW_KEYS view, 2-277
USER_MVIEW_LOGS view, 2-278
USER_MVIEW_REFRESH_TIMES view, 2-278
USER_MVIEWS view, 2-278
USER_NESTED_TABLES view, 2-278
USER_OBJ_AUDIT_OPTS view, 2-278
USER_OBJ_COLATTRS view, 2-278
USER_OBJECT_SIZE view, 2-279
USER_OBJECT_TABLES view, 2-279
USER_OBJECTS view, 2-279
OBJ synonym, 2-250
USER_OPANCILLARY view, 2-279
USER_OPARGUMENTS view, 2-279
USER_OPBINDINGS view, 2-279
USER_OPERATOR_COMMENTS view, 2-279
USER_OPERATORS view, 2-280
USER_OUTLINE_HINTS view, 2-280
USER_OUTLINES view, 2-280
USER_PART_COL_STATISTICS view, 2-280
USER_PART_HISTOGRAMS view, 2-280
USER_PART_INDEXES view, 2-280
USER_PART_KEY_COLUMNS view, 2-281
USER_PART_LOBS view, 2-281
USER_PART_TABLES view, 2-281
USER_PARTIAL_DROP_TABS view, 2-281
USER_PASSWORD_LIMITS view, 2-281
USER_PENDING_CONV_TABLES view, 2-282
USER_POLICIES view, 2-282
USER_POLICY_CONTEXTS view, 2-282
USER_POLICY_GROUPS view, 2-282
USER_PROCEDURES view, 2-282
USER_PROXIES view, 2-283
USER_PUBLISHED_COLUMNS view, 2-283
USER_QUEUE_SCHEDULES view, 2-283
USER_QUEUE_TABLES view, 2-283
USER_QUEUES view, 2-284
USER_REFRESH view, 2-284
USER_REFRESH_CHILDREN view, 2-284
USER_REFS view, 2-284
USER_REGISTERED_MVIEWS view, 2-284
USER_REGISTRY view, 2-284
USER_REPAUDIT_ATTRIBUTE view, 2-2
USER_REPAUDIT_COLUMN view, 2-2
USER_REPCAT view, 2-2
USER_REPCAT_REFRESH_TEMPLATES view, 2-2
USER_REPCAT_TEMPLATE_OBJECTS view, 2-2
USER_REPCAT_TEMPLATE_PARMS view, 2-2
USER_REPCAT_TEMPLATE_SITES view, 2-2
USER_REPCAT_USER_AUTHORIZATION view, 2-2
USER_REPCAT_USER_PARM_VALUES view, 2-2
USER_REPCATLOG view, 2-2
USER_REPCOLUMN view, 2-2
USER_REPCOLUMN_GROUP view, 2-2
USER_REPCONFLICT view, 2-2
USER_REPDDL view, 2-2
USER_REPFLAVOR_COLUMNS view, 2-2
USER_REPFLAVOR_OBJECTS view, 2-2
USER_REPFLAVORS view, 2-2
USER_REPGENERATED view, 2-2
USER_REPGENOBJECTS view, 2-2
USER_REPGROUP view, 2-2
USER_REPGROUP_PRIVILEGES view, 2-2
USER_REPGROUPED_COLUMN view, 2-2
USER_REPKEY_COLUMNS view, 2-2
USER_REPOBJECT view, 2-2
USER_REPPARAMETER_COLUMN view, 2-2
USER_REPPRIORITY view, 2-2
USER_REPPRIORITY_GROUP view, 2-2
USER_REPPROP view, 2-2
USER_REPRESOL_STATS_CONTROL view, 2-2
USER_REPRESOLUTION view, 2-2
USER_REPRESOLUTION_METHOD view, 2-2
USER_REPRESOLUTION_STATISTICS view, 2-2
USER_REPSCHEMA view, 2-2
USER_REPSITES view, 2-2
USER_RESOURCE_LIMITS view, 2-285
USER_RESUMABLE view, 2-285
USER_ROLE_PRIVS view, 2-285
USER_RSRC_CONSUMER_GROUP_PRIVS view, 2-285
USER_RSRC_MANAGER_SYSTEM_PRIVS view, 2-286
USER_RULE_SET_RULES view, 2-286
USER_RULE_SETS view, 2-286
USER_RULES view, 2-286
USER_SEGMENTS view, 2-286
USER_SEQUENCES view, 2-286
SEQ synonym, 2-256
USER_SOURCE view, 2-287
USER_SOURCE_TABLES view, 2-287
USER_SQLJ_TYPE_ATTRS view, 2-287
USER_SQLJ_TYPE_METHODS view, 2-287
USER_SQLJ_TYPES view, 2-287
USER_STORED_SETTINGS view, 2-287
USER_SUBPART_COL_STATISTICS view, 2-288
USER_SUBPART_HISTOGRAMS view, 2-288
USER_SUBPART_KEY_COLUMNS view, 2-288
USER_SUBPARTITION_TEMPLATES view, 2-288
USER_SUBSCRIBED_COLUMNS view, 2-288
USER_SUBSCRIBED_TABLES view, 2-289
USER_SUBSCRIPTIONS view, 2-289
USER_SYNONYMS view, 2-289
SYN synonym, 2-258
USER_SYS_PRIVS view, 2-289
USER_TAB_COL_STATISTICS view, 2-289
USER_TAB_COLUMNS view, 2-289
COLS synonym, 2-156
USER_TAB_COMMENTS view, 2-289
USER_TAB_HISTOGRAMS view, 2-290
USER_TAB_MODIFICATIONS view, 2-290
USER_TAB_PARTITIONS view, 2-290
USER_TAB_PRIVS view, 2-290
USER_TAB_PRIVS_MADE view, 2-290
USER_TAB_PRIVS_RECD view, 2-291
USER_TAB_SUBPARTITIONS view, 2-291
USER_TABLES view, 2-291
TABS synonym, 2-260
USER_TABLESPACES view, 2-291
USER_TRANSFORMATIONS view, 2-291
USER_TRIGGER_COLS view, 2-292
USER_TRIGGERS view, 2-292
USER_TS_QUOTAS view, 2-292
USER_TYPE_ATTRS view, 2-292
USER_TYPE_METHODS view, 2-292
USER_TYPE_VERSIONS view, 2-292
USER_TYPES view, 2-293
USER_UNUSED_COL_TABS view, 2-293
USER_UPDATABLE_COLUMNS view, 2-293
USER_USERS view, 2-293
USER_USTATS view, 2-293
USER_VARRAYS view, 2-293
USER_VIEWS view, 2-294
USER_WM_LOCKED_TABLES view, 2-3
USER_WM_MODIFIED_TABLES view, 2-3
USER_WM_PRIVS view, 2-3
USER_WM_RIC_INFO view, 2-3
USER_WM_TAB_TRIGGERS view, 2-3
USER_WM_VERSIONED_TABLES view, 2-3
USER_WM_VT_ERRORS view, 2-3
USER_WORKSPACE_PRIVS view, 2-3
USER_WORKSPACE_SAVEPOINTS view, 2-3
USER_WORKSPACES view, 2-3
USER_XML_SCHEMAS view, 2-294
USER_XML_TAB_COLS view, 2-294
USER_XML_TABLES view, 2-294
USER_XML_VIEW_COLS view, 2-294
USER_XML_VIEWS view, 2-294
USERLOCK.SQL script, 5-4
users
authenticating, 1-119
multiple, 1-53
UTL_FILE_DIR initialization parameter, 1-169
UTLBSTAT.SQL script, 5-4
UTLCHN1.SQL script, 5-4
UTLCONST.SQL script, 5-4
UTLDTREE.SQL script, 2-236, 5-4
utldtree.sql script, 2-246
UTLESTAT.SQL script, 5-4
UTLEXPT1.SQL script, 5-4
UTLINCMP.SQL script, 5-7
UTLIP.SQL script, 5-4
UTLIRP.SQL script, 5-5
UTLLOCKT.SQL script, 5-5
UTLPWDMG.SQL script, 5-5
UTLRP.SQL script, 5-5
UTLSAMPL.SQL script, 5-5
UTLSCLN.SQL script, 5-5
UTLTKPRF.SQL script, 5-5
UTLVALID.SQL script, 5-5
UTLXPLAN.SQL script, 5-5

V

V$ACCESS view, 3-4
V$ACTIVE_INSTANCES view, 3-4
V$ACTIVE_SESS_POOL_MTH view, 3-4
V$AQ view, 3-4
V$ARCHIVE view, 3-5
V$ARCHIVE_DEST view, 3-5
V$ARCHIVE_DEST_STATUS view, 3-8
V$ARCHIVE_GAP view, 3-10
V$ARCHIVE_PROCESSES view, 3-10
V$ARCHIVED_LOG view, 3-10
V$BACKUP view, 3-12
V$BACKUP_ASYNC_IO view, 3-13
V$BACKUP_CORRUPTION view, 3-14
V$BACKUP_DATAFILE view, 3-15
V$BACKUP_DEVICE view, 3-16
V$BACKUP_PIECE view, 3-17
V$BACKUP_REDOLOG view, 3-18
V$BACKUP_SET view, 3-18
V$BACKUP_SPFILE view, 3-20
V$BACKUP_SYNC_IO view, 3-20
V$BGPROCESS view, 3-21
V$BH view, 3-21
V$BUFFER_POOL view, 3-23
V$BUFFER_POOL_STATISTICS view, 3-24
V$CACHE view, 3-25
V$CACHE_LOCK view, 3-26
V$CACHE_TRANSFER view, 3-29
V$CIRCUIT view, 3-30
V$CLASS_CACHE_TRANSFER view, 3-31
V$COMPATIBILITY view, 3-31
V$COMPATSEG view, 3-32
V$CONTEXT view, 3-32
V$CONTROLFILE view, 3-32
V$CONTROLFILE_RECORD_SECTION view, 3-32
V$COPY_CORRUPTION view, 3-33
V$CR_BLOCK_SERVER view, 3-34
V$DATABASE view, 3-35
V$DATABASE_BLOCK_CORRUPTION view, 3-38
V$DATABASE_INCARNATION view, 3-39
V$DATAFILE view, 3-39
V$DATAFILE_COPY view, 3-41
V$DATAFILE_HEADER view, 3-42
V$DATAGUARD_STATUS view, 3-43
V$DB_CACHE_ADVICE view, 3-44
V$DB_OBJECT_CACHE view, 3-45
V$DB_PIPES view, 3-46
V$DBFILE view, 3-46
V$DBLINK view, 3-46
V$DELETED_OBJECT view, 3-47
V$DISPATCHER view, 3-47
V$DISPATCHER_RATE view, 3-48
V$ENABLEDPRIVS view, 3-53
V$ENQUEUE_LOCK view, 3-53
V$ENQUEUE_STAT view, 3-54
V$EVENT_NAME view, 3-55
V$EXECUTION view, 3-55
V$FALSE_PING view, 3-55
V$FAST_START_SERVERS view, 3-56
V$FAST_START_TRANSACTIONS view, 3-57
V$FILE_CACHE_TRANSFER view, 3-57
V$FILESTAT view, 3-58
V$FIXED_TABLE view, 3-59
V$FIXED_VIEW_DEFINITION view, 3-59
V$GC_ELEMENT view, 3-60
V$GC_ELEMENTS_WITH_COLLISIONS view, 3-60
V$GCSHVMASTER_INFO view, 3-61
V$GCSPFMASTER_INFO view, 3-61
V$GES_BLOCKING_ENQUEUE view, 3-61
V$GES_CONVERT_LOCAL view, 3-63
V$GES_CONVERT_REMOTE view, 3-63
V$GES_ENQUEUE view, 3-64
V$GES_LATCH view, 3-65
V$GES_RESOURCE view, 3-65
V$GES_STATISTICS view, 3-66
V$GLOBAL_BLOCKED_LOCKS view, 3-66
V$GLOBAL_TRANSACTION view, 3-66
V$HS_AGENT view, 3-67
V$HS_PARAMETER view, 3-67
V$HS_SESSION view, 3-68
V$HVMASTER_INFO view, 3-68
V$INDEXED_FIXED_COLUMN view, 3-68
V$INSTANCE view, 3-69
V$INSTANCE_RECOVERY view, 3-70
V$LATCH view, 3-71
V$LATCH_CHILDREN view, 3-72
V$LATCH_MISSES view, 3-73
V$LATCH_PARENT view, 3-74
V$LATCHHOLDER view, 3-74
V$LATCHNAME view, 3-74
V$LIBRARY_CACHE_MEMORY view, 3-75
V$LIBRARYCACHE view, 3-75
V$LICENSE view, 3-76
V$LOADISTAT view, 3-76
V$LOADPSTAT view, 3-76
V$LOCK view, 3-77
V$LOCK_ACTIVITY view, 3-79
V$LOCKED_OBJECT view, 3-79
V$LOG view, 3-80
V$LOG_HISTORY view, 3-81
V$LOGFILE view, 3-81
V$LOGHIST view, 3-82
V$LOGMNR_CONTENTS view, 3-82
V$LOGMNR_DICTIONARY view, 3-84
V$LOGMNR_LOGS view, 3-85
V$LOGMNR_PARAMETERS view, 3-86
V$LOGSTDBY view, 3-86
V$LOGSTDBY_STATS view, 3-87
V$MANAGED_STANDBY view, 3-87
V$MAP_COMP_LIST view, 3-89
V$MAP_ELEMENT view, 3-89
V$MAP_EXT_ELEMENT view, 3-90
V$MAP_FILE view, 3-91
V$MAP_FILE_EXTENT view, 3-91
V$MAP_FILE_IO_STACK view, 3-92
V$MAP_LIBRARY view, 3-92
V$MAP_SUBELEMENT view, 3-93
V$MTTR_TARGET_ADVICE view, 3-93
V$MVREFRESH view, 3-2
V$MYSTAT view, 3-94
V$NLS_PARAMETERS view, 3-95
V$NLS_VALID_VALUES view, 3-95
V$OBJECT_DEPENDENCY view, 3-95
V$OBJECT_USAGE view, 3-96
V$OBSOLETE_PARAMETER view, 3-96
V$OFFLINE_RANGE view, 3-96
V$OPEN_CURSOR view, 3-97
V$OPTION view, 3-97
V$PARALLEL_DEGREE_LIMIT_MTH view, 3-98
V$PARAMETER view, 3-98
V$PARAMETER2 view, 3-99
V$PGA_TARGET_ADVICE view, 3-100
V$PGA_TARGET_ADVICE_HISTOGRAM view, 3-101
V$PGASTAT view, 3-103
V$PQ_SESSTAT view, 3-106
V$PQ_SLAVE view, 3-106
V$PQ_SYSSTAT view, 3-107
V$PQ_TQSTAT view, 3-108
V$PROCESS view, 3-109
V$PROXY_ARCHIVEDLOG view, 3-110
V$PROXY_DATAFILE view, 3-111
V$PWFILE_USERS view, 3-113
V$PX_PROCESS view, 3-113
V$PX_PROCESS_SYSSTAT view, 3-113
V$PX_SESSION view, 3-115
V$PX_SESSTAT view, 3-115
V$QUEUE view, 3-116
V$QUEUEING_MTH view, 3-116
V$RECOVER_FILE view, 3-116
V$RECOVERY_FILE_STATUS view, 3-117
V$RECOVERY_LOG view, 3-117
V$RECOVERY_PROGRESS view, 3-118
V$RECOVERY_STATUS view, 3-118
V$REPLPROP view, 3-2
V$REPLQUEUE view, 3-2
V$REQDIST view, 3-119
V$RESERVED_WORDS view, 3-119
V$RESOURCE view, 3-120
V$RESOURCE_LIMIT view, 3-120
V$RMAN_CONFIGURATION view, 3-121
V$ROLLNAME view, 3-121
V$ROLLSTAT view, 3-122
V$ROWCACHE view, 3-122
V$ROWCACHE_PARENT view, 3-123
V$ROWCACHE_SUBORDINATE view, 3-124
V$RSRC_CONSUMER_GROUP view, 3-124
V$RSRC_CONSUMER_GROUP_CPU_MTH view, 3-125
V$RSRC_PLAN view, 3-126
V$RSRC_PLAN_CPU_MTH view, 3-126
V$SEGMENT_STATISTICS view, 3-127
V$SEGSTAT view, 3-127
V$SEGSTAT_NAME view, 3-127
V$SESS_IO view, 3-128
V$SESSION view, 3-128
V$SESSION_CONNECT_INFO view, 3-133
V$SESSION_CURSOR_CACHE view, 3-134
V$SESSION_EVENT view, 3-134, A-2
V$SESSION_LONGOPS view, 3-135
V$SESSION_OBJECT_CACHE view, 3-136
V$SESSION_WAIT view, 3-137, A-2
V$SESSTAT view, 3-138, C-1
V$SGA view, 3-139
V$SGA_CURRENT_RESIZE_OPS view, 3-139
V$SGA_DYNAMIC_COMPONENTS view, 3-140
V$SGA_DYNAMIC_FREE_MEMORY view, 3-141
V$SGA_RESIZE_OPS view, 3-140
V$SGASTAT view, 3-141
V$SHARED_POOL_ADVICE view, 3-142
V$SHARED_POOL_RESERVED view, 3-142
V$SHARED_SERVER view, 3-143
V$SHARED_SERVER_MONITOR view, 3-144
V$SORT_SEGMENT view, 3-145
V$SPPARAMETER view, 3-146
V$SQL view, 3-146
V$SQL_BIND_DATA view, 3-148
V$SQL_BIND_METADATA view, 3-149
V$SQL_CURSOR view, 3-149
V$SQL_PLAN view, 3-150
V$SQL_PLAN_STATISTICS view, 3-152
V$SQL_PLAN_STATISTICS_ALL view, 3-153
V$SQL_REDIRECTION view, 3-156
V$SQL_SHARED_CURSOR view, 3-157
V$SQL_SHARED_MEMORY view, 3-158
V$SQL_WORKAREA view, 3-159
V$SQL_WORKAREA_ACTIVE view, 3-160
V$SQL_WORKAREA_HISTOGRAM view, 3-162
V$SQLAREA view, 3-163
V$SQLTEXT view, 3-164
V$SQLTEXT_WITH_NEWLINES view, 3-165
V$STANDBY_LOG view, 3-165
V$STATISTICS_LEVEL view, 3-166
V$STATNAME view, 3-167, C-1
V$STREAMS_APPLY_COORDINATOR view, 3-168
V$STREAMS_APPLY_READER view, 3-169
V$STREAMS_APPLY_SERVER view, 3-170
V$STREAMS_CAPTURE view, 3-172
V$SUBCACHE view, 3-174
V$SYSSTAT view, 3-174, C-1
V$SYSTEM_CURSOR_CACHE view, 3-175
V$SYSTEM_EVENT view, 3-175, A-2
V$SYSTEM_PARAMETER view, 3-176
V$SYSTEM_PARAMETER2 view, 3-177
V$TABLESPACE view, 3-178
V$TEMP_CACHE_TRANSFER view, 3-178
V$TEMP_EXTENT_MAP view, 3-179
V$TEMP_EXTENT_POOL view, 3-180
V$TEMP_SPACE_HEADER view, 3-180
V$TEMPFILE view, 3-181
V$TEMPORARY_LOBS view, 3-181
V$TEMPSEG_USAGE view, 3-181
V$TEMPSTAT view, 3-182
V$THREAD view, 3-183
V$TIMER view, 3-184
V$TIMEZONE_NAMES view, 3-184
V$TRANSACTION view, 3-184
V$TRANSACTION_ENQUEUE view, 3-185
V$TYPE_SIZE view, 3-186
V$UNDOSTAT view, 3-187
V$VERSION view, 3-188
V$VPD_POLICY view, 3-188
V$WAITSTAT view, 3-189
views
data dictionary views, 2-1
data files, 1-60
virtual circuit status, A-51

W

wait events
alter system set dispatchers, A-17
batched allocate scn lock request, A-17
BFILE check if exists, A-17
BFILE check if open, A-17
BFILE closure, A-18
BFILE get length, A-18
BFILE get name object, A-18
BFILE get path object, A-18
BFILE internal seek, A-19
BFILE open, A-19
BFILE read, A-19
buffer busy waits, A-20
buffer deadlock, A-20
buffer for checkpoint, A-20
buffer latch, A-21
buffer read retry, A-21
checkpoint completed, A-22
checkpoint range buffer not saved, A-22
controlfile parallel write, A-22
controlfile sequential read, A-23
controlfile single write, A-23
conversion file read, A-24
db file parallel read, A-24
db file parallel write, A-24
db file scattered read, A-25
db file sequential read, A-25
db file single write, A-25
DFS db file lock, A-26
DFS lock handle, A-26
direct path read, A-26
direct path write, A-27
dispatcher shutdown, A-27
dispatcher timer, A-28
duplicate cluster key, A-28
enqueue, A-28
file identify, A-29
file open, A-29
free buffer waits, A-29
free global transaction table entry, A-29
free process state object, A-30
global cache busy, A-30
global cache freelist wait, A-31
global cache lock cleanup, A-30
global cache null to s, A-31
global cache null to x, A-31
global cache open s, A-31
global cache open x, A-32
global cache s to x, A-32
inactive session, A-32
inactive transaction branch, A-33
index block split, A-33
instance recovery, A-33
instance state change, A-34
io done, A-34
kcl bg acks, A-34
latch activity, A-35
latch free, A-35
library cache load lock, A-36
library cache lock, A-36
library cache pin, A-37
lock manager wait for remote message, A-37
log file parallel write, A-38
log file sequential read, A-38
log file single write, A-38
log file switch (archiving needed), A-39
log file switch (checkpoint incomplete), A-39
log file switch (clearing log file), A-39
log file switch completion, A-39
log file sync, A-39
log switch/archive, A-40
on-going SCN fetch to complete, A-40
parallel query create server, A-40
parallel query dequeue wait, A-40
parallel query qref latch, A-41
parallel query server shutdown, A-41
parallel query signal server, A-41
pending global transaction(s), A-42
pipe get, A-42
pipe put, A-42
PL/SQL lock timer, A-17, A-43
pmon rdomain attach, A-43
pmon timer, A-43
process startup, A-43
queue messages, A-44
rdbms ipc message, A-44
rdbms ipc message block, A-44
rdbms ipc reply, A-44
redo, A-45
row cache lock, A-45
scginq AST call, A-45
single-task message, A-45
smon timer, A-46
SQL*Net break/reset to client, A-46
SQL*Net break/reset to dblink, A-46
SQL*Net message from client, A-47
SQL*Net message from dblink, A-47
SQL*Net message to client, A-47
SQL*Net message to dblink, A-47
SQL*Net more data from client, A-48
SQL*Net more data from dblink, A-48
SQL*Net more data to client, A-48
SQL*Net more data to dblink, A-49
switch logfile command, A-49
timer in sksawat, A-49
transaction, A-49
unbound tx, A-50
undo segment extension, A-50
undo segment recovery, A-50
undo segment tx slot, A-50
wait events
log buffer space, A-37
WMON goes to sleep, A-17, A-51
write complete, A-51
writes stopped by instance recovery or database suspension, A-51
WM_INSTALLATION view, 2-3
WM_REPLICATION_INFO view, 2-3
WORKAREA_SIZE_POLICY initialization parameter, 1-170
Go to previous page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
ýýýýº ðº ðº««««««««


Oracle Wait Events, 1 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

A
Oracle Wait Events

This appendix describes the event name, wait time, and parameters for wait events displayed by the V$SESSION_WAIT and V$SYSTEM_EVENT views.

Topics covered include:

  • Displaying Wait Events
  • Wait Events and Parameters
  • Parameter Descriptions
  • Wait Event Descriptions
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
ýýýýº ðº««««««««


Oracle Wait Events, 2 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Displaying Wait Events

Information about wait events is displayed in three dynamic performance views:

  • V$SESSION_WAIT displays the events for which sessions have just completed waiting or are currently waiting.
  • V$SYSTEM_EVENT displays the total number of times all the sessions have waited for the events in that view.
  • V$SESSION_EVENT is similar to V$SYSTEM_EVENT, but displays all waits for each session.

    See Also:

    "V$SESSION_EVENT" , "V$SESSION_WAIT" , and "V$SYSTEM_EVENT"

Many of these wait events are tied to the internal implementation of Oracle and therefore are subject to change or deletion without notice. Application developers should be aware of this and write their code to tolerate missing or extra wait events.

This appendix describes the event name, wait time, and parameters for each event.

The following SQL statement displays all Oracle events:

SELECT * FROM V$EVENT_NAME;
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
ýýýýðº ðº««««««««


Oracle Wait Events, 3 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Wait Events and Parameters

The following wait events are present in the Oracle database server. The columns P1, P2, and P3 represent parameters for the wait event. Selected parameters and wait events are further described in the sections that follow.

Event Name | P1 | P2 | P3
alter system set dispatcher | waited |  |
ARCH random i/o |  |  |
ARCH sequential i/o |  |  |
ARCH wait on ATTACH |  |  |
ARCH wait on DETACH |  |  |
ARCH wait on SENDREQ |  |  |
async disk IO | count | intr | timeout
background parameter adjustment | parameter number |  |
BFILE check if exists |  |  |
BFILE check if open |  |  |
BFILE closure |  |  |
BFILE get length |  |  |
BFILE get name object |  |  |
BFILE get path object |  |  |
BFILE internal seek |  |  |
BFILE open |  |  |
BFILE read |  |  |
buffer busy global cache | file# | block# | id
buffer busy global CR | file# | block# | id
buffer busy waits | file# | block# | id
buffer deadlock | dba | class*10+mode | flag
buffer for checkpoint | buffer# | dba | state*10+mode
buffer latch | latch addr | chain# | not used
buffer read retry | file# | block# | not used
buffer resize |  |  |
cache simulator heap |  |  |
CGS skgxn join retry | retry count |  |
CGS wait for IPC msg |  |  |
checkpoint completed |  |  |
contacting SCN server or SCN lock master |  |  |
control file heartbeat |  |  |
control file parallel write | files | blocks | requests
control file sequential read | file# | block# | blocks
control file single write | file# | block# | blocks
conversion file read | block# | blocks |
cr request retry | file# | block# |
db file parallel read | files | blocks | requests
db file parallel write | files | blocks | requests
db file scattered read | file# | block# | blocks
db file sequential read | file# | block# | blocks
db file single write | file# | block# | blocks
debugger command | not used | not used | not used
DFS db file lock | file# | not used | not used
DFS lock handle | type | mode | id1 | id2
direct path write | file number | first dba | block cnt
dispatcher shutdown |  |  |
dispatcher timer | sleep time | not used | not used
DLM generic wait event |  |  |
dupl. cluster key | dba | not used | not used
enqueue | name | mode | id1 | id2
fib/fob latch |  |  |
file identify | fib | file name | opcode
file open | fib | iov | 0
free buffer waits | file# | block# | set-id#
free global transaction table entry | tries |  |
free process state object |  |  |
gcs domain validation | cluinc | rcvinc |
gcs for action |  |  |
gcs remote message | waittime | poll | p3
gcs to be enabled |  |  |
ges cached resource cleanup | waittime |  |
ges cancel |  |  |
ges cgs de-registration |  |  |
ges cgs registration |  |  |
ges drm deferred close |  |  |
ges enter server mode |  |  |
ges generic event |  |  |
ges global resource directory to be frozen |  |  |
ges global resource directory to be unfrozen |  |  |
ges inquiry response | type|mode | id1 | id2
ges lmd and pmon to attach |  |  |
ges LMD suspend for testing event |  |  |
ges LMD to inherit communication channels |  |  |
ges LMD to shutdown |  |  |
ges lmd/lmses to freeze in rcfg - mrcvr |  |  |
ges lmd/lmses to freeze in rcfg - srcvr |  |  |
ges lmd/lmses to unfreeze in rcfg - mrcvr |  |  |
ges lmd/lmses to unfreeze in rcfg - srcvr |  |  |
ges LMON for send buffers to be empty |  |  |
ges LMON for send queues |  |  |
ges LMON to get to FTDONE |  |  |
ges LMON to join CGS group |  |  |
ges LMS suspend for testing event |  |  |
ges master to get established for SCN op |  |  |
ges performance test completion |  |  |
ges pmon to exit |  |  |
ges proc table latch - kjdrptref |  |  |
ges process allocation |  |  |
ges process with outstanding i/o | pid |  |
ges reconfiguration to start |  |  |
ges remote message | waittime | loop | p3
ges resource cleanout during enqueue open |  |  |
ges resource cleanout during enqueue open-cvt |  |  |
ges reusing os pid | pid | count |
ges server qs to be empty - kjbrrit |  |  |
ges1 LMON to wake up LMD |  |  |
ges1 LMON to wake up LMD - mrcvr |  |  |
ges2 LMON to wake up LMD - mrcvr |  |  |
ges2 LMON to wake up LMD - srcvr |  |  |
ges2 LMON to wake up lms - mrcvr 2 |  |  |
global cache assume wait | le |  |
global cache bg acks | count | loops |
global cache busy | file# | block# | id
global cache cancel wait | le |  |
global cache claim wait |  |  |
global cache cr cancel wait | le |  |
global cache cr disk request | file# | block# | le
global cache cr request | file# | block# | le
global cache domain validation |  |  |
global cache freelist wait |  |  |
global cache null to s | file# | block# | le
global cache null to x | file# | block# | le
global cache open s | file# | block# | le
global cache open x | file# | block# | le
global cache pending ast | le |  |
global cache pred cancel wait | le |  |
global cache recovery free wait |  |  |
global cache recovery quiesce wait | le |  |
global cache retry prepare | file# | block# |
global cache s to x | file# | block# | le
i/o slave wait | msg ptr |  |
imm op | msg ptr |  |
inactive session | session# | waited |
inactive transaction branch | branch# | waited |
index (re)build online cleanup | object | mode | wait
index (re)build online merge | object | mode | wait
index (re)build online start | object | mode | wait
index block split | rootdba | level | childdba
instance recovery | undo segment# |  |
instance state change | layer | value | waited
io done | msg ptr |  |
IPC busy async request |  |  |
IPC send completion sync | send count |  |
IPC wait for name service busy |  |  |
IPC waiting for OSD resources |  |  |
jobq slave wait |  |  |
KJC: Wait for msg sends to complete |  |  |
kjctcisnd: Queue/Send client message |  |  |
kjctssqmg: quick message send wait |  |  |
kksfbc child completion |  |  |
kksfbc research |  |  |
kkshgnc reloop |  |  |
kksscl hash split |  |  |
ksxr poll remote instances |  |  |
L1 validation | seghdr | l1bmb |
latch activity | address | number | process#
latch free | address | number | tries
LGWR random i/o |  |  |
LGWR sequential i/o |  |  |
LGWR wait for redo copy | copy latch # |  |
LGWR wait on ATTACH |  |  |
LGWR wait on DETACH |  |  |
LGWR wait on LNS |  |  |
LGWR wait on SENDREQ |  |  |
library cache load lock | object address | lock address | 100*mask+namespace
library cache lock | handle address | lock address | 100*mode+namespace
library cache pin | handle address | pin address | 100*mode+namespace
listen endpoint status | end-point# | status |
LNS wait on ATTACH |  |  |
LNS wait on DETACH |  |  |
LNS wait on LGWR |  |  |
LNS wait on SENDREQ |  |  |
local write wait | file# | block# |
lock deadlock retry |  |  |
lock escalate retry |  |  |
log buffer space |  |  |
log file parallel write | files | blocks | requests
log file sequential read | log# | block# | blocks
log file single write | log# | block# | blocks
log file switch (archiving needed) |  |  |
log file switch (checkpoint incomplete) |  |  |
log file switch (clearing log file) |  |  |
log file switch completion |  |  |
log file sync | buffer# |  |
log switch/archive | thread# |  |
multiple dbwriter suspend/resume for file offline |  |  |
name-service call wait | waittime |  |
null event |  |  |
parallel recovery coordinator waits for cleanup of slaves |  |  |
pending global transaction(s) | scans |  |
pipe get | handle address | buffer length | timeout
pipe put | handle address | record length | timeout
PL/SQL lock timer | duration |  |
pmon timer | duration |  |
process startup | type | process# | waited
PX create server | nservers | sleeptime | enqueue
PX Deq Credit: free buffer | sleeptime/senderid | passes | qref
PX Deq Credit: need buffer | sleeptime/senderid | passes | qref
PX Deq Credit: send blkd | sleeptime/senderid | passes | qref
PX Deq: Execute Reply | sleeptime/senderid | passes |
PX Deq: Execution Msg | sleeptime/senderid | passes |
PX Deq: Index Merge Close | sleeptime/senderid | passes |
PX Deq: Index Merge Execute | sleeptime/senderid | passes |
PX Deq: Index Merge Reply | sleeptime/senderid | passes |
PX Deq: Join ACK | sleeptime/senderid | passes |
PX Deq: Msg Fragment | sleeptime/senderid | passes |
PX Deq: OLAP Update Close | sleeptime/senderid | passes |
PX Deq: OLAP Update Execute | sleeptime/senderid | passes |
PX Deq: OLAP Update Reply | sleeptime/senderid | passes |
PX Deq: Par Recov Change Vector | sleeptime/senderid | passes |
PX Deq: Par Recov Execute | sleeptime/senderid | passes |
PX Deq: Par Recov Reply | sleeptime/senderid | passes |
PX Deq: Parse Reply | sleeptime/senderid | passes |
PX Deq: reap credit |  |  |
PX Deq: Signal ACK | sleeptime/senderid | passes |
PX Deq: Table Q Close | sleeptime/senderid | passes |
PX Deq: Table Q Get Keys | sleeptime/senderid | passes |
PX Deq: Table Q Normal | sleeptime/senderid | passes |
PX Deq: Table Q qref | sleeptime/senderid | passes |
PX Deq: Table Q Sample | sleeptime/senderid | passes |
PX Deq: Test for msg | sleeptime/senderid | passes |
PX Deq: Txn Recovery Reply | sleeptime/senderid | passes |
PX Deq: Txn Recovery Start | sleeptime/senderid | passes |
PX Deque wait | sleeptime/senderid | passes |
PX Idle Wait | sleeptime/senderid | passes |
PX Nsq: PQ descriptor query |  |  |
PX Nsq: PQ load info query |  |  |
PX qref latch | function | sleeptime | qref
PX Send Wait |  |  |
PX server shutdown | nalive | sleeptime | loop
PX signal server | serial | error | nbusy
PX slave connection |  |  |
PX slave release |  |  |
queue messages | queue id | process# | wait time
rdbms ipc message | timeout |  |
rdbms ipc message block |  |  |
rdbms ipc reply | from_process | timeout |
recovery read |  |  |
refresh controlfile command |  |  |
reliable message | channel context | channel handle | broadcast message
Replication Dequeue | sleeptime/senderid | passes |
resmgr:wait in actses run |  |  |
resmgr:waiting for cschlat1 |  |  |
resmgr:waiting for cschlat2 |  |  |
resmgr:waiting for cschlat3 |  |  |
resmgr:waiting for cschlat4 |  |  |
resmgr:waiting in check |  |  |
resmgr:waiting in check2 |  |  |
resmgr:waiting in end wait |  |  |
resmgr:waiting in end wait2 |  |  |
resmgr:waiting in enter |  |  |
resmgr:waiting in enter2 |  |  |
resmgr:waiting in run (queued) |  |  |
resmgr:waiting in shutdown |  |  |
resmgr:waiting in system stop |  |  |
retry contact SCN lock master |  |  |
RFS random i/o |  |  |
RFS sequential i/o |  |  |
row cache lock | cache id | mode | request
row cache read | cache id | address | times
sbtbackup |  |  |
sbtclose |  |  |
sbtclose2 |  |  |
sbtcommand |  |  |
sbtend |  |  |
sbterror |  |  |
sbtinfo |  |  |
sbtinfo2 |  |  |
sbtinit |  |  |
sbtinit2 |  |  |
sbtopen |  |  |
sbtpcbackup |  |  |
sbtpccancel |  |  |
sbtpccommit |  |  |
sbtpcend |  |  |
sbtpcquerybackup |  |  |
sbtpcqueryrestore |  |  |
sbtpcrestore |  |  |
sbtpcstart |  |  |
sbtpcstatus |  |  |
sbtpcvalidate |  |  |
sbtread |  |  |
sbtread2 |  |  |
sbtremove |  |  |
sbtremove2 |  |  |
sbtrestore |  |  |
sbtwrite |  |  |
sbtwrite2 |  |  |
scginq AST call |  |  |
secondary event | event # | wait time |
select wait |  |  |
single-task message |  |  |
slave exit | nalive | sleeptime | loop
slave shutdown wait |  |  |
slave TJ process wait |  |  |
smon timer | sleep time | failed |
sort segment request |  |  |
SQL*Net break/reset to client | driver id | break? | not used
SQL*Net break/reset to dblink | driver id | break? | not used
SQL*Net message from client | driver id | #bytes | not used
SQL*Net message from dblink | driver id | #bytes | not used
SQL*Net message to client | driver id | #bytes | not used
SQL*Net message to dblink | driver id | #bytes | not used
SQL*Net more data from client | driver id | #bytes | not used
SQL*Net more data from dblink | driver id | #bytes | not used
SQL*Net more data to client | driver id | #bytes | not used
SQL*Net more data to dblink | driver id | #bytes | not used
statement suspended, wait error to be cleared |  |  |
STREAMS apply coord waiting for slave message |  |  |
STREAMS apply slave waiting for coord message |  |  |
STREAMS capture process filter callback wait for ruleset |  |  |
STREAMS capture process waiting for archive log |  |  |
STREAMS fetch slave waiting for txns |  |  |
Streams: Wating for DDL to apply | sleep time |  |
switch logfile command |  |  |
switch undo - offline |  |  |
timer in sksawat |  |  |
trace continue | delay time |  |
trace unfreeze |  |  |
trace writer flush |  |  |
trace writer I/O |  |  |
transaction | undo seg#|slot# | wrap# | count
txn to complete |  |  |
unbound tx |  |  |
undo segment extension | segment# |  |
undo segment recovery | segment# | tx flags |
undo segment tx slot | segment# |  |
virtual circuit status | circuit# | status |
wait for a paralle reco to abort |  |  |
wait for a undo record |  |  |
wait for activate message |  |  |
wait for another txn - rollback to savepoint |  |  |
wait for another txn - txn abort |  |  |
wait for another txn - undo rcv abort |  |  |
wait for assert messages to be sent |  |  |
Wait for Dictionary Build to lock all tables |  |  |
wait for EMON to spawn |  |  |
wait for FMON to come up |  |  |
wait for Logical Standby Apply shutdown |  |  |
wait for master scn | waittime |  |
wait for membership change |  |  |
wait for membership synchronization |  |  |
wait for message ack |  |  |
wait for MTTR advisory state object |  |  |
wait for name service busy |  |  |
wait for possible quiesce finish |  |  |
wait for record update |  |  |
wait for rr lock release |  |  |
wait for scn from all nodes | waittime |  |
wait for split-brain resolution |  |  |
wait for stopper event to be increased |  |  |
wait for sync ack | cluinc | pending_nd |
wait for tmc2 to complete |  |  |
wait for transaction |  |  |
wait for unread message on broadcast channel | channel context | channel handle |
wait for unread message on multiple broadcast channels | channel context | channel handle count |
wait for verification ack | cluinc | pending_insts |
wait for votes |  |  |
wait list latch activity | address | number | process#
wait list latch free | address | number | tries
waiting to get CAS latch |  |  |
waiting to get RM CAS latch |  |  |
wakeup event for builder |  |  |
wakeup event for preparer |  |  |
wakeup event for reader |  |  |
wakeup time manager |  |  |
write complete waits | file# | block# |
writes stopped by instance recovery or database suspension | by thread# | our thread# |
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Oracle Wait Events, 4 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Parameter Descriptions

block#

This is the block number of the block for which Oracle needs to wait. The block number is relative to the start of the file. To find the object to which this block belongs, enter the following SQL statements:

select name, kind
from ext_to_obj_view
where file#  = file#
     and lowb  <= block#
     and highb >= block#;

blocks

The number of blocks that is being either read from or written to the file. The block size is dependent on the file type:

  • Database files have a block size of DB_BLOCK_SIZE
  • Logfiles and controlfiles have a block size that is equivalent to the physical block size of the platform

break?

If the value for this parameter equals 0, a reset was sent to the client. A nonzero value indicates that a break was sent to the client.

class

The class of the block describes how the contents of the block are used. For example, class 1 represents data block, and class 4 represents segment header.

dba

The initials "dba" represents the data block address, which consists of a file number and a block number.

driver id

The address of the disconnect function of the driver that is currently being used.

file#

The following query returns the name of the database file:

select *
from v$datafile
where file# = file#;

id1

The first identifier (id1) of the enqueue or global lock takes its value from P2 or P2RAW. The meaning of the identifier depends on the name (P1).

id2

The second identifier (id2) of the enqueue or global lock takes its value from P3 or P3RAW. The meaning of the identifier depends on the name (P1).

le

The relative index number into V$GC_ELEMENT.

mode

The mode is usually stored in the low order bytes of P1 or P1RAW and indicates the mode of the enqueue or global lock request. This parameter has one of the following values:

Table A-1 Lock Mode Values
Mode Value | Description
1 | Null mode
2 | Sub-Share
3 | Sub-Exclusive
4 | Share
5 | Share/Sub-Exclusive
6 | Exclusive

Use the following SQL statement to retrieve the name of the lock and the mode of the lock request:

select chr(bitand(p1,-16777216)/16777215)||
       chr(bitand(p1, 16711680)/65535) "Lock",
       bitand(p1, 65536) "Mode"
from v$session_wait
where event = 'DFS enqueue lock acquisition';

name and type

The name or "type" of the enqueue or global lock can be determined by looking at the two high order bytes of P1 or P1RAW. The name is always two characters. Use the following SQL statement to retrieve the lock name.

select chr(bitand(p1,-16777216)/16777215)||
      chr(bitand(p1,16711680)/65535) "Lock"
from v$session_wait
where event = 'DFS enqueue lock acquisition';

namespace

The name of the object namespace as it is displayed in V$DB_OBJECT_CACHE view.

requests

The number of I/Os that are "requested." This differs from the number of blocks in that one request could potentially contain multiple blocks.

session#

The number of the inactive session. Use the following SQL statement to find more information about the session:

select *
from v$session
where sid = session#;

waited

This is the total amount of time the session has waited for this session to terminate.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Oracle Wait Events, 5 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Wait Event Descriptions

This section describes some of the more common Oracle events in more detail.

alter system set dispatchers

A session has issued a statement ALTER SYSTEM SET DISPATCHERS = string and is waiting for the dispatchers to get started.

Wait Time: The session will wait 1 / 100 of a second and check to see if the new dispatchers have started else the session will wait again

Parameters:

waited

Number of times that the session has waited 1 / 100 of a second

batched allocate scn lock request

A session is waiting on another process to allocate a system change number (SCN). If the foreground timed out waiting on a process to get the SCN, the foreground will get the SCN.

Wait Time: The wait time is 1 second on the assumption that an SCN allocation should normally need much less than that

Parameters: None

BFILE check if exists

The session waits to check if an external large object (LOB) exists.

Wait Time: The total elapsed time for the exists call

Parameters:

session# | See "session#"
waited | See "waited"

BFILE check if open

The session waits to check if an external large object (LOB) has already been opened.

Wait Time: The total elapsed time for the isopen call

Parameters:

session# | See "session#"
waited | See "waited"

BFILE closure

The session waits for an external large object (LOB) to close.

Wait Time: The total elapsed time for the close call

Parameters:

session# | See "session#"
waited | See "waited"

BFILE get length

The session waits on a call to check the size of an external large object (LOB).

Wait Time: The total elapsed time for the call to check the LOB size

Parameters:

session# | See "session#"
waited | See "waited"

BFILE get name object

The session waits on a call to find or generate the external name of a external large object.

Wait Time: The total elapse time for make external file name to complete

Parameters:

session# | See "session#"
waited | See "waited"

BFILE get path object

The session is waiting on a call to find or generate the external path name of an external large object (LOB).

Wait Time: The total elapsed time for make external path to complete

Parameters:

session# | See "session#"
waited | See "waited"

BFILE internal seek

The session waits for a positioning call within the external large object (LOB) to complete.

Wait Time: The total elapse time for the seek to complete

Parameters:

session# | See "session#"
waited | See "waited"

BFILE open

The session waits to check if an external large object (LOB) has already been opened.

Wait Time: The total elapsed time for the isopen call

Parameters:

session# | See "session#"
waited | See "waited"

BFILE read

The session waits for a read from a external large object (LOB) to complete.

Wait Time: The total elapse time for the read to complete

Parameters:

session# | See "session#"
waited | See "waited"

buffer busy waits

Wait until a buffer becomes available. This event happens because a buffer is either being read into the buffer cache by another session (and the session is waiting for that read to complete) or the buffer is the buffer cache, but in a incompatible mode (that is, some other session is changing the buffer).

Wait Time: Normal wait time is 1 second. If the session was waiting for a buffer during the last wait, then the next wait will be 3 seconds.

Parameters:

file# | See "file#"
block# | See "block#"
id | The buffer busy wait event is called from different places in the session

buffer deadlock

Oracle does not really wait on this event; the foreground only yields the CPU. Thus, the chances of catching this event are very low. This is not an application induced deadlock, but an assumed deadlock by the cache layer. The cache layer cannot get a buffer in a certain mode within a certain amount of time.

Wait Time: 0 seconds. The foreground process only yields the CPU and will usually be placed at the end of the CPU run queue.

Parameters:

class | See "class"
mode | See "mode"
flag | The flag points to the internal flags used by the session to get this block
dba | See "dba"

buffer for checkpoint

The buffer could not be checkpointed, because some process is modifying it. This means that after the wait, the DBWR will scan the whole buffer cache again. This could happen during a database close or after a user does a local checkpoint. During this situation the database cannot be closed.

Wait Time: 1 second

Parameters:

dba | See "dba"
state | State refers to the status of the buffer contents
mode | See "mode"
buffer# | This is the index of the block in the buffer cache (V$BH)

buffer latch

The session waits on the buffer hash chain latch. Primarily used in the dump routines.

Wait Time: 1 second

Parameters:

latch addr

The virtual address in the SGA where this latch is located. Use the following statement to find the name of this latch:

select *
from v$latch a, v$latchname b
where addr = latch addr
and a.latch# = b.latch#;

chain#

The index into array of buffer hash chains. When the chain is 0xfffffff, the foreground waits on the LRU latch.

buffer read retry

This event occurs only if the instance is mounted in shared mode (Oracle Real Application Cluster). During the read of the buffer, the contents changed. This means that either:

  • The version number, dba, or the incarnation and sequence number stored in the block no longer match
  • The checksum on the block does not match the checksum in the block

The block will be re-read (this may fail up to 3 times), then corruption is assumed and the corrupt block is dumped in the trace file.

Wait Time: The wait time is the elapsed time of the read

Parameters:

file# | See "file#"
block# | See "block#"

checkpoint completed

A session waits for a checkpoint to complete. This could happen, for example, during a close database or a local checkpoint.

Wait Time: 5 seconds

Parameters: None

checkpoint range buffer not saved

During a range checkpoint operation a buffer was found that was not saved or written. Either:

  • The session will wait on this event if the write batch is empty and it is the first time that the session waited on this event in the range checkpoint operation
  • The current range checkpoint operation will be aborted and a new one will be started to complete the operation

Wait Time: 10 milliseconds

Parameters: None

control file parallel write

This event occurs while the session is writing physical blocks to all control files. This happens when:

  • The session starts a control file transaction (to make sure that the control files are up to date in case the session crashes before committing the control file transaction)
  • The session commits a transaction to a control file
  • Changing a generic entry in the control file, the new value is being written to all control files

Wait Time: The wait time is the time it takes to finish all writes to all control files

Parameters:

files | The number of control files to which the session is writing
blocks | The number of blocks that the session is writing to the control file
requests | The number of I/O requests which the session wants to write

control file sequential read

Reading from the control file. This happens in many cases. For example, while:

  • Making a backup of the controlfiles
  • Sharing information (between instances) from the controlfile
  • Reading other blocks from the controlfiles
  • Reading the header block

Wait Time: The wait time is the elapsed time of the read

Parameters:

file# | The controlfile from which the session is reading
block# | Block number in the controlfile from where the session starts to read. The block size is the physical block size of the port (usually 512 bytes, some UNIX ports have 1 or 2 Kilobytes).
blocks | The number of blocks that the session is trying to read

control file single write

This wait is signaled while the control file's shared information is written to disk. This is an atomic operation protected by an enqueue (CF), so that only one session at a time can write to the entire database.

Wait Time: The wait time is the elapsed time of the write

Parameters:

file# | This identifies the control file to which the session is currently writing
block# | Block number in the control file where the write begins. The block size is the as the physical block size of the port (usually 512 bytes, some UNIX ports have 1 or 2 Kilobytes).
blocks | The number of blocks that the session is trying to read

conversion file read

This event occurs during the creation of a Version 7 controlfile as part of converting a database to Version 7 from Version 6.

Wait Time: The wait time is the elapsed time of the read

Parameters:

block# | Block number in the control file where the write begins. The block size is the as the physical block size of the port (usually 512 bytes, some UNIX ports have 1 or 2 Kilobytes).
blocks | The number of blocks that the session is trying to read

db file parallel read

This happens during recovery. Database blocks that need to be changed as part of recovery are read in parallel from the database.

Wait Time: Wait until all of the I/Os are completed

Parameters:

files | This indicates the number of files to which the session is reading
blocks | This indicates the total number of blocks to be read
requests | This indicates the total number of I/O requests, which will be the same as blocks

db file parallel write

This event occurs in the DBWR. It indicates that the DBWR is performing a parallel write to files and blocks. The parameter requests indicates the real number of I/Os that are being performed. When the last I/O has gone to disk, the wait ends.

Wait Time: Wait until all of the I/Os are completed

Parameters:

files | This indicates the number of files to which the session is writing
blocks | This indicates the total number of blocks to be written
requests | This indicates the total number of I/O requests, which will be the same as blocks

db file scattered read

Similar to db file sequential read, except that the session is reading multiple data blocks.

Wait Time: The wait time is the actual time it takes to do all of the I/Os

Parameters:

file# | See "file#"
block# | See "block#"
blocks | The number of blocks that the session is trying to read from the file# starting at block#

db file sequential read

The session waits while a sequential read from the database is performed. This event is also used for rebuilding the control file, dumping datafile headers, and getting the database file headers.

Wait Time: The wait time is the actual time it takes to do the I/O

Parameters:

file# | See "file#"
block# | See "block#"
blocks | This is the number of blocks that the session is trying to read (should be 1)

db file single write

This event is used to wait for the writing of the file headers.

Wait Time: The wait time is the actual time it takes to do the I/O

Parameters:

file# | See "file#"
block# | See "block#"
blocks | This is the number of blocks that the session is trying to write in file# starting at block#

DFS db file lock

This event occurs only for the DBWR in the Oracle Real Application Cluster. Each DBWR of every instance holds a global lock on each file in shared mode. The instance that is trying to offline the file will escalate the global lock from shared to exclusive. This signals the other instances to synchronize their SGAs with the controlfile before the file can be taken offline. The name of this lock is DF (see Appendix B, "Oracle Enqueue Names" for more information).

Wait Time: 1 second in loop. The DBWR is waiting in a loop (sleep, check) for the other instances to downgrade to NULL mode. During this time, the DBWR cannot perform other tasks such as writing buffers.

Parameter:

file

See "file#"

DFS lock handle

The session waits for the lock handle of a global lock request. The lock handle identifies a global lock. With this lock handle, other operations can be performed on this global lock (to identify the global lock in future operations such as conversions or release). The global lock is maintained by the DLM.

Wait Time: The session waits in a loop until it has obtained the lock handle from the DLM. Inside the loop there is a wait of 0.5 seconds.

Parameters:

name | See "name and type"
mode | See "mode"
id1 | See "id1"
id2 | See "id2"

The session needs to get the lock handle.

direct path read

During Direct Path operations the data is asynchronously read from the database files. At some stage the session needs to make sure that all outstanding asynchronous I/O have been completed to disk. This can also happen if during a direct read no more slots are available to store outstanding load requests (a load request could consist of multiple I/Os).

Wait Time: 10 seconds. The session will be posted by the completing asynchronous I/O. It will never wait the entire 10 seconds. The session waits in a tight loop until all outstanding I/Os have completed.

Parameters:

descriptor address | This is a pointer to the I/O context of outstanding direct I/Os on which the session is currently waiting
first dba | The dba of the oldest I/O in the context referenced by the descriptor address
block cnt | Number of valid buffers in the context referenced by the descriptor address

direct path write

During Direct Path operations, the data is asynchronously written to the database files. At some stage the session needs to make sure that all outstanding asynchronous I/O have been completed to disk. This can also happen if, during a direct write, no more slots are available to store outstanding load requests (a load request could consist of multiple I/Os).

Wait Time: 10 seconds. The session will be posted by the completing asynchronous I/O. It will never wait the entire 10 seconds. The session waits in a tight loop until all outstanding I/Os have completed.

Parameters:

descriptor address | This is a pointer to the I/O context of outstanding direct I/Os on which the session is currently waiting
first dba | The dba of the oldest I/O in the context referenced by the descriptor address
block cnt | Number of valid buffers in the context referenced by the descriptor address

dispatcher shutdown

During shutdown immediate or normal, the shutdown process must wait for all the dispatchers to shutdown. As each dispatcher is signaled, the session that causes the shutdown is waits on this event until the requested dispatcher is no longer alive.

Wait Time: 1 second

Parameter:

waited

Indicates the cumulative wait time. After 5 minutes, the session writes to the alert and trace files to indicate that there might be a problem.

dispatcher timer

This basically means that the dispatcher is idle and waiting for some work to arrive.

Wait Time: 60 seconds

Parameter:

sleep time

The intended sleep time. The dispatcher will return to work sooner if it is posted by either data arriving on the network or by a post from a shared server process to send data back to the client.

duplicate cluster key

It is possible for a race condition to occur when creating a new cluster key. If it is found that another process has put the cluster key into the data/index block, then the session waits and retries. The retry should then find a valid cluster key.

Wait Time: 0.01 seconds

Parameter:

dba

The dba of the block into which the session is trying to insert a cluster key

enqueue

The session is waiting for a local enqueue. The wait is dependent on the name of the enqueue (see Appendix B, "Oracle Enqueue Names").

Wait Time: Depends on the enqueue name

Parameters:

name | See "name and type"
mode | See "mode"

file identify

The time it takes to identify a file so that it can be opened later.

file open

The time it takes to open the file.

free buffer waits

This will happen if:

  • All buffer gets have been suspended. This could happen when a file was read-only and is now read-write. All the existing buffers need to be invalidated since they are not linked to lock elements (needed when mounted parallel (shared)). So cache buffers are not assigned to data block addresses until the invalidation is finished.
  • The session moved some dirty buffers to the dirty queue and now this dirty queue is full. The dirty queue needs to be written first. The session will wait on this event and try again to find a free buffer
  • This also happens after inspecting free buffer inspected buffers. If no free buffer is found, Oracle waits for one second, and then tries to get the buffer again (depends on the context). For more information, see free buffer inspected .

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"

free global transaction table entry

The session is waiting for a free slot in the global transaction table (used by the Distributed Database option). It will wait for 1 second and try again.

Wait Time: 1 second

Parameter:

tries

The number of times the session tried to find a free slot in the global transaction table

free process state object

Used during the creation of a process. The session will scan the process table and look for a free process slot. If none can be found, PMON is posted to check if all the processes currently in the process table are still alive. If there are dead processes, then PMON will clean them and make the process slot available to new processes. The waiting process will then rescan the process table to find the new slot.

Wait Time: 1 second

Parameters: None

global cache busy

The session waits to convert a buffer from Shared Current to Exclusive Current status.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
le | See "lenum" on page A-8

global cache lock cleanup

PMON is waiting for an LCK process to cleanup the lock context after a foreground process died while doing a global cache lock operation.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
lenum | See "lenum" on page A-8

global cache freelist wait

All releasable locks are used and a new one has been requested. To make a resource element available, a resource element is pinged.

Wait Time: The duration of the resource get operation to ping the resource element

Parameters: None

global cache null to s

The session waits for a resource convert from NULL to SHARED mode on the block identified by file# and block#.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
class | See "class"

global cache null to x

The session waits for a resource convert from NULL to EXCLUSIVE mode on the block identified by file# and block#.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
lenum | See "le"

global cache open s

The session waits for a resource get in SHARED mode on the block identified by file# and block#.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
class | See "class"

global cache open x

The session waits for a resource get in EXCLUSIVE mode on the block identified by file# and block#.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
lenum | See "le"

global cache s to x

The session waits for a resource convert from SHARED to EXCLUSIVE mode on the block identified by file# and block#.

Wait Time: 1 second

Parameters:

file# | See "file#"
block# | See "block#"
lenum | See "le"

inactive session

This event is used for two purposes:

  • Switching sessions

    If a time-out period has been specified, then wait that amount of time for the session to be detached.

  • Killing sessions

    From either KILL SESSION or internal request. Having posted a session that it should kill itself, wait for up to 1 minute for the session to terminate.

Wait Time: 1 second

Parameters:

session# | See "session#"
waited | See "waited"

inactive transaction branch

The session waits for a transaction branch that is currently used by another session.

Wait Time: 1 second

Parameters:

branch# | The serial number of the transaction for which the session is waiting
waited | See "waited"

index block split

While trying to find an index key in an index block, Oracle noticed that the index block was being split. Oracle will wait for the split to finish and try to find the key again.

Wait Time: The session will yield the CPU, so there is no actual waiting time

Parameters:

rootdba | The root of the index
level | This is the level of the block that the session is trying to split in the index. The leaf blocks are level 0. If the level is > 0, it is a branch block. (The root block can be considered a special branch block).
childdba | The block that the session is trying to split

instance recovery

The session waits for SMON to finish the instance, transaction recovery, or sort segment cleanup.

Wait Time: The wait time can vary and depends on the amount of recovery needed

Parameter:

undo segment#

If the value is 0, SMON is probably performing instance recovery. If P1 > 0, use this query to find the undo segment:

select *
from v$rollstat
where usn = undo segment#;

instance state change

The session waits for SMON to enable or disable cache or transaction recovery. This usually happens during ALTER DATABASE OPEN or CLOSE.

Wait Time: Wait time depends on the amount of time the action takes (that is, the amount of recovery needed)

Parameters:

layer | This value can be 1 or 2. If 1, it means that the transaction layer wants transaction recovery to be performed. If 2, it means that cache recovery will be performed.
value | This value can be 0 (disable) or 1 (enable)
waited | The number of seconds waited so far

io done

The session waits for an I/O to complete or it waits for a slave process to become available to submit the I/O request. This event occurs on platforms that do not support asynchronous I/O.

Wait Time: 50 milliseconds

Parameter:

msg ptr

A pointer to the I/O request

kcl bg acks

The session waits for the background LCK process(es) to finish what they are doing. For example:

  • Lock recovery
  • Initializing the locks (start up)
  • Finalizing the locks (shut down)

Wait Time: 10 seconds

Parameters:

count | The number of LCK processes that have finished
loops | The number times the process had to wait for the LCK processes to finish what they were doing

latch activity

This event is used as part of the process of determining whether a latch needs to be cleaned.

Wait Time: 0.05 to 0.1 seconds

Parameters:

address

The address of the latch that is being checked

number

The latch number of the latch that has activity. To find more information on the latch, use the following SQL statement:

select *
from v$latchname
where latch# = number;

process#

If this is 0, it is the first phase of the in-flux tests

latch free

The process waits for a latch that is currently busy (held by another process).

Wait Time: The wait time increases exponentially and does not include spinning on the latch (active waiting). The maximum wait time also depends on the number of latches that the process is holding. There is an incremental wait of up to 2 seconds.

Parameters:

address

The address of the latch for which the process is waiting

number

The latch number that indexes in the V$LATCHNAME view.To find more information on the latch, use the following SQL statement:

select *
from v$latchname
where latch# = number;

tries

A count of the number of times the process tried to get the latch (slow with spinning) and the process has to sleep

library cache load lock

The session tries to find the load lock for the database object so that it can load the object. The load lock is always obtained in Exclusive mode, so that no other process can load the same object. If the load lock is busy the session will wait on this event until the lock becomes available.

Wait Time: 3 seconds (1 second for PMON)

Parameters:

object address | Address of the object being loaded
lock address | Address of load lock being used
mask | Indicates which data pieces of the object that needs to be loaded

library cache lock

This event controls the concurrency between clients of the library cache. It acquires a lock on the object handle so that either:

  • One client can prevent other clients from accessing the same object
  • The client can maintain a dependency for a long time (for example, no other client can change the object)

This lock is also obtained to locate an object in the library cache.

Wait Time: 3 seconds (1 second for PMON)

Parameters:

handle address | Address of the object being loaded
lock address | Address of the load lock being used. This is not the same thing as a latch or an enqueue, it is a State Object.
mode | Indicates the data pieces of the object which need to be loaded
namespace | See "namespace"

library cache pin

This event manages library cache concurrency. Pinning an object causes the heaps to be loaded into memory. If a client wants to modify or examine the object, the client must acquire a pin after the lock.

Wait Time: 3 seconds (1 second for PMON)

Parameters:

handle address | Address of the object being loaded
pin address | Address of the load lock being used. This is not the same thing as a latch or an enqueue, it is basically a State Object.
mode | Indicates which data pieces of the object that needs to be loaded
namespace | See "namespace"

lock manager wait for remote message

The lock manager waits for a message from a remote lock manager in the same configuration.

Wait Time: The elapsed time of the wait

Parameter:

waittime

The elapsed time of the actual wait

log buffer space

Waiting for space in the log buffer because the session is writing data into the log buffer faster than LGWR can write it out. Consider making the log buffer bigger if it is small, or moving the log files to faster disks such as striped disks.

Wait Time: Usually 1 second, but 5 seconds if it is waiting for a Switch Logfile to complete

Parameters: None

log file parallel write

Writing redo records to the redo log files from the log buffer.

Wait Time: Time it takes for the I/Os to complete. Even though redo records are written in parallel, the parallel write is not complete until the last I/O is on disk.

Parameters:

files | Number of files to be written
blocks | Number of blocks to be written
requests | Number of I/O requests

log file sequential read

Waiting for the read from this logfile to return. This is used to read redo records from the log file.

Wait Time: Time it takes to complete the physical I/O (read)

Parameters:

log# | The relative sequence number of the logfiles within a log group (used only when dumping the logfiles)
block# | See "block#"
blocks | The number of blocks to read

log file single write

Waiting for the write to this logfile to complete. This event is used while updating the header of the logfile. It is signaled when adding a log file member and when incrementing sequence numbers.

Wait Time: Time it takes for the physical I/O (write) to complete

Parameters:

log# | This is the number of the group/log to which the session is currently writing
block# | See "block#"
blocks | The number of blocks to write

log file switch (archiving needed)

Waiting for a log switch because the log that the LGWR will be switching into has not been archived yet. Check the alert file to make sure that archiving has not stopped due to a failed archive write. To speed archiving, consider adding more archive processes or putting the archive files on striped disks.

Wait Time: 1 second

Parameters: None

log file switch (checkpoint incomplete)

Waiting for a log switch because the session cannot wrap into the next log. Wrapping cannot be performed because the checkpoint for that log has not completed.

Wait Time: 1 second

Parameters: None

log file switch (clearing log file)

Waiting for a log switch because the log is being cleared due to a CLEAR LOGFILE command or implicit clear logfile executed by recovery.

Wait Time: 1 second

Parameters: None

log file switch completion

Waiting for a log switch to complete.

Wait Time: 1 second

Parameters: None

log file sync

When a user session commits, the session's redo information needs to be flushed to the redo logfile. The user session will post the LGWR to write the log buffer to the redo log file. When the LGWR has finished writing, it will post the user session.

Wait Time: The wait time includes the writing of the log buffer and the post.

Parameter:

buffer#

The number of the physical buffer in the redo log buffer that needs to be synchronized

log switch/archive

Used as part of the ALTER SYSTEM ARCHIVE LOG CHANGE scn statement. The session waits for the current log from all open threads to be archived.

Wait Time: Wait for up to 10 seconds

Parameter:

thread#

The thread number of the thread that is currently archiving its current log

on-going SCN fetch to complete

Another session is fetching the SCN (system change number). This session waits for the other session finish fetching the SCN.

Wait Time: 1 second

Parameters: None

parallel execution create server

Used when creating or starting a parallel execution slave.

Wait Time: The time it takes to start all of the requested parallel execution slaves

Parameters:

nservers | The number of parallel execution slaves that are being started
sleeptime | Time it takes to get the processes started. The process should be started within sleeptime
enqueue | The number of blocks to read

parallel execution dequeue wait

The process is waiting for a message during a parallel execute.

Wait Time: The wait time depends on how quickly the message arrives. Wait times can vary, but it will normally be a short period of time.

Parameters:

reason | The reason for dequeuing
sleeptime | The amount of time that the session slept
loop | The total number of times that the session has slept

parallel execution qref latch

Each parallel execution process has a parallel execution qref latch, which needs to be acquired before the queue buffers can be manipulated.

Wait Time: Wait up to 1 second

Parameters:

function | Indicates the type of wait that the session is doing
sleeptime | The amount of time that the session waits (in hundredths of a second)
qref | The address of the process queue for which the session is waits

parallel execution server shutdown

During normal or immediate shutdown the parallel execution slaves are posted to shutdown cleanly. If any parallel execution slaves are still alive after 10 seconds, they are killed.

Wait Time: Wait up to 0.5 seconds

Parameters:

nalive | The number of parallel execution slaves that are still running
sleeptime | The total sleeptime since the session started to wait on this event
loop | The number of times the session waited for this event

parallel execution signal server

This event occurs only in Exclusive mode. The query coordinator is signalling the Query Slaves that an error has occurred.

Wait Time: 0.5 seconds

Parameters:

serial | The serial number of the slave process queue
error | The error that has occurred
nbusy | The number of slave processes that are still busy

pending global transaction(s)

This event should happen only during testing. The session waits for pending transactions to clear.

Wait Time: 30 seconds

Parameter:

scans

Number of times the session has scanned the PENDING_TRANS$ table

pipe get

The session waits for a message to be received on the pipe or for the pipe timer to expire.

Wait Time: There is a 5 second wake up (check) and the pipe timer set by the user

Parameters:

handle address | The library cache object handle for this pipe
buffer length | The length of the buffer
timeout | The pipe timer set by the user

pipe put

The session waits for the pipe send timer to expire or for space to be made available in the pipe.

Wait Time: There is the 5 second wakeup (check) and the user-supplied timeout value

Parameters:

handle address | The library cache object handle for this pipe
record length | The length of the record or buffer that has been put into the pipe
timeout | The pipe timer set by the user

PL/SQL lock timer

This event is called through the DBMSLOCK.SLEEP procedure or USERLOCK.SLEEP procedure. This event will most likely originate from procedures written by a user.

Wait Time: The wait time is in hundredths of seconds and is dependent on the user context

Parameter:

duration

The duration that the user specified in the DBMS_LOCK.SLEEP or USER_LOCK.SLEEP procedures

pmon rdomain attach

This is the main wait event for PMON. When PMON is idle, it is waiting on this event.

pmon timer

This is the main wait event for PMON. When PMON is idle, it is waiting on this event.

Wait Time: Up to 3 seconds, if not posted before

Parameter:

duration

The actual amount of time that the PMON is trying to sleep

process startup

Wait for a shared server, Dispatcher, or other background process to start.

Wait Time: Wait up to 1 second for a background process to start. If timed out, then re-wait until 5 minutes have passed and signal an error. If the process has started, the event will acknowledge this.

Parameters:

type | The process type that was started
process# | The process number of the process being started
waited | Cumulative time waited for the process to start

queue messages

The session is waiting on an empty OLTP queue (Advanced Queuing) for a message to arrive so that the session can dequeue that message.

Wait Time: The amount of time that the session wants to wait is determined by the parameter wait time

Parameters:

queue id | The ID of the OLTP queue for which this session is waiting
process# | The process number of the process in which this session runs
wait time | The intended wait time for this session

rdbms ipc message

The background processes (LGWR, DBWR, LMS0) use this event to indicate that they are idle and are waiting for the foreground processes to send them an IPC message to do some work.

Wait Time: Up to 3 seconds. The parameter timeout shows the true sleep time.

Parameter:

timeout

The amount of time that the session waits for an IPC message

rdbms ipc message block

This event indicates that all message blocks are in use and that the session had to wait for a message block to become available.

Wait Time: Wait up to 60 seconds

Parameters: None

rdbms ipc reply

This event is used to wait for a reply from one of the background processes.

Wait Time: The wait time is specified by the user and is indicated by the parameter timeout.

Parameters:

from_process | The background process for which the session is waiting. The wait is for a reply to an IPC message sent by the session.
timeout | The amount of time in seconds that this process will wait for a reply

redo wait

Defined but not used by the code.

row cache lock

The session is trying to get a data dictionary lock.

Wait Time: Wait up to 60 seconds.

Parameters:

cache id | The CACHE# column value in the V$ROWCACHE view
mode | See "mode"
request | The pipe timer set by the user

scginq AST call

Called by the session to find the highest lock mode that is held on a resource.

Wait Time: Wait up to 0.2 seconds, but the wait will continue until the NULL mode Acquisition AST has fired.

Parameters: None

single-task message

When running single task, this event indicates that the session waits for the client side of the executable.

Wait Time: Total elapsed time that this session spent in the user application

Parameters: None

smon timer

This is the main idle event for SMON. SMON will be waiting on this event most of the time until it times out or is posted by another process.

Wait Time: 5 minutes (300 seconds)

Parameters:

sleeptime | The amount of time that SMON tries to wait on this event in seconds
failed | The number of times SMON was posted when there some kind of error

SQL*Net break/reset to client

The server sends a break or reset message to the client. The session running on the server waits for a reply from the client.

Wait Time: The actual time it takes for the break or reset message to return from the client

Parameters:

driver id | See "driver id"
break? | See "break?"

SQL*Net break/reset to dblink

Same as SQL*Net break/reset to client, but in this case, the break/reset message is sent to another server process over a database link.

Wait Time: The actual time it takes for the break or reset message to return from the other server process

Parameters:

driver id | See "driver id"
break? | See "break?"

SQL*Net message from client

The server process (foreground process) waits for a message from the client process to arrive.

Wait Time: The time it took for a message to arrive from the client since the last message was sent to the client

Parameters:

driver id | See "driver id"
#bytes | The number of bytes received by the server (foreground process) from the client.

SQL*Net message from dblink

The session waits while the server process (foreground process) receives messages over a database link from another server process.

Wait Time: The time it took for a message to arrive from another server (foreground process) since a message was sent to the other foreground process.

Parameters:

driver id | See "driver id"
#bytes | The number of bytes received by the server (foreground process) from another foreground process over a database link.

SQL*Net message to client

The server (foreground process) is sending a message to the client.

Wait Time: The actual time the send takes

Parameters:

driver id | See "driver id"
#bytes | The number of bytes sent by the server process to the client

SQL*Net message to dblink

The server process (foreground process) is sending a message over a database link to another server process.

Wait Time: The actual time the send takes

Parameters:

driver id | See "driver id"
#bytes | The number of bytes sent by the server process to another server process over a database link

SQL*Net more data from client

The server is performing another send to the client. The previous operation was also a send to the client.

Wait Time: The time waited depends on the time it took to receive the data (including the waiting time)

Parameters:

driver id | See "driver id"
#bytes | The number of bytes received from the client

SQL*Net more data from dblink

The foreground process is expecting more data from a data base link.

Wait Time: The total time it takes to read the data from the database link (including the waiting time for the data to arrive)

Parameters:

driver id | See "driver id"
#bytes | The number of bytes received

SQL*Net more data to client

The server process is sending more data/messages to the client. The previous operation to the client was also a send.

Wait Time: The actual time it took for the send to complete

Parameters:

driver id | See "driver id"
#bytes | The number of bytes that are being sent to the client

SQL*Net more data to dblink

The event indicates that the server is sending data over a database link again. The previous operation over this database link was also a send.

Wait Time: The actual time it takes to send the data to the other server

Parameters:

driver id | See "driver id"
#bytes | The number of bytes that are sent over the database link to the other server process

switch logfile command

The session waits on the user command SWITCH LOGFILE to complete.

Wait Time: 5 seconds

Parameters: None

timer in sksawat

The session waits for the Archiver (ARCH) asynchronous I/O to complete.

Wait Time: 0.01 seconds

Parameters: None

transaction

Wait for a blocking transaction to be rolled back. Continue waiting until the transaction has been rolled back.

Wait Time: 1 second

Parameters:

undo seg# | The rollback segment ID
slot# | The slot ID inside the rollback segment
wrap# | The sequence number that is incremented for each transaction
count | The number of times that the session has waited on this transaction

unbound tx

The session waits to see if there are any transactions that have been started but do not have a Rollback Segment associated with them.

Wait Time: 1 second

Parameters: None

undo segment extension

The undo segment is being extended or shrunk. The session must wait until the operation on the undo segment has finished.

Wait Time: 0.01 seconds

Parameter:

segment#

The ID of the rollback segment that is being extended or shrunk

undo segment recovery

PMON is rolling back a dead transaction. The wait continues until rollback finishes.

Wait Time: 3 seconds

Parameters:

segment# | The ID of the rollback segment that contains the transaction that is being rolled back
tx flags | The transaction flags (options) set for the transaction that is being rolled back

undo segment tx slot

Wait for a transaction slot to become available within the selected rollback segment. Continue waiting until the slot is available.

Wait Time: 1 second

Parameters:

segment#

The ID of the rollback segment that contains the transaction that is being rolled back

virtual circuit status

The session waits for a virtual circuit to return a message type indicated by status.

Wait Time: 30 seconds

Parameters:

circuit# | Indicates the virtual circuit# being waited on
status | Indicates what the session is waiting for

WMON goes to sleep

WMON is the UNIX-specific Wait Monitor, that can be used to reduce the number of system calls related to setting timers for posting or waiting in Oracle. You need to set an initialization parameter that enables the WMON process.

Wait Time: Depends on the next timeout

Parameters: None

write complete waits

The session waits for a buffer to be written. The write is caused by normal aging or by a cross-instance call.

Wait Time: 1 second

Parameters:

file# | The rollback segment id that contains the transaction that is being rolled back
block# | The transaction flags (options) set for the transaction that is being rolled back
id | Identifies the reason for waiting

writes stopped by instance recovery or database suspension

The session is blocked until the instance that started Instance Recovery is finished.

Wait Time: 5 seconds

Parameters:

bythread# | The rollback segment id that contains the transaction that is being rolled back
ourthread# | The current instance thread number
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Oracle Enqueue Names

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

B
Oracle Enqueue Names

This appendix lists Oracle enqueues. Enqueues are shared memory structures (locks) that serialize access to database resources. They can be associated with a session or transaction. Enqueue names are displayed in the LOCK_TYPE column of the DBA_LOCK and DBA_LOCK_INTERNAL data dictionary views.

A resource uniquely identifies an object that can be locked by different sessions within an instance (local resource) or between instances (global resource). Each session that tries to lock the resource will have an enqueue on the resource.

Note:

The names of enqueues and their definitions may change from release to release.
See Also:
  • Oracle9i Application Developer's Guide - Advanced Queuing for more information on enqueues
  • "DBA_LOCK_INTERNAL" and "DBA_LOCK"

The Oracle enqueues are:

  • BL, Buffer Cache Management
  • CF, Controlfile Transaction
  • CI, Cross-instance Call Invocation
  • CU, Bind Enqueue
  • DF, Datafile
  • DL, Direct Loader Index Creation
  • DM, Database Mount
  • DR, Distributed Recovery
  • DX, Distributed TX
  • FS, File Set
  • IN, Instance Number
  • IR, Instance Recovery
  • IS, Instance State
  • IV, Library Cache Invalidation
  • JQ, Job Queue
  • KK, Redo Log "Kick"
  • L[A-P], Library Cache Lock
  • MR, Media Recovery
  • N[A-Z], Library Cache Pin
  • PF, Password File
  • PI, Parallel Slaves
  • PR, Process Startup
  • PS, Parallel Slave Synchronization
  • Q[A-Z], Row Cache
  • RT, Redo Thread
  • SC, System Commit Number
  • SM, SMON
  • SQ, Sequence Number Enqueue
  • SR, Synchronized Replication
  • SS, Sort Segment
  • ST, Space Management Transaction
  • SV, Sequence Number Value
  • TA, Transaction Recovery
  • TM, DML Enqueue
  • TS, Temporary Segment (also TableSpace)
  • TT, Temporary Table
  • TX, Transaction
  • UL, User-defined Locks
  • UN, User Name
  • US, Undo Segment, Serialization
  • WL, Being Written Redo Log
  • XA, Instance Attribute Lock
  • XI, Instance Registration Lock
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Statistics Descriptions, 1 of 2

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

C
Statistics Descriptions

This appendix describes the statistics stored in the V$SESSTAT and V$SYSSTAT dynamic performance tables. These statistics are useful in identifying and correcting performance problems.

Displaying Statistics

The V$SESSTAT view displays statistics on a per-session basis and is valid only for the session currently connected. When a session disconnects, all statistics for the session are updated in V$SYSSTAT. The values for the statistics are cleared until the next session uses them.

The V$STATNAME view contains all of the statistics for an Oracle release.

Many of these statistics are tied to the internal implementation of Oracle and therefore are subject to change or deletion without notice, even between patch releases. Application developers should be aware of this and write their code to tolerate missing or extra statistics.

See Also:

"V$SESSTAT" , "V$STATNAME" , and "V$SYSSTAT" for more information on these views

Press the "Next" button to go to the statistics descriptions.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Statistics Descriptions, 2 of 2

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Statistics Descriptions

This section describes the statistics stored in the V$SESSTAT and V$SYSSTAT views. The statistics are listed here in alphabetical order.

The CLASS column contains a number representing one or more statistics classes. The following class numbers are additive:

  • 1, User
  • 2, Redo
  • 4, Enqueue
  • 8, Cache
  • 16, OS
  • 32, Real Application Clusters
  • 64, SQL
  • 128, Debug

For example, a class value of 72 represents a statistic that relates to SQL statements and caching.

Some statistics are populated only if the TIMED_STATISTICS initialization parameter is set to true. Those statistics are flagged in the right-hand column.

Table C-1 Database Statistics Descriptions
Name Class Description TIMED_STATISTICS

background checkpoints completed

8

Number of checkpoints completed by the background process. This statistic is incremented when the background process successfully advances the thread checkpoint.

background checkpoints started

8

Number of checkpoints started by the background process. This statistic can be larger than "background checkpoints completed" if a new checkpoint overrides an incomplete checkpoint or if a checkpoint is currently under way. This statistic includes only checkpoints of the redo thread. It does not include:

  • Individual file checkpoints for operations such as offline or begin backup
  • Foreground (user-requested) checkpoints (for example, performed by ALTER SYSTEM CHECKPOINT LOCAL statements)

branch node splits

128

Number of times an index branch block was split because of the insertion of an additional value

buffer is not pinned count

72

Number of times a buffer was free when visited. Useful only for internal debugging purposes.

buffer is pinned count

72

Number of times a buffer was pinned when visited. Useful only for internal debugging purposes.

bytes received via SQL*Net from client

1

Total number of bytes received from the client over Net8

bytes received via SQL*Net from dblink

1

Total number of bytes received from a database link over Net8

bytes sent via SQL*Net to client

1

Total number of bytes sent to the client from the foreground processes.

bytes sent via SQL*Net to dblink

1

Total number of bytes sent over a database link

Cached Commit SCN referenced

128

Useful only for internal debugging purposes

calls to get snapshot scn: kcmgss

32

Number of times a snapshot system change number (SCN) was allocated. The SCN is allocated at the start of a transaction.

calls to kcmgas

128

Number of calls to routine kcmgas to get a new SCN

calls to kcmgcs

128

Number of calls to routine kcmgcs to get a current SCN

calls to kcmgrs

128

Number of calls to routine kcsgrs to get a recent SCN

change write time

8

Elapsed redo write time for changes made to CURRENT blocks in 10s of milliseconds. This statistic is populated only if the TIME_STATISTICS parameter is set to TRUE.

cleanouts and rollbacks - consistent read gets

128

Number of consistent gets that require both block rollbacks and block cleanouts.

See Also: "consistent gets"

cleanouts only - consistent read gets

128

Number of consistent gets that require only block cleanouts, no rollbacks.

See Also: "consistent gets"

cluster key scan block gets

64

Number of blocks obtained in a cluster scan

cluster key scans

64

Number of cluster scans that were started

cold recycle reads

8

Number of buffers that were read through the least recently used end of the recycle cache with fast aging strategy

commit cleanout failures: block lost

8

Number of times Oracle attempted a cleanout at commit but could not find the correct block due to forced write, replacement, or switch CURRENT

commit cleanout failures: buffer being written

8

Number of times Oracle attempted a cleanout at commit, but the buffer was currently being written

commit cleanout failures: callback failure

8

Number of times the cleanout callback function returns FALSE

commit cleanout failures: cannot pin

8

Total number of times a commit cleanout was performed but failed because the block could not be pinned

commit cleanout failures: hot backup in progress

8

Number of times Oracle attempted block cleanout at commit during hot backup. The image of the block needs to be logged before the buffer can be made dirty.

commit cleanout failures: write disabled

8

Number of times a cleanout block at commit was performed but the writes to the database had been temporarily disabled

commit cleanouts

8

Total number of times the cleanout block at commit function was performed

commit cleanouts successfully completed

8

Number of times the cleanout block at commit function completed successfully

Commit SCN cached

128

Number of times the system change number of a commit operation was cached

consistent changes

8

Number of times a user process has applied rollback entries to perform a consistent read on the block

Work loads that produce a great deal of consistent changes can consume a great deal of resources. The value of this statistic should be small in relation to the "consistent gets" statistic.

consistent gets

8

Number of times a consistent read was requested for a block.

See Also: "consistent changes" and "session logical reads" statistics

CPU used by this session

1

Amount of CPU time (in 10s of milliseconds) used by a session from the time a user call starts until it ends. If a user call completes within 10 milliseconds, the start and end user-call time are the same for purposes of this statistics, and 0 milliseconds are added.

A similar problem can exist in the reporting by the operating system, especially on systems that suffer from many context switches.

3

CPU used when call started

128

The CPU time used when the call is started

See Also: "CPU used by this session"

3

CR blocks created

8

Number of CURRENT blocks cloned to create CR (consistent read) blocks. The most common reason for cloning is that the buffer is held in a incompatible mode.

current blocks converted for CR

8

Number CURRENT blocks converted to CR state

cursor authentications

128

Number of privilege checks conducted during execution of an operation

data blocks consistent reads - undo records applied

128

Number of undo records applied to data blocks that have been rolled back for consistent read purposes

db block changes

8

Closely related to "consistent changes", this statistic counts the total number of changes that were part of an update or delete operation that were made to all blocks in the SGA. Such changes generate redo log entries and hence become permanent changes to the database if the transaction is committed.

This approximates total database work. It statistic indicates the rate at which buffers are being dirtied (on a per-transaction or per-second basis, for example).

db block gets

8

Number of times a CURRENT block was requested

See Also: "consistent gets"

DBWR buffers scanned

8

Total number of dirty and clean buffers Oracle looks at when scanning LRU sets for dirty buffers to clean. Divide by "DBWR lru scans" to find the average number of buffers scanned.

DBWR checkpoint buffers written

8

Number of buffers that were written for checkpoints

DBWR checkpoints

8

Number of times the DBWR was asked to scan the cache and write all blocks marked for a checkpoint or the end of recovery. This statistic is always larger than "background checkpoints completed".

DBWR cross instance writes

40

Oracle Real Application Cluster only: Number of blocks written to satisfy a lock request from another instance

DBWR free buffers found

8

Number of clean buffers that DBWR found when it was requested to make free buffers. Divide by "DBWR make free requests" to find the average number of reusable buffers at the end of each LRU.

DBWR lru scans

8

Number of times that DBWR scans the LRU queue looking for buffers to write. This count includes scans to fill a batch being written for another purpose (such as a checkpoint). This statistic is always greater than or equal to "DBWR make free requests".

DBWR make free requests

8

Number of requests to DBWR to make some free buffers for the LRU

DBWR revisited being-written buffer

8

Number of times that DBWR tried to save a buffer for writing and found that it was already in the write batch. This statistic measures the amount of "useless" work that DBWR had to do in trying to fill the batch.

Many sources contribute to a write batch. If the same buffer from different sources is considered for adding to the write batch, then all but the first attempt will be "useless" because the buffer is already marked as being written.

DBWR summed scan depth

8

The current scan depth (number of buffers examined by DBWR) is added to this statistic every time DBWR scans the LRU for dirty buffers. Divide by "DBWR lru scans" to find the average scan depth.

DBWR transaction table writes

8

Number of rollback segment headers written by DBWR. This statistic indicates how many "hot" buffers were written, causing a user process to wait while the write completed.

DBWR undo block writes

8

Number of rollback segment blocks written by DBWR

DDL statements parallelized

32

Number of DDL statements that were executed in parallel

deferred (CURRENT) block cleanout applications

128

Number of times cleanout records are deferred, piggyback with changes, always current get

DFO trees parallelized

32

Number of times a serial execution plan was converted to a parallel plan

dirty buffers inspected

8

Number of dirty buffers found by the user process while the it is looking for a buffer to reuse

DML statements parallelized

32

Number of DML statements that were executed in parallel

enqueue conversions

4

Total number of conversions of the state of table or row lock

enqueue deadlocks

4

Total number of deadlocks between table or row locks in different sessions

enqueue releases

4

Total number of table or row locks released

enqueue requests

4

Total number of table or row locks acquired

enqueue timeouts

4

Total number of table and row locks (acquired and converted) that timed out before they could complete

enqueue waits

4

Total number of waits that occurred during an enqueue convert or get because the enqueue get was deferred

exchange deadlocks

8

Number of times that a process detected a potential deadlock when exchanging two buffers and raised an internal, restartable error. Index scans are the only operations that perform exchanges.

execute count

64

Total number of calls (user and recursive) that executed SQL statements

free buffer inspected

8

Number of buffers skipped over from the end of an LRU queue in order to find a reusable buffer. The difference between this statistic and "dirty buffers inspected" is the number of buffers that could not be used because they had a user, a waiter, or were being read or written, or because they were busy or needed to be written after rapid aging out.

free buffer requested

8

Number of times a reusable buffer or a free buffer was requested to create or load a block

global cache blocks corrupt

40

Real Application Clusters only: Number of blocks that encountered a corruption or checksum failure during interconnect

global cache convert time

40

Real Application Clusters only: Total time elapsed during lock converts

global cache convert timeouts

40

Number of times lock converts in the global cache timed out

global cache converts

40

Number of lock converts in the global cache

global cache cr block receive time

40

Total amount of time foreground processes waited for a CR block to be sent through the interconnect. This statistic divided by "global cache cr blocks received" = time waited per block.

global cache cr block serve time

40

Total amount of time the BSP process took to construct consistent-read (CR) blocks. This statistic divided by "global cache cr blocks served" = construction time per CR block.

global cache cr blocks received

40

Total number of blocks received

global cache cr blocks served

40

Total number of blocks constructed by the BSP process

global cache cr requests blocked

40

Number of times foreground attempt to request a cr block and failed

global cache cr timeouts

40

Number of times a foreground process requested a consistent-read (CR) block when the request timed out

global cache defers

40

Number of times a lock was requested and the holder of the lock deferred the release

global cache freelist waits

40

System configured with fewer lock elements than buffers. Number of times foreground has to wait for a lock element.

global cache get time

40

Total time spent waiting. This divided by global cache gets = time waited per request.

global cache gets

40

Number of locks acquired

global cache cr block send time

40

Total time spent by the BSP process in sending constructed consistent-read (CR) blocks. This statistic divided by "global cache cr blocks served" = send time per CR block.

global cache cr block log flushes

40

Number of log flushes of the consistent-read block

global cache cr block log flush time

40

Total time spent by the BSP process in log flushes after sending a constructed consistent-read (CR) block. This statistic divided by "global cache cr blocks served" = log flush time per CR block.

global cache prepare failures

40

Number of times a failure occurred during preparation for interconnect transfer

global lock async converts

32

Total number of asynchronous global lock converts

global lock async gets

32

Total number of asynchronous global lock gets

global lock convert time

32

Total elapsed time in 10s of milliseconds of all synchronous (non-asynchronous) global lock converts

global lock get time

32

Total elapsed time in 10s of milliseconds of all synchronous (non-asynchronous) global lock gets

global lock releases

32

Total number of synchronous global lock releases

global lock sync converts

32

Total number of synchronous global lock converts

global lock sync gets

32

Total number of synchronous global lock gets

hot buffers moved to head of LRU

8

When a hot buffer reaches the tail of its replacement list, Oracle moves it back to the head of the list to keep it from being reused. This statistic counts such moves.

immediate (CR) block cleanout applications

128

Number of times cleanout records are applied immediately during consistent-read requests

immediate (CURRENT) block cleanout applications

128

Number of times cleanout records are applied immediately during current gets. Compare this statistic with "deferred (CURRENT) block cleanout applications"

index fast full scans (direct read)

64

Number of fast full scans initiated using direct read

index fast full scans (full)

64

Number of fast full scans initiated for full segments

index fast full scans (rowid ranges)

64

Number of fast full scans initiated with rowid endpoints specified

instance recovery database freeze count

32

Number of times the database is frozen during instance recovery

kcmccs called get current scn

32

Number of times the kernel got the CURRENT SCN when there was a need to casually confirm the SCN

kcmgss read scn without going to DLM

32

Number of times the kernel got a snapshot SCN without going to the distributed lock manager (DLM)

kcmgss waited for batching

32

Number of times a database process is blocked waiting for a snapshot SCN

leaf node splits

128

Number of times an index leaf node was split because of the insertion of an additional value

logons cumulative

1

Total number of logons since the instance started. Useful only in V$SYSSTAT. It gives an instance overview of all processes that logged on.

logons current

1

Total number of current logons. Useful only in V$SYSSTAT.

messages received

128

Number of messages sent and received between background processes

messages sent

128

native hash arithmetic execute

64

Number of hash operations performed using native arithmetic rather than Oracle NUMBERs

native hash arithmetic fail

64

Number of has operations performed using native arithmetic that failed, requiring the hash operation to be performed with Oracle NUMBERs

next scns gotten without going to DLM

32

Number of system change numbers obtained without going to the distributed lock manager or server

no buffer to keep pinned count

72

Number of times a visit to a buffer attempted, but the buffer was not found where expected. Like "buffer is not pinned count" and "buffer is pinned count", this statistic is useful only for internal debugging purposes.

no work - consistent read gets

128

Number consistent gets that require neither block cleanouts nor rollbacks.

See Also: "consistent gets"

opened cursors cumulative

1

In V$SYSSTAT: Total number of cursors opened since the instance started.

In V$SESSTAT: Total number of cursors opened since the start of the session.

opened cursors current

1

Total number of current open cursors

opens of replaced files

8

Total number of files that had to be reopened because they were no longer in the process file cache

opens requiring cache replacement

8

Total number of file opens that caused a current file in the process file cache to be closed

OS All other sleep time

16

Time spent sleeping for reasons other than misses in the data segment (see "OS Data page fault sleep time"), kernel page faults (see "OS Kernel page fault sleep time"), misses in the text segment (see "OS Text page fault sleep time"), or waiting for an OS locking object (see "OS User lock wait sleep time"). An example of such a reason is expiration of quanta.

OS Chars read and written

16

Number of bytes read and written

OS Data page fault sleep time

16

Time spent sleeping due to misses in the data segment

OS Input blocks

16

Number of read I/Os

OS Involuntary context switches

16

Number of context switches that were enforced by the operating system

OS Kernel page fault sleep time

16

Time spent sleeping due to OS kernel page faults

OS Major page faults

16

Number of page faults that resulted in I/O

OS Messages received

16

Number of messages received

OS Messages sent

16

Number of messages sent

OS Minor page faults

16

Number of page faults that did not result in an actual I/O

OS Other system trap CPU time

16

Total amount of time to process system traps (as distinct from system calls)

OS Output blocks

16

Number of write I/Os

OS Process heap size

16

Size of area in memory allocated by the process. Typically this represents memory obtained by way of malloc().

OS Process stack size

16

Size of the process stack segment

OS Signals received

16

Number of signals received

OS Swaps

16

Number of swap pages

OS System call CPU time

16

Total amount of time spent executing in system mode

OS System calls

16

Number of system calls

OS Text page fault sleep time

16

Time spent sleeping due to misses in the text segment

OS User level CPU time

16

Total amount of time spent executing in user mode

OS User lock wait sleep time

16

Total amount of time sleeping while waiting for an OS locking object

OS Voluntary context switches

16

Number of voluntary context switches (for example, when a process gives up the CPU by a SLEEP() system call)

OS Wait-cpu (latency) time

16

Time spent sleeping while waiting for a CPU to become available

Parallel operations downgraded 1 to 25 pct

32

Number of times parallel execution was requested and the degree of parallelism was reduced because of insufficient parallel execution servers

Parallel operations downgraded 25 to 50 pct

32

Parallel operations downgraded 50 to 75 pct

32

Parallel operations downgraded 75 to 99 pct

32

Parallel operations downgraded to serial

32

Number of times parallel execution was requested but execution was serial because of insufficient parallel execution servers

Parallel operations not downgraded

32

Number of times parallel execution was executed at the requested degree of parallelism

parse count (hard)

64

Total number of parse calls (real parses). A hard parse is a very expensive operation in terms of memory use, because it requires Oracle to allocate a workheap and other memory structures and then build a parse tree.

parse count (total)

64

Total number of parse calls (hard and soft). A soft parse is a check on an object already in the shared pool, to verify that the permissions on the underlying object have not changed.

parse time cpu

64

Total CPU time used for parsing (hard and soft) in 10s of milliseconds

3

parse time elapsed

64

Total elapsed time for parsing, in 10s of milliseconds. Subtract "parse time cpu" from the this statistic to determine the total waiting time for parse resources.

3

physical reads

8

Total number of data blocks read from disk. This number equals the value of "physical reads direct" plus all reads into buffer cache.

physical reads direct

8

Number of reads directly from disk, bypassing the buffer cache. For example, in high bandwidth, data-intensive operations such as parallel query, reads of disk blocks bypass the buffer cache to maximize transfer rates and to prevent the premature aging of shared data blocks resident in the buffer cache.

physical writes

8

Total number of data blocks written to disk. This number equals the value of "physical writes direct" plus all writes from buffer cache.

physical writes direct

8

Number of writes directly to disk, bypassing the buffer cache (as in a direct load operation)

physical writes non checkpoint

8

Number of times a buffer is written for reasons other than advancement of the checkpoint. Used as a metric for determining the I/O overhead imposed by setting the FAST_START_IO_TARGET parameter to limit recovery I/Os. Essentially this statistic measures the number of writes that would have occurred had there been no checkpointing. Subtracting this value from "physical writes" gives the extra I/O for checkpointing.

pinned buffers inspected

8

Number of times a user process, when scanning the tail of the replacement list looking for a buffer to reuse, encountered a cold buffer that was pinned or had a waiter that was about to pin it. This occurrence is uncommon, because a cold buffer should not be pinned very often.

prefetched blocks

8

Number of contiguous and noncontiguous blocks that were prefetched

prefetched blocks aged out before use

8

Number of contiguous and noncontiguous blocks that were prefetched but aged out before use

process last non-idle time

128

The last time this process executed

3

PX local messages recv'd

32

Number of local messages received for parallel execution within the instance local to the current session

PX local messages sent

32

Number of local messages sent for parallel execution within the instance local to the current session

PX remote messages recv'd

32

Number of remote messages received for parallel execution within the instance local to the current session

PX remote messages sent

32

Number of remote messages sent for parallel execution within the instance local to the current session

queries parallelized

32

Number of SELECT statements executed in parallel

recovery array read time

8

Elapsed time of I/O during recovery

recovery array reads

8

Number of reads performed during recovery

recovery blocks read

8

Number of blocks read during recovery

recursive calls

1

Number of recursive calls generated at both the user and system level. Oracle maintains tables used for internal processing. When Oracle needs to make a change to these tables, it internally generates an internal SQL statement, which in turn generates a recursive call.

recursive cpu usage

1

Total CPU time used by non-user calls (recursive calls). Subtract this value from "CPU used by this session" to determine how much CPU time was used by the user calls.

redo blocks written

2

Total number of redo blocks written. This statistic divided by "redo writes" equals number of blocks per write.

redo buffer allocation retries

2

Total number of retries necessary to allocate space in the redo buffer. Retries are needed either because the redo writer has fallen behind or because an event such as a log switch is occurring.

redo entries

2

Number of times a redo entry is copied into the redo log buffer

redo log space requests

2

Number of times the active log file is full and Oracle must wait for disk space to be allocated for the redo log entries. Such space is created by performing a log switch.

Log files that are small in relation to the size of the SGA or the commit rate of the work load can cause problems. When the log switch occurs, Oracle must ensure that all committed dirty buffers are written to disk before switching to a new log file. If you have a large SGA full of dirty buffers and small redo log files, a log switch must wait for DBWR to write dirty buffers to disk before continuing.

Also examine the log file space and log file space switch wait events in V$SESSION_WAIT

redo log space wait time

2

Total elapsed waiting time for "redo log space requests" in 10s of milliseconds

3

redo log switch interrupts

2

Number of times that another instance asked this instance to advance to the next log file

redo ordering marks

2

Number of times that a system change number was allocated to force a redo record to have an higher SCN than a record generated in another thread using the same block

redo size

2

Total amount of redo generated in bytes

redo synch time

8

Elapsed time of all "redo synch writes" calls in 10s of milliseconds

3

redo synch writes

8

Number of times a change being applied to the log buffer must be written out to disk due to a commit. The log buffer is a circular buffer that LGWR periodically flushes. Usually, redo that is generated and copied into the log buffer need not be flushed out to disk immediately.

redo wastage

2

Number of bytes wasted because redo blocks needed to be written before they are completely full. Early writing may be needed to commit transactions, to be able to write a database buffer, or to switch logs.

redo write time

2

Total elapsed time of the write from the redo log buffer to the current redo log file in 10s of milliseconds

3

redo writer latching time

2

Elapsed time in 10s of milliseconds needed by LWGR to obtain and release each copy latch

3

redo writes

2

Total number of writes by LGWR to the redo log files. "redo blocks written" divided by this statistic equals the number of blocks per write

remote instance undo block writes

40

Number of times this instance wrote a rollback segment so that another instance could read it

remote instance undo header writes

40

Number of times this instance wrote a undo header block so that another instance could read it

rollback changes - undo records applied

128

Number of undo records applied to user-requested rollback changes (not consistent-read rollbacks)

rollbacks only - consistent read gets

128

Number of consistent gets that require only block rollbacks, no block cleanouts.

See Also: "consistent gets"

rows fetched via callback

64

Rows fetched via callback. Useful primarily for internal debugging purposes.

serializable aborts

1

Number of times a SQL statement in a serializable isolation level had to abort

session connect time

1

The connect time for the session in 10s of milliseconds. This value is useful only in V$SESSTAT. It is the wall clock time since the logon to this session occurred.

3

session cursor cache count

64

Total number of cursors cached. This statistic is incremented only if SESSION_CACHED_CURSORS > 0. This statistic is the most useful in V$SESSTAT. If the value for this statistic in V$SESSTAT is close to the setting of the SESSION_CACHED_CURSORS parameter, the value of the parameter should be increased.

session cursor cache hits

64

Number of hits in the session cursor cache. A hit means that the SQL statement did not have to be reparsed. Subtract this statistic from "parse count (total)" to determine the real number of parses that occurred.

session logical reads

1

The sum of "db block gets" plus "consistent gets"

session pga memory

1

Current PGA size for the session. Useful only in V$SESSTAT; it has no meaning in V$SYSSTAT.

session pga memory max

1

Peak PGA size for the session. Useful only in V$SESSTAT; it has no meaning in V$SYSSTAT.

session stored procedure space

1

Amount of memory this session is using for stored procedures

session uga memory

1

Current UGA size for the session. Useful only in V$SESSTAT; it has no meaning in V$SYSSTAT.

session uga memory max

1

Peak UGA size for a session. Useful only in V$SESSTAT; it has no meaning in V$SYSSTAT.

sorts (disk)

64

Number of sort operations that required at least one disk write

Sorts that require I/O to disk are quite resource intensive. Try increasing the size of the initialization parameter SORT_AREA_SIZE. For more information, see "SORT_AREA_SIZE" .

sorts (memory)

64

Number of sort operations that were performed completely in memory and did not require any disk writes

You cannot do much better than memory sorts, except maybe no sorts at all. Sorting is usually caused by selection criteria specifications within table join SQL operations.

sorts (rows)

64

Total number of rows sorted

SQL*Net roundtrips to/from client

1

Total number of Net8 messages sent to and received from the client

SQL*Net roundtrips to/from dblink

1

Total number of Net8 messages sent over and received from a database link

summed dirty queue length

8

The sum of the dirty LRU queue length after every write request. Divide by write requests to get the average queue length after write completion.

switch current to new buffer

8

Number of times the CURRENT block moved to a different buffer, leaving a CR block in the original buffer

table fetch by rowid

64

Number of rows that are fetched using a ROWID (usually recovered from an index)

This occurrence of table scans usually indicates either non-optimal queries or tables without indexes. Therefore, this statistic should increase as you optimize queries and provide indexes in the application.

table fetch continued row

64

Number of times a chained or migrated row is encountered during a fetch

Retrieving rows that span more than one block increases the logical I/O by a factor that corresponds to the number of blocks than need to be accessed. Exporting and re-importing may eliminate this problem. Evaluate the settings for the storage parameters PCTFREE and PCTUSED. This problem cannot be fixed if rows are larger than database blocks (for example, if the LONG datatype is used and the rows are extremely large).

table scan blocks gotten

64

During scanning operations, each row is retrieved sequentially by Oracle. This statistic counts the number of blocks encountered during the scan.

This statistic tells you the number of database blocks that you had to get from the buffer cache for the purpose of scanning. Compare this value with the value of "consistent gets" to determine how much of the consistent read activity can be attributed to scanning.

table scan rows gotten

64

Number of rows that are processed during scanning operations

table scans (cache partitions)

64

Number of range scans performed on tables that have the CACHE option enabled

table scans (direct read)

64

Number of table scans performed with direct read (bypassing the buffer cache)

table scans (long tables)

64

Long (or conversely short) tables can be defined as tables that do not meet the short table criteria as described in table scans (short tables)

table scans (rowid ranges)

64

During parallel query, the number of table scans conducted with specified ROWID ranges

table scans (short tables)

64

Long (or conversely short) tables can be defined by optimizer hints coming down into the row source access layer of Oracle. The table must have the CACHE option set.

total file opens

8

Total number of file opens performed by the instance. Each process needs a number of files (control file, log file, database file) in order to work against the database.

transaction lock background get time

128

Useful only for internal debugging purposes

transaction lock background gets

128

Useful only for internal debugging purposes

transaction lock foreground requests

128

Useful only for internal debugging purposes

transaction lock foreground wait time

128

Useful only for internal debugging purposes

transaction rollbacks

128

Number of transactions being successfully rolled back

transaction tables consistent read rollbacks

128

Number of times rollback segment headers are rolled back to create consistent read blocks

transaction tables consistent reads - undo records applied

128

Number of undo records applied to transaction tables that have been rolled back for consistent read purposes

Unnecessary process cleanup for SCN batching

32

Total number of times that the process cleanup was performed unnecessarily because the session or process did not get the next batched SCN. The next batched SCN went to another session instead.

user calls

1

Number of user calls such as login, parse, fetch, or execute

When determining activity, the ratio of user calls to RPI calls, give you an indication of how much internal work gets generated as a result of the type of requests the user is sending to Oracle.

user commits

1

Number of user commits. When a user commits a transaction, the redo generated that reflects the changes made to database blocks must be written to disk. Commits often represent the closest thing to a user transaction rate.

user rollbacks

1

Number of times users manually issue the ROLLBACK statement or an error occurs during a user's transactions

write clones created in background

8

Number of times a a background or foreground process clones a CURRENT buffer that is being written. The clone becomes the new, accessible CURRENT buffer, leaving the original buffer (now the clone) to complete writing.

write clones created in foreground

8
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 1 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

1
Initialization Parameters

This chapter contains detailed descriptions of the database initialization parameters and includes the following topics:

  • Uses of Initialization Parameters
  • Parameter Files
  • Changing Parameter Values
  • Reading the Parameter Descriptions
  • Parameter Descriptions
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 1 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

2
Static Data Dictionary Views

This chapter describes data dictionary tables and views. These tables and views are called static, because they change only when a change is made to the data dictionary (for example, when a new table is created or a user is granted new privileges). Oracle also maintains tables that monitor ongoing database activity. These dynamic performance tables are described in Chapter 3, "Dynamic Performance (V$) Views".

Data dictionary tables are not directly accessible, but you can access information in them through data dictionary views. To list the data dictionary views available to you, query the view DICTIONARY.

Many data dictionary tables have three corresponding views:

  • An ALL_ view displays all the information accessible to the current user, including information from the current user's schema as well as information from objects in other schemas, if the current user has access to those objects by way of grants of privileges or roles.
  • A DBA_ view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They can be accessed only by users with the SELECT_ANY_TABLE privilege. (This privilege is assigned to the DBA role when the system is initially installed.)
  • A USER_ view displays all the information from the schema of the current user. No special privileges are required to query these views.

The columns of the ALL_, DBA_, and USER_ views corresponding to a single data dictionary table are usually nearly identical. Therefore, these views are described in full only once in this chapter, at their first occurrence alphabetically, and are listed without full descriptions at their other occurrences.

A number of data dictionary views are relevant only if you are using Oracle Replication. Table 2-1 lists these views.

Table 2-1 Oracle Replication Data Dictionary Views
ALL_ Views | DBA_ Views | USER_ Views
ALL_REPAUDIT_ATTRIBUTE | DBA_REPAUDIT_ATTRIBUTE | USER_REPAUDIT_ATTRIBUTE
ALL_REPAUDIT_COLUMN | DBA_REPAUDIT_COLUMN | USER_REPAUDIT_COLUMN
ALL_REPCAT | DBA_REPCAT | USER_REPCAT
 | DBA_REPCAT_EXCEPTIONS |
ALL_REPCAT_REFRESH_TEMPLATES | DBA_REPCAT_REFRESH_TEMPLATES | USER_REPCAT_REFRESH_TEMPLATES
ALL_REPCAT_TEMPLATE_OBJECTS | DBA_REPCAT_TEMPLATE_OBJECTS | USER_REPCAT_TEMPLATE_OBJECTS
ALL_REPCAT_TEMPLATE_PARMS | DBA_REPCAT_TEMPLATE_PARMS | USER_REPCAT_TEMPLATE_PARMS
ALL_REPCAT_TEMPLATE_SITES | DBA_REPCAT_TEMPLATE_SITES | USER_REPCAT_TEMPLATE_SITES
ALL_REPCAT_USER_AUTHORIZATIONS | DBA_REPCAT_USER_AUTHORIZATIONS | USER_REPCAT_USER_AUTHORIZATIONS
ALL_REPCAT_USER_PARM_VALUES | DBA_REPCAT_USER_PARM_VALUES | USER_REPCAT_USER_PARM_VALUES
ALL_REPCATLOG | DBA_REPCATLOG | USER_REPCATLOG
ALL_REPCOLUMN | DBA_REPCOLUMN | USER_REPCOLUMN
ALL_REPCOLUMN_GROUP | DBA_REPCOLUMN_GROUP | USER_REPCOLUMN_GROUP
ALL_REPCONFLICT | DBA_REPCONFLICT | USER_REPCONFLICT
ALL_REPDDL | DBA_REPDDL | USER_REPDDL
 | DBA_REPEXTENSIONS |
ALL_REPFLAVOR_COLUMNS | DBA_REPFLAVOR_COLUMNS | USER_REPFLAVOR_COLUMNS
ALL_REPFLAVOR_OBJECTS | DBA_REPFLAVOR_OBJECTS | USER_REPFLAVOR_OBJECTS
ALL_REPFLAVORS | DBA_REPFLAVORS | USER_REPFLAVORS
ALL_REPGENERATED | DBA_REPGENERATED | USER_REPGENERATED
ALL_REPGENOBJECTS | DBA_REPGENOBJECTS | USER_REPGENOBJECTS
ALL_REPGROUP | DBA_REPGROUP | USER_REPGROUP
ALL_REPGROUP_PRIVILEGES | DBA_REPGROUP_PRIVILEGES | USER_REPGROUP_PRIVILEGES
ALL_REPGROUPED_COLUMN | DBA_REPGROUPED_COLUMN | USER_REPGROUPED_COLUMN
ALL_REPKEY_COLUMNS | DBA_REPKEY_COLUMNS | USER_REPKEY_COLUMNS
ALL_REPOBJECT | DBA_REPOBJECT | USER_REPOBJECT
ALL_REPPARAMETER_COLUMN | DBA_REPPARAMETER_COLUMN | USER_REPPARAMETER_COLUMN
ALL_REPPRIORITY | DBA_REPPRIORITY | USER_REPPRIORITY
ALL_REPPRIORITY_GROUP | DBA_REPPRIORITY_GROUP | USER_REPPRIORITY_GROUP
ALL_REPPROP | DBA_REPPROP | USER_REPPROP
ALL_REPRESOL_STATS_CONTROL | DBA_REPRESOL_STATS_CONTROL | USER_REPRESOL_STATS_CONTROL
ALL_REPRESOLUTION | DBA_REPRESOLUTION | USER_REPRESOLUTION
ALL_REPRESOLUTION_METHOD | DBA_REPRESOLUTION_METHOD | USER_REPRESOLUTION_METHOD
ALL_REPRESOLUTION_STATISTICS | DBA_REPRESOLUTION_STATISTICS | USER_REPRESOLUTION_STATISTICS
ALL_REPSCHEMA | DBA_REPSCHEMA | USER_REPSCHEMA
ALL_REPSITES | DBA_REPSITES | USER_REPSITES
 | DBA_REPSITES_NEW |

The following are additional Oracle Replication data dictionary views:

DEFCALL | DEFCALLDEST
DEFDEFAULTDEST | DEFERRCOUNT
DEFERROR | DEFLOB
DEFPROPAGATOR | DEFSCHEDULE
DEFTRAN | DEFTRANDEST
See Also:

Oracle9i Replication Management API Reference for information about these views

A number of data dictionary views are relevant only if you are using Oracle Workspace Manager. Table 2-2 lists these views.

Table 2-2 Oracle Workspace Manager Data Dictionary Views
ALL_ Views | DBA_ Views | USER_ Views
ALL_VERSION_HVIEW |  |
ALL_WM_LOCKED_TABLES |  | USER_WM_LOCKED_TABLES
ALL_WM_MODIFIED_TABLES |  | USER_WM_MODIFIED_TABLES
 |  | USER_WM_PRIVS
ALL_WM_RIC_INFO |  | USER_WM_RIC_INFO
ALL_WM_TAB_TRIGGERS |  | USER_WM_TAB_TRIGGERS
ALL_WM_VERSIONED_TABLES |  | USER_WM_VERSIONED_TABLES
ALL_WM_VT_ERRORS |  | USER_WM_VT_ERRORS
ALL_WORKSPACE_PRIVS |  | USER_WORKSPACE_PRIVS
ALL_WORKSPACE_SAVEPOINTS |  | USER_WORKSPACE_SAVEPOINTS
 | DBA_WORKSPACE_SESSIONS |
ALL_WORKSPACES |  | USER_WORKSPACES

The following are additional Oracle Workspace Manager data dictionary views:

ROLE_WM_PRIVS | WM_INSTALLATION
WM_REPLICATION_INFO |
See Also:

Oracle9i Application Developer's Guide - Workspace Manager for information about these views

The following data dictionary views are only available after you create an optional recovery catalog (which contains schemas containing information about backups) for use with Recovery Manager:

RC_ARCHIVED_LOG | RC_BACKUP_CONTROLFILE
RC_BACKUP_CORRUPTION | RC_BACKUP_DATAFILE
RC_BACKUP_PIECE | RC_BACKUP_REDOLOG
RC_BACKUP_SET | RC_BACKUP_SPFILE
RC_CHECKPOINT | RC_CONTROLFILE_COPY
RC_COPY_CORRUPTION | RC_DATABASE
RC_DATABASE_BLOCK_CORRUPTION | RC_DATABASE_INCARNATION
RC_DATAFILE | RC_DATAFILE_COPY
RC_LOG_HISTORY | RC_OFFLINE_RANGE
RC_PROXY_CONTROLFILE | RC_PROXY_DATAFILE
RC_REDO_LOG | RC_REDO_THREAD
RC_RESYNC | RC_RMAN_CONFIGURATION
RC_STORED_SCRIPT | RC_STORED_SCRIPT_LINE
RC_TABLESPACE |
See Also:

Oracle9i Recovery Manager Reference for information about these views

The remainder of this chapter lists the data dictionary views in alphabetical order.

Press the "Next" button to go to the first static data dictionary view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 1 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

3
Dynamic Performance (V$) Views

This chapter describes the dynamic performance views, which are often referred to as V$ views.

About Dynamic Performance Views

Oracle contains a set of underlying views that are maintained by the server and accessible to the database administrator user SYS. These views are called dynamic performance views because they are continuously updated while a database is open and in use, and their contents relate primarily to performance.

Although these views appear to be regular database tables, they are not. These views provide data on internal disk structures and memory structures. You can select from these views, but you can never update or alter them.

Note:
  • You can query the dynamic performance views to extract information from them. However, only simple queries are supported. If sorts, joins, GROUP BY clauses and the like are needed, then you should copy the information from each V$ view into a table (for example, using a CREATE TABLE ... AS SELECT statement), and then query from those tables.
  • Because the information in the V$ views is dynamic, read consistency is not guaranteed for SELECT operations on these views.

The catalog.sql script contains definitions of the views and public synonyms for the dynamic performance views. You must run catalog.sql to create these views and synonyms. After installation, only username SYS or anyone with SYSDBA role has access to the dynamic performance tables.

V$ Views

The actual dynamic performance views are identified by the prefix V_$. Public synonyms for these views have the prefix V$. Database administrators and other users should access only the V$ objects, not the V_$ objects.

The dynamic performance views are used by Enterprise Manager and Oracle Trace, which is the primary interface for accessing information about system performance. After an instance is started, the V$ views that read from memory are accessible. Views that read data from disk require that the database be mounted, and some require that the database be open.

A number of dynamic performance views are relevant only if you are using Oracle Replication. Descriptions of the following Oracle Replication dynamic performance views can be found in the Oracle9i Replication Management API Reference.

  • V$MVREFRESH
  • V$REPLPROP
  • V$REPLQUEUE

GV$ Views

For almost every V$ view described in this chapter, Oracle has a corresponding GV$ (global V$) view. In Oracle9i Real Application Clusters, querying a GV$ view retrieves the V$ view information from all qualified instances. In addition to the V$ information, each GV$ view contains an extra column named INST_ID of datatype NUMBER. The INST_ID column displays the instance number from which the associated V$ view information was obtained. The INST_ID column can be used as a filter to retrieve V$ information from a subset of available instances. For example, the following query retrieves the information from the V$LOCK view on instances 2 and 5:

SELECT * FROM GV$LOCK WHERE INST_ID = 2 OR INST_ID = 5;

In order to query the GV$ views, the value of the PARALLEL_MAX_SERVERS initialization parameter must be greater than zero on all instances mounting the database.

See Also:

Oracle9i Real Application Clusters Concepts

The following sections list the columns and public synonyms for the dynamic performance views.

Press the "Next" button to go to the first dynamic performance view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Database Limits, 1 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

4
Database Limits

This chapter lists the limits of values associated with database functions and objects. Limits exist on several levels in the database. There is usually a hard-coded limit in the database that cannot be exceeded. This value may be further restricted for any given operating system.

Database limits are divided into four categories:

  • Datatype Limits
  • Physical Database Limits
  • Logical Database Limits
  • Process and Runtime Limits

    See Also:

    Your operating system-specific Oracle documentation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


SQL Scripts, 1 of 6

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

5
SQL Scripts

This chapter describes SQL scripts that are required for optimal operation of Oracle.

The SQL scripts are described in the following sections:

  • Creating the Data Dictionary
  • Creating Additional Data Dictionary Structures
  • The "NO" Scripts
  • Database Migration Scripts
  • Java Scripts

    Note:

    Comments within the SQL scripts themselves contain more detailed information and examples.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 2 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Uses of Initialization Parameters

Initialization parameters fall into various functional groups. For example, parameters perform the following functions:

  • Set limits for the entire database
  • Set user or process limits
  • Set limits on database resources
  • Affect performance (these are called variable parameters)

    Variable parameters are of particular interest to database administrators, because these parameters are used primarily to improve database performance.

Database administrators can use initialization parameters to:

  • Optimize performance by adjusting memory structures, such as the number of database buffers in memory
  • Set database-wide defaults, such as the amount of space initially allocated for a context area when it is created
  • Set database limits, such as the maximum number of database users
  • Specify names of files or directories required by the database

Many initialization parameters can be fine-tuned to improve database performance. Other parameters should never be altered or should be altered only under the supervision of Oracle Support Services.

All initialization parameters are optional. Oracle has a default value for each parameter. This value may be operating system-dependent, depending on the parameter.

Types of Initialization Parameters

The Oracle database server has the following types of initialization parameters:

  • Derived Parameters
  • Operating System-Dependent Parameters
  • Variable Parameters (these can be dynamic parameters or any of the preceding ones)

Derived Parameters

Some initialization parameters are derived, meaning that their values are calculated from the values of other parameters. Normally, you should not alter values for derived parameters, but if you do, then the value you specify will override the calculated value.

For example, the default value of the SESSIONS parameter is derived from the value of the PROCESSES parameter. If the value of PROCESSES changes, then the default value of SESSIONS changes as well, unless you override it with a specified value.

Operating System-Dependent Parameters

The valid values or value ranges of some initialization parameters depend upon the host operating system. For example, the parameter DB_BLOCK_BUFFERS indicates the number of data buffers in main memory, and its maximum value depends on the operating system. The size of those buffers, set by DB_BLOCK_SIZE, has an operating system-dependent default value.

See Also:

Your operating system-specific Oracle documentation for more information on operating system-dependent Oracle parameters and operating system parameters

Variable Parameters

The variable initialization parameters offer the most potential for improving system performance. Some variable parameters set capacity limits but do not affect performance. For example, when the value of OPEN_CURSORS is 10, a user process attempting to open its eleventh cursor receives an error. Other variable parameters affect performance but do not impose absolute limits. For example, reducing the value of DB_BLOCK_BUFFERS does not prevent work even though it may slow down performance.

Increasing the values of variable parameters may improve your system's performance, but increasing most parameters also increases the system global area (SGA) size. A larger SGA can improve database performance up to a point. In virtual memory operating systems, an SGA that is too large can degrade performance if it is swapped in and out of memory. Operating system parameters that control virtual memory working areas should be set with the SGA size in mind. The operating system configuration can also limit the maximum size of the SGA.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 3 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Parameter Files

A parameter file is a file that contains a list of initialization parameters and a value for each parameter. You specify initialization parameters in a parameter file that reflect your particular installation. Oracle supports the following two types of parameter files:

  • Server Parameter Files
  • Initialization Parameter Files

Server Parameter Files

A server parameter file is a binary file that acts as a repository for initialization parameters. The server parameter file can reside on the machine where the Oracle database server executes. Initialization parameters stored in a server parameter file are persistent, in that any changes made to the parameters while an instance is running can persist across instance shutdown and startup.

Initialization Parameter Files

An initialization parameter file is a text file that contains a list of initialization parameters. The file should be written in the client's default character set.

The following are sample entries in an initialization parameter file:

PROCESSES = 100
OPEN_LINKS = 12
GLOBAL_NAMES = true

The name of the initialization parameter file varies depending on the operating system. For example, it can be in mixed case or lowercase, or it can have a logical name or a variation of the name init.ora. Also supplied is an initdw.ora file, which contains suggested parameter settings for data warehouses and data marts. The database administrator can choose a different filename for the initialization parameter file.

Refer to your operating system-specific Oracle documentation for the default locations and filenames for initialization parameter files on your operating system. The initialization parameter file is read by the client-side tool used to start the server (such as SQL*Plus).

Sample initialization parameter files are provided on the Oracle distribution medium for each operating system. A sample file is sufficient for initial use, but you will probably want to modify the file to tune the database for best performance. Any changes will take effect after you completely shut down and restart the instance.

Specifying Values in the Initialization Parameter File

This section describes several aspects of setting parameter values in the initialization parameter file.

Rules Governing Parameter Files

The following rules govern the specification of parameters in initialization parameter files:

  • The initialization parameter file should contain only parameters and comments. A pound sign (#) starts a comment line. The rest of the line is ignored.
  • You can specify parameters in any order.
  • Case (upper or lower) in filenames is significant only if case is significant on the host operating system.
  • To enter several parameters on one line, use spaces between parameter names and values, as in the following example:
    PROCESSES = 100 CPU_COUNT = 1 OPEN_CURSORS = 10
  • Some parameters, such as ROLLBACK_SEGMENTS, accept multiple value entries. Enter multiple values enclosed in parentheses and separated by commas. For example:
    ROLLBACK_SEGMENTS = (SEG1, SEG2, SEG3, SEG4, SEG5)

    Alternatively, you can enter multiple values without parentheses and commas. For example:

    ROLLBACK_SEGMENTS = SEG1 SEG2 SEG3 SEG4 SEG5

    Either syntax is valid.

    If you enter values for one parameter in multiple entries, then the entries must be on consecutive lines. If they are not, then the first entry will not be processed properly. For example, in the following entry the setting for SEG3 and SEG4 will override the setting for SEG1 and SEG2:

    ROLLBACK_SEGMENTS = SEG1 SEG2
OPEN_CURSORS = 10
ROLLBACK_SEGMENTS = SEG3 SEG4
  • A backslash (\), also known as an escape character, indicates continuation of the parameter specification. If a backslash continues a line, then the continued line must have no leading spaces. For example:
    ROLLBACK_SEGMENTS = (SEG1, SEG2, \
SEG3, SEG4, SEG5)
  • You can use the IFILE initialization parameter to embed the contents of another initialization parameter file into the current initialization parameter file.
  • Enclose in quotation marks any parameter values that contain spaces or tabs. You can use either single or double quotation marks unless otherwise indicated. For example:
    NLS_TERRITORY = 'CZECH REPUBLIC'
    Note:

    Listing parameters in alphabetical order in the initialization parameter file can help you to find them and can help ensure that each parameter is specified only once.
  • Enclose in quotation marks any parameter value that contains a special character.

    See Also:
    • Your operating system-specific Oracle documentation for more information on initialization parameter files
    • "IFILE"
Using Special Characters in Parameter Values

If a parameter value contains a special character, then the special character must be preceded by a backslash or the entire parameter value must be enclosed in quotation marks. For example, you can specify special characters using either of the following:

DB_DOMAIN = 'JAPAN.ACME#.COM'

DB_DOMAIN = JAPAN.ACME\#.COM

Table 1-1 lists the special characters you can use in initialization parameter files.

Table 1-1 Special Characters in the Initialization Parameter File
Character | Name | Description
# | Number sign | Comment
( | Left parenthesis | Start list of values
) | Right parenthesis | End list of values
" | Double quotation mark | Start or end of quoted string
' | Single quotation mark | Start or end of quoted string
= | Equal sign | Separator of keyword and values
, | Comma | Separator of elements
- | Minus sign | Precedes UNIX-style keywords
\ | Backslash | Escape character

If a special character must be treated literally in the initialization parameter file, then it must either be preceded by the backslash character, or the entire string containing the special character must be enclosed in quotation marks.

Using the Escape Character

As described in "Rules Governing Parameter Files" , the backslash (\) can also signify a line continuation. If the backslash is followed by an alphanumeric character, then the backslash is treated as a normal character in the input. If it is not followed by an alphanumeric character, then the backslash is treated either as a backslash or as a continuation character.

Using Quotation Marks

Quotation marks can be nested in one of two ways. The first method is to double the quotation marks in the nested string. For example:

NLS_DATE_FORMAT = '''Today is'' MM/DD/YYYY'

The second method is to alternate single and double quotation marks. For example:

NLS_DATE_FORMAT = '"Today is" MM/DD/YYYY'
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 4 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Changing Parameter Values

You change the value of a parameter by editing the initialization parameter file. In most cases, the new value takes effect the next time you start an instance of the database. However, you can change the value of some parameters for the duration of the current session, as described in the following section.

Dynamic Parameters

Some initialization parameters are dynamic, that is, they can be modified using the ALTER SESSION or ALTER SYSTEM statements while an instance is running.

Use the following syntax to dynamically alter initialization parameters:

ALTER SESSION SET parameter_name = value
ALTER SYSTEM SET parameter_name = value [DEFERRED]

Whenever a dynamic parameter is modified using the ALTER SYSTEM statement, Oracle records the command that modifies the parameter in the alert log.

The ALTER SESSION statement changes the value of the specified parameter for the duration of the session that invokes the statement. The value of the parameter does not change for other sessions in the instance. The value of the following initialization parameters can be changed with ALTER SESSION:

CURSOR_SHARING | DB_BLOCK_CHECKING
DB_CREATE_FILE_DEST | DB_CREATE_ONLINE_LOG_DEST_n
DB_FILE_MULTIBLOCK_READ_COUNT | FILESYSTEMIO_OPTIONS
GLOBAL_NAMES | HASH_AREA_SIZE
HASH_JOIN_ENABLED | LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_STATE_n | LOG_ARCHIVE_MIN_SUCCEED_DEST
MAX_DUMP_FILE_SIZE | NLS_CALENDAR
NLS_COMP | NLS_CURRENCY
NLS_DATE_FORMAT | NLS_DATE_LANGUAGE
NLS_DUAL_CURRENCY | NLS_ISO_CURRENCY
NLS_LANGUAGE | NLS_NUMERIC_CHARACTERS
NLS_SORT | NLS_TERRITORY
NLS_TIMESTAMP_FORMAT | NLS_TIMESTAMP_TZ_FORMAT
OBJECT_CACHE_MAX_SIZE_PERCENT | OBJECT_CACHE_OPTIMAL_SIZE
OLAP_PAGE_POOL_SIZE | OPTIMIZER_DYNAMIC_SAMPLING
OPTIMIZER_INDEX_CACHING | OPTIMIZER_INDEX_COST_ADJ
OPTIMIZER_MAX_PERMUTATIONS | OPTIMIZER_MODE
ORACLE_TRACE_ENABLE | PARALLEL_INSTANCE_GROUP
PARALLEL_MIN_PERCENT | PARTITION_VIEW_ENABLED
PLSQL_COMPILER_FLAGS | PLSQL_V2_COMPATIBILITY
QUERY_REWRITE_ENABLED | QUERY_REWRITE_INTEGRITY
REMOTE_DEPENDENCIES_MODE | SESSION_CACHED_CURSORS
SORT_AREA_RETAINED_SIZE | SORT_AREA_SIZE
STAR_TRANSFORMATION_ENABLED | STATISTICS_LEVEL
TIMED_OS_STATISTICS | TIMED_STATISTICS
TRACEFILE_IDENTIFIER | UNDO_SUPPRESS_ERRORS
WORKAREA_SIZE_POLICY |

The ALTER SYSTEM statement without the DEFERRED keyword modifies the global value of the parameter for all sessions in the instance, for the duration of the instance (until the database is shut down). The value of the following initialization parameters can be changed with ALTER SYSTEM:

AQ_TM_PROCESSES | ARCHIVE_LAG_TARGET
BACKGROUND_DUMP_DEST | CONTROL_FILE_RECORD_KEEP_TIME
CORE_DUMP_DEST | CURSOR_SHARING
DB_n K_CACHE_SIZE | DB_BLOCK_CHECKING
DB_BLOCK_CHECKSUM | DB_CACHE_ADVICE
DB_CACHE_SIZE | DB_CREATE_FILE_DEST
DB_CREATE_ONLINE_LOG_DEST_n | DB_FILE_MULTIBLOCK_READ_COUNT
DB_KEEP_CACHE_SIZE | DB_RECYCLE_CACHE_SIZE
DG_BROKER_CONFIG_FILE n | DG_BROKER_START
DISPATCHERS | DRS_START
FAL_CLIENT | FAL_SERVER
FAST_START_IO_TARGET | FAST_START_MTTR_TARGET
FAST_START_PARALLEL_ROLLBACK | FILE_MAPPING
FILESYSTEMIO_OPTIONS | FIXED_DATE
GLOBAL_NAMES | HS_AUTOREGISTER
JOB_QUEUE_PROCESSES | LARGE_POOL_SIZE
LICENSE_MAX_SESSIONS | LICENSE_MAX_USERS
LICENSE_SESSIONS_WARNING | LOCAL_LISTENER
LOG_ARCHIVE_DEST | LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_STATE_n | LOG_ARCHIVE_DUPLEX_DEST
LOG_ARCHIVE_MAX_PROCESSES | LOG_ARCHIVE_MIN_SUCCEED_DEST
LOG_ARCHIVE_TRACE | LOG_CHECKPOINTS_TO_ALERT
LOG_CHECKPOINT_INTERVAL | LOG_CHECKPOINT_TIMEOUT
MAX_DUMP_FILE_SIZE | NLS_LENGTH_SEMANTICS
NLS_NCHAR_CONV_EXCP | OPEN_CURSORS
OPTIMIZER_DYNAMIC_SAMPLING | ORACLE_TRACE_ENABLE
PARALLEL_ADAPTIVE_MULTI_USER | PARALLEL_INSTANCE_GROUP
PARALLEL_THREADS_PER_CPU | PGA_AGGREGATE_TARGET
PLSQL_COMPILER_FLAGS | PLSQL_NATIVE_C_COMPILER
PLSQL_NATIVE_LIBRARY_DIR | PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT
PLSQL_NATIVE_LINKER | PLSQL_NATIVE_MAKE_FILE_NAME
PLSQL_NATIVE_MAKE_UTILITY | PLSQL_V2_COMPATIBILITY
QUERY_REWRITE_ENABLED | QUERY_REWRITE_INTEGRITY
REMOTE_DEPENDENCIES_MODE | REMOTE_LISTENER
RESOURCE_LIMIT | RESOURCE_MANAGER_PLAN
SERVICE_NAMES | SHARED_POOL_SIZE
SHARED_SERVERS | STANDBY_ARCHIVE_DEST
STANDBY_FILE_MANAGEMENT | STATISTICS_LEVEL
TIMED_OS_STATISTICS | TIMED_STATISTICS
TRACE_ENABLED | UNDO_RETENTION
UNDO_SUPPRESS_ERRORS | UNDO_TABLESPACE
USER_DUMP_DEST | WORKAREA_SIZE_POLICY

The ALTER SYSTEM ... DEFERRED statement does not modify the global value of the parameter for existing sessions, but the value will be modified for future sessions that connect to the database. The value of the following initialization parameters can be changed with ALTER SYSTEM ... DEFERRED:

BACKUP_TAPE_IO_SLAVES | OBJECT_CACHE_MAX_SIZE_PERCENT
OBJECT_CACHE_OPTIMAL_SIZE | OLAP_PAGE_POOL_SIZE
SORT_AREA_RETAINED_SIZE | SORT_AREA_SIZE
TRANSACTION_AUDITING |

Displaying Current Parameter Values

To see the current settings for initialization parameters, use the following SQL*Plus command:

SQL> SHOW PARAMETERS

This command displays all parameters in alphabetical order, with their current values.

Enter the following text string to display all parameters having BLOCK in their names:

SQL> SHOW PARAMETERS BLOCK

You can use the SPOOL command to write the output to a file.

Parameters You Should Not Specify in the Parameter File

You should not specify the following two types of parameters in your parameter files:

  • Parameters that you never alter except when instructed to do so by Oracle Corporation to resolve a problem
  • Derived parameters, which normally do not need altering because their values are calculated automatically by the Oracle database server

When Parameters Are Set Incorrectly

Some parameters have a minimum setting below which an Oracle instance will not start. For other parameters, setting the value too low or too high may cause Oracle to perform badly, but it will still run. Also, Oracle may convert some values outside the acceptable range to usable levels.

If a parameter value is too low or too high, or you have reached the maximum for some resource, then Oracle returns an error. Frequently, you can wait a short while and retry the operation when the system is not as busy. If a message occurs repeatedly, then you should shut down the instance, adjust the relevant parameter, and restart the instance.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 5 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Reading the Parameter Descriptions

The parameter descriptions in this chapter adhere to the following format.

PARAMETER_NAME

Parameter type

Specifies the type of the parameter:

  • A Boolean parameter accepts either true or false as its value.
  • A string parameter accepts any sequence of characters as its value, subject to the syntax for the parameter.
  • An integer parameter accepts a 4-byte value that can range from 0 to 232-1.
  • A parameter file parameter accepts an initialization parameter file specification as its value.
  • A big integer parameter accepts an 8-byte value that can range from 0 to 264-1. You specify a value for a big integer as an integer together with an optional modifier such as K, M, or G, which respectively denotes kilobytes, megabytes, or gigabytes.

    For example, 1000, 100 KB, 50 MB and 2 GB are valid specifications for big integers.

Syntax

For string and big integer parameters, specifies the valid syntax for specifying the parameter.

Default value

Specifies the value this parameter assumes if not explicitly specified.

Parameter class

Specifies whether the parameter is dynamic or static. If dynamic, then it also specifies whether its value can be changed by an ALTER SESSION or ALTER SYSTEM statement. ALTER SESSION overrides the instance-wide setting of the parameter for the current session only. You can restore the instance-wide setting for that session only by issuing another ALTER SESSION statement. ALTER SYSTEM sets or changes the value of the parameter for all sessions.

Range of values

Specifies the valid range of values that this parameter can assume, shown as a minimum and maximum value. Not applicable to all parameters.

Real Application Clusters

Specifies how the values for this parameter must be specified for multiple instances in a cluster database environment. Not applicable to all parameters.

For each parameter, paragraphs following these details further describe the parameter and the effects of different settings.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 6 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Parameter Descriptions

Descriptions of the individual initialization parameters follow in alphabetical order. Initialization parameter values apply to the entire database, not to an individual user, unless otherwise specified.

Note:

Parameters that have become obsolete are not documented.
See Also:
  • Oracle9i Database Migration for information about obsolete parameters
  • Your system release bulletins or other operating system-specific Oracle documentation

Press the "Next" button to go to the first initialization parameter.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 7 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ACTIVE_INSTANCE_COUNT

Parameter type | Integer
Default value | There is no default value.
Parameter class | Static
Range of values | 1 or >= the number of instances in the cluster. (Values other than 1 have no effect on the active or standby status of any instances.)
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.
Note:

This parameter functions only in a cluster with only two instances.

ACTIVE_INSTANCE_COUNT enables you to designate one instance in a two-instance cluster as the primary instance and the other instance as the secondary instance. This parameter has no functionality in a cluster with more than two instances.

When you set this parameter to 1, the first instance you start up becomes the primary instance and accepts client connections. The second instance starts up as a secondary instance and can accept client connections only if the first instance fails. In such an event, the secondary instance becomes the primary instance.

When the failed instance can once again be started up, it starts up as the secondary instance, and will not accept client connections unless the current primary instance fails.

See Also:

Oracle9i Real Application Clusters Setup and Configuration for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Initialization Parameters, 8 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AQ_TM_PROCESSES

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 10

AQ_TM_PROCESSES enables time monitoring of queue messages. The times can be used in messages that specify delay and expiration properties. Values from 1 to 10 specify the number of queue monitor processes created to monitor the messages. If AQ_TM_PROCESSES is not specified or is set to 0, then the queue monitor is not created.

See Also:

Oracle9i Application Developer's Guide - Advanced Queuing for more information about this parameter and Advanced Queuing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 9 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ARCHIVE_LAG_TARGET

Parameter type | Integer
Default value | 0 (disabled)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 or any integer in [60, 7200]
Real Application Clusters | Multiple instances should use the same value.

ARCHIVE_LAG_TARGET limits the amount of data that can be lost and effectively increases the availability of the standby database by forcing a log switch after a user-specified time period elapses.

A 0 value disables the time-based thread advance feature; otherwise, the value represents the number of seconds. Values larger than 7200 seconds are not of much use in maintaining a reasonable lag in the standby database. The typical, or recommended value is 1800 (30 minutes). Extremely low values can result in frequent log switches, which could degrade performance; such values can also make the archiver process too busy to archive the continuously generated logs.

See Also:

Oracle9i Data Guard Concepts and Administration for more information about criteria for setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 2 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_ALL_TABLES

ALL_ALL_TABLES describes all object tables and relational tables accessible to the current user.

Related Views

  • DBA_ALL_TABLES describes all object tables and relational tables in the database.
  • USER_ALL_TABLES describes all object tables and relational tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table

    TABLESPACE_NAME

    VARCHAR2(30)

    Name of the tablespace containing the table

    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 entry belongs

    PCT_FREE

    NUMBER

    Minimum percentage of free space in a block

    PCT_USED

    NUMBER

    Minimum percentage of used space in a block

    INI_TRANS

    NUMBER

    Initial number of transactions

    MAX_TRANS

    NUMBER

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent in bytes

    NEXT_EXTENT

    NUMBER

    Size of secondary extents in bytes

    MIN_EXTENTS

    NUMBER

    Minimum number of extents allowed in the segment

    MAX_EXTENTS

    NUMBER

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of process freelists allocated in this segment

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated in this segment

    LOGGING

    VARCHAR2(3)

    Logging attribute

    BACKED_UP

    VARCHAR2(1)

    Whether the table has been backed up since the last modification

    NUM_ROWS

    NUMBER

    Number of rows in the table

    BLOCKS

    NUMBER

    Number of used blocks in the table

    EMPTY_BLOCKS

    NUMBER

    Number of empty (never used) blocks in the table

    AVG_SPACE

    NUMBER

    Average available free space in the table

    CHAIN_CNT

    NUMBER

    Number of rows in the table that are chained from one data block to another or that have migrated to a new block, requiring a link to preserve the old rowid. This column is updated only after you analyze the table.

    AVG_ROW_LEN

    NUMBER

    Average row length, including row overhead

    AVG_SPACE_FREELIST_BLOCKS

    NUMBER

    Average freespace of all blocks on a freelist

    NUM_FREELIST_BLOCKS

    NUMBER

    Number of blocks on the freelist

    DEGREE

    VARCHAR2(10)

    Number of threads per instance for scanning the table

    INSTANCES

    VARCHAR2(10)

    Number of instances across which the table is to be scanned

    CACHE

    VARCHAR2(5)

    Whether the cluster is to be cached in the buffer cache (CACHE | NOCACHE)

    TABLE_LOCK

    VARCHAR2(8)

    Whether table locking is enabled or disabled

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this table

    LAST_ANALYZED

    DATE

    Date on which this table was most recently analyzed

    PARTITIONED

    VARCHAR2(3)

    Whether this table is partitioned (YES | NO)

    IOT_TYPE

    VARCHAR2(12)

    If an index-organized table, whether an overflow segment has been specified (OVERFLOW) or not (NULL)

    OBJECT_ID_TYPE

    VARCHAR2(16)

    Whether the object ID is USER-DEFINED or SYSTEM GENERATED

    TABLE_TYPE_OWNER

    VARCHAR2(30)

    If an object table, owner of the type from which the table is created

    TABLE_TYPE

    VARCHAR2(30)

    If an object table, type of the table

    TEMPORARY

    VARCHAR2(1)

    Whether the table is temporary

    SECONDARY

    VARCHAR2(1)

    Whether the table is a secondary object created by the ODCIIndexCreate method of the Oracle9i Data Cartridge to contain the contents of a domain index (Y | N)

    NESTED

    VARCHAR2(3)

    Whether this is a nested table

    BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool for the table

    ROW_MOVEMENT

    VARCHAR2(8)

    If a partitioned table, whether row movement is enabled or disabled

    GLOBAL_STATS

    VARCHAR2(3)

    For partitioned tables, indicates whether statistics were collected by analyzing the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO).

    USER_STATS

    VARCHAR2(3)

    Whether statistics were entered directly by the user

    DURATION

    VARCHAR2(15)

    Indicates the duration of a temporary table:

    SYS$SESSION: the rows are preserved for the duration of the session

    SYS$TRANSACTION: the rows are deleted after COMMIT

    Null for a permanent table

    SKIP_CORRUPT

    VARCHAR2(8)

    Whether Oracle ignores blocks marked corrupt during table and index scans (ENABLED) or raises an error (DISABLED). To enable this feature, run the DBMS_REPAIR.skip_corrupt_blocks procedure.

    MONITORING

    VARCHAR2(3)

    Whether the table has the MONITORING attribute set
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 3 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY

ALL_APPLY displays information about the apply processes that dequeue events from queues accessible to the current user.

Related View

DBA_APPLY displays information about all apply processes in the database.

Column Datatype NULL Description

APPLY_NAME

VARCHAR2(30)

NOT NULL

Name of the apply process

QUEUE_NAME

VARCHAR2(30)

NOT NULL

Name of the queue from which the apply process dequeues

QUEUE_OWNER

VARCHAR2(30)

NOT NULL

Owner of the queue from which the apply process dequeues

APPLY_CAPTURED

VARCHAR2(3)

Indicates whether the apply process applies captured events (YES) or user-enqueued events (NO)

RULE_SET_NAME

VARCHAR2(30)

Rule set used by the apply process for filtering

RULE_SET_OWNER

VARCHAR2(30)

Owner of the rule set

APPLY_USER

VARCHAR2(30)

NOT NULL

User who is applying events

APPLY_DATABASE_LINK

VARCHAR2(128)

Database link to which changes are applied. If null, then changes are applied to the local database.

APPLY_TAG

RAW(2000)

Tag associated with redo log records that are generated when changes are made by the apply process

DDL_HANDLER

VARCHAR2(92)

Name of the user-specified DDL handler, which handles DDL logical change records

MESSAGE_HANDLER

VARCHAR2(92)

Name of the user-specified procedure that handles dequeued events other than logical change records

STATUS

VARCHAR2(8)

Status of the apply process:

  • DISABLED
  • ENABLED
  • ABORTED
See Also:

"DBA_APPLY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 4 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY_CONFLICT_COLUMNS

ALL_APPLY_CONFLICT_COLUMNS displays information about conflict handlers on the tables accessible to the current user.

Related View

DBA_APPLY_CONFLICT_COLUMNS displays information about conflict handlers on all tables in the database.

Column | Datatype | NULL | Description
OBJECT_OWNER | VARCHAR2(30) |  | Owner of the object on which the update conflict handler is defined
OBJECT_NAME | VARCHAR2(30) |  | Name of the object on which the update conflict handler is defined
METHOD_NAME | VARCHAR2(92) |  | Name of the update conflict handler used to resolve conflicts
RESOLUTION_COLUMN | VARCHAR2(4000) |  | Name of the column used to resolve conflicts
COLUMN_NAME | VARCHAR2(30) |  | Name of a column in the column list for the update conflict handler
APPLY_DATABASE_LINK | VARCHAR2(128) |  | Database link to which changes are applied. If null, then changes are applied to the local database.
See Also:

"DBA_APPLY_CONFLICT_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 5 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY_DML_HANDLERS

ALL_APPLY_DML_HANDLERS displays information about the DML handlers on the tables accessible to the current user.

Related View

DBA_APPLY_DML_HANDLERS displays information about the DML handlers on all tables in the database.

Column | Datatype | NULL | Description
OBJECT_OWNER | VARCHAR2(30) |  | Owner of the object on which the DML handler is specified
OBJECT_NAME | VARCHAR2(30) |  | Name of the object on which the DML handler is specified
OPERATION_NAME | VARCHAR2(12) |  | Name of the DML operation for which the DML handler is used
USER_PROCEDURE | VARCHAR2(92) |  | Name of the user-specified DML handler, which handles row logical change records that contain the DML operation in the OPERATION_NAME column on the object
ERROR_HANDLER | VARCHAR2(1) |  | Indicates whether the DML handler handles only the relevant row logical change records that result in apply errors (Y) or all relevant row logical change records (N)
APPLY_DATABASE_LINK | VARCHAR2(128) |  | Database link to which changes are applied. If null, then changes are applied to the local database.
See Also:

"DBA_APPLY_DML_HANDLERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 6 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY_ERROR

ALL_APPLY_ERROR displays information about error transactions generated by the apply processes that dequeue events from queues accessible to the current user.

Related View

DBA_APPLY_ERROR displays information about error transactions generated by all apply processes in the database.

Column | Datatype | NULL | Description
APPLY_NAME | VARCHAR2(30) |  | Name of the apply process at the local database which processed the transaction
QUEUE_NAME | VARCHAR2(30) | NOT NULL | Name of the queue at the local database from which the transaction was dequeued
QUEUE_OWNER | VARCHAR2(30) | NOT NULL | Owner of the queue at the local database from which the transaction was dequeued
LOCAL_TRANSACTION_ID | VARCHAR2(22) |  | Local transaction ID for the error transaction
SOURCE_DATABASE | VARCHAR2(128) |  | Database where the transaction originated
SOURCE_TRANSACTION_ID | VARCHAR2(22) |  | Original transaction ID at the source database
SOURCE_COMMIT_SCN | NUMBER |  | Original commit system change number (SCN) for the transaction at the source database
MESSAGE_NUMBER | NUMBER |  | Identifier for the event in the transaction that raised an error
ERROR_NUMBER | NUMBER |  | Error number of the error raised by the transaction
ERROR_MESSAGE | VARCHAR2(4000) |  | Error message of the error raised by the transaction
RECIPIENT_ID | NUMBER |  | User ID of the original user that applied the transaction
RECIPIENT_NAME | VARCHAR2(30) |  | Name of the original user that applied the transaction
MESSAGE_COUNT | NUMBER |  | Total number of events inside the error transaction
See Also:

"DBA_APPLY_ERROR"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 7 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY_KEY_COLUMNS

ALL_APPLY_KEY_COLUMNS displays information about substitute key columns for the tables accessible to the current user. Substitute key columns are set using the SET_KEY_COLUMNS procedure in the DBMS_APPLY_ADM package.

Related View

DBA_APPLY_KEY_COLUMNS displays information about substitute key columns for all tables in the database.

Column | Datatype | NULL | Description
OBJECT_OWNER | VARCHAR2(30) | NOT NULL | Owner of the object on which substitute key columns are set
OBJECT_NAME | VARCHAR2(30) | NOT NULL | Name of the object on which substitute key columns are set
COLUMN_NAME | VARCHAR2(30) | NOT NULL | Column name of a column specified as a substitute key column
APPLY_DATABASE_LINK | VARCHAR2(128) |  | Database link to which changes are applied. If null, then changes are applied to the local database.
See Also:

"DBA_APPLY_KEY_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 8 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY_PARAMETERS

ALL_APPLY_PARAMETERS displays information about the parameters for the apply processes that dequeue events from queues accessible to the current user.

Related View

DBA_APPLY_PARAMETERS displays information about the parameters for all apply processes in the database.

Column | Datatype | NULL | Description
APPLY_NAME | VARCHAR2(30) | NOT NULL | Name of the apply process
PARAMETER | VARCHAR2(128) | NOT NULL | Name of the parameter
VALUE | VARCHAR2(4000) |  | Parameter value
SET_BY_USER | VARCHAR2(3) |  | Indicates whether the parameter value was set by the user (YES) or was not set by the user (NO). If NO for a parameter, then the parameter is set to its default value. If YES for a parameter, then the parameter may or may not be set to its default value.
See Also:

"DBA_APPLY_PARAMETERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 9 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_APPLY_PROGRESS

ALL_APPLY_PROGRESS displays information about the progress made by the apply processes that dequeue events from queues accessible to the current user. This view only contains information about captured events. It does not contain information about user-enqueued events.

Related View

DBA_APPLY_PROGRESS displays information about the progress made by all apply processes in the database.

Column | Datatype | NULL | Description
APPLY_NAME | VARCHAR2(30) | NOT NULL | Name of the apply process
APPLIED_MESSAGE_NUMBER | NUMBER | NOT NULL | Message number up to which all transactions have definitely been applied. This value is the low-watermark for the apply process. That is, messages with a commit message number less than or equal to this message number have definitely been applied, but some messages with a higher commit message number also may have been applied.
OLDEST_MESSAGE_NUMBER | NUMBER | NOT NULL | Earliest message number of the transactions currently being dequeued and applied
APPLY_TIME | DATE |  | Time at which the message with the message number displayed in the APPLIED_MESSAGE_NUMBER column was applied
APPLIED_MESSAGE_CREATE_TIME | DATE |  | Time at which the message with the message number displayed in the APPLIED_MESSAGE_NUMBER column was created at its source database
See Also:

"DBA_APPLY_PROGRESS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 2 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ACCESS

This view displays objects in the database that are currently locked and the sessions that are accessing them.

Column | Datatype | Description
SID | NUMBER | Session number that is accessing an object
OWNER | VARCHAR2(64) | Owner of the object
OBJECT | VARCHAR2(1000) | Name of the object
TYPE | VARCHAR2(24) | Type identifier for the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 3 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ACTIVE_INSTANCES

This view maps instance names to instance numbers for all instances that have the database currently mounted.

Column | Datatype | Description
INST_NUMBER | NUMBER | The instance number
INST_NAME | VARCHAR2(60) | The instance name
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 4 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ACTIVE_SESS_POOL_MTH

This view displays all available active session pool resource allocation methods.

Column | Datatype | Description
NAME | VARCHAR2(40) | Name of the active session pool resource allocation method
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 5 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$AQ

This view describes statistics for the queues in the database.

Column | Datatype | Description
QID | NUMBER | The unique queue identifier
WAITING | NUMBER | Number of messages in the queue in the state 'WAITING'
READY | NUMBER | Number of messages in the queue in the state 'READY'
EXPIRED | NUMBER | Number of messages in the queue the state 'EXPIRED'
TOTAL_WAIT | NUMBER | Total wait time of all 'READY' messages in the queue
AVERAGE_WAIT | NUMBER | Average wait time of 'READY' messages in the queue
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 6 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ARCHIVE

This view contains information on redo log files in need of archiving. Each row provides information for one thread. This information is also available in V$LOG. Oracle recommends that you use V$LOG.

See Also:

"V$LOG"

Column | Datatype | Description
GROUP# | NUMBER | Log file group number
THREAD# | NUMBER | Log file thread number
SEQUENCE# | NUMBER | Log file sequence number
ISCURRENT | VARCHAR2(3) | This is the current online redo log
CURRENT | VARCHAR2(3) | This column is obsolete and maintained only for compatibility reasons. The value of this column is always equal to the value in ISCURRENT.
FIRST_CHANGE# | NUMBER | First SCN stored in the current log
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 7 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ARCHIVE_DEST

V$ARCHIVE_DEST describes, for the current instance, all the archived redo log destinations, their current value, mode, and status.

Column Datatype Description

DEST_ID

NUMBER

Identifies the log archive destination parameter (1 to 10)

DEST_NAME

VARCHAR2(256)

???

STATUS

VARCHAR2(9)

Identifies the current status of the destination:

  • VALID - Initialized and available
  • INACTIVE - No destination information
  • DEFERRED - Manually disabled by the user
  • ERROR - Error during open or copy
  • DISABLED - Disabled after error
  • BAD PARAM - Parameter has errors
  • ALTERNATE - Destination is in an alternate state
  • FULL - Exceeded quota size for the destination

BINDING

VARCHAR2(9)

Specifies how failure will affect the archival operation:

  • MANDATORY - Successful archival is required
  • OPTIONAL - Successful archival is not required (depends on LOG_ARCHIVE_MIN_SUCCEED_DEST)

NAME_SPACE

VARCHAR2(7)

Identifies the scope of parameter setting:

  • SYSTEM - System definition
  • SESSION - Session definition

TARGET

VARCHAR2(7)

Specifies whether the archive destination is local or remote to the primary database:

  • PRIMARY - local
  • STANDBY - remote

ARCHIVER

VARCHAR2(10)

Identifies the archiver process relative to the database where the query is issued:

  • ARC n
  • FOREGROUND
  • LGWR
  • RFS

SCHEDULE

VARCHAR2(8)

Indicates whether the archival of this destination is INACTIVE, PENDING, ACTIVE, or LATENT

DESTINATION

VARCHAR2(256)

Specifies the location where the archived redo logs are to be archived

LOG_SEQUENCE

NUMBER

Identifies the sequence number of the last archived redo log to be archived

REOPEN_SECS

NUMBER

Identifies the retry time (in seconds) after error

DELAY_MINS

NUMBER

Identifies the delay interval (in minutes) before the archived redo log is automatically applied to a standby database

NET_TIMEOUT

NUMBER

Number of seconds the log writer process will wait for status from the network server of a network operation issued by the log writer process

PROCESS

VARCHAR2(10)

Identifies the archiver process relative to the primary database, even if the query is issued on the standby database:

  • ARC n
  • FOREGROUND
  • LGWR

REGISTER

VARCHAR2(3)

Indicates whether the archived redo log is registered in the remote destination control file. If the archived redo log is registered, it is available to the managed recovery operation:

  • YES
  • NO

FAIL_DATE

DATE

Date and time of last error

FAIL_SEQUENCE

NUMBER

Sequence number of the archived redo log being archived when the last error occurred

FAIL_BLOCK

NUMBER

Block number of the archived redo log being archived when the last error occurred

FAILURE_COUNT

NUMBER

Current number of contiguous archival operation failures that have occurred for the destination

MAX_FAILURE

NUMBER

Allows you to control the number of times log transport services will attempt to re-establish communication and resume archival operations with a failed destination

ERROR

VARCHAR2(256)

Displays the error text

ALTERNATE

VARCHAR2(256)

Alternate destination, if any

DEPENDENCY

VARCHAR2(256)

Dependent archive destination, if any

REMOTE_TEMPLATE

VARCHAR2(256)

Specifies the template to be used to derive the location to be recorded

QUOTA_SIZE

NUMBER

Destination quotas, expressed in bytes

QUOTA_USED

NUMBER

Size of all the archived redo logs currently residing on the specified destination

MOUNTID

NUMBER

Instance mount identifier

TRANSMIT_MODE

VARCHAR2(12)

Specifies network transmission mode:

  • SYNC=PARALLEL
  • SYNC=NOPARALLEL
  • ASYNC

ASYNC_BLOCKS

NUMBER

Number of blocks specified for the ASYNC attribute

AFFIRM

VARCHAR2(3)

Specifies disk I/O mode

TYPE

VARCHAR2(7)

Indicates whether the archived log destination definition is PUBLIC or PRIVATE. Only PUBLIC destinations can be modified at runtime using the ALTER SYSTEM SET or ALTER SESSION SET statements. By default, all archived log destinations are PUBLIC.
See Also:
  • "LOG_ARCHIVE_DEST" and "LOG_ARCHIVE_DEST_n"
  • "LOG_ARCHIVE_DUPLEX_DEST" and "LOG_ARCHIVE_DEST_STATE_n"
  • "STANDBY_ARCHIVE_DEST"
  • "LOG_ARCHIVE_MIN_SUCCEED_DEST"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 8 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ARCHIVE_DEST_STATUS

V$ARCHIVE_DEST_STATUS displays runtime and configuration information for the archived redo log destinations.

Column Datatype Description

DEST_ID

NUMBER

Identifies the log archive destination parameter (1 to 10)

DEST_NAME

VARCHAR2(256)

???

STATUS

VARCHAR2(9)

Identifies the current status of the destination:

  • VALID - Initialized and available
  • INACTIVE - No destination information
  • DEFERRED - Manually disabled by the user
  • ERROR - Error during open or copy
  • DISABLED - Disabled after error
  • BAD PARAM - Parameter has errors
  • ALTERNATE - Destination is in an alternate state
  • FULL - Exceeded quota size for the destination

TYPE

VARCHAR2(14)

Identifies the type of archival destination database:

  • LOCAL - Local to primary database
  • PHYSICAL - Physical standby
  • CROSS-INSTANCE - An instance of the primary

DATABASE_MODE

VARCHAR2(15)

Identifies the current mode of the archival destination database:

  • STARTED - Instance started, not mounted
  • MOUNTED - Mounted
  • MOUNTED-STANDBY - Mounted standby
  • OPEN - Open read/write
  • OPEN_READ-ONLY - Open read-only

RECOVERY_MODE

VARCHAR2(7)

Identifies the current mode of media recovery at the archival destination database

  • IDLE - Managed recovery is not active
  • MANUAL - Manual media recovery active
  • MANAGED - Managed recovery is active

PROTECTION_MODE

VARCHAR2(20)

Indicates whether the database is protected:

  • MAXIMUM PROTECTION
  • MAXIMUM AVAILABILITY
  • RESYNCHRONIZATION
  • MAXIMUM PERFORMANCE
  • UNPROTECTED

DESTINATION

VARCHAR2(256)

Specifies the location where the archived redo logs are to be archived

STANDBY_LOGFILE_COUNT

NUMBER

Indicates the total number of standby redo logs created on the standby database

STANDBY_LOGFILE_ACTIVE

NUMBER

Indicates the total number of standby redo logs on the standby database that are active and contain primary database online redo log information

ARCHIVED_THREAD#

NUMBER

Identifies the thread number of the most recent archived redo log received at the destination

ARCHIVED_SEQ#

NUMBER

Identifies the log sequence number of the most recent archived redo log received at the destination

APPLIED_THREAD#

NUMBER

Identifies the thread number of the most recent applied redo log received at the destination

APPLIED_SEQ#

NUMBER

Identifies the log sequence number of the most recent applied redo log received at the destination

ERROR

VARCHAR2(256)

Displays the error text

SRL

VARCHAR2(3)

Indicates the use of standby redo logfiles on the standby database (YES) or (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 9 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ARCHIVE_GAP

V$ARCHIVE_GAP displays information about archive gaps on a standby database. This view can be used to find out the current archive gap that is blocking recovery.

Column Datatype Description

DEST_ID

NUMBER

Identifies the log archive destination parameter (1 to 10)

DEST_NAME

VARCHAR2(256)

???

STATUS

VARCHAR2(9)

Identifies the current status of the destination:

  • VALID - Initialized and available
  • INACTIVE - No destination information
  • DEFERRED - Manually disabled by the user
  • ERROR - Error during open or copy
  • DISABLED - Disabled after error
  • BAD PARAM - Parameter has errors
  • ALTERNATE - Destination is in an alternate state
  • FULL - Exceeded quota size for the destination

TYPE

VARCHAR2(14)

Identifies the type of archival destination database:

  • LOCAL - Local to primary database
  • PHYSICAL - Physical standby
  • CROSS-INSTANCE - An instance of the primary

DATABASE_MODE

VARCHAR2(15)

Identifies the current mode of the archival destination database:

  • STARTED - Instance started, not mounted
  • MOUNTED - Mounted
  • MOUNTED-STANDBY - Mounted standby
  • OPEN - Open read/write
  • OPEN_READ-ONLY - Open read-only

RECOVERY_MODE

VARCHAR2(7)

Identifies the current mode of media recovery at the archival destination database

  • IDLE - Managed recovery is not active
  • MANUAL - Manual media recovery active
  • MANAGED - Managed recovery is active

PROTECTION_MODE

VARCHAR2(20)

Indicates whether the database is protected:

  • MAXIMUM PROTECTION
  • MAXIMUM AVAILABILITY
  • RESYNCHRONIZATION
  • MAXIMUM PERFORMANCE
  • UNPROTECTED

DESTINATION

VARCHAR2(256)

Specifies the location where the archived redo logs are to be archived

STANDBY_LOGFILE_COUNT

NUMBER

Indicates the total number of standby redo logs created on the standby database

STANDBY_LOGFILE_ACTIVE

NUMBER

Indicates the total number of standby redo logs on the standby database that are active and contain primary database online redo log information

ARCHIVED_THREAD#

NUMBER

Identifies the thread number of the most recent archived redo log received at the destination

ARCHIVED_SEQ#

NUMBER

Identifies the log sequence number of the most recent archived redo log received at the destination

APPLIED_THREAD#

NUMBER

Identifies the thread number of the most recent applied redo log received at the destination

APPLIED_SEQ#

NUMBER

Identifies the log sequence number of the most recent applied redo log received at the destination

ERROR

VARCHAR2(256)

Displays the error text

SRL

VARCHAR2(3)

Indicates the use of standby redo logfiles on the standby database (YES) or (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Database Limits, 2 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Datatype Limits

See Also:

Oracle9i SQL Reference for information on the rules and limitations governing the use of datatypes, naming database objects and parts of objects
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Database Limits, 3 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Physical Database Limits

Item | Type of Limit | Limit Value
Database Block Size | Minimum | 2048 bytes; must be a multiple of operating system physical block size
 | Maximum | Operating system dependent; never more than 32 KB
Database Blocks | Minimum in initial extent of a segment. | 2 blocks
 | Maximum per datafile | Platform dependent; typically 222-1 blocks
Controlfiles | Number of control files | 1 minimum; 2 or more (on separate devices) strongly recommended
 | Size of a control file | Dependent on operating system and database creation options; maximum of 20,000 x (database block size)
Database files | Maximum per tablespace | Operating system dependent; usually 1022
 | Maximum per database | 65533 May be less on some operating systems Limited also by size of database blocks and by the DB_FILES initialization parameter for a particular instance
Database extents | Maximum | 4 GB, regardless of the maximum file size allowed by the operating system
Database file size | Maximum | Operating system dependent. Limited by maximum operating system file size; typically 222 or 4M blocks
MAXEXTENTS | Default value | Derived from tablespace default storage or DB_BLOCK_SIZE initialization parameter
 | Maximum | Unlimited
Redo Log Files | Maximum number of logfiles | Limited by value of MAXLOGFILES parameter in the CREATE DATABASE statement Control file can be resized to allow more entries; ultimately an operating system limit
 | Maximum number of logfiles per group | Unlimited
Redo Log File Size | Minimum size | 50 KB
 | Maximum size | Operating system limit; typically 2 GB
Tablespaces | Maximum number per database | 64 K Number of tablespaces cannot exceed the number of database files, as each tablespace must include at least one file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Database Limits, 4 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Logical Database Limits

Item | Type | Limit
GROUP BY clause | Maximum length | The GROUP BY expression and all of the nondistinct aggregate functions (for example, SUM, AVG) must fit within a single database block.
Indexes | Maximum per table | Unlimited
 | total size of indexed column | 75% of the database block size minus some overhead
Columns | Per table | 1000 columns maximum
 | Per index (or clustered index) | 32 columns maximum
 | Per bitmapped index | 30 columns maximum
Constraints | Maximum per column | Unlimited
Subqueries | Maximum levels of subqueries in a SQL statement | Unlimited in the FROM clause of the top-level query 255 subqueries in the WHERE clause
Partitions | Maximum length of linear partitioning key | 4 KB - overhead
 | Maximum number of columns in partition key | 16 columns
 | Maximum number of partitions allowed per table or index | 64 K-1 partitions
Rollback Segments | Maximum number per database | No limit; limited within a session by the MAX_ROLLBACK_SEGMENTS initialization parameter
Rows | Maximum number per table | Unlimited
SQL Statement Length | Maximum length of statements | 64 K maximum; particular tools may impose lower limits
Stored Packages | Maximum size | PL/SQL and Developer/2000 may have limits on the size of stored procedures they can call. The limits typically range from 2000 to 3000 lines of code. See Also: Your PL/SQL or Developer/2000 documentation for details
Trigger Cascade Limit | Maximum value | Operating system-dependent, typically 32
Users and Roles | Maximum | 2,147,483,638
Tables | Maximum per clustered table | 32 tables
 | Maximum per database | Unlimited
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Database Limits, 5 of 5

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Process and Runtime Limits

Item | Type | Limit
Instances per database | Maximum number of cluster database instances per database | Operating system-dependent
Locks | Row-level | Unlimited
 | Distributed Lock Manager | Operating system dependent
SGA size | Maximum value | Operating system-dependent; typically 2 to 4 GB for 32-bit operating systems, and > 4 GB for 64-bit operating systems
Advanced Queuing Processes | Maximum per instance | 10
Job Queue Processes | Maximum per instance | 1000
I/O Slave Processes | Maximum per background process (DBWR, LGWR, etc.) | 15
 | Maximum per Backup session | 15
Sessions | Maximum per instance | 32 KB; limited by the PROCESSES and SESSIONS initialization parameters
Global Cache Service Processes | Maximum per instance | 10
Shared Servers | Maximum per instance | Unlimited within constraints set by the PROCESSES and SESSIONS initialization parameters, for instance
Dispatchers | Maximum per instance | Unlimited within constraints set by PROCESSES and SESSIONS initialization parameters, for instance
Parallel Execution Slaves | Maximum per instance | Unlimited within constraints set by PROCESSES and SESSIONS initialization parameters, for instance
Backup Sessions | Maximum per instance | Unlimited within constraints set by PROCESSES and SESSIONS initialization parameters, for instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


SQL Scripts, 2 of 6

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Creating the Data Dictionary

When you use the Database Configuration Assistant to create a database, Oracle automatically creates the data dictionary. Thereafter, whenever the database is in operation, Oracle updates the data dictionary in response to every DDL statement.

The data dictionary base tables are the first objects created in any Oracle database. They are created in the SYSTEM tablespace and must remain there. The data dictionary base tables store information about all user-defined objects in the database.

Table 5-1 lists required scripts, which are run automatically when you create a database using the Database Configuration Assistant. They are described here because you might need to run them if you create a database manually, or if you upgrade and subsequently downgrade a database. To run these scripts, you must be connected to Oracle as a user with SYSDBA privileges.

Table 5-1 Creating the Data Dictionary Scripts
Script Name | Needed For | Description
catalog.sql | All databases | Creates the data dictionary and public synonyms for many of its views Grants PUBLIC access to the synonyms
catproc.sql | All databases | Runs all scripts required for, or used with PL/SQL
catclust.sql | Real Application Clusters | Creates Oracle9i Real Application Clusters data dictionary views
See Also:
  • Your operating system-specific Oracle documentation for the exact names and locations of these scripts on your operating system
  • Oracle9i Database Administrator's Guide for more information about creating a database
  • Your release notes and Oracle9i Database Migration to learn when it is necessary to run these scripts
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


SQL Scripts, 3 of 6

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Creating Additional Data Dictionary Structures

Oracle supplies other scripts that create additional structures you can use in managing your database and creating database applications. These scripts are listed in Table 5-2.

See Also:

Your operating system-specific Oracle documentation for the exact names and locations of these scripts on your operating system
Table 5-2 Creating Additional Data Dictionary Structures
Script Name | Needed For | Run By | Description
catblock.sql | Performance management | SYS | Creates views that can dynamically display lock dependency graphs
catexp7.sql | Exporting data to Oracle7 | SYS | Creates the dictionary views needed for the Oracle7 Export utility to export data from Oracle9i in Oracle7 Export file format
caths.sql | Heterogeneous Services | SYS | Installs packages for administering heterogeneous services
catio.sql | Performance management | SYS | Allows I/O to be traced on a table-by-table basis
catoctk.sql | Security | SYS | Creates the Oracle Cryptographic Toolkit package
catqueue.sql | Advanced Queuing |  | Creates the dictionary objects required for Advanced Queuing
catrep.sql | Oracle Replication | SYS | Runs all SQL scripts for enabling database replication
catrman.sql | Recovery Manager | RMAN or any user with GRANT_RECOVERY_CATALOG_OWNER role | Creates recovery manager tables and views (schema) to establish an external recovery catalog for the backup, restore, and recovery functionality provided by the Recovery Manager (RMAN) utility
dbmsiotc.sql | Storage management | Any user | Analyzes chained rows in index-organized tables
dbmsotrc.sql | Performance management | SYS or SYSDBA | Enables and disables generation of Oracle Trace output
dbmspool.sql | Performance management | SYS or SYSDBA | Enables DBA to lock PL/SQL packages, SQL statements, and triggers into the shared pool
userlock.sql | Concurrency control | SYS or SYSDBA | Provides a facility for user-named locks that can be used in a local or clustered environment to aid in sequencing application actions
utlbstat.sql and utlestat.sql | Performance monitoring | SYS | Respectively start and stop collecting performance tuning statistics
utlchn1.sql | Storage management | Any user | For use with Oracle9i. Creates tables for storing the output of the ANALYZE command with the CHAINED ROWS option. Can handle both physical and logical rowids.
utlconst.sql | Year 2000 compliance | Any user | Provides functions to validate that CHECK constraints on date columns are year 2000 compliant
utldtree.sql | Metadata management | Any user | Creates tables and views that show dependencies between objects
utlexpt1.sql | Constraints | Any user | For use with Oracle9i. Creates the default table (EXCEPTIONS) for storing exceptions from enabling constraints. Can handle both physical and logical rowids.
utlip.sql | PL/SQL | SYS | Used primarily for upgrade and downgrade operations. It invalidates all existing PL/SQL modules by altering certain dictionary tables so that subsequent recompilations will occur in the format required by the database. It also reloads the packages STANDARD and DBMS_STANDARD, which are necessary for any PL/SQL compilations.
utlirp.sql | PL/SQL | SYS | Used to change from 32-bit to 64-bit word size or vice versa. This script recompiles existing PL/SQL modules in the format required by the new database. It first alters some data dictionary tables. Then it reloads the packages STANDARD and DBMS_STANDARD, which are necessary for using PL/SQL. Finally, it triggers a recompilation of all PL/SQL modules, such as packages, procedures, and types.
utllockt.sql | Performance monitoring | SYS or SYSDBA | Displays a lock wait-for graph, in tree structure format
utlpwdmg.sql | Security | SYS or SYSDBA | Creates PL/SQL functions for default password complexity verification. Sets the default password profile parameters and enables password management features.
utlrp.sql | PL/SQL | SYS | Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types.
utlsampl.sql | Examples | SYS or any user with DBA role | Creates sample tables, such as emp and dept, and users, such as scott
utlscln.sql | Oracle Replication | Any user | Copies a snapshot schema from another snapshot site
utltkprf.sql | Performance management | SYS | Creates the TKPROFER role to allow the TKPROF profiling utility to be run by non-DBA users
utlvalid.sql | Partitioned tables | Any user | Creates tables required for storing output of ANALYZE TABLE ...VALIDATE STRUCTURE of a partitioned table
utlxplan.sql | Performance management | Any user | Creates the table PLAN_TABLE, which holds output from the EXPLAIN PLAN statement
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


SQL Scripts, 4 of 6

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

The "NO" Scripts

The scripts in Table 5-3 are used to remove dictionary information for various optional services or components.

See Also:

Oracle9i Database Migration for more information about these scripts
Table 5-3 The NO Scripts
Script Name | Needed For | Run By | Description
catnoadt.sql | Objects | SYS | Drops views and synonyms on dictionary metadata that relate to object types
catnoaud.sql | Security | SYS | Drops views and synonyms on auditing metadata
catnohs.sql | Heterogeneous Services | SYS | Removes Heterogeneous Services dictionary metadata
catnoprt.sql | Partitioning | SYS | Drops views and synonyms on dictionary metadata that relate to partitioned tables and indexes
catnoque.sql | Advanced Queuing | SYS | Removes Advanced Queuing dictionary metadata
catnormn.sql | Recovery Manager | Owner of recovery catalog | Removes recovery catalog schema
catnosvm.sql | Server Manager | SYS | Removes Oracle7 Server Manager views and synonyms
catnsnmp.sql | Distributed management | SYS | Drops the DBSNMP user and SNMPAGENT role
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


SQL Scripts, 5 of 6

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Database Migration Scripts

The scripts in Table 5-4 are useful when upgrading or downgrading to another release of Oracle. To run these scripts, you must be connected to Oracle as a user with SYSDBA privileges.

Table 5-4 Database Migration Scripts
Script Name | Needed For | Description
cmpdbmig.SQL | Upgrading components | Runs the database migration scripts for all components that can be upgraded when connected as a user with SYSDBA privileges
d0801070.sql | Downgrading to release 8.1.7 of Oracle | Provides a direct downgrade path from your current release of Oracle to release 8.1.7
d0900010.sql | Downgrading to release 9.0.1 of Oracle | Provides a direct downgrade path from your current release of Oracle to release 9.0.1
u0703040.sql | Upgrading from release 7.3.4 of Oracle | Provides a direct upgrade path from release 7.3.4 of Oracle to the new release
u0800060.sql | Upgrading from release 8.0.6 of Oracle | Provides a direct upgrade path from release 8.0.6 of Oracle to the new release
u0801070.sql | Upgrading from release 8.1.7 of Oracle | Provides a direct upgrade path from release 8.1.7 of Oracle to the new release
u0900010.sql | Upgrading from release 9.0.1 of Oracle | Provides a direct upgrade path from release 9.0.1 of Oracle to the new release
utlincmp.sql | Removing incompatibilities before a downgrade | Contains a set of queries that identify database objects that are incompatible with previous releases of Oracle
See Also:

Oracle9i Database Migration for more information about these scripts
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


SQL Scripts, 6 of 6

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

Java Scripts

The scripts in Table 5-5 are useful only if the JServer option is installed.

See Also:

Oracle9i Java Developer's Guide
Table 5-5 Java Scripts
Script Name | Description
initjvm.sql | Initializes JServer by installing core Java class libraries and Oracle-specific Java classes
rmjvm.sql | Removes all elements of the JServer
catjava.sql | Installs Java-related packages and classes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 10 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AUDIT_FILE_DEST

Parameter type | String
Syntax | AUDIT_FILE_DEST = 'directory'
Default value | ORACLE_HOME/rdbms/audit
Parameter class | Static

AUDIT_FILE_DEST specifies the directory where Oracle stores auditing files.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 11 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AUDIT_SYS_OPERATIONS

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

AUDIT_SYS_OPERATIONS enables or disables the auditing of operations issued by user SYS, and users connecting with SYSDBA or SYSOPER privileges. The audit records are written to the operating system's audit trail.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 12 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AUDIT_TRAIL

Parameter type | String
Syntax | AUDIT_TRAIL = {NONE | FALSE | DB | TRUE | OS}
Default value | There is no default value.
Parameter class | Static

AUDIT_TRAIL enables or disables the automatic writing of rows to the audit trail.

Values:

  • NONE or FALSE

    Audit records are not written.

  • OS

    Enables system-wide auditing and causes audited records to be written to the operating system's audit trail.

  • DB or TRUE

    Enables system-wide auditing and causes audited records to be written to the database audit trail (the SYS.AUD$ table).

You can use the SQL statement AUDIT to set auditing options regardless of the setting of this parameter.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 13 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BACKGROUND_CORE_DUMP

Parameter type | String
Syntax | BACKGROUND_CORE_DUMP = {partial | full}
Default value | partial
Parameter class | Static

BACKGROUND_CORE_DUMP specifies whether Oracle includes the SGA in the core file for Oracle background processes.

Values:

  • partial

    Oracle does not include the SGA in the core dump.

  • full

    Oracle includes the SGA in the core dump.

    See Also:

    "SHADOW_CORE_DUMP"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 14 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BACKGROUND_DUMP_DEST

Parameter type | String
Syntax | BACKGROUND_DUMP_DEST = {pathname | directory}
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid local path, directory, or disk

BACKGROUND_DUMP_DEST specifies the pathname (directory or disc) where debugging trace files for the background processes (LGWR, DBWn, and so on) are written during Oracle operations.

An alert file in the directory specified by BACKGROUND_DUMP_DEST logs significant database events and messages. Anything that affects the database instance or global database is recorded here. The alert file is a normal text file. Its filename is operating system-dependent. For platforms that support multiple instances, it takes the form alert_sid.log, where sid is the system identifier. This file grows slowly, but without limit, so you might want to delete it periodically. You can delete the file even when the database is running.

See Also:
  • Oracle9i Database Administrator's Guide for more information on setting this parameter and on alert files
  • Your operating system-specific Oracle documentation for the default value of this parameter
  • "USER_DUMP_DEST" for information on setting a destination for server process trace files
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 15 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BACKUP_TAPE_IO_SLAVES

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM ... DEFERRED
Range of values | true | false

BACKUP_TAPE_IO_SLAVES specifies whether I/O server processes (also called slaves) are used by the Recovery Manager to back up, copy, or restore data to tape. When the value is set to true, Oracle uses an I/O server process to write to or read from a tape device. When the value is set to false (the default), Oracle does not use I/O server process for backups. Instead, the shadow process engaged in the backup accesses the tape device.

Note:

You cannot perform duplexed backups unless you enable this parameter. Otherwise, Oracle returns an error. When this parameter is enabled, Recovery Manager will configure as many server processes as needed for the number of backup copies requested.
See Also:
  • Oracle9i Recovery Manager User's Guide for more information on duplexed backups
  • "DBWR_IO_SLAVES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 16 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BITMAP_MERGE_AREA_SIZE

Parameter type | Integer
Default value | 1048576 (1 MB)
Parameter class | Static
Range of values | Operating system-dependent
Note:

Oracle does not recommend using the BITMAP_MERGE_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. BITMAP_MERGE_AREA_SIZE is retained for backward compatibility.

BITMAP_MERGE_AREA_SIZE is relevant only for systems containing bitmap indexes. It specifies the amount of memory Oracle uses to merge bitmaps retrieved from a range scan of the index. The default value is 1 MB. A larger value usually improves performance, because the bitmap segments must be sorted before being merged into a single bitmap.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 17 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BLANK_TRIMMING

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

BLANK_TRIMMING specifies the data assignment semantics of character datatypes.

Values:

  • TRUE

    Allows the data assignment of a source character string or variable to a destination character column or variable even though the source length is longer than the destination length. In this case, however, the additional length over the destination length is all blanks. This value complies with the semantics of SQL92 Transitional Level and above.

  • FALSE

    Disallows the data assignment if the source length is longer than the destination length and reverts to SQL92 Entry Level semantics.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 18 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BUFFER_POOL_KEEP

Parameter type | String
Syntax | BUFFER_POOL_KEEP = {integer | (BUFFERS:integer, LRU_LATCHES:integer)} where integer is the number of buffers and, optionally, the number of LRU latches.
Default value | There is no default value.
Parameter class | Static
Note:

This parameter is deprecated in favor of the DB_KEEP_CACHE_SIZE parameter. Oracle recommends that you use DB_KEEP_CACHE_SIZE instead. Also, BUFFER_POOL_KEEP cannot be combined with the new dynamic DB_KEEP_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error. BUFFER_POOL_KEEP is retained for backward compatibility only.

BUFFER_POOL_KEEP lets you save objects in the buffer cache by setting aside a portion of the total number of buffers (the value of the DB_BLOCK_BUFFERS parameter) as a KEEP buffer pool. You can also allocate to the KEEP buffer pool a specified portion of the total number of LRU latches.

The string value can take one of two forms. You can simply specify a buffer count:

BUFFER_POOL_KEEP = 5

Or, you can specify a combination of buffers and LRU latches. Specifying LRU latches is optional:

BUFFER_POOL_KEEP = (BUFFERS:400, LRU_LATCHES:3)

This parameter is most useful in combination with the BUFFER_POOL_RECYCLE parameter.

See Also:
  • "BUFFER_POOL_RECYCLE"
  • Oracle9i Database Performance Tuning Guide and Reference for information on setting these parameters and on using multiple buffer pools
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 19 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

BUFFER_POOL_RECYCLE

Parameter type | String
Syntax | BUFFER_POOL_RECYCLE = {integer | (BUFFERS:integer, LRU_LATCHES:integer)} where integer is the number of buffers and, optionally, the number of LRU latches.
Default value | There is no default value.
Parameter class | Static
Note:

This parameter is deprecated in favor of the DB_RECYCLE_CACHE_SIZE parameter. Oracle recommends that you use DB_RECYCLE_CACHE_SIZE instead. Also, BUFFER_POOL_RECYCLE cannot be combined with the new dynamic DB_RECYCLE_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error. BUFFER_POOL_RECYCLE is retained for backward compatibility only.

BUFFER_POOL_RECYCLE lets you limit the size of objects in the buffer cache by setting aside a portion of the total number of buffers (the value of the DB_BLOCK_BUFFERS parameter) as a RECYCLE buffer pool. You can also allocate to the RECYCLE buffer pool a specified portion of the total number of LRU latches.

The string value can take one of two forms. You can simply specify a buffer count:

BUFFER_POOL_RECYCLE = 5

Or, you can specify a combination of buffers and LRU latches. Specifying LRU latches is optional:

BUFFER_POOL_RECYCLE = (BUFFERS:50, LRU_LATCHES:1)

This parameter is most useful in combination with the BUFFER_POOL_KEEP parameter.

See Also:
  • "BUFFER_POOL_KEEP"
  • Oracle9i Database Performance Tuning Guide and Reference for information on setting these parameters and on using multiple buffer pools
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 20 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CIRCUITS

Parameter type

Integer

Default value

Derived:

  • If you are using shared server architecture, then the value of SESSIONS
  • If you are not using the shared server architecture, then the value is 0

Parameter class

Static

CIRCUITS specifies the total number of virtual circuits that are available for inbound and outbound network sessions. It is one of several parameters that contribute to the total SGA requirements of an instance.

See Also:
  • Oracle9i Database Concepts for more information on memory structures and processes
  • "DB_BLOCK_BUFFERS" and "TRANSACTIONS" , which also contribute to SGA requirements
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 21 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CLUSTER_DATABASE

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false
Real Application Clusters | Multiple instances must have the same value.

CLUSTER_DATABASE is an Oracle9i Real Application Clusters parameter that specifies whether or not Oracle9i Real Application Clusters is enabled.

See Also:

Oracle9i Real Application Clusters Administration
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 22 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CLUSTER_DATABASE_INSTANCES

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | Any nonzero value

CLUSTER_DATABASE_INSTANCES is an Oracle9i Real Application Clusters parameter that specifies the number of instances that are configured as part of your cluster database. You must set this parameter for every instance. Normally you should set this parameter to the number of instances in your Oracle9i Real Application Clusters environment. A proper setting for this parameter can improve memory use.

Oracle uses the value of this parameter to compute the default value of the LARGE_POOL_SIZE parameter when the PARALLEL_AUTOMATIC_TUNING parameter is set to true.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution
  • Oracle9i Real Application Clusters Administration for information on Oracle9i Real Application Clusters
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 23 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CLUSTER_INTERCONNECTS

Parameter type | String
Syntax | CLUSTER_INTERCONNECTS = ifn [: ifn ... ]
Default value | There is no default value.
Parameter class | Static
Range of values | One or more IP addresses, separated by colons

CLUSTER_INTERCONNECTS provides Oracle with information about additional cluster interconnects available for use in Oracle9i Real Application Clusters environments.

The CLUSTER_INTERCONNECTS parameter can be used to override the default interconnect with a preferred cluster traffic network. This parameter is useful in Data Warehouse systems that have reduced availibility requirements and high interconnect bandwidth demands. You can also use CLUSTER_INTERCONNECTS to override the default interconnect chosen by Oracle.

For example, if you are running two instances of Oracle for two databases on the same machine, then you can load balance the interconnect traffic to different physical interconnects. This does not reduce Oracle availability.

See Also:

Oracle9i Real Application Clusters Administration
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 24 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COMMIT_POINT_STRENGTH

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 0 to 255

COMMIT_POINT_STRENGTH is relevant only in distributed database systems. It specifies a value that determines the commit point site in a distributed transaction. The node in the transaction with the highest value for COMMIT_POINT_STRENGTH will be the commit point site.

The commit point site of a database should reflect the amount of critical shared data in the database. For example, a database on a mainframe computer typically shares more data among users than one on a personal computer. Therefore, COMMIT_POINT_STRENGTH should be set to a higher value for the mainframe computer.

The commit point site stores information about the status of transactions. Other computers in a distributed transaction require this information during Oracle's two-phase commit, so it is desirable to have machines that are always available as commit point sites. Therefore, set COMMIT_POINT_STRENGTH to a higher value on your more available machines.

See Also:
  • Oracle9i Database Concepts and Oracle9i Database Administrator's Guide for information on two-phase commit
  • Your operating system-specific Oracle documentation for the default value of this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 25 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COMPATIBLE

Parameter type | String
Syntax | COMPATIBLE = release_number
Default value | 8.1.0
Parameter class | Static
Range of values | Default release to current release
Real Application Clusters | Multiple instances must have the same value.

COMPATIBLE allows you to use a new release, while at the same time guaranteeing backward compatibility with an earlier release. This is helpful if it becomes necessary to revert to the earlier release.

This parameter specifies the release with which the Oracle server must maintain compatibility. It allows you to take advantage of the maintenance improvements of a new release immediately in your production systems without testing the new functionality in your environment. Some features of the current release may be restricted.

When using the standby database feature, this parameter must have the same value on the primary and standby databases, and the value must be 7.3.0.0.0 or higher. The default value is the earliest release with which compatibility can be guaranteed.

The value of COMPATIBLE must be set to 8.1.0 or higher in order to use stored columns of UROWID type. You can use ROWID pseudo columns for index-organized tables regardless of the parameter setting.

See Also:

Oracle9i Database Migration for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 26 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CONTROL_FILE_RECORD_KEEP_TIME

Parameter type | Integer
Default value | 7 (days)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 365 (days)

CONTROL_FILE_RECORD_KEEP_TIME specifies the minimum number of days before a reusable record in the control file can be reused. In the event a new record needs to be added to a reusable section and the oldest record has not aged enough, the record section expands. If this parameter is set to 0, then reusable sections never expand, and records are reused as needed.

Note:

This parameter applies only to records in the control file that are circularly reusable (such as archive log records and various backup records). It does not apply to records such as datafile, tablespace, and redo thread records, which are never reused unless the corresponding object is dropped from the tablespace.
See Also:
  • "CONTROL_FILES"
  • Oracle9i Database Concepts
  • Oracle9i User-Managed Backup and Recovery Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 27 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CONTROL_FILES

Parameter type | String
Syntax | CONTROL_FILES = filename [, filename [...] ] Note: The control file name can be an OMF (Oracle Managed Files) name. This occurs when the control file is re-created using the CREATE CONTROLFILE REUSE statement.
Default value | Operating system-dependent
Parameter class | Static
Range of values | 1 to 8 filenames
Real Application Clusters | Multiple instances must have the same value.

Every database has a control file, which contains entries that describe the structure of the database (such as its name, the timestamp of its creation, and the names and locations of its datafiles and redo files). CONTROL_FILES specifies one or more names of control files, separated by commas.

Oracle Corporation recommends that you multiplex multiple control files on different devices or mirror the file at the operating system level.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference
  • Oracle9i Database Administrator's Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 28 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CORE_DUMP_DEST

Parameter type | String
Syntax | CORE_DUMP_DEST = directory
Default value | ORACLE_HOME/DBS
Parameter class | Dynamic: ALTER SYSTEM

CORE_DUMP_DEST is primarily a UNIX parameter and may not be supported on your platform. It specifies the directory where Oracle dumps core files.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 29 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CPU_COUNT

Parameter type | Integer
Default value | Set automatically by Oracle
Parameter class | Static
Range of values | 0 to unlimited
Caution:

On most platforms, Oracle automatically sets the value of CPU_COUNT to the number of CPUs available to your Oracle instance. Do not change the value of CPU_COUNT.

CPU_COUNT specifies the number of CPUs available to Oracle. On single-CPU computers, the value of CPU_COUNT is 1.

See Also:

Your operating system-specific Oracle documentation for more information about this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 30 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CREATE_BITMAP_AREA_SIZE

Parameter type | Integer
Default value | 8388608 (8 MB)
Parameter class | Static
Range of values | Operating system-dependent
Note:

Oracle does not recommend using the CREATE_BITMAP_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. CREATE_BITMAP_AREA_SIZE is retained for backward compatibility.

CREATE_BITMAP_AREA_SIZE is relevant only for systems containing bitmap indexes. It specifies the amount of memory (in bytes) allocated for bitmap creation. The default value is 8 MB. A larger value may speed up index creation.

Cardinality is the number of unique values in a column in relation to the number of rows in the table. If cardinality is very small, you can set a small value for this parameter. For example, if cardinality is only 2, then the value can be on the order of kilobytes rather than megabytes. As a general rule, the higher the cardinality, the more memory is needed for optimal performance.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on using bitmap indexes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 31 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CURSOR_SHARING

Parameter type | String
Syntax | CURSOR_SHARING = {SIMILAR | EXACT | FORCE}
Default value | EXACT
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

CURSOR_SHARING determines what kind of SQL statements can share the same cursors.

Values:

  • FORCE

    Forces statements that may differ in some literals, but are otherwise identical, to share a cursor, unless the literals affect the meaning of the statement.

  • SIMILAR

    Causes statements that may differ in some literals, but are otherwise identical, to share a cursor, unless the literals affect either the meaning of the statement or the degree to which the plan is optimized.

  • EXACT

    Only allows statements with identical text to share the same cursor.

    Note:

    Forcing cursor sharing among similar (but not identical) statements can have unexpected results in some DSS applications, or applications that use stored outlines.
    See Also:

    Oracle9i Database Performance Tuning Guide and Reference for information on setting this parameter in these and other environments
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 32 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CURSOR_SPACE_FOR_TIME

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

CURSOR_SPACE_FOR_TIME lets you use more space for cursors in order to save time. It affects both the shared SQL area and the client's private SQL area.

Values:

  • TRUE

    Shared SQL areas are kept pinned in the shared pool. As a result, shared SQL areas are not aged out of the pool as long as an open cursor references them. Because each active cursor's SQL area is present in memory, execution is faster. However, the shared SQL areas never leave memory while they are in use. Therefore, you should set this parameter to TRUE only when the shared pool is large enough to hold all open cursors simultaneously.

    In addition, a setting of TRUE retains the private SQL area allocated for each cursor between executions instead of discarding it after cursor execution, saving cursor allocation and initialization time

  • FALSE

    Shared SQL areas can be deallocated from the library cache to make room for new SQL statements.

    Note:

    If this parameter is set to TRUE, the SERIAL_REUSE parameter is disabled.
    See Also:
    • Oracle9i Database Concepts and Oracle9i Database Performance Tuning Guide and Reference
    • "SERIAL _REUSE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 33 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_nK_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_[2 | 4 | 8 | 16 | 32]K_CACHE_SIZE = integer [K | M | G]
Default value | 0 (additional block size caches are not configured by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

DB_nK_CACHE_SIZE (where n = 2, 4, 8, 16, 32) specifies the size of the cache for the n K buffers. You can set this parameter only when DB_BLOCK_SIZE has a value other than n K. For example, if DB_BLOCK_SIZE=4096, then it is illegal to specify the parameter DB_4K_CACHE_SIZE (because the size for the 4 KB block cache is already specified by DB_CACHE_SIZE).

Do not set this parameter to zero if there are any online tablespaces with an n K block size.

Platform-specific block size restrictions apply. For example, you cannot set DB_32K_CACHE_SIZE if the maximum block size on the platform is less than 32 KB. Also, you cannot set DB_2K_CACHE_SIZE if the minimum block size is greater than 2 KB.

See Also:

For more information on block size restrictions, see your platform specific documentation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 34 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_BLOCK_BUFFERS

Parameter type | Integer
Default value | Derived: 48 MB / DB_BLOCK_SIZE
Parameter class | Static
Range of values | 50 to an operating system-specific maximum
Real Application Clusters | Multiple instances can have different values, and you can change the values as needed.
Note:

This parameter is deprecated in favor of the DB_CACHE_SIZE parameter. Oracle recommends that you use DB_CACHE_SIZE instead. Also, DB_BLOCK_BUFFERS cannot be combined with the new dynamic DB_CACHE_SIZE parameter; combining these parameters in the same parameter file will produce an error. DB_BLOCK_BUFFERS is retained for backward compatibility.

DB_BLOCK_BUFFERS specifies the number of database buffers in the buffer cache. It is one of several parameters that contribute to the total memory requirements of the SGA of an instance.

This parameter, together with DB_BLOCK_SIZE, determines the total size of the buffer cache. Effective use of the buffer cache can greatly reduce the I/O load on the database. DB_BLOCK_SIZE can be specified only when the database is first created, so you use DB_BLOCK_BUFFERS to control the size of the buffer cache.

The buffers for the "keep" buffer pool and the "recycle" buffer pool come out of the buffer cache. In addition, each LRU list in the buffer cache must have at least 50 buffers. Therefore, if you specify BUFFER_POOL_KEEP and BUFFER_POOL_RECYCLE, be sure the value of DB_BLOCK_BUFFERS conforms to the following formula:

DB_BLOCK_BUFFERS > #_buffers_in_"keep"_buffer_pool
                 + #_BUFFERS_IN_"recycle"_buffer_pool
                 + 50*(DB_BLOCK_LRU_LATCHES
                       - #_lru_latches_in_"keep"_buffer_pool
                       - #_lru_latches_in_"recycle"_buffer_pool)

If you did not specify any LRU latches in BUFFER_POOL_KEEP and BUFFER_POOL_RECYCLE, then the values default to 1.

This parameter affects the probability of data block pinging when Oracle9i Real Application Clusters are enabled: the more buffers, the greater the chance of pinging.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference, "BUFFER_POOL_KEEP" , and "BUFFER_POOL_RECYCLE" for more information on setting this parameter
  • Oracle9i Real Application Clusters Concepts for more information on data block pinging
  • Your operating system-specific Oracle documentation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 35 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_BLOCK_CHECKING

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

DB_BLOCK_CHECKING controls whether Oracle performs block checking for data blocks. When this parameter is set to true, Oracle performs block checking for all data blocks. When it is set to false, Oracle does not perform block checking for blocks in the user tablespaces. However, block checking for the SYSTEM tablespace is always turned on.

Oracle checks a block by going through the data on the block, making sure it is self-consistent. Block checking can often prevent memory and data corruption. Block checking typically causes 1% to 10% overhead, depending on workload. The more updates or inserts in a workload, the more expensive it is to turn on block checking. You should set DB_BLOCK_CHECKING to true if the performance overhead is acceptable.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 36 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_BLOCK_CHECKSUM

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

DB_BLOCK_CHECKSUM determines whether DBWn and the direct loader will calculate a checksum (a number calculated from all the bytes stored in the block) and store it in the cache header of every data block when writing it to disk. Checksums are verified when a block is read-only if this parameter is true and the last write of the block stored a checksum. In addition, Oracle gives every log block a checksum before writing it to the current log.

If this parameter is set to false, DBWn calculates checksums only for the SYSTEM tablespace, but not for user tablespaces.

Checksums allow Oracle to detect corruption caused by underlying disks, storage systems, or I/O systems. Turning on this feature typically causes only an additional 1% to 2% overhead. Therefore, Oracle Corporation recommends that you set DB_BLOCK_CHECKSUM to true.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 37 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_BLOCK_SIZE

Parameter type | Integer
Default value | 2048
Parameter class | Static
Range of values | 2048 to 32768, but your operating system may have a narrower range
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.
Caution:

Set this parameter at the time of database creation. Do not alter it afterward.

DB_BLOCK_SIZE specifies the size (in bytes) of Oracle database blocks. Typical values are 2048 and 4096. The value for DB_BLOCK_SIZE in effect at the time you create the database determines the size of the blocks. The value must remain set to its initial value.

If you are using Oracle9i Real Application Clusters, then this parameter affects the maximum value of the FREELISTS storage parameter for tables and indexes. Oracle uses one database block for each freelist group. Decision support system (DSS) and data warehouse database environments tend to benefit from larger block size values.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference and Oracle9i Database Administrator's Guide for information on setting this parameter
  • Oracle9i SQL Reference for information on freelist groups
  • Oracle9i Database Performance Tuning Guide and Reference for more information on the DSS and data warehouse environments
  • Oracle9i Database Concepts for general information on block sizes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 38 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_CACHE_ADVICE

Parameter type | String
Syntax | DB_CACHE_ADVICE = {ON | READY | OFF}
Default value | If STATISTICS_LEVEL is set to TYPICAL or ALL, then ON If STATISTICS_LEVEL is set to BASIC, then OFF
Parameter class | Dynamic: ALTER SYSTEM

DB_CACHE_ADVICE enables or disables statistics gathering used for predicting behavior with different cache sizes through the V$DB_CACHE_ADVICE performance view.

Values:

  • OFF

    Advisory is turned off and the memory for the advisory is not allocated.

  • READY

    Advisory is turned off but the memory for the advisory remains allocated. Allocating the memory before the advisory is actually turned on avoids the risk of an error when you switch the parameter to ON.

    If the parameter is switched to this state from ON, the contents of the view are preserved and the memory for the advisory is retained.

    If the parameter is switched to this state from OFF, you may get an error.

  • ON

    Advisory is turned on. CPU and memory overheads are incurred. Attempting to set the parameter to this state when it is already in the OFF state may result in an error. Otherwise, the view (V$DB_CACHE_ADVICE) is reset and statistics are gathered to the newly refreshed view.

    If the parameter is in the READY state, you can set it to ON without any errors because the memory is already allocated. The view is reset and statistics are displayed in the newly refreshed view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 39 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_CACHE_SIZE = integer [K | M | G]
Default value | 48 MB, rounded up to the nearest granule size
Parameter class | Dynamic: ALTER SYSTEM

DB_CACHE_SIZE specifies the size of the DEFAULT buffer pool for buffers with the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).

The value must be at least the size of one granule (smaller values are automatically rounded up to the granule size). A value of zero is illegal because zero is the size of the DEFAULT pool for the standard block size, which is the block size for the SYSTEM tablespace.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 40 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_CREATE_FILE_DEST

Parameter type | String
Syntax | DB_CREATE_FILE_DEST = directory
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

DB_CREATE_FILE_DEST sets the default location for Oracle-managed datafiles. This location is also used as the default for Oracle-managed control files and online redo logs if DB_CREATE_ONLINE_LOG_DEST_n is not specified.

You can specify a file system directory as the default location for the creation of datafiles, control files, and online redo logs. However, the directory must already exist; Oracle does not create it. The directory must have appropriate permissions that allow Oracle to create files in it. Oracle generates unique names for the files, and a file thus created is an Oracle-managed file.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 41 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_CREATE_ONLINE_LOG_DEST_n

Parameter type | String
Syntax | DB_CREATE_ONLINE_LOG_DEST_[1 | 2 | 3 | 4 | 5] = directory
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

DB_CREATE_ONLINE_LOG_DEST_n (where n = 1, 2, 3, ... 5) sets the default location for Oracle-managed control files and online redo logs.

You should specify at least two parameters: DB_CREATE_ONLINE_LOG_DEST_1 and DB_CREATE_ONLINE_LOG_DEST_2. This provides greater fault tolerance for the logs if one of the destinations should fail.

If more than one directory is specified, then the control file or online redo log is multiplexed across the directories. One member of each online redo log is created in each directory, and one control file is created in each directory.

The directory must already exist; Oracle does not create it. The directory must have appropriate permissions that allow Oracle to create files in it. Oracle generates unique names for the files, and a file thus created is an Oracle-managed file.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 42 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_DOMAIN

Parameter type | String
Syntax | DB_DOMAIN = domain_name
Default value | There is no default value.
Parameter class | Static
Range of values | Any legal string of name components, separated by periods and up to 128 characters long (including the periods). This value cannot be NULL.
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

In a distributed database system, DB_DOMAIN specifies the logical location of the database within the network structure. You should set this parameter if this database is or ever will be part of a distributed system. The value consists of the extension components of a global database name, consisting of valid identifiers, separated by periods. Oracle Corporation recommends that you specify DB_DOMAIN as a unique string for all databases in a domain.

This parameter allows one department to create a database without worrying that it might have the same name as a database created by another department. If one sales department's DB_DOMAIN is JAPAN.ACME.COM, then their SALES database (SALES.JAPAN.ACME.COM) is uniquely distinguished from another database with DB_NAME = SALES but with DB_DOMAIN = US.ACME.COM.

If you omit the domains from the name of a database link, Oracle expands the name by qualifying the database with the domain of your local database as it currently exists in the data dictionary, and then stores the link name in the data dictionary. The characters valid in a database domain name are: alphanumeric characters, underscore (_), and number sign (#).

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • The data dictionary view "GLOBAL_NAME"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 43 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_FILE_MULTIBLOCK_READ_COUNT

Parameter type | Integer
Default value | 8
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | Operating system-dependent

DB_FILE_MULTIBLOCK_READ_COUNT is one of the parameters you can use to minimize I/O during table scans. It specifies the maximum number of blocks read in one I/O operation during a sequential scan. The total number of I/Os needed to perform a full table scan depends on such factors as the size of the table, the multiblock read count, and whether parallel execution is being utilized for the operation.

Online transaction processing (OLTP) and batch environments typically have values in the range of 4 to 16 for this parameter. DSS and data warehouse environments tend to benefit most from maximizing the value of this parameter. The optimizer is more likely to choose a full table scan over an index if the value of this parameter is high.

The maximum value is always less than the operating system's maximum I/O size expressed as Oracle blocks ((max I/O size)/DB_BLOCK_SIZE). If you set this parameter to a value greater than the maximum, Oracle uses the maximum.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Your operating system-specific Oracle documentation for the default value of this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 44 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_FILE_NAME_CONVERT

Parameter type

String

Syntax

DB_FILE_NAME_CONVERT = [(]'string1' , 'string2' , 'string3' , 'string4' , ...[)]

Where:

  • string1 is the pattern of the primary database filename
  • string2 is the pattern of the standby database filename
  • string3 is the pattern of the primary database filename
  • string4 is the pattern of the standby database filename

You can use as many pairs of primary and standby replacement strings as required. You can use single or double quotation marks. The parentheses are optional.

Following are example settings that are acceptable:

DB_FILE_NAME_CONVERT = ('/dbs/t1/','/dbs/t1/s_','dbs/t2/ ','dbs/t2/s_')

Default value

None

Parameter class

Static

DB_FILE_NAME_CONVERT is useful for creating a duplicate database for recovery purposes. It converts the filename of a new datafile on the primary database to a filename on the standby database. If you add a datafile to the primary database, you must add a corresponding file to the standby database. When the standby database is updated, this parameter converts the datafile name on the primary database to the datafile name on the standby database. The file on the standby database must exist and be writable, or the recovery process will halt with an error.

If you specify an odd number of strings (the last string has no corresponding replacement string), an error is signalled during startup. If the filename being converted matches more than one pattern in the pattern/replace string list, the first matched pattern takes effect. There is no limit on the number of pairs that you can specify in this parameter (other than the hard limit of the maximum length of multivalue parameters).

Set the value of this parameter to two strings. The first string is the pattern found in the datafile names on the primary database. The second string is the pattern found in the datafile names on the standby database.

You can also use DB_FILE_NAME_CONVERT to rename the datafiles in the clone controlfile when setting up a clone database during tablespace point-in-time recovery.

See Also:
  • Oracle9i User-Managed Backup and Recovery Guide
  • Oracle9i Data Guard Concepts and Administration
  • Oracle9i Recovery Manager User's Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 45 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_FILES

Parameter type | Integer
Default value | 200
Parameter class | Static
Range of values | Minimum: the largest among the absolute file numbers of the datafiles in the database Maximum: operating system-dependent
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

DB_FILES specifies the maximum number of database files that can be opened for this database. The maximum valid value is the maximum number of files, subject to operating system constraint, that will ever be specified for the database, including files to be added by ADD DATAFILE statements.

If you increase the value of DB_FILES, then you must shut down and restart all instances accessing the database before the new value can take effect. If you have a primary and standby database, then they should have the same value for this parameter.

See Also:
  • Oracle9i Real Application Clusters Administration for information on setting this parameter in an Oracle9i Real Application Clusters environment
  • Your operating system-specific Oracle documentation for the default value of this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 46 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_KEEP_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_KEEP_CACHE_SIZE = integer [K | M | G]
Default value | 0 (KEEP cache is not configured by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

DB_KEEP_CACHE_SIZE specifies the size of the KEEP buffer pool. The size of the buffers in the KEEP buffer pool is the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 47 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_NAME

Parameter type | String
Syntax | DB_NAME = database_name
Default value | There is no default value.
Parameter class | Static
Real Application Clusters | You must set this parameter for every instance. Multiple instances must have the same value, or the same value must be specified in the STARTUP OPEN SQL*Plus statement or the ALTER DATABASE MOUNT SQL statement.

DB_NAME specifies a database identifier of up to 8 characters. If specified, it must correspond to the name specified in the CREATE DATABASE statement. Although the use of DB_NAME is optional, you should generally set it before issuing the CREATE DATABASE statement, and then reference it in that statement.

If you have multiple databases, the value of this parameter should match the Oracle instance identifier of each one to avoid confusion with other databases running on the system. The value of DB_NAME should be the same in both the standby and production initialization parameter files.

If you do not specify this parameter, you must specify a database name in either the STARTUP command or the ALTER DATABASE ... MOUNT statement for each instance of the cluster database.

The following characters are valid in a database name: alphanumeric characters, underscore (_), number sign (#), and dollar sign ($). No other characters are valid. Oracle removes double quotation marks before processing the database name. Therefore you cannot use double quotation marks to embed other characters in the name. The database name is case insensitive.

See Also:

Oracle9i Database Administrator's Guide and Oracle9i Real Application Clusters Administration for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 48 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_RECYCLE_CACHE_SIZE

Parameter type | Big integer
Syntax | DB_RECYCLE_CACHE_SIZE = integer [K | M | G]
Default value | 0 (RECYCLE cache is not configured by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

DB_RECYCLE_CACHE_SIZE specifies the size of the RECYCLE buffer pool. The size of the buffers in the RECYCLE pool is the primary block size (the block size defined by the DB_BLOCK_SIZE parameter).

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 49 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DB_WRITER_PROCESSES

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 1 to 20

DB_WRITER_PROCESSES is useful for systems that modify data heavily. It specifies the initial number of database writer processes for an instance.

See Also:
  • Oracle9i Database Concepts for more information on the database writer processes
  • Oracle9i Database Performance Tuning Guide and Reference for information on setting the DBWn parameters
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 50 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBLINK_ENCRYPT_LOGIN

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

When you attempt to connect to a database using a password, Oracle encrypts the password before sending it to the database. DBLINK_ENCRYPT_LOGIN specifies whether or not attempts to connect to other Oracle servers through database links should use encrypted passwords.

Values:

  • TRUE

    When a connection fails Oracle does not reattempt the connection.

  • FALSE

    When a connection fails Oracle reattempts the connection using an unencrypted version of the password.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 51 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBWR_IO_SLAVES

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to operating system-dependent

DBWR_IO_SLAVES is relevant only on systems with only one database writer process (DBW0). It specifies the number of I/O server processes used by the DBW0 process. The DBW0 process and its server processes always write to disk. By default, the value is 0 and I/O server processes are not used.

If you set DBWR_IO_SLAVES to a nonzero value, the number of I/O server processes used by the ARCH and LGWR processes is set to 4. However, the number of I/O server processes used by Recovery Manager is set to 4 only if asynchronous I/O is disabled (either your platform does not support asynchronous I/O or disk_asynch_io is set to false.

Typically, I/O server processes are used to simulate asynchronous I/O on platforms that do not support asynchronous I/O or that implement it inefficiently. However, you can use I/O server processes even when asynchronous I/O is being used. In that case the I/O server processes will use asynchronous I/O.

I/O server processes are also useful in database environments with very large I/O throughput, even if asynchronous I/O is enabled.

See Also:

"BACKUP_TAPE_IO_SLAVES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 52 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DG_BROKER_CONFIG_FILEn

Parameter type | String
Syntax | DG_BROKER_CONFIG_FILE[1 | 2] = filename
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SYSTEM
Range of values | One filename

DG_BROKER_CONFIG_FILEn (where n = 1, 2) specifies the names for the Data Guard broker configuration files.

Every database that is part of a Data Guard broker configuration has two broker configuration files, which contain entries that describe the state and properties of the configuration (such as the sites and databases that are part of the configuration, the roles and properties of each of the databases, and the state of each of the elements of the configuration). Two files are provided so as to always maintain the last known good state of the configuration.

If DG_BROKER_CONFIG_FILE n is not explicitly defined, then it is set to an operating system-specific default value at instance startup. The parameter can only be altered when the DMON (Data Guard broker) process is not running.

See Also:

Oracle9i Data Guard Broker for more information about setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 53 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DG_BROKER_START

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

DG_BROKER_START enables Oracle to determine whether or not the DMON (Data Guard broker) process should be started. DMON is a non-fatal Oracle background process and exists as long as the instance exists, whenever this parameter is set to true.

If the site is never going to be configured in a Data Guard broker configuration, then you can leave the parameter unspecified and accept the default value of false. If the site is part of a Data Guard broker configuration, then automatic startup of the DRMON process is simplified by setting DG_BROKER_START to true in the initialization parameter file.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 54 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DISK_ASYNCH_IO

Parameter type | Boolean
Default value | true
Parameter class | Static
Range of values | true | false

DISK_ASYNCH_IO controls whether I/O to datafiles, control files, and logfiles is asynchronous (that is, whether parallel server processes can overlap I/O requests with CPU processing during table scans). If your platform supports asynchronous I/O to disk, Oracle Corporation recommends that you leave this parameter set to its default value. However, if the asynchronous I/O implementation is not stable, you can set this parameter to false to disable asynchronous I/O. If your platform does not support asynchronous I/O to disk, this parameter has no effect.

If you set DISK_ASYNCH_IO to false, then you should also set DBWR_IO_SLAVES to a value other than its default of zero in order to simulate asynchronous I/O.

See Also:
  • "DBWR_IO_SLAVES"
  • Oracle9i Database Performance Tuning Guide and Reference for more information on asynchronous I/O and on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 55 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DISPATCHERS

Parameter type | String
Syntax | DISPATCHERS = 'dispatch_clause'
 | dispatch_clause::= (PROTOCOL = protocol) | (ADDRESS = address) | (DESCRIPTION = description ) [options_clause]
 | options_clause::= (DISPATCHERS = integer | SESSIONS = integer | CONNECTIONS = integer | TICKS = seconds | POOL = {1 | ON | YES | TRUE | BOTH | ({IN | OUT} = ticks) | 0 | OFF | NO | FALSE | ticks} | MULTIPLEX = {1 | ON | YES | TRUE | 0 | OFF | NO | FALSE | BOTH | IN | OUT} | LISTENER = tnsname | SERVICE = service | INDEX = integer)
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

DISPATCHERS configures dispatcher processes in the shared server architecture. The parsing software supports a name-value syntax to enable the specification of attributes in a position-independent case-insensitive manner. For example:

DISPATCHERS = "(PROTOCOL=TCP)(DISPATCHERS=3)"

Specify only one of the following attributes: PROTOCOL, ADDRESS, or DESCRIPTION. If you specify either ADDRESS or DESCRIPTION, then you can specify additional network attributes. Doing so supports multi-homed hosts.

dispatch_clause

  • PROTOCOL (PRO or PROT)

    The network protocol for which the dispatcher generates a listening endpoint.

  • ADDRESS (ADD or ADDR)

    The network protocol address of the endpoint on which the dispatchers listen.

  • DESCRIPTION (DES or DESC)

    The network description of the endpoint on which the dispatchers listen, including the protocol address.

options_clause

  • DISPATCHERS (DIS or DISP)

    The initial number of dispatchers to start. The default is 1.

  • SESSIONS (SES or SESS)

    The maximum number of network sessions to allow for each dispatcher. The default is operating system-specific. Most operating systems have a default of 16 KB.

  • CONNECTIONS (CON or CONN)

    The maximum number of network connections to allow for each dispatcher. The default is operating system-specific.

  • TICKS (TIC or TICK)

    The length of a network tick in seconds. The default is 1 second.

  • POOL (POO)

    Enables Connection Pooling.

    • An integer indicates that Connection Pooling is enabled for both incoming and outgoing network connections. The number specified is the timeout in ticks for both incoming and outgoing network connections.
    • ON, YES, TRUE, and BOTH indicate that Connection Pooling is enabled for both incoming and outgoing network connections. A default timeout of 10 ticks is used for both incoming and outgoing network connections.
    • IN indicates that Connection Pooling is enabled for incoming network connections and the default timeout of 10 ticks is used for incoming network connections.
    • OUT indicates that Connection Pooling is enabled for outgoing network connections and the default timeout of 10 ticks is used for outgoing network connections.
    • NO, OFF, and FALSE indicate that Connection Pooling is disabled for both incoming and outgoing network connections. This is the default.

POOL can also be assigned a name-value string such as: "(IN=10)", "(OUT=20)", or "(IN=10)(OUT=20)". In such cases:

  • If an IN numeric value is specified, then Connection Pooling is enabled for incoming connections, and the number specified is the timeout in ticks for incoming network connections.
  • If an OUT numeric value is specified, then Connection Pooling is enabled for outgoing network connections, and the number specified is the timeout in ticks for outgoing network connections.
  • If the numeric value of a specified timeout is 0 or 1, then the default value of 10 ticks is used.
  • MULTIPLEX (MUL or MULT)

    Enables the Oracle Connection Manager session multiplexing feature.

    • The values 1, ON, YES, TRUE, and BOTH indicate that Network Session Multiplex is enabled for both incoming and outgoing network connections.
    • The value IN indicates that Network Session Multiplex is enabled for incoming network connections.
    • The value OUT indicates that Network Session Multiplexing is enabled for outgoing network connections.
    • The values 0, NO, OFF, and FALSE indicate that Network Session Multiplexing is disabled for both incoming and outgoing network connections. This is the default.
  • LISTENER (LIS, LIST)

    Specifies the network name of an address or address list of the Oracle Net listeners with which the dispatchers will register.

    The LISTENER attribute facilitates administration of multi-homed hosts. This attribute specifies the appropriate listeners with which the dispatchers will register. The LISTENER attribute takes precedence over the LOCAL_LISTENER and REMOTE_LISTENER parameters. See "LOCAL_LISTENER" and "REMOTE_LISTENER" .

  • SERVICE (SER, SERV)

    The service names the dispatchers register with the listeners.

  • INDEX

    Use this parameter in an ALTER SYSTEM SET DISPATCHERS statement to indicate which dispatcher you want to modify. (If you specify INDEX in the initialization parameter file, Oracle ignores it.) In an ALTER SYSTEM statement, INDEX specifies the order in which the parameter's values were initialized. The value ranges from 0 (for the first dispatcher process) to one less than the total number of dispatchers you define.

    For example, if you specify 3 dispatchers in the initialization parameter file, you would modify the third dispatcher by specifying INDEX=2 in the ALTER SYSTEM statement. You could also add an additional dispatcher in the ALTER SYSTEM statement by specifying INDEX=3.

    See Also:

    Oracle9i Net Services Administrator's Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 56 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DISTRIBUTED_LOCK_TIMEOUT

Parameter type | Integer
Default value | 60
Parameter class | Static
Range of values | 1 to unlimited

DISTRIBUTED_LOCK_TIMEOUT specifies the amount of time (in seconds) for distributed transactions to wait for locked resources.

See Also:

Oracle9i Database Concepts and Oracle9i Database Administrator's Guide for more information on data concurrency
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 57 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DML_LOCKS

Parameter type | Integer
Default value | Derived: 4 * TRANSACTIONS
Parameter class | Static
Range of values | 20 to unlimited; a setting of 0 disables enqueues
Real Application Clusters | You must set this parameter for every instance, and all instances must have positive values or all must be 0.

A DML lock is a lock obtained on a table that is undergoing a DML operation (insert, update, delete). DML_LOCKS specifies the maximum number of DML locks--one for each table modified in a transaction. The value should equal the grand total of locks on tables currently referenced by all users. For example, if three users are modifying data in one table, then three entries would be required. If three users are modifying data in two tables, then six entries would be required.

The default value assumes an average of four tables referenced for each transaction. For some systems, this value may not be enough.

Enqueues are shared memory structures that serialize access to database resources. If you set the value of DML_LOCKS to 0, enqueues are disabled and performance is slightly increased. However, you cannot use DROP TABLE, CREATE INDEX, or explicit lock statements such as LOCK TABLE IN EXCLUSIVE MODE.

Oracle holds more locks during parallel DML than during serial execution. Therefore, if your database supports a lot of parallel DML, you may need to increase the value of this parameter.

See Also:
  • Oracle9i Database Concepts for a discussion of lock and enqueue resources needed for parallel DML
  • Oracle9i Real Application Clusters Administration, Oracle9i Database Concepts, and Oracle9i Database Administrator's Guide for more information on data concurrency
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 58 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DRS_START

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false
Note:

This parameter is deprecated in favor of the DG_BROKER_START parameter. Oracle recommends that you use DG_BROKER_START instead. DRS_START is retained for backward compatibility only.

DRS_START enables Oracle to determine whether or not the DMON (Data Guard broker) process should be started. DMON is a non-fatal Oracle background process and exists as long as the instance exists, whenever this parameter is set to true.

If the site is never going to be configured in a Data Guard broker configuration, then you can leave the parameter unspecified and accept the default value of false. If the site is part of a Data Guard broker configuration, then automatic startup of the DRMON process is simplified by setting DRS_START to true in the initialization parameter file.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 59 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ENQUEUE_RESOURCES

Parameter type | Integer
Default value | Derived from SESSIONS parameter
Parameter class | Static
Range of values | 10 to unlimited

ENQUEUE_RESOURCES sets the number of resources that can be concurrently locked by the lock manager. An enqueue is a sophisticated locking mechanism that permits several concurrent processes to share known resources to varying degrees. Any object that can be used concurrently can be protected with enqueues. For example, Oracle allows varying levels of sharing on tables: two processes can lock a table in share mode or in share update mode.

One difference between enqueues and latches is that latches do not entail an ordered queue of waiting processes as do enqueues. Processes waiting for latches can either use timers to wake up and retry or (in multiprocessors) spin.

At database startup time, Oracle allocates the number of enqueues specified by the ENQUEUE_RESOURCES parameter. The default value of ENQUEUE_RESOURCES is derived from the SESSIONS parameter and is usually adequate, as long as its value is greater than DML_LOCKS + 20. For three or fewer sessions, the default value is the number of database files + 20. For 4 to 10 sessions, the default value is the number of database files + ((SESSIONS - 3) * 5) + 20. For more than 10 sessions, it is the number of database files + ((SESSIONS - 10) * 2) + 55.

If you explicitly set ENQUEUE_RESOURCES to a value higher than DML_LOCKS + 20, then Oracle uses the value you provide. Oracle will automatically allocate additional enqueues from the shared pool as needed if the number specified by ENQUEUE_RESOURCES is exceeded. You can check resource usage by querying V$RESOURCE_LIMIT.

See Also:
  • Oracle9i Real Application Clusters Administration
  • Oracle9i Database Concepts
  • Oracle9i Database Administrator's Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 60 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EVENT

Parameter type | String
Default value | There is no default value.
Parameter class | Static

EVENT is a parameter used only to debug the system. Do not alter the value of this parameter except under the supervision of Oracle Support Services staff.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 61 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FAL_CLIENT

Parameter type | String
Syntax | FAL_CLIENT = string
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

FAL_CLIENT specifies the FAL (fetch archive log) client name that is used by the FAL service, configured through the FAL_SERVER parameter, to refer to the FAL client. The value is an Oracle Net service name, which is assumed to be configured properly on the FAL server system to point to the FAL client (standby database).

Given the dependency of FAL_CLIENT on FAL_SERVER, the two parameters should be configured or changed at the same time.

See Also:

Oracle9i Data Guard Concepts and Administration for more information about FAL server
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Initialization Parameters, 62 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FAL_SERVER

Parameter type | String
Syntax | FAL_SERVER = string
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

FAL_SERVER specifies the FAL (fetch archive log) server for a standby database. The value is an Oracle Net service name, which is assumed to be configured properly on the standby database system to point to the desired FAL server.

See Also:

Oracle9i Data Guard Concepts and Administration for more information about FAL server
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 63 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FAST_START_IO_TARGET

Parameter type | Integer
Default value | All the buffers in the cache
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 1000 to all buffers in the cache. A setting of 0 disables limiting recovery I/Os.
Real Application Clusters | Multiple instances can have different values, and you can change the values at runtime.
Note:

This parameter is deprecated in favor of the FAST_START_MTTR_TARGET parameter. Oracle recommends that you use FAST_START_MTTR_TARGET instead. FAST_START_IO_TARGETis retained for backward compatibility only.

FAST_START_IO_TARGET (available only with the Oracle Enterprise Edition) specifies the number of I/Os that should be needed during crash or instance recovery.

When you set this parameter, DBW n writes dirty buffers out more aggressively, so that the number of blocks that must be processed during recovery stays below the value specified in the parameter. However, this parameter does not impose a hard limit on the number of recovery I/Os. Under transient workload situations, the number of I/Os needed during recovery may be greater than the value specified in this parameter. In such situations, DBW n will not slow down database activity.

Smaller values for this parameter result in faster recovery times. This improvement in recovery performance is achieved at the expense of additional writing activity during normal processing.

Setting this parameter to 0 disables fast-start checkpointing, which is the mechanism that limits the number of I/Os that need to be performed during recovery. All other writing activity is unaffected.

Notes:

Recovery I/O can also be limited by setting the LOG_CHECKPOINT_INTERVAL or LOG_CHECKPOINT_TIMEOUT parameter or by the size specified for the smallest redo log. For information on which mechanism is controlling checkpointing behavior, query the V$INSTANCE_RECOVERY view.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • V$INSTANCE_RECOVERY for information on fast-start checkpointing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 64 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FAST_START_MTTR_TARGET

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 3600 seconds
Real Application Clusters | Multiple instances can have different values, and you can change the values at runtime.

FAST_START_MTTR_TARGET enables you to specify the number of seconds the database takes to perform crash recovery of a single instance. When specified, FAST_START_MTTR_TARGET

  • Is overridden by FAST_START_IO_TARGET
  • Is overridden by LOG_CHECKPOINT_INTERVAL
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 65 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FAST_START_PARALLEL_ROLLBACK

Parameter type | String
Syntax | FAST_START_PARALLEL_ROLLBACK = {HI | LO | FALSE}
Default value | LOW
Parameter class | Dynamic: ALTER SYSTEM

FAST_START_PARALLEL_ROLLBACK determines the maximum number of processes that can exist for performing parallel rollback. This parameter is useful on systems in which some or all of the transactions are long running.

Values:

  • FALSE indicates that parallel rollback is disabled
  • LOW limits the number of rollback processes to 2 * CPU_COUNT
  • HIGH limits the number of rollback processes to 4 * CPU_COUNT
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 66 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FILE_MAPPING

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

FILE_MAPPING enables or disables file mapping. The FMON background process will be started to manage the mapping information when file mapping is enabled.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 67 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FILESYSTEMIO_OPTIONS

Parameter type | String
Syntax | FILESYSTEMIO_OPTIONS = {none | setall | directIO | asynch}
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

FILESYSTEMIO_OPTIONS specifies I/O operations for file system files.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 68 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FIXED_DATE

Parameter type | String
Syntax | FIXED_DATE = YYYY-MM-DD-HH24:MI:SS (or the default Oracle date format)
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

FIXED_DATE enables you to set a constant date that SYSDATE will always return instead of the current date. This parameter is useful primarily for testing. The value can be in the format shown above or in the default Oracle date format, without a time.

Specify the value either without quotation marks or with double quotation marks.

Note:

Do not use single quotation marks.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 69 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GC_FILES_TO_LOCKS

Parameter type | String
Syntax | GC_FILES_TO_LOCKS = '{file_list=lock_count[!blocks][EACH][:...]}' Spaces are not allowed within the quotation marks.
Default value | There is no default value.
Parameter class | Static
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have identical values. To change the value, you must shut down all instances in the cluster, change the value for each instance, and then start up each instance.
Note:

Setting this parameter to any value other than the default will disable Cache Fusion processing in Oracle9i Real Application Clusters.

GC_FILES_TO_LOCKS is an Oracle9i Real Application Clusters parameter that has no effect on an instance running in exclusive mode. It controls the mapping of pre-release 9.0.1 parallel cache management (PCM) locks to datafiles.

Values:

  • file_list

    One or more datafiles listed by their file numbers, or ranges of file numbers, with comma separators:

    filenumber[-filenumber][,filenumber[-filenumber]]...

    To find the correspondence between filenames and file numbers, query the FILE_NAME and FILE_ID columns of the DBA_DATA_FILES data dictionary view.

  • lock_count

    The number of PCM locks assigned to file_list. By default these locks are fixed. If you set lock_count to 0, then Oracle uses fine-grain locking for these files and takes locks as needed from the pool of releasable locks.

  • blocks

    Specifies the number of contiguous blocks covered by one lock. The default is noncontiguous blocks.

  • EACH

    Indicates that each datafile in file_list is assigned a separate set of lock_count PCM locks.

The value of the parameter should be set to cover as many files as possible. Therefore, to avoid performance problems, you should always change GC_FILES_TO_LOCKS when the size of datafiles change or when new datafiles are added. Doing so requires you to shut down and restart your cluster database.

If the number of PCM locks allocated to a datafile is less than or equal to the number of blocks in a datafile, each of these locks will cover a number of contiguous blocks within the datafile equal to blocks. If the number of PCM locks assigned to the datafile is larger than its number of blocks, resources will be wasted because some locks will not be covering any blocks.

A colon (:) separates each clause that assigns a number of PCM locks to file_list.

See Also:

Oracle9i Real Application Clusters Concepts and Oracle9i Real Application Clusters Deployment and Performance for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 70 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GLOBAL_CONTEXT_POOL_SIZE

Parameter type | String
Default value | 1 MB
Parameter class | Static
Range of values | Any integer value in MB

GLOBAL_CONTEXT_POOL_SIZE specifies the amount of memory to allocate in the SGA for storing and managing global application context.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 71 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GLOBAL_NAMES

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

GLOBAL_NAMES specifies whether a database link is required to have the same name as the database to which it connects.

If the value of GLOBAL_NAMES is false, then no check is performed. If you use or plan to use distributed processing, then Oracle Corporation recommends that you set this parameter to true to ensure the use of consistent naming conventions for databases and links in a networked environment.

See Also:

Oracle9i Database Administrator's Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 72 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HASH_AREA_SIZE

Parameter type | Integer
Default value | Derived: 2 * SORT_AREA_SIZE
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to operating system-dependent
Note:

Oracle does not recommend using the HASH_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. HASH_AREA_SIZE is retained for backward compatibility.

HASH_AREA_SIZE is relevant to parallel execution operations and to the query portion of DML or DDL statements. It specifies the maximum amount of memory, in bytes, to be used for hash joins.

See Also:
  • Oracle9i Database Concepts for information on hash joins in general
  • Oracle9i Database Performance Tuning Guide and Reference for information on calculating an appropriate value for this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 73 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HASH_JOIN_ENABLED

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SESSION
Range of values | true | false

HASH_JOIN_ENABLED specifies whether the optimizer should consider using a hash join as a join method. If set to false, then hashing is not available as a join method. If set to true, then the optimizer compares the cost of a hash join with other types of joins, and chooses hashing if it gives the best cost. Oracle Corporation recommends that you set this parameter to true for all data warehousing applications.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 74 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HI_SHARED_MEMORY_ADDRESS

Parameter type | Integer
Default value | 0
Parameter class | Static

HI_SHARED_MEMORY_ADDRESS specifies the starting address at runtime of the system global area (SGA). It is ignored on platforms that specify the SGA's starting address at linktime.

On 64-bit platforms, use HI_SHARED_MEMORY_ADDRESS to specify the high-order 32 bits of a 64-bit address. Use SHARED_MEMORY_ADDRESS to specify the low-order 32 bits of the address (see "SHARED_MEMORY_ADDRESS" ). If both parameters are 0 or unspecified, the SGA address defaults to a platform-specific location.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 75 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_AUTOREGISTER

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

HS_AUTOREGISTER enables or disables automatic self-registration of Heterogeneous Services (HS) agents. When enabled, information is uploaded into the server's data dictionary to describe a previously unknown agent class or a new agent version.

Oracle Corporation recommends that you set this parameter to true. Oracle incurs less overhead when establishing subsequent connections through the same agent if self-registered information is available in the server's data dictionary.

See Also:

Oracle9i Heterogeneous Connectivity Administrator's Guide for more information on HS agents
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 76 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

IFILE

Parameter type | Parameter file
Syntax | IFILE = parameter_file_name
Default value | There is no default value.
Parameter class | Static
Range of values | Valid parameter filenames
Real Application Clusters | Multiple instances can have different values.

Use IFILE to embed another parameter file within the current parameter file. For example:

IFILE = COMMON.ORA

You can have up to three levels of nesting. In this example, the file COMMON.ORA could contain a second IFILE parameter for the file COMMON2.ORA, which could contain a third IFILE parameter for the file GCPARMS.ORA. You can also include multiple parameter files in one parameter file by listing IFILE several times with different values:

IFILE = DBPARMS.ORA
IFILE = GCPARMS.ORA
IFILE = LOGPARMS.ORA
Note:

You must list multiple entries on contiguous lines of the parameter file.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 77 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INSTANCE_GROUPS

Parameter type | String
Syntax | INSTANCE_GROUPS = group_name [, group_name ... ]
Default value | There is no default value.
Parameter class | Static
Range of values | One or more instance group names, separated by commas
Real Application Clusters | Multiple instances can have different values.

INSTANCE_GROUPS is an Oracle9i Real Application Clusters parameter that you can specify only in parallel mode. Used in conjunction with the PARALLEL_INSTANCE_GROUP parameter, it lets you restrict parallel query operations to a limited number of instances.

This parameter specifies one or more instance groups and assigns the current instance to those groups. If one of the specified groups is also specified in the PARALLEL_INSTANCE_GROUP parameter, then Oracle allocates query processes for a parallel operation from this instance.

See Also:
  • Oracle9i Real Application Clusters Administration for more information on parallel query execution in an Oracle9i Real Application Clusters environment
  • "PARALLEL_INSTANCE_GROUP"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 78 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INSTANCE_NAME

Parameter type | String
Syntax | INSTANCE_NAME = instance_id
Default value | The instance's SID Note: The SID identifies the instance's shared memory on a host, but may not uniquely distinguish this instance from other instances.
Parameter class | Static
Range of values | Any alphanumeric characters

In an Oracle9i Real Application Clusters environment, multiple instances can be associated with a single database service. Clients can override Oracle's connection load balancing by specifying a particular instance by which to connect to the database. INSTANCE_NAME specifies the unique name of this instance.

In a single-instance database system, the instance name is usually the same as the database name.

See Also:

Oracle9i Real Application Clusters Administration and Oracle9i Net Services Administrator's Guide for more information
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 79 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INSTANCE_NUMBER

Parameter type | Integer
Default value | Lowest available number; derived from instance start up order and INSTANCE_NUMBER value of other instances. If not configured for Oracle9i Real Application Clusters, then 0.
Parameter class | Static
Range of values | 1 to maximum number of instances specified when the database was created
Real Application Clusters | You must set this parameter for every instance, and all instances must have different values.

INSTANCE_NUMBER is an Oracle9i Real Application Clusters parameter that can be specified in parallel mode or exclusive mode. It specifies a unique number that maps the instance to one free list group for each database object created with storage parameter FREELIST GROUPS.

The INSTANCE parameter of the ALTER TABLE ... ALLOCATE EXTENT statement assigns an extent to a particular free list group. If you set INSTANCE_NUMBER to the value specified for the INSTANCE parameter, the instance uses that extent for inserts and for updates that expand rows.

The practical maximum value of this parameter is the maximum number of instances specified in the CREATE DATABASE statement. The absolute maximum is operating system-dependent.

See Also:

Oracle9i Real Application Clusters Administration for more information
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 80 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

JAVA_MAX_SESSIONSPACE_SIZE

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to 4 GB

Java session space is the memory that holds Java state from one database call to another. JAVA_MAX_SESSIONSPACE_SIZE specifies (in bytes) the maximum amount of session space made available to a Java program executing in the server. When a user's session-duration Java state attempts to exceed this amount, the Java virtual machine kills the session with an out-of-memory failure.

See Also:
  • Oracle9i Java Developer's Guide
  • "JAVA_SOFT_SESSIONSPACE_LIMIT"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 81 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

JAVA_POOL_SIZE

Parameter type | Big integer
Syntax | LARGE_POOL_SIZE = integer [K | M | G]
Default value | 24 MB, rounded up to the nearest granule size
Parameter class | Static
Range of values | Minimum: the granule size Maximum: operating system-dependent

JAVA_POOL_SIZE specifies the size (in bytes) of the Java pool, from which the Java memory manager allocates most Java state during runtime execution. This memory includes the shared in-memory representation of Java method and class definitions, as well as the Java objects that are migrated to the Java session space at end-of-call.

See Also:

Oracle9i Java Developer's Guide for information on adjusting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 82 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

JAVA_SOFT_SESSIONSPACE_LIMIT

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to 4 GB

Java session space is the memory that holds Java state from one database call to another. JAVA_SOFT_SESSIONSPACE_LIMIT specifies (in bytes) a soft limit on Java memory usage in a session, as a means to warn you if a user's session-duration Java state is using too much memory. When a user's session-duration Java state exceeds this size, Oracle generates a warning that goes into the trace files.

See Also:
  • Oracle9i Java Developer's Guide for more information on this parameter
  • "JAVA_MAX_SESSIONSPACE_SIZE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 83 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

JOB_QUEUE_PROCESSES

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 1000
Real Application Clusters | Multiple instances can have different values.

JOB_QUEUE_PROCESSES specifies the maximum number of processes that can be created for the execution of jobs. It specifies the number of job queue processes per instance (J000, ... J999). Replication uses job queues for data refreshes. Advanced queuing uses job queues for message propagation. You can create user job requests through the DBMS_JOB package.

Some job queue requests are created automatically. An example is refresh support for materialized views. If you wish to have your materialized views updated automatically, you must set JOB_QUEUE_PROCESSES to a value of one or higher.

See Also:
  • Oracle9i Replication and Oracle9i Data Warehousing Guide for more information on managing materialized views
  • Oracle9i Application Developer's Guide - Advanced Queuing for more information on message propagation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 84 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LARGE_POOL_SIZE

Parameter type

Big integer

Syntax

LARGE_POOL_SIZE = integer [K | M | G]

Default value

0 if both of the following are true:

  • The pool is not required by parallel execution
  • DBWR_IO_SLAVES is not set

Otherwise, derived from the values of PARALLEL_MAX_SERVERS, PARALLEL_THREADS_PER_CPU, CLUSTER_DATABASE_INSTANCES, DISPATCHERS, and DBWR_IO_SLAVES.

Parameter class

Dynamic: ALTER SYSTEM

Range of values

300 KB to at least 2 GB (actual maximum is operating system-specific)

LARGE_POOL_SIZE lets you specify the size (in bytes) of the large pool allocation heap. The large pool allocation heap is used in shared server systems for session memory, by parallel execution for message buffers, and by backup processes for disk I/O buffers. (Parallel execution allocates buffers out of the large pool only when PARALLEL_AUTOMATIC_TUNING is set to true.)

Caution:

When Oracle derives a default value, it adds 250K for each session for the shared server if DISPATCHERS is configured. The final derived value also includes a port-specific amount of memory for backup I/O buffers. The total derived default value can either be too large to allocate or can cause performance problems. In that case, set LARGE_POOL_SIZE to a number sufficiently small so that the database can start.

You can specify the value of this parameter using a number, optionally followed by K or M to specify kilobytes or megabytes, respectively. If you do not specify K or M, then the number is taken as bytes.

See Also:

Oracle9i Database Performance Tuning Guide and Reference and Oracle9i Database Migration for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 85 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LICENSE_MAX_SESSIONS

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to number of session licenses
Real Application Clusters | Multiple instances can have different values, but the total for all instances mounting a database should be less than or equal to the total number of sessions licensed for that database.

LICENSE_MAX_SESSIONS specifies the maximum number of concurrent user sessions allowed. When this limit is reached, only users with the RESTRICTED SESSION privilege can connect to the database. Users who are not able to connect receive a warning message indicating that the system has reached maximum capacity.

A zero value indicates that concurrent usage (session) licensing is not enforced. If you set this parameter to a nonzero number, you might also want to set LICENSE_SESSIONS_WARNING (see "LICENSE_SESSIONS_WARNING" ).

Do not enable both concurrent usage licensing and user licensing. Set either LICENSE_MAX_SESSIONS or LICENSE_MAX_USERS to zero.

See Also:

Oracle9i Database Administrator's Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 86 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LICENSE_MAX_USERS

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to number of user licenses
Real Application Clusters | Multiple instances should have the same values. If different instances specify different values for this parameter, then the value of the first instance to mount the database takes precedence.

LICENSE_MAX_USERS specifies the maximum number of users you can create in the database. When you reach this limit, you cannot create more users. You can, however, increase the limit.

Do not enable both concurrent usage (session) licensing and user licensing. Set either LICENSE_MAX_SESSIONS or LICENSE_MAX_USERS to zero.

See Also:

Oracle9i Database Administrator's Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 87 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LICENSE_SESSIONS_WARNING

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to value of LICENSE_MAX_SESSIONS parameter
Real Application Clusters | Multiple instances can have different values.

LICENSE_SESSIONS_WARNING specifies a warning limit on the number of concurrent user sessions. When this limit is reached, additional users can connect, but Oracle writes a message in the alert file for each new connection. Users with RESTRICTED SESSION privilege who connect after the limit is reached receive a warning message stating that the system is nearing its maximum capacity.

If this parameter is set to zero, no warning is given as you approach the concurrent usage (session) limit. If you set this parameter to a nonzero number, you should also set LICENSE_MAX_SESSIONS (see "LICENSE_MAX_SESSIONS" ).

See Also:
  • Oracle9i Database Administrator's Guide for more information on setting this parameter
  • Oracle9i Real Application Clusters Administration for more information on calculating an appropriate value for this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 88 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOCAL_LISTENER

Parameter type | String
Syntax | LOCAL_LISTENER = network_name
Default value | (ADDRESS = (PROTOCOL=TCP)(HOST=)(PORT=1521))
Parameter class | Dynamic: ALTER SYSTEM

LOCAL_LISTENER specifies a network name that resolves to an address or address list of Oracle Net local listeners (that is, listeners that are running on the same machine as this instance). The address or address list is specified in the TNSNAMES.ORA file or other address repository as configured for your system.

See Also:
  • Oracle9i Database Concepts for more information about instances, listener processes, and dispatcher processes
  • Oracle9i Net Services Administrator's Guide and your operating system-specific Oracle documentation for more information about specifying network addresses for the protocols on your system
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 89 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOCK_NAME_SPACE

Parameter type | String
Syntax | LOCK_NAME_SPACE = namespace
Default value | There is no default value.
Parameter class | Static
Range of values | Up to 8 alphanumeric characters. No special characters allowed.

LOCK_NAME_SPACE specifies the namespace that the distributed lock manager (DLM) uses to generate lock names. Consider setting this parameter if a standby or clone database has the same database name on the same cluster as the primary database.

If the standby database resides on the same file system as the primary database, set LOCK_NAME_SPACE in the standby initialization parameter file to a distinct value such as the following:

LOCK_NAME_SPACE = standby
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 90 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOCK_SGA

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

LOCK_SGA locks the entire SGA into physical memory. It is usually advisable to lock the SGA into real (physical) memory, especially if the use of virtual memory would include storing some of the SGA using disk space. This parameter is ignored on platforms that do not support it.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 91 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_DEST

Parameter type | String
Syntax | LOG_ARCHIVE_DEST = filespec
Default value | Null
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path or device name, except raw partitions
Real Application Clusters | Multiple instances can have different values.
Note:

For Enterprise Edition users, this parameter has been deprecated in favor of the LOG_ARCHIVE_DEST_n parameters. If Oracle Enterprise Edition is not installed or it is installed, but you have not specified any LOG_ARCHIVE_DEST_n parameters, this parameter is valid.

LOG_ARCHIVE_DEST is applicable only if you are running the database in ARCHIVELOG mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST is incompatible with the LOG_ARCHIVE_DEST_n parameters, and must be defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string. Use a text string to specify the default location and root of the disk file or tape device when archiving redo log files. (Archiving to tape is not supported on all operating systems.) The value cannot be a raw partition.

If LOG_ARCHIVE_DEST is not explicitly defined and all the LOG_ARCHIVE_DEST_n parameters have null string values, LOG_ARCHIVE_DEST is set to an operating system-specific default value on instance startup.

To override the destination that this parameter specifies, either specify a different destination for manual archiving or use the SQL*Plus statement ARCHIVE LOG START filespec for automatic archiving, where filespec is the new archive destination. To permanently change the destination, use the statement ALTER SYSTEM SET LOG_ARCHIVE_DEST = filespec, where filespec is the new archive destination.

Neither LOG_ARCHIVE_DEST nor LOG_ARCHIVE_FORMAT have to be complete file or directory specifiers themselves; they only need to form a valid file path after the variables are substituted into LOG_ARCHIVE_FORMAT and the two parameters are concatenated together.

See Also:
  • Oracle9i User-Managed Backup and Recovery Guide
  • "LOG_ARCHIVE_DUPLEX_DEST" , "LOG_ARCHIVE_MIN_SUCCEED_DEST" , and "V$ARCHIVE_DEST" for more information on setting this parameter
  • Your Oracle operating system-specific documentation for the default value and for an example of how to specify the destination path or filename using LOG_ARCHIVE_DEST
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 92 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_DEST_n

Parameter type

String

Syntax

LOG_ARCHIVE_DEST_[1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10] =

   { null_string} |
     { LOCATION=path_name | SERVICE=service_name }
     [ { MANDATORY | OPTIONAL } ]
     [ REOPEN[=seconds] | NOREOPEN ]
     [ DELAY[=minutes] | NODELAY ]
     [ REGISTER[=template] | NOREGISTER ]
     [ TEMPLATE=template] | NOTEMPLATE ]
     [ ALTERNATE=destination | NOALTERNATE ]
     [ DEPENDENCY=destination | NODEPENDENCY ]
     [ MAX_FAILURE=count | NOMAX_FAILURE ]
     [ QUOTA_SIZE=blocks | NOQUOTA_SIZE ]
     [ QUOTA_USED=blocks | NOQUOTA_USED ]
     [ ARCH | LGWR ]
     [ SYNC[=PARALLEL|NOPARALLEL] | ASYNC[=blocks] ]
     [ AFFIRM | NOAFFIRM ]
     [ NET_TIMEOUT=seconds | NONET_TIMEOUT ]
   }

Default value

There is no default value.

Parameter class

Dynamic: ALTER SESSION, ALTER SYSTEM
Note:

This parameter is valid only if you have installed Oracle Enterprise Edition. You may continue to use LOG_ARCHIVE_DEST if you have installed Oracle Enterprise Edition. However, you cannot use both LOG_ARCHIVE_DEST_n and LOG_ARCHIVE_DEST, as they are not compatible.

The LOG_ARCHIVE_DEST_n parameters (where n = 1, 2, 3, ... 10) define up to ten archive log destinations. The parameter integer suffix is defined as the handle displayed by the V$ARCHIVE_DEST dynamic performance view.

Values:

  • SERVICE

    Specifies a standby destination. Oracle Net (IPC or TCP) transmits the archivelog. A standby instance must be associated with the destination. The value represented by tnsnames_service corresponds to an appropriate service name in tnsnames.ora.

  • LOCATION

    Specifies a local file system destination. You must specify this parameter for at least one destination.

  • MANDATORY

    Specifies that archiving to the destination must succeed before the redo log file can be made available for reuse.

  • OPTIONAL

    Specifies that successful archiving to the destination is not required before the redo log file can be made available for reuse. If the "must succeed count," set with LOG_ARCHIVE_MIN_SUCCEED_DEST, is met, the redo logfile is marked for reuse. This is the default.

  • REOPEN

    Specifies the minimum number of seconds before the archiver process (ARCn, foreground, or log writer process) should try again to access a previously failed destination. Future attempts are made when the next redo log file is archived. If a destination is MANDATORY, Oracle Corporation recommends that you specify a REOPEN time that reduces the possibility of primary database shutdown due to lack of available online redo log files.

    If you do not specify seconds, the default value is 300 seconds.

    See Also:

    Oracle9i User-Managed Backup and Recovery Guide and Oracle9i Database Administrator's Guide for more information and examples
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Initialization Parameters, 93 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_DEST_STATE_n

Parameter type | String
Syntax | LOG_ARCHIVE_DEST_STATE_n = {alternate | reset | defer | enable}
Default value | enable
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

The LOG_ARCHIVE_DEST_STATE_n parameters (wheren = 1, 2, 3, ... 10) specify the availability state of the corresponding destination. The parameter suffix (1 through 10) specifies one of the ten corresponding LOG_ARCHIVE_DEST_n destination parameters.

Values:

  • enabled

    Specifies that a valid log archive destination can be used for a subsequent archiving operation (automatic or manual). This is the default.

  • defer

    Specifies that valid destination information and attributes are preserved, but the destination is excluded from archiving operations until re-enabled.

  • alternate

    Specifies that a log archive destination is not enabled but will become enabled if communications to another destination fail.

The LOG_ARCHIVE_DEST_STATE_n parameters have no effect on the ENABLE state for the LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST parameters.

The V$ARCHIVE_DEST dynamic performance view shows values in use for the current session. The DEST_ID column of that view corresponds to the archive destination suffix n.

See Also:
  • Oracle9i User-Managed Backup and Recovery Guide and Oracle9i Database Administrator's Guide for more information and examples
  • "V$ARCHIVE_DEST"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 94 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_DUPLEX_DEST

Parameter type | String
Syntax | LOG_ARCHIVE_DUPLEX_DEST = filespec
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Either a null string or any valid path or device name, except raw partitions
Note:

If you are using Oracle Enterprise Edition, this parameter is deprecated in favor of the LOG_ARCHIVE_DEST_n parameters. If Oracle Enterprise Edition is not installed or it is installed but you have not specified any LOG_ARCHIVE_DEST_n parameters, this parameter is valid.

LOG_ARCHIVE_DUPLEX_DEST is similar to the initialization parameter LOG_ARCHIVE_DEST. This parameter specifies a second archive destination: the duplex archive destination. This duplex archive destination can be either a must-succeed or a best-effort archive destination, depending on how many archive destinations must succeed (as specified in the LOG_ARCHIVE_MIN_SUCCEED_DEST parameter).

The default setting of a null string ("") or (' ') indicates that a duplex archive destination does not exist.

See Also:
  • "LOG_ARCHIVE_DEST_n"
  • "LOG_ARCHIVE_MIN_SUCCEED_DEST"
  • "V$ARCHIVE_DEST"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 95 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_FORMAT

Parameter type | String
Syntax | LOG_ARCHIVE_FORMAT = filename
Default value | Operating system-dependent
Parameter class | Static
Range of values | Any string that resolves to a valid filename
Real Application Clusters | Multiple instances can have different values, but identical values are recommended.

LOG_ARCHIVE_FORMAT is applicable only if you are using the redo log in ARCHIVELOG mode. Use a text string and variables to specify the default filename format when archiving redo log files. The string generated from this format is appended to the string specified in the LOG_ARCHIVE_DEST parameter.

The following variables can be used in the format:

%s log sequence number

%S log sequence number, zero filled

%t thread number

%T thread number, zero filled

Using uppercase letters for the variables (for example, %S) causes the value to be fixed length and padded to the left with zeros. An example of specifying the archive redo log filename format follows:

LOG_ARCHIVE_FORMAT = "LOG%s_%t.ARC"

Neither LOG_ARCHIVE_DEST nor LOG_ARCHIVE_FORMAT have to be complete file or directory specifiers themselves; they only need to form a valid file path after the variables are substituted into LOG_ARCHIVE_FORMAT and the two parameters are concatenated together.

See Also:
  • Oracle9i User-Managed Backup and Recovery Guide and Oracle9i Real Application Clusters Administration for more information on setting this parameter
  • Your operating system- specific Oracle documentation for the default value and range of values for LOG_ARCHIVE_FORMAT
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 96 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_MAX_PROCESSES

Parameter type | Integer
Default value | 1
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any integer from 1 to 10

LOG_ARCHIVE_MAX_PROCESSES specifies the number of archiver background processes (ARC0 through ARC9) Oracle initially invokes.

  • If the LOG_ARCHIVE_START initialization parameter has the value true, then this value is evaluated at instance startup.
  • Otherwise, this parameter is evaluated when the archiver process is first invoked by SQL*Plus or SQL syntax.

The actual number of archiver processes in use may vary subsequently based on archive workload.

See Also:

Oracle9i Database Concepts
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 97 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_MIN_SUCCEED_DEST

Parameter type | Integer
Default value | 1
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | 1 to 10 if you are using LOG_ARCHIVE_DEST_n 1 or 2 if you are using LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST

LOG_ARCHIVE_MIN_SUCCEED_DEST defines the minimum number of destinations that must succeed in order for the online logfile to be available for reuse.

  • If you are using the LOG_ARCHIVE_DEST_n parameters and automatic archiving is enabled, the value of this parameter cannot exceed either of the following:

    - The total number of destinations

    - The number of enabled, valid destinations specified as MANDATORY plus the number of enabled, valid non-standby destinations specified as OPTIONAL

  • If you are using LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST and automatic archiving is enabled, a value of 1 specifies that the destination specified in LOG_ARCHIVE_DEST must succeed. A value of 2 specifies that the destinations specified in both parameters must succeed.

If the value of this parameter is less than the number of enabled, valid MANDATORY destinations, this parameter is ignored in favor of the MANDATORY destination count. If the value is more than the number of enabled, valid MANDATORY destinations, some of the enabled, valid OPTIONAL non-standby destinations are treated as MANDATORY.

You cannot set a value for this parameter dynamically if LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST are in use. However, you can switch dynamically from one system to the other using ALTER SYSTEM, as follows:

  1. Set LOG_ARCHIVE_MIN_SUCCEED_DEST to 1.
  2. Set the value of LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST to the null string.
  3. Set the desired number of destinations for the LOG_ARCHIVE_DEST_n parameters.
  4. Reset LOG_ARCHIVE_MIN_SUCCEED_DEST to the desired value.

    See Also:
    • Oracle9i Database Administrator's Guide for more information on setting this parameter
    • "LOG_ARCHIVE_DEST_n" , "LOG_ARCHIVE_DUPLEX_DEST" , and "V$ARCHIVE_DEST" for information on related parameters
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 98 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_START

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false
Real Application Clusters | Multiple instances can have different values.

LOG_ARCHIVE_START is applicable only when you use the redo log in ARCHIVELOG mode. It indicates whether archiving should be automatic or manual when the instance starts up.

Values:

  • true

    Indicates that archiving is automatic

  • false

    Indicates that the database administrator will archive filled redo log files manually

The SQL*Plus statements ARCHIVE LOG START or ARCHIVE LOG STOP override this parameter.

In ARCHIVELOG mode, if all online redo log files fill without being archived, Oracle issues an error and suspends instance operations until the necessary archiving is performed. This delay is more likely if you use manual archiving. You can reduce its likelihood by increasing the number of online redo log files.

To use ARCHIVELOG mode while creating a database, set this parameter to true. Normally, a database is created in NOARCHIVELOG mode and then altered to ARCHIVELOG mode after creation.

See Also:

Oracle9i Database Administrator's Guide and Oracle9i Real Application Clusters Administration
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 99 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_ARCHIVE_TRACE

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0, 1, 2, 4, 8, 16, 32, 64, 128
Real Application Clusters | Multiple instances can have different values.

LOG_ARCHIVE_TRACE controls output generated by the archivelog process.

This process can be initiated by any of the following:

  • An ARCn background process (designated as ARCn in the output logs)
  • An explicit session-invoked foreground process (designated as ARCH in the output logs)

The valid values have the following meanings:

  • 0: Disable archivelog tracing (this is the default)
  • 1: Track archival of redo log file
  • 2: Track archival status of each archivelog destination
  • 4: Track archival operational phase
  • 8: Track archivelog destination activity
  • 16: Track detailed archivelog destination activity
  • 32: Track archivelog destination parameter modifications
  • 64: Track ARCn process state activity
  • 128: Track FAL (fetch archived log) server related activities

You can combine tracing levels by adding together the values of the desired tracing levels. For example, a setting of 3 will generate level 1 and level 2 trace output. You can set different values for the primary and standby database.

When this parameter is set to the default value of 0, Oracle will still generate appropriate alert and trace entries in response to error conditions. If you change the value of this parameter dynamically in an ALTER SYSTEM statement, the changes will take effect at the start of the next archivelog operation.

See Also:

Oracle9i User-Managed Backup and Recovery Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 10 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_ARGUMENTS

ALL_ARGUMENTS lists all arguments of procedures and functions that are accessible to the current user.

Related View

USER_ARGUMENTS lists all arguments of procedures and functions that are owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(30)

NOT NULL

Owner of the object

OBJECT_NAME

VARCHAR2(30)

Name of the procedure or function

PACKAGE_NAME

VARCHAR2(30)

Name of the procedure or function

OBJECT_ID

NUMBER

NOT NULL

Object number of the object

OVERLOAD

VARCHAR2(40)

Overload unique identifier

ARGUMENT_NAME

VARCHAR2(30)

Name of the argument

POSITION

NUMBER

NOT NULL

Position in the argument list, or null for a function return value

SEQUENCE

NUMBER

NOT NULL

Argument sequence, including all nesting levels

DATA_LEVEL

NUMBER

NOT NULL

Nesting depth of the argument for composite types

DATA_TYPE

VARCHAR2(30)

Datatype of the argument

DEFAULT_VALUE

LONG

Default value for the argument

DEFAULT_LENGTH

NUMBER

Length of the default value for the argument

IN_OUT

VARCHAR2(9)

Direction of the argument:

  • IN
  • OUT
  • IN/OUT

DATA_LENGTH

NUMBER

Length of the column (in bytes)

DATA_PRECISION

NUMBER

Length in decimal digits (NUMBER) or binary digits (FLOAT)

DATA_SCALE

NUMBER

Digits to the right of the decimal point in a number

RADIX

NUMBER

Argument radix for a number

CHARACTER_SET_NAME

VARCHAR2(44)

Character set name for the argument

TYPE_OWNER

VARCHAR2(30)

Owner of the type of the argument

TYPE_NAME

VARCHAR2(30)

Name of the type of the argument. If the type is a package local type (that is, it is declared in a package specification), then this column displays the name of the package.

TYPE_SUBNAME

VARCHAR2(30)

Relevant only for package local types. Displays the name of the type declared in the package identified in the TYPE_NAME column.

TYPE_LINK

VARCHAR2(128)

Relevant only for package local types when the package identified in the TYPE_NAME column is a remote package. This column displays the database link used to refer to the remote package.

PLS_TYPE

VARCHAR2(30)

For numeric arguments, the name of the PL/SQL type of the argument. Null otherwise.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 11 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_ASSOCIATIONS

ALL_ASSOCIATIONS describes user-defined statistics associated with objects accessible to the current user.

Related Views

  • DBA_ASSOCIATIONS describes all user-defined statistics in the database.
  • USER_ASSOCIATIONS describes user-defined statistics associated with objects owned by the current user.

    Column Datatype NULL Description

    OBJECT_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object for which the association is being defined

    OBJECT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object for which the association is being defined

    COLUMN_NAME

    VARCHAR2(30)

    Column name in the object for which the association is being defined

    OBJECT_TYPE

    VARCHAR2(9)

    Kind of object with which statistics are being associated: column, type, package or function, indextype, or domain index.

    STATSTYPE_SCHEMA

    VARCHAR2(30)

    Owner of the statistics type

    STATSTYPE_NAME

    VARCHAR2(30)

    Name of statistics type that contains the cost, selectivity or statistics functions

    DEF_SELECTIVITY

    NUMBER

    Default selectivity of the object, if any

    DEF_CPU_COST

    NUMBER

    Default CPU cost of the object, if any

    DEF_IO_COST

    NUMBER

    Default I/O cost of the object, if any

    DEF_NET_COST

    NUMBER

    Default networking cost of the object, if any

    INTERFACE_VERSION

    NUMBER

    Identifies the version number of the ODCIStats interface. Value is 1 for statistics type implementing Oracle8i 8.1; 0 for types implementing Oracle9i 9.0.0.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 12 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_AUDIT_POLICIES

ALL_AUDIT_POLICIES describes the fine-grained auditing policies on the tables and views accessible to the current user.

Related Views

  • DBA_AUDIT_POLICIES describes all fine-grained auditing policies in the database.
  • USER_AUDIT_POLICIES describes the fine-grained auditing policies on the tables and views owned by the current user. This view does not display the OBJECT_SCHEMA column.

    Column Datatype NULL Description

    OBJECT_SCHEMA

    VARCHAR2(30)

    Owner of the table or view

    OBJECT_NAME

    VARCHAR2(30)

    Name of the table or view

    POLICY_NAME

    VARCHAR2(30)

    Name of the policy

    POLICY_TEXT

    VARCHAR2(30)

    Audit condition

    POLICY_COLUMN

    VARCHAR2(30)

    Relevant column

    PF_SCHEMA

    VARCHAR2(30)

    Owner of the audit handler function

    PF_PACKAGE

    VARCHAR2(30)

    Name of the package containing the audit handler function

    PF_FUNCTION

    VARCHAR2(30)

    Name of the audit handler function

    ENABLED

    VARCHAR2(3)

    Indicates whether the policy is enabled (YES) or disabled (NO)
    See Also:
    • "DBA_AUDIT_POLICIES"
    • "USER_AUDIT_POLICIES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 13 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_BASE_TABLE_MVIEWS

ALL_BASE_TABLE_MVIEWS describes all materialized views using materialized view logs accessible to the current user. A materialized view log can be created for a master or base table or a master materialized view. Query this view at the master site or the master materialized view site to show one row for each materialized view using a materialized view log.

Related Views

  • DBA_BASE_TABLE_MVIEWS describes all materialized views using materialized view logs in the database.
  • USER_BASE_TABLE_MVIEWS describes all materialized views using materialized view logs owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Schema in which the master table or the master materialized view was created

    MASTER

    VARCHAR2(30)

    Name of the master table or the master materialized view

    MVIEW_LAST_REFRESH_TIME

    DATE

    Date when the materialized view based on the master was last refreshed

    MVIEW_ID

    NUMBER

    Unique identifier of the materialized view that is based on the master
    See Also:
    • "DBA_BASE_TABLE_MVIEWS"
    • "USER_BASE_TABLE_MVIEWS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 14 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CAPTURE

ALL_CAPTURE displays information about the capture processes that enqueue the captured changes into queues accessible to the current user.

Related View

DBA_CAPTURE displays information about all capture processes in the database.

Column Datatype NULL Description

CAPTURE_NAME

VARCHAR2(30)

NOT NULL

Name of the capture process

QUEUE_NAME

VARCHAR2(30)

NOT NULL

Name of the queue used for staging captured changes

QUEUE_OWNER

VARCHAR2(30)

NOT NULL

Owner of the queue used for staging captured changes

RULE_SET_NAME

VARCHAR2(30)

Name of the rule set used by the capture process for filtering

RULE_SET_OWNER

VARCHAR2(30)

Owner of the rule set

START_SCN

NUMBER

System change number (SCN) from which the capture process will start to capture changes

STATUS

VARCHAR2(8)

Status of the capture process:

  • DISABLED
  • ENABLED
  • ABORTED

CAPTURED_SCN

NUMBER

System change number (SCN) of the last captured message

APPLIED_SCN

NUMBER

System change number (SCN) of the most recent message dequeued by the relevant apply processes. All changes below this SCN have been dequeued by all apply processes that apply changes captured by this capture process.
See Also:

"DBA_CAPTURE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 15 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CAPTURE_PARAMETERS

ALL_CAPTURE_PARAMETERS displays information about the parameters for the capture processes that enqueue the captured changes into queues accessible to the current user.

Related View

DBA_CAPTURE_PARAMETERS displays information about the parameters for all capture processes in the database.

Column | Datatype | NULL | Description
CAPTURE_NAME | VARCHAR2(30) | NOT NULL | Name of the capture process
PARAMETER | VARCHAR2(128) | NOT NULL | Name of the parameter
VALUE | VARCHAR2(4000) |  | Parameter value
SET_BY_USER | VARCHAR2(3) |  | Indicates whether the parameter value was set by the user (YES) or was not set by the user (NO). If NO, then the parameter is set to its default value. If YES, then the parameter may or may not be set to its default value.
See Also:

"DBA_CAPTURE_PARAMETERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 16 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CAPTURE_PREPARED_DATABASE

ALL_CAPTURE_PREPARED_DATABASE displays information about when the local database was prepared for instantiation. If the local database was not prepared for instantiation, then this view contains no rows.

Related View

DBA_CAPTURE_PREPARED_DATABASE displays information about when the local database was prepared for instantiation.

Column | Datatype | NULL | Description
TIMESTAMP | DATE |  | Time when the local database was prepared for instantiation
See Also:

"DBA_CAPTURE_PREPARED_DATABASE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 17 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CAPTURE_PREPARED_SCHEMAS

ALL_CAPTURE_PREPARED_SCHEMAS displays information about the schemas prepared for instantiation that are accessible to the current user at the local database.

Related View

DBA_CAPTURE_PREPARED_SCHEMAS displays information about all schemas prepared for instantiation at the local database.

Column | Datatype | NULL | Description
SCHEMA_NAME | VARCHAR2(30) | NOT NULL | Name of the schema prepared for instantiation
TIMESTAMP | DATE |  | Time when the schema was prepared for instantiation
See Also:

"DBA_CAPTURE_PREPARED_SCHEMAS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 18 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CAPTURE_PREPARED_TABLES

ALL_CAPTURE_PREPARED_TABLES displays information about the tables prepared for instantiation that are accessible to the current user at the local database.

Related View

DBA_CAPTURE_PREPARED_TABLES displays information about all tables prepared for instantiation at the local database.

Column | Datatype | NULL | Description
TABLE_OWNER | VARCHAR2(30) |  | Owner of the table prepared for instantiation
TABLE_NAME | VARCHAR2(30) |  | Name of the table prepared for instantiation
SCN | NUMBER | NOT NULL | Smallest system change number (SCN) for which the table can be instantiated
TIMESTAMP | DATE |  | Time when the table was prepared for instantiation
See Also:

"DBA_CAPTURE_PREPARED_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 19 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CATALOG

ALL_CATALOG lists all indexes, tables, clusters, views, synonyms, and sequences accessible to the current user.

Related Views

  • DBA_CATALOG lists all indexes, tables, clusters, views, synonyms, and sequences in the entire database.
  • USER_CATALOG lists all indexes, tables, clusters, views, synonyms, and sequences in the current user's schema. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the INDEX, TABLE, CLUSTER, VIEW, SYNONYM, SEQUENCE, or UNDEFINED

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the INDEX, TABLE, CLUSTER, VIEW, SYNONYM, SEQUENCE, or UNDEFINED

    TABLE_TYPE

    VARCHAR2(11)

    Type of the INDEX, TABLE, CLUSTER, VIEW, SYNONYM, SEQUENCE, or UNDEFINED
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 20 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CLUSTER_HASH_EXPRESSIONS

ALL_CLUSTER_HASH_EXPRESSIONS lists hash functions for all hash clusters accessible to the current user.

Related Views

  • DBA_CLUSTER_HASH_EXPRESSIONS lists hash functions for all hash clusters in the database.
  • USER_CLUSTER_HASH_EXPRESSIONS lists hash functions for all hash clusters owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Name of the owner of the cluster

    CLUSTER_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the cluster

    HASH_EXPRESSION

    LONG

    Text of hash function of the hash cluster
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 21 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CLUSTERS

ALL_CLUSTERS describes all clusters accessible to the current user.

Related Views

  • DBA_CLUSTERS describes all clusters in the database.
  • USER_CLUSTERS describes all clusters owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the cluster

    CLUSTER_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the cluster

    TABLESPACE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the tablespace containing the cluster

    PCT_FREE

    NUMBER

    Minimum percentage of free space in a block

    PCT_USED

    NUMBER

    NOT NULL

    Minimum percentage of used space in a block

    KEY_SIZE

    NUMBER

    Estimated size of cluster key plus associated rows

    INI_TRANS

    NUMBER

    NOT NULL

    Initial number of transactions

    MAX_TRANS

    NUMBER

    NOT NULL

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent in bytes

    NEXT_EXTENT

    NUMBER

    Size of secondary extents in bytes

    MIN_EXTENTS

    NUMBER

    NOT NULL

    Minimum number of extents allowed in the segment

    MAX_EXTENTS

    NUMBER

    NOT NULL

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    NOT NULL

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of process freelists allocated to this segment

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated to this segment

    AVG_BLOCKS_PER_KEY

    NUMBER

    Number of blocks in the table divided by number of cluster keys

    CLUSTER_TYPE

    VARCHAR2(5)

    Type of cluster: B*-Tree index or hash

    FUNCTION

    VARCHAR2(15)

    If a hash cluster, the hash function

    HASHKEYS

    NUMBER

    If a hash cluster, the number of hash keys (hash buckets)

    DEGREE

    VARCHAR2(10)

    Number of threads per instance for scanning the cluster

    INSTANCES

    VARCHAR2(10)

    Number of instances across which the cluster is to be scanned

    CACHE

    VARCHAR2(5)

    Whether the cluster is to be cached in the buffer cache (CACHE | NOCACHE)

    BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool for the cluster

    SINGLE_TABLE

    VARCHAR2(5)

    Whether this is a single-table cluster (Y | N)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 22 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_COL_COMMENTS

ALL_COL_COMMENTS lists comments on columns of tables and views accessible to the current user.

Related Views

  • DBA_COL_COMMENTS lists comments on all tables and views in the database.
  • USER_COL_COMMENTS lists comments on tables and views owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the column

    COMMENTS

    VARCHAR2(4000)

    Comment on the column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 23 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_COL_PRIVS

ALL_COL_PRIVS describes the following types of grants:

  • Column object grants for which the current user is the object owner, grantor, or grantee
  • Column object grants for which an enabled role or PUBLIC is the grantee

Related Views

  • DBA_COL_PRIVS describes all column object grants in the database.
  • USER_COL_PRIVS describes the column object grants for which the current user is the object owner, grantor, or grantee.

    Column Datatype NULL Description

    GRANTOR

    VARCHAR2(30)

    NOT NULL

    Name of the user who performed the grant

    GRANTEE

    VARCHAR2(30)

    NOT NULL

    Name of the user to whom access was granted

    TABLE_SCHEMA

    VARCHAR2(30)

    NOT NULL

    Schema of the object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the column

    PRIVILEGE

    VARCHAR2(40)

    NOT NULL

    Privilege on the column

    GRANTABLE

    VARCHAR2(3)

    Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
    See Also:
    • "DBA_COL_PRIVS"
    • "USER_COL_PRIVS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 24 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_COL_PRIVS_MADE

ALL_COL_PRIVS_MADE describes the column object grants for which the current user is the object owner or grantor.

Related View

USER_COL_PRIVS_MADE describes the column object grants for which the current user is the object owner. This view does not display the OWNER column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
COLUMN_NAME | VARCHAR2(30) | NOT NULL | Name of the column
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Privilege on the column
GRANTABLE | VARCHAR2(3) |  | Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
See Also:

"USER_COL_PRIVS_MADE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 25 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_COL_PRIVS_RECD

ALL_COL_PRIVS_RECD describes the following types of grants:

  • Column object grants for which the current user is the grantee
  • Column object grants for which an enabled role or PUBLIC is the grantee

Related View

USER_COL_PRIVS_RECD describes the column object grants for which the current user is the grantee. This view does not display the GRANTEE column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NUL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
COLUMN_NAME | VARCHAR2(30) | NOT NULL | Name of the column
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Privilege on the column
GRANTABLE | VARCHAR2(3) |  | Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
See Also:

"USER_COL_PRIVS_RECD"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 26 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_COLL_TYPES

ALL_COLL_TYPES describes all named collection types (varrays and nested tables) accessible to the current user.

Related Views

  • DBA_COLL_TYPES describes all named collection types in the database.
  • USER_COLL_TYPES describes all named collection types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the collection

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the collection

    COLL_TYPE

    VARCHAR2(30)

    NOT NULL

    Description of the collection, such as VARYING ARRAY, [nested] TABLE

    UPPER_BOUND

    NUMBER

    For varrays only, maximum size

    ELEM_TYPE_MOD

    VARCHAR2(7)

    Whether the collection

    ELEM_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type upon which the collection is based. This value is useful primarily in the case of a user-defined type.

    ELEM_TYPE_NAME

    VARCHAR2(30)

    Name of the datatype or user-defined type upon which the collection is based

    LENGTH

    NUMBER

    Length of CHAR elements or maximum length of VARCHAR or VARCHAR2 elements

    PRECISION

    NUMBER

    Decimal precision of NUMBER or DECIMAL elements; binary precision of FLOAT elements

    SCALE

    NUMBER

    Scale of NUMBER or DECIMAL elements

    CHARACTER_SET_NAME

    VARCHAR2(44)

    Name of the character set (CHAR_CS | NCHAR_CS)

    ELEM_STORAGE

    VARCHAR2(7)

    [Obsolete column]

    NULLS_STORED

    VARCHAR2(3)

    [Obsolete column]
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 27 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CONS_COLUMNS

ALL_CONS_COLUMNS describes columns that are accessible to the current user and that are specified in constraints.

Related Views

  • DBA_CONS_COLUMNS describes all columns in the database that are specified in constraints.
  • USER_CONS_COLUMNS describes columns that are owned by the current user and that are specified in constraints.

    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

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table with constraint definition

    COLUMN_NAME

    VARCHAR2(4000)

    Name of the column or attribute of the object type column specified in the constraint definition

    Note: If you create a constraint on a user-defined REF column, the system creates the constraint on the attributes that make up the REF column. Therefore, the column names displayed in this view are the attribute names, with the REF column name as a prefix, in the following form:

    "REF_name"."attribute"

    POSITION

    NUMBER

    Original position of column or attribute in the definition of the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 28 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CONS_OBJ_COLUMNS

ALL_CONS_OBJ_COLUMNS displays information about the types that object columns (or attributes) or collection elements have been constrained to, in the tables accessible to the current user.

Related Views

  • DBA_CONS_OBJ_COLUMNS displays information about the types that object columns (or attributes) or collection elements have been constrained to, in all tables in the database.
  • USER_CONS_OBJ_COLUMNS displays information about the types that object columns (or attributes) or collection elements have been constrained to, in the tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table containing the object column or attribute

    COLUMN_NAME

    VARCHAR2(4000)

    Fully qualified name of the object column or attribute

    CONS_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type that the column (or element) is constrained to

    CONS_TYPE_NAME

    VARCHAR2(30)

    Name of the type that the column (or element) is constrained to

    CONS_TYPE_ONLY

    VARCHAR2(15)

    Indicates whether the column (or element) is constrained to ONLY type (Y) or not (N)
    See Also:
    • "DBA_CONS_OBJ_COLUMNS"
    • "USER_CONS_OBJ_COLUMNS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 29 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

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 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)

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name associated with the table (or view) with constraint definition

    SEARCH_CONDITION

    LONG

    Text of search condition for a check constraint

    R_OWNER

    VARCHAR2(30)

    Owner of table referred to in a referential constraint

    R_CONSTRAINT_NAME

    VARCHAR2(30)

    Name of the unique constraint definition for referenced table

    DELETE_RULE

    VARCHAR2(9)

    Delete rule for a referential constraint (CASCADE or NO ACTION)

    STATUS

    VARCHAR2(8)

    Enforcement status of constraint (ENABLED or DISABLED)

    DEFERRABLE

    VARCHAR2(14)

    Whether the constraint is deferrable

    DEFERRED

    VARCHAR2(9)

    Whether the constraint was initially deferred

    VALIDATED

    VARCHAR2(13)

    Whether all data obeys the constraint (VALIDATED or NOT VALIDATED)

    GENERATED

    VARCHAR2(14)

    Whether the name of the constraint is user or system generated

    BAD

    VARCHAR2(3)

    A YES value indicates that this constraint specifies a century in an ambiguous manner. 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 Oracle9i SQL Reference and Oracle9i Application Developer's Guide - Fundamentals

    RELY

    VARCHAR2(4)

    Whether an enabled constraint is enforced or unenforced.

    See Also: the constraints in Oracle9i SQL 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
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 30 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_CONTEXT

ALL_CONTEXT describes all context namespaces in the current session for which attributes and values have been specified using the DBMS_SESSION.SET_CONTEXT procedure.

Related View

DBA_CONTEXT describes all context namespaces defined in the database, regardless whether any attributes have been specified for them using the DBMS_SESSION.SET_CONTEXT procedure.

Column | Datatype | NULL | Description
NAMESPACE | VARCHAR2(30) | NOT NULL | Name of the context namespace
SCHEMA | VARCHAR2(30) | NOT NULL | Schema name of the designated package that can set attributes using this namespace
PACKAGE | VARCHAR2(30) | NOT NULL | Package name of the designated package that can set attributes using this namespace
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 31 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DB_LINKS

ALL_DB_LINKS describes database links accessible to the current user. This view does not display the PASSWORD column.

Related Views

  • DBA_DB_LINKS describes all database links defined in the database. This view does not display the PASSWORD column.
  • USER_DB_LINKS describes database links in the current user's schema. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Name of the owner of the database link

    DB_LINK

    VARCHAR2(12)

    NOT NULL

    Name of the database link

    USERNAME

    VARCHAR2(30)

    Name of user when logging in

    PASSWORD

    VARCHAR2(30)

    Login password for current user

    HOST

    VARCHAR2(200)

    Net8 connect string

    CREATED

    DATE

    NOT NULL

    Creation time of the database link
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 32 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DEF_AUDIT_OPTS

ALL_DEF_AUDIT_OPTS contains default object-auditing options that will be applied when objects are created. The output for each column takes one of the following forms:

  • -/-: no default auditing
  • S/-: auditing whenever successful
  • -/S: auditing whenever not successful

    Column Datatype NULL Description

    ALT

    VARCHAR2(3)

    Auditing ALTER WHENEVER SUCCESSFUL / UNSUCCESSFUL

    AUD

    VARCHAR2(3)

    Auditing AUDIT WHENEVER SUCCESSFUL / UNSUCCESSFUL

    COM

    VARCHAR2(3)

    Auditing COMMENT WHENEVER SUCCESSFUL / UNSUCCESSFUL

    DEL

    VARCHAR2(3)

    Auditing DELETE WHENEVER SUCCESSFUL / UNSUCCESSFUL

    GRA

    VARCHAR2(3)

    Auditing GRANT WHENEVER SUCCESSFUL / UNSUCCESSFUL

    IND

    VARCHAR2(3)

    Auditing INDEX WHENEVER SUCCESSFUL / UNSUCCESSFUL

    INS

    VARCHAR2(3)

    Auditing INSERT WHENEVER SUCCESSFUL / UNSUCCESSFUL

    LOC

    VARCHAR2(3)

    Auditing LOCK WHENEVER SUCCESSFUL / UNSUCCESSFUL

    REN

    VARCHAR2(3)

    Auditing RENAME WHENEVER SUCCESSFUL / UNSUCCESSFUL

    SEL

    VARCHAR2(3)

    Auditing SELECT WHENEVER SUCCESSFUL / UNSUCCESSFUL

    UPD

    VARCHAR2(3)

    Auditing UPDATE WHENEVER SUCCESSFUL / UNSUCCESSFUL

    REF

    VARCHAR2(3)

    Auditing REFERENCES WHENEVER SUCCESSFUL / UNSUCCESSFUL (not used)

    EXE

    VARCHAR2(3)

    Auditing EXECUTE WHENEVER SUCCESSFUL / UNSUCCESSFUL
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 33 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DEPENDENCIES

ALL_DEPENDENCIES describes dependencies between procedures, packages, functions, package bodies, and triggers accessible to the current user, including dependencies on views created without any database links. This view does not display the SCHEMAID column.

Related Views

  • DBA_DEPENDENCIES describes all dependencies between objects in the database. This view does not display the SCHEMAID column.
  • USER_DEPENDENCIES describes dependencies between objects in the current user's schema. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    TYPE

    VARCHAR2(12)

    Type of object

    REFERENCED_OWNER

    VARCHAR2(30)

    Owner of the parent object

    REFERENCED_NAME

    VARCHAR2(64)

    Type of parent object

    REFERENCED_TYPE

    VARCHAR2(12)

    Type of referenced object

    REFERENCED_LINK_NAME

    VARCHAR2(128)

    Name of the link to the parent object (if remote)

    SCHEMAID

    NUMBER

    ID of the current schema

    DEPENDENCY_TYPE

    VARCHAR2(4)

    Whether the dependency is a REF dependency (REF) or not (HARD)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 34 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIM_ATTRIBUTES

ALL_DIM_ATTRIBUTES describes the relationship between a dimension level and a functionally dependent column. The level columns and the dependent column must be in the same table.

Related Views

  • DBA_DIM_ATTRIBUTES describes all such dimension relationships in the database.
  • USER_DIM_ATTRIBUTES describes all such dimension attributes in the current user's schema.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    LEVEL_NAME

    VARCHAR2(30)

    Name of the hierarchy level

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Dependent column name

    INFERRED

    CHAR(1)

    Whether inferred
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 35 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIM_CHILD_OF

ALL_DIM_CHILD_OF describes hierarchical relationships of 1 to n between the pairs of levels in the dimensions accessible to the current user.

Related Views

  • DBA_DIM_CHILD_OF describes all such hierarchical relationships in the database.
  • USER_DIM_CHILD_OF describes all such hierarchical attributes in the current user's schema.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    HIERARCHY_NAME

    VARCHAR2(30)

    Hierarchy name

    POSITION

    NUMBER

    NOT NULL

    Hierarchical position within this hierarchy, position 1 being the most detailed

    CHILD_LEVEL_NAME

    VARCHAR2(30)

    Child side of 1:n relationship

    JOIN_KEY_ID

    VARCHAR2(40)

    If non-null, then the child joins to the parent

    PARENT_LEVEL_NAME

    VARCHAR2(30)

    Parent side of 1:n relationship in relation to the CHILD_LEVEL_NAME
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 36 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIM_HIERARCHIES

ALL_DIM_HIERARCHIES describes all dimension hierarchies accessible to the current user.

Related Views

  • DBA_DIM_HIERARCHIES describes all such hierarchies in the database.
  • USER_DIM_HIERARCHIES describes all such hierarchies owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    HIERARCHY_NAME

    VARCHAR2(30)

    Hierarchy name
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 37 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIM_JOIN_KEY

ALL_DIM_JOIN_KEY describes the joins between two dimension tables that are accessible to the current user. The join is always specified between a parent dimension level column and a child column.

Related Views

  • DBA_DIM_JOIN_KEY describes all such joins in the database.
  • USER_DIM_JOIN_KEY describes all such joins owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    DIM_KEY_ID

    NUMBER

    NOT NULL

    Join key ID (unique within a dimension)

    LEVEL_NAME

    VARCHAR2(30)

    Name of the hierarchy level

    KEY_POSITION

    NUMBER

    NOT NULL

    Ordinal position of the key column within the level

    HIERARCHY_NAME

    VARCHAR2(30)

    Name of the hierarchy

    CHILD_JOIN_COLUMN

    VARCHAR2(30)

    NOT NULL

    Name of the join column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 38 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIM_LEVEL_KEY

ALL_DIM_LEVEL_KEY describes a column of a dimension level accessible to the current user. The position of a column within a level is specified by KEY_POSITION.

Related Views

  • DBA_DIM_LEVEL_KEY describes all columns of dimension levels in the database.
  • USER_DIM_LEVEL_KEY describes all columns of dimension levels owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    LEVEL_NAME

    VARCHAR2(30)

    Name of the hierarchy level

    KEY_POSITION

    NUMBER

    NOT NULL

    Ordinal position of the key column within the level

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the key column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 39 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIM_LEVELS

ALL_DIM_LEVELS describes the dimension levels accessible to the current user. All columns of a dimension level must come from the same relation.

Related Views

  • DBA_DIM_LEVELS describes all dimension levels in the database.
  • USER_DIM_LEVELS describes the levels of all dimensions owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    LEVEL_NAME

    VARCHAR2(30)

    Unique within a dimension

    NUM_COLUMNS

    NUMBER

    Number of columns in the level definition

    DETAILOBJ_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the detail object that the keys of this level come from

    DETAILOBJ_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table that the keys of this level come from
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 40 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIMENSIONS

ALL_DIMENSIONS describes dimension objects accessible to the current user.

Related Views

  • DBA_DIMENSIONS describes all dimensions in the database.
  • USER_DIMENSIONS describes dimensions in the current user's schema.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the dimension

    DIMENSION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the dimension

    INVALID

    VARCHAR2(1)

    Whether the dimension is invalid (Y/N)

    REVISION

    NUMBER

    Dimension revision level
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 41 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_DIRECTORIES

ALL_DIRECTORIES describes all directories accessible to the current user.

Related View

DBA_DIRECTORIES describes all directories in the database.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the directory (always SYS)
DIRECTORY_NAME | VARCHAR2(30) | NOT NULL | Name of the directory
DIRECTORY_PATH | VARCHAR2(4000) |  | Operating system pathname for the directory
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 42 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_ERRORS

ALL_ERRORS describes current errors on all stored objects (views, procedures, functions, packages, and package bodies) accessible to the current user.

Related Views

  • DBA_ERRORS describes all current errors on all views, procedures, functions, packages, and package bodies in the database.
  • USER_ERRORS describes all current errors on all views, procedures, functions, packages, and package bodies owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    TYPE

    VARCHAR2(12)

    Type of object

    SEQUENCE

    NUMBER

    NOT NULL

    Sequence number, for ordering

    LINE

    NUMBER

    NOT NULL

    Line number at which this error occurs

    POSITION

    NUMBER

    NOT NULL

    Position in the line at which this error occurs

    TEXT

    VARCHAR2(4000)

    NOT NULL

    Text of the error
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 43 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_EVALUATION_CONTEXT_TABLES

ALL_EVALUATION_CONTEXT_TABLES describes the tables in the rule evaluation contexts accessible to the current user.

Related Views

  • DBA_EVALUATION_CONTEXT_TABLES describes the tables in all rule evaluation contexts in the database.
  • USER_EVALUATION_CONTEXT_TABLES describes the tables in the rule evaluation contexts owned by the current user. This view does not display the EVALUATION_CONTEXT_OWNER column.

    Column Datatype NULL Description

    EVALUATION_CONTEXT_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the evaluation context

    EVALUATION_CONTEXT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the evaluation context

    TABLE_ALIAS

    VARCHAR2(30)

    Alias for a table in the evaluation context

    TABLE_NAME

    VARCHAR2(4000)

    Name of the table referred to by the table alias
    See Also:
    • "DBA_EVALUATION_CONTEXT_TABLES"
    • "USER_EVALUATION_CONTEXT_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 44 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_EVALUATION_CONTEXT_VARS

ALL_EVALUATION_CONTEXT_VARS describes the variables in the rule evaluation contexts accessible to the current user.

Related Views

  • DBA_EVALUATION_CONTEXT_VARS describes the variables in all rule evaluation contexts in the database.
  • USER_EVALUATION_CONTEXT_VARS describes the variables in the rule evaluation contexts owned by the current user. This view does not display the EVALUATION_CONTEXT_OWNER column.

    Column Datatype NULL Description

    EVALUATION_CONTEXT_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the evaluation context

    EVALUATION_CONTEXT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the evaluation context

    VARIABLE_NAME

    VARCHAR2(30)

    Name of a variable in the evaluation context

    VARIABLE_TYPE

    VARCHAR2(4000)

    Datatype of the variable

    VARIABLE_VALUE_FUNCTION

    VARCHAR2(4000)

    Function used to retrieve the value of the variable (NULL for variables that are not implicit)

    VARIABLE_METHOD_FUNCTION

    VARCHAR2(228)

    Function used to retrieve the result of method invocation on the variable. Such a function can speed up evaluation, if there are many simple rules that invoke the method on the variable.
    See Also:
    • "DBA_EVALUATION_CONTEXT_VARS"
    • "USER_EVALUATION_CONTEXT_VARS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 45 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_EVALUATION_CONTEXTS

ALL_EVALUATION_CONTEXTS describes the rule evaluation contexts accessible to the current user.

Related Views

  • DBA_EVALUATION_CONTEXTS describes all rule evaluation contexts in the database.
  • USER_EVALUATION_CONTEXTS describes the rule evaluation contexts owned by the current user. This view does not display the EVALUATION_CONTEXT_OWNER column.

    Column Datatype NULL Description

    EVALUATION_CONTEXT_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the evaluation context

    EVALUATION_CONTEXT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the evaluation context

    EVALUATION_FUNCTION

    VARCHAR2(4000)

    Evaluation function associated with the evaluation context, if any

    EVALUATION_CONTEXT_COMMENT

    VARCHAR2(4000)

    Comment specified with the evaluation context, if any
    See Also:
    • "DBA_EVALUATION_CONTEXTS"
    • "USER_EVALUATION_CONTEXTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 46 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_EXTERNAL_LOCATIONS

ALL_EXTERNAL_LOCATIONS describes the locations (data sources) of the external tables accessible to the current user.

Related Views

  • DBA_EXTERNAL_LOCATIONS describes the locations (data sources) of all external tables in the database.
  • USER_EXTERNAL_LOCATIONS describes the locations (data sources) of the external tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the external table location

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the corresponding external table

    LOCATION

    VARCHAR2(4000)

    External table location clause

    DIRECTORY_OWNER

    CHAR(3)

    Owner of the directory containing the external table location

    DIRECTORY_NAME

    VARCHAR2(30)

    Name of the directory containing the external table location
    See Also:
    • "DBA_EXTERNAL_LOCATIONS"
    • "USER_EXTERNAL_LOCATIONS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 47 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_EXTERNAL_TABLES

ALL_EXTERNAL_TABLES describes the external tables accessible to the current user.

Related Views

  • DBA_EXTERNAL_TABLES describes all external tables in the database.
  • USER_EXTERNAL_TABLES describes the external tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the external table

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the external table

    TYPE_OWNER

    CHAR(3)

    Owner of the implementation type for the external table access driver

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the implementation type for the external table access driver

    DEFAULT_DIRECTORY_OWNER

    CHAR(3)

    Owner of the default directory for the external table (can be NULL)

    DEFAULT_DIRECTORY_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the default directory for the external table (can be NULL)

    REJECT_LIMIT

    NUMBER

    Reject limit for the external table (default is 0)

    ACCESS_TYPE

    VARCHAR2(7)

    Type of access parameters for the external table (CLOB/BLOB)

    ACCESS_PARAMETERS

    VARCHAR2(4000)

    Access parameters for the external table
    See Also:
    • "DBA_EXTERNAL_TABLES"
    • "USER_EXTERNAL_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 48 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_IND_COLUMNS

ALL_IND_COLUMNS describes the columns of indexes on all tables accessible to the current user.

Note:

For join indexes, the TABLE_NAME and TABLE_OWNER columns in this view may not match the TABLE_NAME and TABLE_OWNER columns you find in the *_INDEXES (and other similar) data dictionary views.

Related Views

  • DBA_IND_COLUMNS describes the columns of indexes on all tables in the database.
  • USER_IND_COLUMNS describes the columns of indexes owned by the current user and columns of indexes on tables owned by the current user. This view does not display the INDEX_OWNER or TABLE_OWNER columns.

    Column Datatype NULL Description

    INDEX_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the index

    INDEX_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the index

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the table or cluster

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table or cluster

    COLUMN_NAME

    VARCHAR2(4000)

    Column name or attribute of object type column

    Note: If you create an index on a user-defined REF column, the system creates the index on the attributes that make up the REF column. Therefore, the column names displayed in this view are the attribute names, with the REF column name as a prefix, in the following form:

    "REF_name"."attribute"

    COLUMN_POSITION

    NUMBER

    NOT NULL

    Position of column or attribute within the index

    COLUMN_LENGTH

    NUMBER

    NOT NULL

    Indexed length of the column

    CHAR_LENGTH

    NUMBER

    Maximum codepoint length of the column

    DESCEND

    VARCHAR2(4)

    Whether the column is sorted in descending order (Y/N)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 49 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_IND_EXPRESSIONS

ALL_IND_EXPRESSIONS describes the expressions of function-based indexes on tables accessible to the current user.

Related Views

  • DBA_IND_EXPRESSIONS describes the expressions of all function-based indexes in the database.
  • USER_IND_EXPRESSIONS describes the expressions of function-based indexes on tables owned by the current user. This view does not display the INDEX_OWNER or TABLE_OWNER columns.

    Column Datatype NULL Description

    INDEX_OWNER

    VARCHAR2(30)

    NOT NULL

    Index owner

    INDEX_NAME

    VARCHAR2(30)

    NOT NULL

    Index name

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Table or cluster owner

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table or cluster name

    COLUMN_EXPRESSION

    LONG

    Function-based index expression defining the column

    COLUMN_POSITION

    NUMBER

    NOT NULL

    Position of column or attribute within index
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 50 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_IND_PARTITIONS

ALL_IND_PARTITIONS describes, for each index partition accessible to the current user, the partition-level partitioning information, the storage parameters for the partition, and various partition statistics collected by ANALYZE statements.

Related Views

  • DBA_IND_PARTITIONS describes all index partitions in the database.
  • USER_IND_PARTITIONS describes the index partitions owned by the current user. This view does not display the INDEX_OWNER column.

    Column Datatype Description

    INDEX_OWNER

    VARCHAR2(30)

    Owner of the index

    INDEX_NAME

    VARCHAR2(30)

    Name of the index

    COMPOSITE

    VARCHAR2(3)

    Whether the partition belongs to a local index on a composite-partitioned table (YES | NO)

    PARTITION_NAME

    VARCHAR2(30)

    Name of the partition

    SUBPARTITION_COUNT

    NUMBER

    If a local index on a composite-partitioned table, the number of subpartitions in the partition

    HIGH_VALUE

    LONG

    Partition bound value expression

    HIGH_VALUE_LENGTH

    NUMBER

    Length of partition bound value expression

    PARTITION_POSITION

    NUMBER

    Position of the partition within the index

    STATUS

    VARCHAR2(8)

    Whether index partition is USABLE or UNUSABLE

    TABLESPACE_NAME

    VARCHAR2(30)

    Name of the tablespace containing the partition

    PCT_FREE

    NUMBER

    Minimum percentage of free space in a block

    INI_TRANS

    NUMBER

    Initial number of transactions

    MAX_TRANS

    NUMBER

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent in bytes

    NEXT_EXTENT

    NUMBER

    Size of secondary extents in bytes

    MIN_EXTENT

    NUMBER

    Minimum number of extents allowed in the segment

    MAX_EXTENT

    NUMBER

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of process freelists allocated in this segment

    FREELIST_GROUPS

    NUMBER

    Number of process freelist groups allocated in this segment

    LOGGING

    VARCHAR2(7)

    Logging attribute of partition

    COMPRESSION

    VARCHAR2(8)

    Indicates whether key compression is ENABLED or DISABLED for a partitioned index. NULL for a nonpartitioned index.

    BLEVEL

    NUMBER

    B*-Tree level: depth of the index from its root block to its leaf blocks. A depth of 0 indicates that the root block and leaf block are the same.

    LEAF_BLOCKS

    NUMBER

    Number of leaf blocks in the index partition

    DISTINCT_KEYS

    NUMBER

    Number of distinct keys in the index partition

    AVG_LEAF_BLOCKS_PER_KEY

    NUMBER

    Average number of leaf blocks in which each distinct value in the index appears, rounded to the nearest integer. For indexes that enforce UNIQUE and PRIMARY KEY constraints, this value is always 1.

    AVG_DATA_BLOCKS_PER_KEY

    NUMBER

    Average number of data blocks in the table that are pointed to by a distinct value in the index rounded to the nearest integer. This statistic is the average number of data blocks that contain rows that contain a given value for the indexed columns.

    CLUSTERING_FACTOR

    NUMBER

    Indicates the amount of order of the rows in the table based on the values of the index.

    • If the value is near the number of blocks, then the table is very well ordered. In this case, the index entries in a single leaf block tend to point to rows in the same data blocks.
    • If the value is near the number of rows, then the table is very randomly ordered. In this case, it is unlikely that index entries in the same leaf block point to rows in the same data blocks.

    NUM_ROWS

    NUMBER

    Number of rows returned by the ANALYZE statement

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this partition

    LAST_ANALYZED

    DATE

    Date on which this partition was most recently analyzed

    BUFFER_POOL

    VARCHAR2(7)

    Actual buffer pool for the partition

    USER_STATS

    VARCHAR2(3)

    Indicates whether the statistics were entered directly by the user (YES) or not (NO)

    PCT_DIRECT_ACCESS

    NUMBER

    If a secondary index on index-organized table, the percentage of rows with VALID guess

    GLOBAL_STATS

    VARCHAR2(3)

    Indicates whether statistics for the partition were collected for the partition as a whole (YES) or were estimated from statistics on underlying subpartitions (NO).

    DOMIDX_OPSTATUS

    VARCHAR2(6)

    PARAMETERS

    VARCHAR2(1000)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 51 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_IND_SUBPARTITIONS

ALL_IND_SUBPARTITIONS describes, for each index subpartition accessible to the current user, the partition-level partitioning information, the storage parameters for the subpartition, and various partition statistics collected by ANALYZE statements.

Related Views

  • DBA_IND_SUBPARTITIONS describes all index subpartitions in the database.
  • USER_IND_SUBPARTITIONS describes the index subpartitions owned by the current user. This view does not display the INDEX_OWNER column.

    Column Datatype NULL Description

    INDEX_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the index

    INDEX_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the index

    PARTITION_NAME

    VARCHAR2(30)

    Name of the partition

    SUBPARTITION_NAME

    VARCHAR2(30)

    Name of the subpartition

    SUBPARTITION_POSITION

    NUMBER

    NOT NULL

    Position of a subpartition within a partition

    STATUS

    VARCHAR2(8)

    Whether index partition is usable or not

    TABLESPACE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the tablespace containing the partition

    PCT_FREE

    NUMBER

    NOT NULL

    Minimum percentage of free space in a block

    INI_TRANS

    NUMBER

    NOT NULL

    Initial number of transactions

    MAX_TRANS

    NUMBER

    NOT NULL

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent in bytes

    NEXT_EXTENT

    NUMBER

    Size of secondary extents in bytes

    MIN_EXTENT

    NUMBER

    NOT NULL

    Minimum number of extents allowed in the segment

    MAX_EXTENT

    NUMBER

    NOT NULL

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    NOT NULL

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of process freelists allocated in this segment

    FREELIST_GROUPS

    NUMBER

    Number of process freelist groups allocated in this segment

    LOGGING

    VARCHAR2(3)

    Logging attribute of partition

    BLEVEL

    NUMBER

    B-Tree level: depth of the index from its root block to its leaf blocks. A depth of 0 indicates that the root block and leaf block are the same.

    LEAF_BLOCKS

    NUMBER

    Number of leaf blocks in the index

    DISTINCT_KEYS

    NUMBER

    Number of distinct keys in the index partition

    AVG_LEAF_BLOCKS_PER_KEY

    NUMBER

    Average number of leaf blocks in which each distinct value in the index appears, rounded to the nearest integer. For indexes that enforce UNIQUE and PRIMARY KEY constraints, this value is always 1.

    AVG_DATA_BLOCKS_PER_KEY

    NUMBER

    Average number of data blocks in the table that are pointed to by a distinct value in the index rounded to the nearest integer. This statistic is the average number of data blocks that contain rows that contain a given value for the indexed columns.

    CLUSTERING_FACTOR

    NUMBER

    Indicates the amount of order of the rows in the table based on the values of the index.

    • If the value is near the number of blocks, then the table is very well ordered. In this case, the index entries in a single leaf block tend to point to rows in the same data blocks.
    • If the value is near the number of rows, then the table is very randomly ordered. In this case, it is unlikely that index entries in the same leaf block point to rows in the same data blocks.

    NUM_ROWS

    NUMBER

    Number of rows in this index subpartition

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this subpartition

    LAST_ANALYZED

    DATE

    Date on which this partition was most recently analyzed

    BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool for the subpartition

    USER_STATS

    VARCHAR2(3)

    Whether the statistics were entered directly by the user

    GLOBAL_STATS

    VARCHAR2(3)

    Indicates whether column statistics for the subpartition statistics were collected by analyzing the table as a whole (YES) or estimated from statistics gathered on partitions and subpartitions (NO).
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 52 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_INDEXES

ALL_INDEXES describes indexes on all tables accessible to the current user. To gather statistics for this view and the related views DBA_INDEXES and USER_INDEXES, use the SQL ANALYZE statement.

Note:

Column names followed by an asterisk are populated only if you collect statistics on the index using the ANALYZE statement or the DBMS_STATS package.

Related Views

  • DBA_INDEXES describes all indexes in the database.
  • USER_INDEXES describes the indexes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the index

    INDEX_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the index

    INDEX_TYPE

    VARCHAR2(12)

    Type of index (NORMAL, BITMAP, FUNCTION-BASED NORMAL, FUNCTION-BASED BITMAP, or DOMAIN)

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the indexed object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the indexed object

    TABLE_TYPE

    CHAR(5)

    Type of the indexed object (for example, TABLE, CLUSTER)

    UNIQUENESS

    VARCHAR2(9)

    Whether the index is UNIQUE or NONUNIQUE

    COMPRESSION

    VARCHAR2(11)

    Whether the index is ENABLED or DISABLED

    PREFIX_LENGTH

    NUMBER

    Number of columns in the prefix of the compression key

    TABLESPACE_NAME

    VARCHAR2(30)

    Name of the tablespace containing the index

    INI_TRANS

    NUMBER

    Initial number of transactions

    MAX_TRANS

    NUMBER

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent

    NEXT_EXTENT

    NUMBER

    Size of secondary extents

    MIN_EXTENTS

    NUMBER

    Minimum number of extents allowed in the segment

    MAX_EXTENTS

    NUMBER

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    Percentage increase in extent size

    PCT_THRESHOLD

    NUMBER

    Threshold percentage of block space allowed per index entry

    INCLUDE_COLUMN

    NUMBER

    Column ID of the last column to be included in index-organized table primary key (non-overflow) index. This column maps to the COLUMN_ID column of the *_TAB_COLUMNS data dictionary views.

    FREELISTS

    NUMBER

    Number of process freelists allocated to this segment

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated to this segment

    PCT_FREE

    NUMBER

    Minimum percentage of free space in a block

    LOGGING

    VARCHAR2(3)

    Logging information

    BLEVEL*

    NUMBER

    B*-Tree level: depth of the index from its root block to its leaf blocks. A depth of 0 indicates that the root block and leaf block are the same.

    LEAF_BLOCKS*

    NUMBER

    Number of leaf blocks in the index

    DISTINCT_KEYS*

    NUMBER

    Number of distinct indexed values. For indexes that enforce UNIQUE and PRIMARY KEY constraints, this value is the same as the number of rows in the table (USER_TABLES.NUM_ROWS)

    AVG_LEAF_BLOCKS_PER_KEY*

    NUMBER

    Average number of leaf blocks in which each distinct value in the index appears, rounded to the nearest integer. For indexes that enforce UNIQUE and PRIMARY KEY constraints, this value is always 1.

    AVG_DATA_BLOCKS_PER_KEY*

    NUMBER

    Average number of data blocks in the table that are pointed to by a distinct value in the index rounded to the nearest integer. This statistic is the average number of data blocks that contain rows that contain a given value for the indexed columns.

    CLUSTERING_FACTOR*

    NUMBER

    Indicates the amount of order of the rows in the table based on the values of the index.

    • If the value is near the number of blocks, then the table is very well ordered. In this case, the index entries in a single leaf block tend to point to rows in the same data blocks.
    • If the value is near the number of rows, then the table is very randomly ordered. In this case, it is unlikely that index entries in the same leaf block point to rows in the same data blocks.

    STATUS

    VARCHAR2(8)

    Whether a nonpartitioned index is VALID or UNUSABLE

    NUM_ROWS

    NUMBER

    Number of rows in the index

    SAMPLE_SIZE

    NUMBER

    Size of the sample used to analyze the index

    LAST_ANALYZED

    DATE

    Date on which this index was most recently analyzed

    DEGREE

    VARCHAR2(40)

    Number of threads per instance for scanning the index

    INSTANCES

    VARCHAR2(40)

    Number of instances across which the indexes to be scanned

    PARTITIONED

    VARCHAR2(3)

    Whether this index is partitioned (YES | NO)

    TEMPORARY

    VARCHAR2(1)

    Whether the index is on a temporary table

    GENERATED

    VARCHAR2(1)

    Whether the name of the index is system generated (Y|N)

    SECONDARY

    VARCHAR2(1)

    Whether the index is a secondary object created by the ODCIIndexCreate method of the Oracle9i Data Cartridge (Y|N)

    BUFFER_POOL

    VARCHAR2(7)

    Name of the default buffer pool to be used for the index blocks

    USER_STATS

    VARCHAR2(3)

    Whether the statistics were entered directly by the user

    DURATION

    VARCHAR2(15)

    Indicates the duration of a temporary table:

    • SYS$SESSION: the rows are preserved for the duration of the session
    • SYS$TRANSACTION: the rows are deleted after COMMIT

    Null for a permanent table

    PCT_DIRECT_ACCESS

    NUMBER

    For a secondary index on an index-organized table, the percentage of rows with VALID guess

    ITYP_OWNER

    NUMBER

    For a domain index, the owner of the indextype

    ITYP_NAME

    VARCHAR2(30)

    For a domain index, the name of the indextype

    PARAMETERS

    VARCHAR2(1000)

    For a domain index, the parameter string

    GLOBAL_STATS

    VARCHAR2(3)

    For partitioned indexes, indicates whether statistics were collected by analyzing index as a whole (YES) or were estimated from statistics on underlying index partitions and subpartitions (NO).

    DOMIDX_STATUS

    VARCHAR

    Reflects the status of the domain index

    • NULL: the specified index is not a domain index
    • VALID: the index is a valid domain index
    • IDXTYP_INVLD: the indextype of this domain index is invalid

    DOMIDX_OPSTATUS

    VARCHAR

    Reflects the status of an operation that was performed on a domain index

    • NULL: the specified index is not a domain index
    • VALID: the operation performed without errors
    • FAILED: the operation failed with an error

    FUNCIDX_STATUS

    VARCHAR

    Indicates the status of a function-based index

    • NULL: this is not a function-based index
    • ENABLED: the function-based index is enabled
    • DISABLED: the function-based index is disabled
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 53 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_INDEXTYPE_COMMENTS

ALL_INDEXTYPE_COMMENTS lists all comments for user-defined indextypes accessible to the current user.

Related Views

  • DBA_INDEXTYPE_COMMENTS lists all comments for user-defined indextypes in the database.
  • USER_INDEXTYPE_COMMENTS lists all comments for user-defined indextypes owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the user-defined indextype

    INDEXTYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the user-defined indextype

    COMMENTS

    VARCHAR2(4000)

    Comment for the user-defined indextype
    See Also:
    • "DBA_INDEXTYPE_COMMENTS"
    • "USER_INDEXTYPE_COMMENTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 54 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_INDEXTYPE_OPERATORS

ALL_INDEXTYPE_OPERATORS lists all operators supported by indextypes accessible to the current user.

Related Views

  • DBA_INDEXTYPE_OPERATORS lists all operators supported by indextypes in the database.
  • USER_INDEXTYPE_OPERATORS lists all operators supported by indextypes owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the indextype

    INDEXTYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the indextype

    OPERATOR_SCHEMA

    VARCHAR2(30)

    NOT NULL

    Name of the operator schema

    OPERATOR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the operator for which the indextype is defined

    BINDING#

    NUMBER

    NOT NULL

    Binding# associated with the operator
    See Also:
    • "DBA_INDEXTYPE_OPERATORS"
    • "USER_INDEXTYPE_OPERATORS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 55 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_INDEXTYPES

ALL_INDEXTYPES describes all indextypes accessible to the current user.

Related Views

  • DBA_INDEXTYPES describes all indextypes in the database.
  • USER_INDEXTYPES describes all indextypes owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the indextype

    INDEXTYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the indextype

    IMPLEMENTATION_SCHEMA

    VARCHAR2(30)

    NOT NULL

    Name of the schema for indextype implementation (that is, containing the indextype operators)

    IMPLEMENTATION_NAME

    VARCHAR2(30)

    NOT NULL

    Name of indextype implementation type

    INTERFACE_VERSION

    NUMBER

    Version of indextype interface

    IMPLEMENTATION_VERSION

    NUMBER

    NOT NULL

    Version of indextype implementation

    NUMBER_OF_OPERATORS

    NUMBER

    Number of operators associated with the indextype

    PARTITIONING

    VARCHAR2(10)

    Kinds of local partitioning supported by the indextype
    See Also:
    • "DBA_INDEXTYPES"
    • "USER_INDEXTYPES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 56 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_INTERNAL_TRIGGERS

ALL_INTERNAL_TRIGGERS describes internal triggers on tables accessible to the current user. Internal triggers are internal pieces of code executed when a particular flag is set for a table.

Related Views

  • DBA_INTERNAL_TRIGGERS describes internal triggers on all tables in the database. This view does not display the OWNER_NAME column.
  • USER_INTERNAL_TRIGGERS describes all internal triggers on tables owned by the current user. This view does not display the OWNER_NAME column.

    Column Datatype NULL Description

    TABLE_NAME

    VARCHAR2(30)

    Name of the table on which the trigger is defined

    OWNER_NAME

    VARCHAR2(30)

    Owner of the table

    INTERNAL_TRIGGER_TYPE

    VARCHAR2(19)

    Indicates the type of internal trigger on the table
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 57 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_ARGUMENTS

ALL_JAVA_ARGUMENTS displays argument information about the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_ARGUMENTS displays argument information about all stored Java classes in the database.
  • USER_JAVA_ARGUMENTS displays argument information about the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    METHOD_INDEX

    NUMBER

    Index of the hosting method of the argument

    METHOD_NAME

    VARCHAR2(4000)

    Name of the hosting method of the argument

    ARGUMENT_POSITION

    NUMBER

    Position of the argument, starting from 0

    ARRAY_DEPTH

    NUMBER

    Array depth of the type of the argument

    BASE_TYPE

    VARCHAR2(7)

    Base type of the type of the argument:

    • int
    • long
    • float
    • double
    • boolean
    • byte
    • char
    • short
    • class

    ARGUMENT_CLASS

    VARCHAR2(4000)

    Actual class name of the argument if the base type is class
    See Also:
    • "DBA_JAVA_ARGUMENTS"
    • "USER_JAVA_ARGUMENTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 58 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_CLASSES

ALL_JAVA_CLASSES displays class level information about the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_CLASSES displays class level information about all stored Java classes in the database.
  • USER_JAVA_CLASSES displays class level information about the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    MAJOR

    NUMBER

    Major version number of the Java class, as defined in the JVM specification

    MINOR

    NUMBER

    Minor version number of the Java class, as defined in the JVM specification

    KIND

    VARCHAR2(9)

    Indicates whether the stored object is a Java class (CLASS) or a Java interface (INTERFACE)

    ACCESSIBILITY

    VARCHAR2(6)

    Accessibility of the Java class

    IS_INNER

    VARCHAR2(3)

    Indicates whether this Java class is an inner class (YES) or not (NO)

    IS_ABSTRACT

    VARCHAR2(3)

    Indicates whether this Java class is an abstract class (YES) or not (NO)

    IS_FINAL

    VARCHAR2(3)

    Indicates whether this Java class is a final class (YES) or not (NO)

    IS_DEBUG

    VARCHAR2(3)

    Indicates whether this Java class contains debug information (YES) or not (NO)

    SOURCE

    VARCHAR2(4000)

    Source designation of the Java class

    SUPER

    VARCHAR2(4000)

    Super class of this Java class

    OUTER

    VARCHAR2(4000)

    Outer class of this Java class if this Java class is an inner class
    See Also:
    • "DBA_JAVA_CLASSES"
    • "USER_JAVA_CLASSES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 59 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_DERIVATIONS

ALL_JAVA_DERIVATIONS displays mapping information about Java source objects and their derived Java class objects and Java resource objects for the Java classes accessible to the current user.

Related Views

  • DBA_JAVA_DERIVATIONS displays mapping information about Java source objects and their derived Java class objects and Java resource objects for all Java classes in the database.
  • USER_JAVA_DERIVATIONS displays mapping information about Java source objects and their derived Java class objects and Java resource objects for the Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java source object

    SOURCE_NAME

    VARCHAR2(4000)

    Name of the Java source object

    CLASS_INDEX

    NUMBER

    Index of the derived Java class object

    CLASS_NAME

    VARCHAR2(4000)

    Name of the derived Java class object

    RESOURCE_INDEX

    NUMBER

    Index of the derived Java resource object

    RESOURCE_NAME

    VARCHAR2(4000)

    Name of the derived Java resource object
    See Also:
    • "DBA_JAVA_DERIVATIONS"
    • "USER_JAVA_DERIVATIONS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 60 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_FIELDS

ALL_JAVA_FIELDS displays field information about the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_FIELDS displays field information about all stored Java classes in the database.
  • USER_JAVA_FIELDS displays field information about the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    FIELD_INDEX

    NUMBER

    Index of the field

    FIELD_NAME

    VARCHAR2(4000)

    Name of the field identified by the FIELD_INDEX column

    ACCESSIBILITY

    VARCHAR2(9)

    Accessibility of the field:

    • PUBLIC
    • PRIVATE
    • PROTECTED

    IS_STATIC

    VARCHAR2(3)

    Indicates whether the field is a static field (YES) or not (NO)

    IS_FINAL

    VARCHAR2(3)

    Indicates whether the field is a final field (YES) or not (NO)

    IS_VOLATILE

    VARCHAR2(3)

    Indicates whether the field is volotile (YES) or not (NO)

    IS_TRANSIENT

    VARCHAR2(3)

    Indicates whether the field is transient (YES) or not (NO)

    ARRAY_DEPTH

    NUMBER

    Array depth of the type of the field

    BASE_TYPE

    VARCHAR2(7)

    Base type of the type of the field:

    • int
    • long
    • float
    • double
    • boolean
    • byte
    • char
    • short
    • class

    FIELD_CLASS

    VARCHAR2(4000)

    Actual class name of the base object if the base type is class
    See Also:
    • "DBA_JAVA_FIELDS"
    • "USER_JAVA_FIELDS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 61 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_IMPLEMENTS

ALL_JAVA_IMPLEMENTS describes interfaces implemented by the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_IMPLEMENTS describes interfaces implemented by all stored Java classes in the database.
  • USER_JAVA_IMPLEMENTS describes interfaces implemented by the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    INTERFACE_INDEX

    NUMBER

    Index of the interfaces implemented by the Java class

    INTERFACE_NAME

    VARCHAR2(4000)

    Name of the interface identified by the INTERFACE_INDEX column
    See Also:
    • "DBA_JAVA_IMPLEMENTS"
    • "USER_JAVA_IMPLEMENTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 62 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_INNERS

ALL_JAVA_INNERS displays information about inner classes referred to by the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_INNERS displays information about inner classes referred to by all stored Java classes in the database.
  • USER_JAVA_INNERS displays information about inner classes referred to by the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    INNER_INDEX

    NUMBER

    Index of the referred inner class

    SIMPLE_NAME

    VARCHAR2(4000)

    Simple name of the referred inner class

    FULL_NAME

    VARCHAR2(4000)

    Full name of the referred inner class

    ACCESSIBILITY

    VARCHAR2(9)

    Accessibility of the referred inner class:

    • PUBLIC
    • PRIVATE
    • PROTECTED

    IS_STATIC

    VARCHAR2(3)

    Indicates whether the referred inner class is declared static in the sorce file (YES) or not (NO)

    IS_FINAL

    VARCHAR2(3)

    Indicates whether the referred inner class is declared final in the sorce file (YES) or not (NO)

    IS_ABSTRACT

    VARCHAR2(3)

    Indicates whether the referred inner class is declared abstract in the sorce file (YES) or not (NO)

    IS_INTERFACE

    VARCHAR2(3)

    Indicates whether the referred inner class is declared interface in the sorce file (YES) or not (NO)
    See Also:
    • "DBA_JAVA_INNERS"
    • "USER_JAVA_INNERS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 63 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_LAYOUTS

ALL_JAVA_LAYOUTS displays class layout information about the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_LAYOUTS displays class layout information about all stored Java classes in the database.
  • USER_JAVA_LAYOUTS displays class layout information about the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    INTERFACES

    NUMBER

    Number of interfaces that this Java class implements

    INNER_CLASSES

    NUMBER

    Number of inner classes that this Java class contains

    FIELDS

    NUMBER

    Number of locally declared fields that this Java class contains

    STATIC_FIELDS

    NUMBER

    Number of locally declared static fields that this Java class contains

    METHODS

    NUMBER

    Number of locally declared methods that this Java class contains

    STATIC_METHODS

    NUMBER

    Number of locally declared static methods that this Java class contains

    NATIVE_METHODS

    NUMBER

    Number of locally declared native methods that this Java class contains
    See Also:
    • "DBA_JAVA_LAYOUTS"
    • "USER_JAVA_LAYOUTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 64 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_METHODS

ALL_JAVA_METHODS displays method information about the stored Java classes accessible to the current user.

Related Views

  • DBA_JAVA_METHODS displays method information about all stored Java classes in the database.
  • USER_JAVA_METHODS displays method information about the stored Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    METHOD_INDEX

    NUMBER

    Index of the method

    METHOD_NAME

    VARCHAR2(4000)

    Name of the method identified by the METHOD_INDEX column

    ACCESSIBILITY

    VARCHAR2(9)

    Accessibility of the method:

    • PUBLIC
    • PRIVATE
    • PROTECTED

    IS_STATIC

    VARCHAR2(3)

    Indicates whether the method is a static method (YES) or not (NO)

    IS_FINAL

    VARCHAR2(3)

    Indicates whether the method is a final method (YES) or not (NO)

    IS_SYNCHRONIZED

    VARCHAR2(3)

    Indicates whether the method is a synchronized method (YES) or not (NO)

    IS_NATIVE

    VARCHAR2(3)

    Indicates whether the method is a native method (YES) or not (NO)

    IS_ABSTRACT

    VARCHAR2(3)

    Indicates whether the method is an abstract method (YES) or not (NO)

    IS_STRICT

    VARCHAR2(3)

    Indicates whether the method is a strict method (YES) or not (NO)

    ARGUMENTS

    NUMBER

    Number of arguments of the method

    THROWS

    NUMBER

    Number of exceptions thrown by the method

    ARRAY_DEPTH

    NUMBER

    Array depth of the return type of the method

    BASE_TYPE

    VARCHAR2(7)

    Base type of the return type of the method:

    • int
    • long
    • float
    • double
    • boolean
    • byte
    • char
    • short
    • class
    • void

    RETURN_CLASS

    VARCHAR2(4000)

    Actual class name of the return value if the base type is class
    See Also:
    • "DBA_JAVA_METHODS"
    • "USER_JAVA_METHODS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 65 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_NCOMPS

ALL_JAVA_NCOMPS displays ncomp-related information about the Java classes accessible to the current user.

Related Views

  • DBA_JAVA_NCOMPS displays ncomp-related information about all Java classes in the database.
  • USER_JAVA_NCOMPS displays ncomp-related information about the Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class object

    NAME

    VARCHAR2(4000)

    Name of the Java class object

    SOURCE

    VARCHAR2(4000)

    ncomp source shown in this row

    INITIALIZER

    VARCHAR2(4000)

    ncomp initializer shown in this row

    LIBRARYFILE

    VARCHAR2(4000)

    ncomp library file shown in this row

    LIBRARY

    VARCHAR2(4000)

    ncomp library shown in this row
    See Also:
    • "DBA_JAVA_NCOMPS"
    • "USER_JAVA_NCOMPS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 66 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_RESOLVERS

ALL_JAVA_RESOLVERS displays information about resolvers of the Java classes accessible to the current user.

Related Views

  • DBA_JAVA_RESOLVERS displays information about resolvers of all Java classes in the database.
  • USER_JAVA_RESOLVERS displays information about resolvers of the Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class object

    NAME

    VARCHAR2(4000)

    Name of the Java class object

    TERM_INDEX

    NUMBER

    Index of the resolver term in this row

    PATTERN

    VARCHAR2(4000)

    Resolver pattern of the resolver term identified by the TERM_INDEX column

    SCHEMA

    VARCHAR2(64)

    Resolver schema of the resolver term identified by the TERM_INDEX column
    See Also:
    • "DBA_JAVA_RESOLVERS"
    • "USER_JAVA_RESOLVERS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 67 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JAVA_THROWS

ALL_JAVA_THROWS displays information about exceptions thrown from methods of the Java classes accessible to the current user.

Related Views

  • DBA_JAVA_THROWS displays information about exceptions thrown from methods of all Java classes in the database.
  • USER_JAVA_THROWS displays information about exceptions thrown from methods of the Java classes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the Java class

    NAME

    VARCHAR2(4000)

    Name of the Java class

    METHOD_INDEX

    NUMBER

    Index of the throwing method of the exception

    METHOD_NAME

    VARCHAR2(4000)

    Name of the throwing method of the exception

    EXCEPTION_INDEX

    NUMBER

    Index of the exception

    EXCEPTION_CLASS

    VARCHAR2(4000)

    Class of the exception
    See Also:
    • "DBA_JAVA_THROWS"
    • "USER_JAVA_THROWS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 68 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JOBS

ALL_JOBS describes all jobs in the database that are accessible to the current user.

See Also:

Oracle9i Database Administrator's Guide

Related Views

  • DBA_JOBS describes all jobs in the database.
  • USER_JOBS describes all jobs owned by the current user.

    Column Datatype NULL Description

    JOB

    NUMBER

    NOT NULL

    Identifier of job. Neither import/export nor repeated executions change this value.

    LOG_USER

    VARCHAR2(30)

    NOT NULL

    Login user when the job was submitted

    PRIV_USER

    VARCHAR2(30)

    NOT NULL

    User whose default privileges apply to this job

    SCHEMA_USER

    VARCHAR2(30)

    NOT NULL

    Default schema used to parse the job

    For example, if the SCHEMA_USER is SCOTT and you submit the procedure HIRE_EMP as a job, Oracle looks for SCOTT.HIRE_EMP

    LAST_DATE

    DATE

    Date on which this job last successfully executed

    LAST_SEC

    VARCHAR2(8)

    Same as LAST_DATE. This is when the last successful execution started.

    THIS_DATE

    DATE

    Date that this job started executing (usually null if not executing)

    THIS_SEC

    VARCHAR2(8)

    Same as THIS_DATE. This is when the last successful execution started.

    NEXT_DATE

    DATE

    NOT NULL

    Date that this job will next be executed

    NEXT_SEC

    VARCHAR2(8))

    Same as NEXT_DATE. This is when the last successful execution started.

    TOTAL_TIME

    NUMBER

    Total wall clock time spent by the system on this job, in seconds

    BROKEN

    VARCHAR2(1)

    Y: no attempt is made to run this job

    N: an attempt is made to run this job

    INTERVAL

    VARCHAR2(200)

    NOT NULL

    A date function, evaluated at the start of execution, becomes next NEXT_DATE

    FAILURES

    NUMBER

    Number of times this job has started and failed since its last success

    WHAT

    VARCHAR2(4000)

    Body of the anonymous PL/SQL block that this job executes

    NLS_ENV

    VARCHAR2(4000)

    Session parameters describing the NLS environment of the job

    MISC_ENV

    RAW(32)

    Other session parameters that apply to this job

    INSTANCE

    NUMBER

    ID of the instance that can execute or is executing the job. The default is 0.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 69 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_JOIN_IND_COLUMNS

ALL_JOIN_IND_COLUMNS describes the join conditions of bitmap join indexes to which you have access. Bitmap join indexes are indexes built on a child table with an index key containing columns from associated parent tables, where all of the tables are connected through join conditions. There is one row for each join condition.

Related Views

  • DBA_JOIN_IND_COLUMNS describes all join conditions exiting in the database.
  • USER_JOIN_IND_COLUMNS describes join conditions owned by the current user. This view does not display the INDEX_OWNER column.

    Column Datatype Description

    INDEX_OWNER

    VARCHAR2(30)

    Bitmap join index owner

    INDEX_NAME

    VARCHAR2(30)

    Name of bitmap join index

    INNER_TABLE_OWNER

    VARCHAR2(30)

    Fact table owner

    INNER_TABLE_NAME

    VARCHAR2(30)

    Name of the fact table

    OUTER_TABLE_OWNER

    VARCHAR2(30)

    Dimension table owner

    OUTER_TABLE_NAME

    VARCHAR2(30)

    Name of the dimension table

    COL_NAME_INNER

    VARCHAR2(4000)

    Name of the fact table join column

    COL_NAME_OUTER

    VARCHAR2(4000)

    Name of the dimension table join column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 70 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LIBRARIES

ALL_LIBRARIES describes all the libraries that are accessible to the current user.

Related Views

  • DBA_LIBRARIES describes all libraries in the database.
  • USER_LIBRARIES describes libraries owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the library

    LIBRARY_NAME

    VARCHAR2(30)

    NOT NULL

    Library name

    FILE_SPEC

    VARCHAR2(2000)

    Operating system file specification associated with the library

    DYNAMIC

    VARCHAR2(1)

    Whether the library is dynamically loadable (YES | NO)

    STATUS

    VARCHAR2(7)

    Status of the library (VALID, INVALID, or N/A)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 71 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LOB_PARTITIONS

ALL_LOB_PARTITIONS displays LOB partitions contained in tables accessible to the current user.

Related Views

  • DBA_LOB_PARTITIONS describes all LOB partitions in the database.
  • USER_LOB_PARTITIONS describes the LOB partitions owned by the current user. This view does not display the TABLE_OWNER column.

    Column Datatype NULL Description

    TABLE_OWNER

    VARCHAR2(30)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table

    COLUMN_NAME

    VARCHAR2(30)

    Name of the LOB column

    LOB_NAME

    VARCHAR2(30)

    Name of the partitioned LOB item

    PARTITION_NAME

    VARCHAR2(30)

    Name of the table partition

    LOB_PARTITION_NAME

    VARCHAR2(30)

    Name of the LOB data partition

    LOB_INDPART_NAME

    VARCHAR2(30)

    Name of the corresponding LOB index partition

    PARTITION_POSITION

    NUMBER

    Position of the LOB data partition within the LOB item

    COMPOSITE

    VARCHAR2(3)

    Whether the partition is composite (YES | NO)

    CHUNK

    NUMBER

    Value of the CHUNK attribute of the LOB data partition

    PCTVERSION

    NUMBER

    Value of the PCTVERSION attribute of the LOB data partition

    CACHE

    VARCHAR2(3)

    Whether and how the cluster is to be cached in the buffer cache (CACHE, NOCACHE, CACHEREADS)

    IN_ROW

    VARCHAR2(3)

    Whether the STORAGE IN ROW attribute is enabled for the LOB data partition

    TABLESPACE_NAME

    VARCHAR2(30)

    Name of the tablespace containing the LOB data partition

    INITIAL_EXTENT

    VARCHAR2(40)

    Size in bytes of the initial extent of the LOB data partition

    NEXT_EXTENT

    VARCHAR2(40)

    Size in bytes of secondary extents of the LOB data partition

    MIN_EXTENTS

    VARCHAR2(40)

    Minimum number of extents allowed in the segment of the LOB data partition

    MAX_EXTENTS

    VARCHAR2(40)

    Maximum number of extents allowed in the segment of the LOB data partition

    PCT_INCREASE

    VARCHAR2(40)

    Percentage increase in extent size for the LOB data partition

    FREELISTS

    VARCHAR2(40)

    Number of process freelists allocated in the segment of the LOB data partition

    FREELIST_GROUPS

    VARCHAR2(40)

    Number of freelist groups allocated in the segment of the LOB data partition

    LOGGING

    VARCHAR2(7)

    Logging attribute of the LOB data partition

    BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool for the LOB partition blocks
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 72 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LOB_SUBPARTITIONS

ALL_LOB_SUBPARTITIONS displays partition-level attributes of LOB data subpartitions accessible to the current user.

Related Views

  • DBA_LOB_SUBPARTITIONS describes all LOB subpartitions in the database.
  • USER_LOB_SUBPARTITIONS describes the LOB subpartitions owned by the current user. This view does not display the TABLE_OWNER column.

    Column Datatype NULL Description

    TABLE_OWNER

    VARCHAR2(30)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table

    COLUMN_NAME

    VARCHAR2(30)

    Name of the LOB column

    LOB_NAME

    VARCHAR2(30)

    Name of the partitioned LOB item

    LOB_PARTITION_NAME

    VARCHAR2(30)

    Name of LOB data partition to which this LOB data subpartition belongs

    SUBPARTITION_NAME

    VARCHAR2(30)

    Name of the table subpartition to which this LOB subpartition corresponds

    LOB_SUBPARTITION_NAME

    VARCHAR2(30)

    Name of the LOB subpartition

    LOB_INDSUBPART_NAME

    VARCHAR2(30)

    Name of corresponding LOB index subpartition

    SUBPARTITION_POSITION

    NUMBER

    Position of the LOB data partition within the LOB item

    CHUNK

    NUMBER

    Value of the CHUNK attribute of the LOB data partition

    PCTVERSION

    NUMBER

    Value of the PCTVERSION attribute of the LOB data partition

    CACHE

    VARCHAR2(3)

    Whether and how the cluster is to be cached in the buffer cache (CACHE, NOCACHE, CACHEREADS)

    IN_ROW

    VARCHAR2(3)

    Whether the STORAGE IN ROW attribute of the LOB data partition is enabled

    TABLESPACE_NAME

    VARCHAR2(30)

    Name of the tablespace containing the LOB data partition

    INITIAL_EXTENT

    VARCHAR2(40)

    Size in bytes of the initial extent for the LOB data partition

    NEXT_EXTENT

    VARCHAR2(40)

    Size in bytes of secondary extents for the LOB data partition

    MIN_EXTENTS

    VARCHAR2(40)

    Minimum number of extents allowed in the segment of the LOB data partition

    MAX_EXTENTS

    VARCHAR2(40)

    Maximum number of extents allowed in the segment of the LOB data partition

    PCT_INCREASE

    VARCHAR2(40)

    Percentage increase in extent size for the LOB data partition

    FREELISTS

    VARCHAR2(40)

    Number of process freelists allocated in the segment of the LOB data partition

    FREELIST_GROUPS

    VARCHAR2(40)

    Number of freelist groups allocated in the segment of the LOB data partition

    LOGGING

    VARCHAR2(7)

    Logging attribute of the LOB data partition

    BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool to be used for the LOB data partition blocks
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 73 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LOB_TEMPLATES

ALL_LOB_TEMPLATES describes the LOB subpartition templates accessible to the current user.

Related Views

  • DBA_LOB_TEMPLATES describes all LOB subpartition templates in the database.
  • USER_LOB_TEMPLATES describes the LOB subpartition templates owned by the current user. This view does not display the USER_NAME column.

    Column Datatype NULL Description

    USER_NAME

    VARCHAR2(30)

    NOT NULL

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table

    LOB_COL_NAME

    VARCHAR2(4000)

    Name of the LOB column

    SUBPARTITION_NAME

    VARCHAR2(34)

    NOT NULL

    Name of the subpartition

    LOB_SEGMENT_NAME

    VARCHAR2(34)

    NOT NULL

    Name of the LOB segment

    TABLESPACE_NAME

    VARCHAR2(30)

    Tablespace name of the subpartition
    See Also:
    • "DBA_LOB_TEMPLATES"
    • "USER_LOB_TEMPLATES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 74 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LOBS

ALL_LOBS displays the large objects (LOBs) contained in tables accessible to the current user. LOBs include binary large objects (BLOBs) and character large objects (CLOBs). Binary files (BFILEs) are stored outside the database, so they are not displayed by this view or the related views.

Related Views

  • DBA_LOBS describes all LOBs in the database.
  • USER_LOBS describes the LOBs owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the object containing the LOB

    TABLE_NAME

    VARCHAR2(30)

    Name of the object containing the LOB

    COLUMN_NAME

    VARCHAR2(4000)

    Name of the LOB column or attribute

    SEGMENT_NAME

    VARCHAR2(30)

    Name of the LOB segment

    INDEX_NAME

    VARCHAR2(30)

    Name of the LOB index

    CHUNK

    NUMBER

    Size (in bytes) of the LOB chunk as a unit of allocation or manipulation

    PCTVERSION

    NUMBER

    Maximum percentage of the LOB space used for versioning

    RETENTION

    NUMBER

    Maximum time duration for versioning of the LOB space

    FREEPOOLS

    NUMBER

    Number of freepools for this LOB segment

    CACHE

    VARCHAR2(10)

    Whether and how the cluster is to be cached in the buffer cache (YES, NO, CACHEREADS)

    LOGGING

    VARCHAR2(7)

    Indicates whether changes to the LOB are logged

    IN_ROW

    VARCHAR2(3)

    Indicates whether some of the LOBs are stored inline with the base row
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 75 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LOG_GROUP_COLUMNS

ALL_LOG_GROUP_COLUMNS describes columns that are accessible to the current user and that are specified in log groups.

Related Views

  • DBA_LOG_GROUP_COLUMNS describes all columns in the database that are specified in log groups.
  • USER_LOG_COLUMN_GROUPS describes columns that are owned by the current user and that are specified in log groups.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the log group definition

    LOG_GROUP_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the log group definition

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table with log group definition

    COLUMN_NAME

    VARCHAR2(4000)

    NOT NULL

    Name of the column or attribute of the object type column specified in the log group definition

    POSITION

    NUMBER

    Original position of column or attribute in the definition of the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 76 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_LOG_GROUPS

ALL_LOG_GROUPS describes log group definitions on tables accessible to the current user.

Related Views

  • DBA_LOG_GROUPS describes log group definitions on tables owned by the current users.
  • USER_LOG_GROUPS describes log group definitions on all tables in the database.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the log group definition

    LOG_GROUP_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the log group definition

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table with log group definition

    ALWAYS

    VARCHAR2(6)

    Y indicates the log group is logged any time a row is updated; N indicates the log group is logged any time a member column is updated.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 77 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_METHOD_PARAMS

ALL_METHOD_PARAMS describes the method parameters of the object types accessible to the current user.

Related Views

  • DBA_METHOD_PARAMS describes the method parameters of all object types in the database.
  • USER_METHOD_PARAMS describes the method parameters of the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    METHOD_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the method

    METHOD_NO

    NUMBER

    NOT NULL

    For an overloaded method, a number distinguishing this method from others of the same. Do not confuse this number with the object ID.

    PARAM_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the parameter

    PARAM_NO

    NUMBER

    NOT NULL

    Parameter number (position)

    PARAM_MODE

    VARCHAR2(6)

    Mode of the parameter (IN, OUT, IN OUT)

    PARAM_TYPE_MOD

    VARCHAR2(7)

    Whether this parameter is a REF to another object

    PARAM_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type of the parameter

    PARAM_TYPE_NAME

    VARCHAR2(30)

    Name of the type of the parameter

    CHARACTER_SET_NAME

    VARCHAR2(44)

    Whether the character set or the method is fixed-length character set (CHAR_CS) or fixed-length national character set (NCHAR_CS), or a particular character set specified by the user
    See Also:
    • "DBA_METHOD_PARAMS"
    • "USER_METHOD_PARAMS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 78 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_METHOD_RESULTS

ALL_METHOD_RESULTS describes the method results of the object types accessible to the current user.

Related Views

  • DBA_METHOD_RESULTS describes the method results of all object types in the database.
  • USER_METHOD_RESULTS describes the method results of the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    METHOD_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the method

    METHOD_NO

    NUMBER

    NOT NULL

    For an overloaded method, a number distinguishing this method from others of the same. Do not confuse this number with the object ID.

    RESULT_TYPE_MOD

    VARCHAR2(7)

    NOT NULL

    Whether this result is a REF to another object

    RESULT_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type of the result

    RESULT_TYPE_NAME

    VARCHAR2(30)

    Name of the type of the result

    CHARACTER_SET_NAME

    VARCHAR2(44)

    Whether the character set or the method is fixed-length character set (CHAR_CS) or fixed-length national character set (NCHAR_CS), or a particular character set specified by the user
    See Also:
    • "DBA_METHOD_RESULTS"
    • "USER_METHOD_RESULTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 79 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_AGGREGATES

ALL_MVIEW_AGGREGATES describes the grouping functions (aggregate operations) that appear in the SELECT list of materialized aggregate views accessible to the current user.

Related Views

  • DBA_MVIEW_AGGREGATES describes all such grouping functions defined for all materialized views in the database.
  • USER_MVIEW_AGGREGATES describes all such grouping functions defined for all materialized views owned by the current user.

All three views exclude materialized views that reference remote tables or that include references to a nonstatic value such as SYSDATE or USER. These views also exclude materialized views that were created as "snapshots" prior to Oracle8i and that were never altered to enable query rewrite.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the materialized view
MVIEW_NAME | VARCHAR2(30) | NOT NULL | Name of the materialized view
POSITION_IN_SELECT | NUMBER | NOT NULL | Ordinal position of this aggregation within the SELECT list. For the position of nonaggregate elements of the select list, see "ALL_MVIEW_KEYS" .
CONTAINER_COLUMN | VARCHAR2(30) | NOT NULL | Name of this column in the container table
AGG_FUNCTION | VARCHAR2(8) |  | Aggregation function
DISTINCTFLAG | VARCHAR2(1) |  | Whether this aggregation is distinct (Y | N)
MEASURE | LONG |  | SQL text of the measure, excluding the aggregation function. Equal to * for COUNT(*).
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 80 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_ANALYSIS

ALL_MVIEW_ANALYSIS describes the materialized views accessible to the current user. It provides additional information for analysis by applications. Minimal information is displayed for materialized views that do not support query rewrite (such as materialized views with remote master tables or nondeterministic functions).

Related Views

  • DBA_MVIEW_ANALYSIS describes all such materialized views in the database.
  • USER_MVIEW_ANALYSIS describes all such materialized views owned by the current user.

    Note:

    All of the information in these views is also displayed in ALL_MVIEWS and its related views. Oracle Corporation recommends that you refer to ALL_MVIEWS for this information instead of these views.
    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the materialized view

    MVIEW_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the materialized view

    MVIEW_TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the container table (see next column)

    CONTAINER_NAME

    VARCHAR2(30)

    Name of the internal container in which the materialized view data is held. Normally this is the same as MVIEW_NAME. For materialized views created in releases before 8.1 (or under pre-8.1 compatibility mode), Oracle attaches the 6-byte prefix SNAP$_. If MVIEW_NAME has more than 19 bytes, Oracle truncates the name to 19 bytes and adds a 4-byte sequence number as a suffix to produce a nonambiguous CONTAINER_NAME.

    LAST_REFRESH_SCN

    NUMBER

    System change number (SCN) of the last refresh operation

    LAST_REFRESH_DATE

    DATE

    SYSDATE of the last refresh

    REFRESH_METHOD

    VARCHAR2(8)

    Default refresh method: FORCE, FAST, COMPLETE, or NONE

    SUMMARY

    VARCHAR2(1)

    Whether this materialized view includes a GROUP BY clause or aggregation (Y | N)

    FULLREFRESHTIM

    NUMBER

    Approximate refresh time, in seconds, for full refresh (defined only when SUMMARY = Y)

    INCREFRESHTIM

    NUMBER

    Approximate refresh time, in seconds, for fast refresh (defined only when SUMMARY = Y)

    CONTAINS_VIEWS

    VARCHAR2(1)

    Whether this materialized view contains a view in its definition (Y | N)

    UNUSABLE

    VARCHAR2(1)

    Whether this materialized view is UNUSABLE (inconsistent data) (Y | N). A materialized view can be UNUSABLE if a system failure occurs during a full refresh.

    RESTRICTED_SYNTAX

    VARCHAR2(1)

    Whether this materialized view had a restriction in its defining query that limits the use of query rewrite (Y | N). More complete information is provided by the REWRITE_CAPABILITY column of the ALL_, DBA_, and USER_MVIEWS views.

    INC_REFRESHABLE

    VARCHAR2(1)

    Whether this materialized view can be fast refreshed (Y | N)

    KNOWN_STALE

    VARCHAR2(1)

    Whether the data contained in the materialized view is known to be inconsistent with the master table data because that has been updated since the last successful refresh (Y | N)

    INVALID

    VARCHAR2(1)

    Whether this materialized view is in an invalid state (inconsistent metadata) (Y | N)

    REWRITE_ENABLED

    VARCHAR2(1)

    Whether this materialized view is currently enabled for query rewrite (Y | N)

    QUERY_LEN

    NUMBER

    NOT NULL

    Length (in bytes) of the query field

    QUERY

    LONG

    NOT NULL

    SELECT expression of the materialized view definition

    REVISION

    NUMBER

    Reserved for internal use
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 81 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_DETAIL_RELATIONS

ALL_MVIEW_DETAIL_RELATIONS describes the named detail relations that are either specified in the FROM list of the subquery that defines a materialized view accessible to the current user, or that are indirectly referenced through views in that FROM list. Inline views in the materialized view definition are not represented in this view or the related views.

Related Views

  • DBA_MVIEW_DETAIL_RELATIONS describes all such detail relations defined for all materialized views in the database.
  • USER_MVIEW_DETAIL_RELATIONS describes such detail relations defined for all materialized views owned by the current user.

All three views exclude materialized views that reference remote tables or that includes references to a nonstatic value such as SYSDATE or USER. These views also exclude materialized views that were created as snapshots prior to Oracle8i and that were never altered to enable query rewrite.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the materialized view
MVIEW_NAME | VARCHAR2(30) | NOT NULL | Name of the materialized view
DETAILOBJ_OWNER | VARCHAR2(30) | NOT NULL | Detail object owner
DETAILOBJ_NAME | VARCHAR2(30) | NOT NULL | Detail object name (that is, the name of a table or view)
DETAILOBJ_TYPE | VARCHAR2(9) |  | TABLE, VIEW, SNAPSHOT, CONTAINER, or UNDEFINED
DETAILOBJ_ALIAS | VARCHAR2(30) |  | Implicit or explicit alias for detail relation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 82 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_JOINS

ALL_MVIEW_JOINS describes joins between two columns in the WHERE clause of the subquery that defines a materialized view accessible to the current user.

Related Views

  • DBA_MVIEW_JOINS describes all such joins for all materialized views in the database.
  • USER_MVIEW_JOINS describes such joins for all materialized views owned by the current user.

All three views exclude materialized views that reference remote tables or that includes references to a nonstatic value such as SYSDATE or USER. These views also exclude materialized views that were created as "snapshots" prior to Oracle8i and that were never altered to enable query rewrite.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the materialized view
MVIEW_NAME | VARCHAR2(30) | NOT NULL | Materialized view name
Note: The next 8 rows relate only to materialized join views and materialized aggregate views. They describe the two detail objects of a materialized view join.
DETAILOBJ1_OWNER | VARCHAR2(30) | NOT NULL | Owner of the first object in the join
DETAILOBJ1_RELATION | VARCHAR2(30) | NOT NULL | Name of the first object in the join
DETAILOBJ1_COLUMN | VARCHAR2(30) | NOT NULL | Join column of the first object in the join
OPERATOR | CHAR(1) |  | Join operator
OPERATOR_TYPE | VARCHAR2(1) |  | Whether the join is an inner or outer join
DETAILOBJ2_OWNER | VARCHAR2(30) | NOT NULL | Owner of the second object in the join
DETAILOBJ2_RELATION | VARCHAR2(30) | NOT NULL | Name of the second object in the join
DETAILOBJ2_COLUMN | VARCHAR2(30) | NOT NULL | Join column of the second object in the join
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 83 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_KEYS

ALL_MVIEW_KEYS describes the columns or expressions in the SELECT list upon which materialized views accessible to the current user are based.

Related Views

  • DBA_MVIEW_KEYS describes such columns and expressions for all materialized views in the database.
  • USER_MVIEW_KEYS describes such columns and expressions for all materialized views owned by the current user.

All three views exclude materialized views that reference remote tables or that includes references to a nonstatic value such as SYSDATE or USER. These views also exclude materialized views that were created as snapshots prior to Oracle8i and that were never altered to enable query rewrite.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the materialized view
MVIEW_NAME | VARCHAR2(30) | NOT NULL | Materialized view name
POSITION_IN_SELECT | NUMBER | NOT NULL | Ordinal position of this key within the SELECT list
CONTAINER_COLUMN | VARCHAR2(30) | NOT NULL | Name of the column in the container table
DETAILOBJ_OWNER | VARCHAR2(30) | NOT NULL | Detail object owner
DETAILOBJ_NAME | VARCHAR2(30) | NOT NULL | Detail object name (for example, the name of a table or view)
DETAILOBJ_TYPE | VARCHAR2(5) |  | Detail object type (VIEW | TABLE)
DETAILOBJ_ALIAS | VARCHAR2(30) |  | Implicit or explicit alias for detail relation
DETAILOBJ_COLUMN | VARCHAR2(30) | NOT NULL | Name of the detail relation column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 84 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_LOGS

ALL_MVIEW_LOGS describes all materialized view logs accessible to the current user.

Related Views

  • DBA_MVIEW_LOGS describes all materialized view logs in the database.
  • USER_MVIEW_LOGS describes all materialized view logs owned by the current user.

    Column Datatype NULL Description

    LOG_OWNER

    VARCHAR2(30)

    Owner of the materialized view log

    MASTER

    VARCHAR2(30)

    Name of the master table or master materialized view whose changes are logged

    LOG_TABLE

    VARCHAR2(30)

    Name of the table where the changes to the master table or master materialized view are logged

    LOG_TRIGGER

    VARCHAR2(30)

    Obsolete with the release of Oracle8i and higher. Set to NULL. Formerly, this parameter was an after-row trigger on the master which inserted rows into the log.

    ROWIDS

    VARCHAR2(3)

    If YES, records rowid information

    PRIMARY_KEY

    VARCHAR2(3)

    If YES, records primary key information

    OBJECT_ID

    VARCHAR2(3)

    If YES, records object identifier information in an object table

    FILTER_COLUMNS

    VARCHAR2(3)

    If YES, records filter columns

    SEQUENCE

    VARCHAR2(3)

    If YES, records the sequence value, which provides additional ordering information

    INCLUDE_NEW_VALUES

    VARCHAR2(3)

    If YES, records both old and new values. If NO, records old values, but does not record new values.
    See Also:
    • "DBA_MVIEW_LOGS"
    • "USER_MVIEW_LOGS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 85 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEW_REFRESH_TIMES

ALL_MVIEW_REFRESH_TIMES describes refresh times of the materialized views accessible to the current user.

Related Views

  • DBA_MVIEW_REFRESH_TIMES describes refresh times of all materialized views in the database.
  • USER_MVIEW_REFRESH_TIMES describes refresh times of the materialized views owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the materialized view

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the materialized view

    MASTER_OWNER

    VARCHAR2(30)

    Owner of the master table

    MASTER

    VARCHAR2(30)

    Name of the master table

    LAST_REFRESH

    DATE

    The last refresh
    See Also:
    • "DBA_MVIEW_REFRESH_TIMES"
    • "USER_MVIEW_REFRESH_TIMES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 86 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_MVIEWS

ALL_MVIEWS describes all materialized views accessible to the current user.

Related views

  • DBA_MVIEWS describes all materialized views in the database.
  • USER_MVIEWS describes all materialized views owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Schema in which the materialized view was created

    MVIEW_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the materialized view

    CONTAINER_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the container in which the materialized view's data is held. Normally this is the same as MVIEW_NAME. For materialized views created in releases before 8.1 (or under pre-8.1 compatibility mode), Oracle attaches the 6-byte prefix SNAP$_. If MVIEW_NAME has more than 19 bytes, then Oracle truncates the name to 19 bytes and may add a 4-byte sequence number as a suffix to produce a nonambiguous CONTAINER_NAME.

    QUERY

    LONG

    Query that defines the materialized view

    QUERY_LEN

    NUMBER(38)

    Length (in bytes) of the defining query

    UPDATABLE

    VARCHAR2(1)

    Indicates whether the materialized view is updatable (Y) or not (N)

    UPDATE_LOG

    VARCHAR2(30)

    For updatable materialized views, the filename of the update log

    MASTER_ROLLBACK_SEG

    VARCHAR2(30)

    Rollback segment for the master site or the master materialized view site

    MASTER_LINK

    VARCHAR2(128)

    Database link for the master site or the master materialized view site

    REWRITE_ENABLED

    VARCHAR2(1)

    Indicates whether rewrite is enabled (Y) or not (N)

    REWRITE_CAPABILITY

    VARCHAR2(9)

    Indicates whether the materialized view is eligible for rewrite, and if so, what rules must be followed:

    • NONE - Materialized view cannot be used for rewrite, because rewrite is disallowed or prevented
    • TEXTMATCH - Defining query of the materialized view contained restrictions on the use of query rewrite
    • GENERAL - Defining query of the materialized view contained no restrictions on the use of query rewrite, so Oracle can apply any rewrite rule that is supported

    REFRESH_MODE

    VARCHAR2(6)

    Refresh mode of the materialized view:

    • DEMAND - Oracle refreshes this materialized view whenever an appropriate refresh procedure is called
    • COMMIT - Oracle refreshes this materialized view when a transaction on one of the materialized view's masters commits
    • NEVER - Oracle never refreshes this materialized view

    REFRESH_METHOD

    VARCHAR2(8)

    Default method used to refresh the materialized view (can be overridden through the API):

    • COMPLETE (C) - Materialized view is completely refreshed from the masters
    • FORCE (?) - Oracle performs a fast refresh if possible, otherwise a complete refresh
    • FAST (F) - Oracle performs an incremental refresh applying changes that correspond to changes in the masters since the last refresh
    • NEVER (N) - User specified that Oracle should not refresh this materialized view

    BUILD_MODE

    VARCHAR2(9)

    Indicates how the materialized view was populated during creation:

    • IMMEDIATE - Populated from the masters during creation
    • DEFERRED - Not populated during creation. Must be explicitly populated later by the user.
    • PREBUILT - Populated with an existing table during creation. The relationship of the contents of this prebuilt table to the materialized view's masters is unknown to Oracle.

    FAST_REFRESHABLE

    VARCHAR2(18)

    Indicates whether the materialized view is eligible for incremental (fast) refresh. Oracle calculates this value statically, based on the materialized view definition query:

    • NO - Materialized view is not fast refreshable, and hence is complex
    • DIRLOAD - Fast refresh is supported only for direct loads
    • DML - Fast refresh is supported only for DML operations
    • DIRLOAD_DML - Fast refresh is supported for both direct loads and DML operations
    • DIRLOAD_LIMITEDDML - Fast refresh is supported for direct loads and a subset of DML operations

    LAST_REFRESH_TYPE

    VARCHAR2(8)

    Method used for the most recent refresh:

    • COMPLETE - Most recent refresh was complete
    • FAST - Most recent refresh was fast (incremental)
    • NA - Materialized view has not yet been refreshed (for example, if it was created DEFERRED)

    LAST_REFRESH_DATE

    DATE

    Date on which the materialized view was most recently refreshed. Blank if not yet populated.

    STALENESS

    VARCHAR2(19)

    Relationship between the contents of the materialized view and the contents of the materialized view's masters:

    • FRESH - Materialized view is a read-consistent view of the current state of its masters
    • STALE - Materialized view is out of date because one or more of its masters has changed. If the materialized view was FRESH before it became STALE, then it is a read-consistent view of a former state of its masters.
    • UNUSABLE - Materialized view is not a read-consistent view of its masters from any point in time
    • UNKNOWN - Oracle does not know whether the materialized view is in a read-consistent view of its masters from any point in time (this is the case for materialized views created on prebuilt tables)
    • UNDEFINED - Materialized view has remote masters. The concept of staleness is not defined for such materialized views.

    AFTER_FAST_REFRESH

    VARCHAR2(19)

    Specifies the staleness value that will occur if a fast refresh is applied to this materialized view. Its values are the same as for the STALENESS column, plus the value NA, which is used when fast refresh is not applicable to this materialized view.

    UNKNOWN_PREBUILT

    VARCHAR2(1)

    Indicates whether the materialized view is prebuilt (Y) or not (N)

    UNKNOWN_PLSQL_FUNC

    VARCHAR2(1)

    Indicates whether the materialized view contains PL/SQL functions (Y) or not (N)

    UNKNOWN_EXTERNAL_TABLE

    VARCHAR2(1)

    Indicates whether the materialized view contains external tables (Y) or not (N)

    UNKNOWN_CONSIDER_FRESH

    VARCHAR2(1)

    Indicates whether the materialized view is considered fresh (Y) or not (N)

    UNKNOWN_IMPORT

    VARCHAR2(1)

    Indicates whether the materialized view is imported (Y) or not (N)

    COMPILE_STATE

    VARCHAR2(19)

    Validity of the materialized view with respect to the objects upon which it depends:

    • VALID - Materialized view has been validated without error, and no object upon which it depends has changed since the last validation
    • NEEDS_COMPILE - Some object upon which the materialized view depends has changed (other than normal DML changes). An ALTER MATERIALIZED VIEW...COMPILE statement is required to validate this materialized view.
    • ERROR - Materialized view has been validated with one or more errors

    USE_NO_INDEX

    VARCHAR2(1)

    Indicates whether the materialized view was created using the USING NO INDEX clause (Y) or the materialized view was created with the default index (N). The USING NO INDEX clause suppresses the creation of the default index.
    See Also:
    • "DBA_MVIEWS"
    • "USER_MVIEWS"
    • Oracle9i Replication for more information on materialized views to support replication
    • Oracle9i Data Warehousing Guide for more information on materialized views to support data warehousing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 87 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_NESTED_TABLES

ALL_NESTED_TABLES describes the nested tables in tables accessible to the current user.

Related Views

  • DBA_NESTED_TABLES describes all nested tables in the database.
  • USER_NESTED_TABLES describes nested tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the nested table

    TABLE_NAME

    VARCHAR2(30)

    Name of the nested table

    TABLE_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type of which the nested table was created

    TABLE_TYPE_NAME

    VARCHAR2(30)

    Name of the type of the nested table

    PARENT_TABLE_NAME

    VARCHAR2(30)

    Name of the parent table containing the nested table

    PARENT_TABLE_COLUMN

    VARCHAR2(4000)

    Column name of the parent table that corresponds to the nested table

    STORAGE_SPEC

    VARCHAR2(30)

    Whether storage for the nested table is USER-SPECIFIED or DEFAULT

    RETURN_TYPE

    VARCHAR2(20)

    Return type of the varray column (LOCATOR | VALUE)

    ELEMENT_SUBSTITUTABLE

    VARCHAR2(25)

    Indicates whether the nested table element is substitutable (Y) or not (N)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 88 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OBJ_COLATTRS

ALL_OBJ_COLATTRS describes object columns and attributes contained in the tables accessible to the current user.

Related Views

  • DBA_OBJ_COLATTRS describes object columns and attributes contained in all tables in the database.
  • USER_OBJ_COLATTRS describes object columns and attributes contained in the tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table containing the object column or attribute

    COLUMN_NAME

    VARCHAR2(4000)

    Fully qualified name of the object column or attribute

    SUBSTITUTABLE

    VARCHAR2(15)

    Indicates whether the column is substitutable (Y) or not (N)
    See Also:
    • "DBA_OBJ_COLATTRS"
    • "USER_OBJ_COLATTRS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 89 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OBJECT_TABLES

ALL_OBJECT_TABLES describes all object tables accessible to the current user.

Related Views

  • DBA_OBJECT_TABLES describes all object tables in the database.
  • USER_OBJECT_TABLES describes all object tables owned by the current user. This view does not display the OWNER column.

    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

    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 entry belongs

    PCT_FREE

    NUMBER

    Minimum percentage of free space in a block

    PCT_USED

    NUMBER

    Minimum percentage of used space in a block

    INI_TRANS

    NUMBER

    Initial number of transactions

    MAX_TRANS

    NUMBER

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size (in bytes) of the initial extent

    NEXT_EXTENT

    NUMBER

    Size (in bytes) of secondary extents

    MIN_EXTENTS

    NUMBER

    Minimum number of extents allowed in the segment

    MAX_EXTENTS

    NUMBER

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of process freelists allocated in this segment

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated in this segment

    LOGGING

    VARCHAR2(3)

    Logging attribute

    BACKED_UP

    VARCHAR2(1)

    Whether the table has been backed up since last modification

    NUM_ROWS

    NUMBER

    Number of rows in the table

    BLOCKS

    NUMBER

    Number of used blocks in the table

    EMPTY_BLOCKS

    NUMBER

    Number of empty (never used) blocks in the table

    AVG_SPACE

    NUMBER

    Average available free space in the table

    CHAIN_CNT

    NUMBER

    Number of chained rows in the table

    AVG_ROW_LEN

    NUMBER

    Average row length, including row overhead

    AVG_SPACE_FREELIST_BLOCKS

    NUMBER

    Average free space of all blocks on a freelist

    NUM_FREELIST_BLOCKS

    NUMBER

    Number of blocks on the freelist

    DEGREE

    VARCHAR2(10)

    Number of parallel execution processes per instance for scanning the table

    INSTANCES

    VARCHAR2(10)

    Number of instances across which the table is to be scanned

    CACHE

    VARCHAR2(5)

    Whether the cluster is to be cached in the buffer cache (CACHE | NOCACHE)

    TABLE_LOCK

    VARCHAR2(8)

    Whether table locking is enabled or disabled

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this table

    LAST_ANALYZED

    DATE

    Date on which this table was most recently analyzed

    PARTITIONED

    VARCHAR2(3)

    Whether the table is partitioned (YES | NO)

    IOT_TYPE

    VARCHAR2(12)

    If index-organized table, then IOT_TYPE is IOT or IOT_OVERFLOW else NULL

    OBJECT_ID_TYPE

    VARCHAR2(16)

    Whether the object ID (OID) is USER-DEFINED or SYSTEM-GENERATED

    TABLE_TYPE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the type of the table

    TABLE_TYPE

    VARCHAR2(30)

    NOT NULL

    Type of the table

    TEMPORARY

    VARCHAR2(1)

    Whether this is a temporary table

    SECONDARY

    VARCHAR2(1)

    Whether the object table is a secondary object created by the ODCIIndexCreate method of the Oracle8i Data Cartridge (Y | N)

    NESTED

    VARCHAR2(3)

    Whether the table a nested table

    BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool to be used for table blocks

    ROW_MOVEMENT

    VARCHAR2(8)

    Whether partitioned row movement is ENABLED or DISABLED

    GLOBAL_STATS

    VARCHAR2(3)

    For partitioned object tables, whether 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)

    Whether statistics were entered directly by the user

    DURATION

    VARCHAR2(15)

    Indicates the duration of a temporary table:

    • SYS$SESSION: the rows are preserved for the duration of the session
    • SYS$TRANSACTION: the rows are deleted after COMMIT

    Null for a permanent table

    SKIP_CORRUPT

    VARCHAR2(8)

    Whether Oracle ignores blocks marked corrupt during table and index scans (ENABLED) or raises an error (DISABLED). To enable this feature, run the DBMS_REPAIR.SKIP_CORRUPT_BLOCKS procedure.

    MONITORING

    VARCHAR2(3)

    Whether the table has the MONITORING attribute set
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 90 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OBJECTS

ALL_OBJECTS describes all objects accessible to the current user.

Related Views

  • DBA_OBJECTS describes all objects in the database.
  • USER_OBJECTS describes all objects owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    OBJECT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    SUBOBJECT_NAME

    VARCHAR2(30)

    Name of the subobject (for example, partition)

    OBJECT_ID

    NUMBER

    NOT NULL

    Dictionary object number of the object

    DATA_OBJECT_ID

    NUMBER

    Dictionary object number of the segment that contains the object

    Note: OBJECT_ID and DATA_OBJECT_ID display data dictionary metadata. Do not confuse these numbers with the unique 16-byte object identifier (object ID) that Oracle assigns to row objects in object tables in the system.

    OBJECT_TYPE

    VARCHAR2(15)

    Type of the object (such as TABLE, INDEX)

    CREATED

    DATE

    NOT NULL

    Timestamp for the creation of the object

    LAST_DDL_TIME

    DATE

    NOT NULL

    Timestamp for the last modification of the object resulting from a DDL command (including grants and revokes)

    TIMESTAMP

    VARCHAR2(20)

    Timestamp for the specification of the object (character data)

    STATUS

    VARCHAR2(7)

    Status of the object (VALID, INVALID, or N/A)

    TEMPORARY

    VARCHAR2(1)

    Whether the object is temporary (the current session can see only data that it placed in this object itself)

    GENERATED

    VARCHAR2(1)

    Was the name of this object system generated? (Y|N)

    SECONDARY

    VARCHAR2(1)

    Whether this is a secondary object created by the ODCIIndexCreate method of the Oracle9i Data Cartridge (Y | N)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 91 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OPANCILLARY

ALL_OPANCILLARY describes operators whose bindings are ancillary to other (primary) operators.

Related Views

  • DBA_OPANCILLARY provides such information about all operators in the database.
  • USER_OPANCILLARY provides such information about operators owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the ancillary operator

    OPERATOR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the ancillary operator

    BINDING#

    NUMBER

    NOT NULL

    Binding number the of ancillary operator

    PRIMOP_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the primary operator

    PRIMOP_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the primary operator

    PRIMOP_BIND#

    NUMBER

    NOT NULL

    Binding number of the primary operator
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 92 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OPARGUMENTS

ALL_OPARGUMENTS describes arguments for each operator binding accessible to the current user.

Related Views

  • DBA_OPARGUMENTS describes arguments of all operator bindings in the database.
  • USER_OPARGUMENTS describes arguments of all operator bindings owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the operator argument

    OPERATOR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the operator argument

    BINDING#

    NUMBER

    NOT NULL

    Binding number of the operator argument

    POSITION

    NUMBER

    NOT NULL

    Position of the operator argument (1, 2, 3, ...)

    ARGUMENT_TYPE

    VARCHAR2(61)

    Datatype of the operator argument
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 93 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OPBINDINGS

ALL_OPBINDINGS describes operator bindings accessible to the current user.

Related Views

  • DBA_OPBINDINGS describes bindings of all operators in the database.
  • USER_OPBINDINGS describes bindings of all operators owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the operator

    OPERATOR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the operator

    BINDING#

    NUMBER

    NOT NULL

    Binding number of the operator

    FUNCTION_NAME

    VARCHAR2(92)

    Name of the binding function or method as specified by the user

    RETURN_SCHEMA

    VARCHAR2(30)

    If the return type of the binding is an object type, the schema of the type

    RETURN_TYPE

    VARCHAR2(30)

    Name of the return type

    IMPLEMENTATION_TYPE_SCHEMA

    VARCHAR2(30)

    If the operator was created WITH INDEX CONTEXT, SCAN CONTEXT, this column displays the schema of the implementation type used by the functional implementation of the operator as a scan context. (Blank if the operator was created without this syntax.)

    See Also: the CREATE OPERATOR statement in Oracle9i SQL Reference

    IMPLEMENTATION_TYPE

    VARCHAR2(30)

    If the operator was created WITH INDEX CONTEXT, SCAN CONTEXT, this column displays the name of the implementation type used by the functional implementation of the operator as a scan context. (Blank if the operator was created without this syntax.)

    See Also: the CREATE OPERATOR statement in Oracle9i SQL Reference
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 94 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OPERATOR_COMMENTS

ALL_OPERATOR_COMMENTS lists all comments for user-defined operators accessible to the current user.

Related Views

  • DBA_OPERATOR_COMMENTS lists all comments for user-defined operators in the database.
  • USER_OPERATOR_COMMENTS lists all comments for user-defined operators owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the user-defined operator

    OPERATOR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the user-defined operator

    COMMENTS

    VARCHAR2(4000)

    Comment for the user-defined operator
    See Also:
    • "DBA_OPERATOR_COMMENTS"
    • "USER_OPERATOR_COMMENTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 95 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OPERATORS

ALL_OPERATORS describes operators accessible to the current user.

Related Views

  • DBA_OPERATORS describes all operators in the database.
  • USER_OPERATORS describes all operators owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the operator

    OPERATOR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the operator

    NUMBER_OF_BINDS

    NUMBER

    NOT NULL

    Number of bindings associated with the operator
    See Also:
    • "DBA_OPERATORS"
    • "USER_OPERATORS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 96 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OUTLINE_HINTS

ALL_OUTLINE_HINTS describes the set of hints stored in outlines accessible to the current user.

Related Views

  • DBA_OUTLINE_HINTS describes such hints for all outlines in the database. This is the only one of the three views that displays the OWNER column.
  • USER_OUTLINE_HINTS describes such hints for all outlines owned by the current user.

    Column Datatype NULL Description

    NAME

    VARCHAR2(30)

    Name of the outline

    OWNER

    VARCHAR2(30)

    Name of the user who created the outline

    NODE

    NUMBER

    ID of the query or subquery to which the hint applies. The top-level query is labeled 1. Subqueries are assigned sequentially numbered labels, starting with 2.

    STAGE

    NUMBER

    Outline hints can be applied at three different stages during the compilation process. This column indicates the stage at which this hint was applied.

    JOIN_POS

    NUMBER

    Position of the table in the join order. The value is 0 for all hints except access method hints, which identify a table to which the hint and the join position apply.

    HINT

    VARCHAR2(512)

    Text of the hint
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 97 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_OUTLINES

ALL_OUTLINES describes all stored outlines accessible to the current user.

Related Views

  • DBA_OUTLINES describes all stored outlines in the database. This is the only one of the three views that displays the OWNER column.
  • USER_OUTLINES describes all stored outlines owned by the current user.

    Column Datatype NULL Description

    NAME

    VARCHAR2(30)

    User-specified or generated name of the stored outline. The name must be of a form that can be expressed in SQL.

    OWNER

    VARCHAR2(30)

    Name of the user who created the outline

    CATEGORY

    VARCHAR2(30)

    User-defined name of the category to which this outline belongs

    USED

    VARCHAR2(9)

    Whether the outline has ever been used (USED, UNUSED, or UNDEFINED)

    TIMESTAMP

    DATE

    Timestamp of outline creation

    VERSION

    VARCHAR2(64)

    Oracle version that created the outline

    SQL_TEXT

    LONG

    SQL text of the query, including any hints that were a part of the original statement. If bind variables are included, the variable names are stored as SQL text, not the values that are assigned to the variables.

    Note: This field may contain sensitive information about your database or application. Therefore, use discretion when granting SELECT or VIEW object privileges on these views.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 98 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PART_COL_STATISTICS

ALL_PART_COL_STATISTICS provides column statistics and histogram information for table partitions accessible to the current user.

Related Views

  • DBA_PART_COL_STATISTICS provides such information for all table partitions in the database.
  • USER_PART_COL_STATISTICS provides such information for all partitions of tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the partitioned table

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table

    PARTITION_NAME

    VARCHAR2(30)

    Name of the table partition

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the column

    NUM_DISTINCT

    NUMBER

    Number of distinct values in the column

    LOW_VALUE

    RAW(32)

    Low value in the column

    HIGH_VALUE

    RAW(32)

    High value in the column

    DENSITY

    NUMBER

    Density of the column

    NUM_NULLS

    NUMBER

    Number of nulls in the column

    NUM_BUCKETS

    NUMBER

    Number of buckets in histogram for the column

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this column

    LAST_ANALYZED

    DATE

    Date on which this column was most recently analyzed

    GLOBAL_STATS

    VARCHAR2(3)

    Indicates whether column statistics were collected for the partition as a whole (YES) or were estimated from statistics on underlying subpartitions (NO).

    USER_STATS

    VARCHAR2(3)

    Whether the statistics were entered directly by the user

    AVG_COL_LEN

    NUMBER

    Average length of the column, in bytes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 99 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PART_HISTOGRAMS

ALL_PART_HISTOGRAMS provides the histogram data (endpoints per histogram) for histograms on table partitions accessible to the current user.

Note:

These views are populated only if you collect statistics on the index using the ANALYZE statement or the DBMS_STATS package.

Related Views

  • DBA_PART_HISTOGRAMS provides such information for all table partitions in the database.
  • USER_PART_HISTOGRAMS provides such information for all partitions of tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table

    PARTITION_NAME

    VARCHAR2(30)

    Name of the table partition

    COLUMN_NAME

    VARCHAR2(30)

    Name of the column

    BUCKET_NUMBER

    NUMBER

    Bucket number of the histogram

    ENDPOINT_VALUE

    NUMBER

    Normalized endpoint values for this bucket

    ENDPOINT_ACTUAL_VALUE

    VARCHAR2(1000)

    Actual (not normalized) string value of the endpoint for this bucket
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 10 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ARCHIVE_PROCESSES

This view provides information about the state of the various ARCH processes for the instance.

Column | Datatype | Description
PROCESS | NUMBER | The identifier for the ARCH process for the instance, numbered from 0-9
STATUS | VARCHAR2(10) | The status of the ARCH process, displayed as a keyword. Possible values are: STOPPED, SCHEDULED, STARTING, ACTIVE, STOPPING, and TERMINATED.
LOG_SEQUENCE | NUMBER | This is the online redo log sequence number currently being archived, if STATE="BUSY"
STATE | VARCHAR2(4) | This is the current state of the ARCH process, displayed as a keyword. Possible keywords are IDLE or BUSY.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 11 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ARCHIVED_LOG

This view displays archived log information from the control file, including archive log names. An archive log record is inserted after the online redo log is successfully archived or cleared (name column is NULL if the log was cleared). If the log is archived twice, there will be two archived log records with the same THREAD#, SEQUENCE#, and FIRST_CHANGE#, but with a different name. An archive log record is also inserted when an archive log is restored from a backup set or a copy and whenever a copy of a log is made with the RMAN COPY command.

Column Datatype Description

RECID

NUMBER

Archived log record ID

STAMP

NUMBER

Archived log record stamp

NAME

VARCHAR2(513)

Archived log file name. If set to NULL, the log file was cleared before it was archived.

DEST_ID

NUMBER

Original destination from which the archivelog was generated. The value is 0 if the destination identifier is not available.

THREAD#

NUMBER

Redo thread number

SEQUENCE#

NUMBER

Redo log sequence number

RESETLOGS_CHANGE#

NUMBER

Resetlogs change# of the database when this log was written

RESETLOGS_TIME

DATE

Resetlogs time of the database when this log was written

FIRST_CHANGE#

NUMBER

First change# in the archived log

FIRST_TIME

DATE

Timestamp of the first change

NEXT_CHANGE#

NUMBER

First change in the next log

NEXT_TIME

DATE

Timestamp of the next change

BLOCKS

NUMBER

Size of the archived log (in blocks)

BLOCK_SIZE

NUMBER

Redo log block size. This is the logical block size of the archived log, which is the same as the logical block size of the online log from which this archived log was copied. The online log logical block size is a platform-specific value that is not adjustable by the user.

CREATOR

VARCHAR2(7)

Creator of the archivelog:

  • ARCH - ARCH process
  • FGRD - Foreground process
  • RMAN
  • SRMN - RMAN at standby
  • LGWR - LGWR process

REGISTRAR

VARCHAR2(7)

Registrar of the entry:

  • RFS
  • ARCH - ARCH process
  • FGRD - Foreground process
  • RMAN
  • SRMN - RMAN at standby
  • LGWR - LGWR process

STANDBY_DEST

VARCHAR2(3)

(YES|NO) Indicates if the entry is an archivelog destination

ARCHIVED

VARCHAR2(3)

Indicates that the online redo log was archived (YES) or that RMAN only inspected the log and created a record for future application of redo logs during recovery.

See Also: Oracle9i Recovery Manager User's Guide.

APPLIED

VARCHAR2(3)

(YES|NO) Indicates whether or not the archivelog has been applied to its corresponding standby database. YES indicates it has been applied; NO indicates it has not. The value is always NO for local destinations.

This column is meaningful at the physical standby site for the ARCHIVED_LOG entries with REGISTRAR='RFS' (which means this log is shipped from the primary to the standby database). If REGISTRAR='RFS' and APPLIED is NO, then the log has arrived at the standby but has not yet been applied. If REGISTRAR='RFS' and APPLIED is YES, the log has arrived and been applied at the standby database.

You can use this field to identify archivelogs that can be backed up and removed from disk.

DELETED

VARCHAR2(3)

Specifies (YES | NO) whether an RMAN DELETE command has physically deleted the archived log file from disk, as well as logically removing it from the control file of the target database and from the recovery catalog.

STATUS

VARCHAR2(1)

The status of this archived log. Possible values are:

A - Available

D - Deleted

U - Unavailable

X - Expired

COMPLETION_TIME

DATE

Time when the archiving completed

DICTIONARY_BEGIN

VARCHAR2(3)

(YES|NO) Indicates whether or not this log contains the start of a LogMiner dictionary. This column also appears in the RC_ARCHIVED_LOG view.

DICTIONARY_END

VARCHAR2(3)

(YES|NO) Indicates whether or not this log contains the end of a LogMiner dictionary. This column also appears in the RC_ARCHIVED_LOG view.

BACKUP_COUNT

NUMBER

Indicates the number of times this file has been backed up. Values range from 0-15. If the file has been backed up more than 15 times, the value remains 15.

ARCHIVAL_THREAD#

NUMBER

Redo thread number of the instance that performed the archival operation. This column differs from the THREAD# column only when a closed thread is archived by another instance.

ACTIVATION#

NUMBER
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 12 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP

This view displays the backup status of all online datafiles.

Column | Datatype | Description
FILE# | NUMBER | File identifier
STATUS | VARCHAR2(18) | File status: NOT ACTIVE, ACTIVE (backup in progress), OFFLINE NORMAL, or description of an error
CHANGE# | NUMBER | System change number when backup started
TIME | DATE | Time the backup started
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 13 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_ASYNC_IO

This view displays performance information about ongoing and recently completed RMAN backups and restores. For each backup, it contains one row for each input datafile, one row for the aggregate total performance of all datafiles, and one row for the output backup piece. This data is not stored persistently, and is not preserved when the instance is re-started.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for information on how to use this table to tune backup performance

Column | Datatype | Description
SID | NUMBER | The Oracle SID of the session doing the backup or restore
SERIAL | NUMBER | The use count for the SID doing the backup or restore
USE_COUNT | NUMBER | A counter that can be used to identify rows from different backup sets
DEVICE_TYPE | VARCHAR2(17) | The device type where the file is located
TYPE | VARCHAR2(9) | INPUT, OUTPUT, or AGGREGATE
STATUS | VARCHAR2(11) | NOT STARTED, IN PROGRESS, or FINISHED
FILENAME | VARCHAR2(513) | The name of the backup file being read or written
SET_COUNT | NUMBER | The set count of the backup set being read or written
SET_STAMP | NUMBER | The set stamp of the backup set being read or written
BUFFER_SIZE | NUMBER | The size of the buffers being used to read/write this file, in bytes
BUFFER_COUNT | NUMBER | The number of buffers being used to read/write this file
TOTAL_BYTES | NUMBER | The total number of bytes that will be read or written for this file, if known. If not known, this column will be null
OPEN_TIME | DATE | The time this file was opened. If TYPE='AGGREGATE', then this is the time that the first file in the aggregate was opened
CLOSE_TIME | DATE | The time this file was closed. If TYPE='AGGREGATE', then this is the time that the last file in the aggregate was closed
ELAPSED_TIME | NUMBER | The time, in 100ths of seconds, that the file was open
MAXOPENFILES | NUMBER | The number of concurrently open DISK files. This value is only present in rows where TYPE='AGGREGATE'.
BYTES | NUMBER | The number of bytes read or written so far
EFFECTIVE_BYTES_PER_SECOND | NUMBER | The I/O rate that was achieved with this device during this backup
IO_COUNT | NUMBER | The number of I/Os that were performed to this file
READY | NUMBER | The number of asynchronous requests for which a buffer was immediately ready for use
SHORT_WAITS | NUMBER | The number of times that a buffer was not immediately available, but a buffer became available after doing a non-blocking poll for I/O completion
SHORT_WAIT_TIME_TOTAL | NUMBER | The total time, in 100ths of seconds, taken by non-blocking polls for I/O completion
SHORT_WAIT_TIME_MAX | NUMBER | The maximum time taken for a non-blocking poll for I/O completion, in 100ths of seconds
LONG_WAITS | NUMBER | The number of times that a buffer was not immediately available, and only became available after a blocking wait was issued
LONG_WAIT_TIME_TOTAL | NUMBER | The total time, in 100ths of seconds, taken by blocking waits for I/O completion
LONG_WAIT_TIME_MAX | NUMBER | The maximum time taken for a blocking wait for I/O completion, in 100ths of seconds
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 14 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_CORRUPTION

V$BACKUP_CORRUPTION displays information about corrupt block ranges in datafile backups from the control file. Note that corruptions are not tolerated in the control file and archived redo log backups.

Column Datatype Description

RECID

NUMBER

Backup corruption record ID

STAMP

NUMBER

Backup corruption record stamp

SET_STAMP

NUMBER

Backup set stamp

SET_COUNT

NUMBER

Backup set count

PIECE#

NUMBER

backup piece that contains this corrupt block

FILE#

NUMBER

Absolute file number of the datafile that contains the corrupt blocks

BLOCK#

NUMBER

Block number of the first corrupt block in the range of corrupted blocks

BLOCKS

NUMBER

Number of corrupted blocks found starting with BLOCK#

CORRUPTION_CHANGE#

NUMBER

Change number at which the logical corruption was detected. Set to 0 to indicate media corruption.

MARKED_CORRUPT

VARCHAR2(3)

Indicates whether this corruption was not previously detected by Oracle (YES) or Oracle had already discovered this corrupt block and marked it as corrupt in the database (NO). Note that when a corrupt block is encountered in a backup, and was not already marked corrupt by Oracle, then the backup process does not mark the block as corrupt in the production datafile. Thus, this field may be YES for the same block in more than one backup set.

CORRUPTION_TYPE

VARCHAR2(9)

Type of block corruption in the datafile:

  • ALL ZERO - Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.
  • FRACTURED - Block header looks reasonable, but the front and back of the block are different versions.
  • CHECKSUM - optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it probably fails because sectors in the middle of the block are from different versions.
  • CORRUPT - Block is wrongly identified or is not a data block (for example, the data block address is missing)
  • LOGICAL - Specifies the range is for logically corrupt blocks. CORRUPTION_CHANGE# will have a nonzero value.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 15 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_DATAFILE

This view displays backup datafile and backup control file information from the control file.

Column | Datatype | Description
RECID | NUMBER | Backup datafile record ID
STAMP | NUMBER | Backup datafile record stamp
SET_STAMP | NUMBER | Backup set stamp
SET_COUNT | NUMBER | Backup set count
FILE# | NUMBER | Datafile number; set to 0 for control file
CREATION_CHANGE# | NUMBER | Creation change of the datafile
CREATION_TIME | DATE | Creation timestamp of the datafile
RESETLOGS_CHANGE# | NUMBER | Resetlogs change# of the datafile when it was backed up
RESETLOGS_TIME | DATE | Resetlogs timestamp of the datafile when it was backed up
INCREMENTAL_LEVEL | NUMBER | (0-4) incremental backup level
INCREMENTAL_CHANGE# | NUMBER | All blocks changed after incremental change# is included in this backup; set to 0 for a full backup
CHECKPOINT_CHANGE# | NUMBER | All changes up to checkpoint change# are included in this backup
CHECKPOINT_TIME | DATE | Timestamp of the checkpoint
ABSOLUTE_FUZZY_CHANGE# | NUMBER | Highest change# in this backup
MARKED_CORRUPT | NUMBER | Number of blocks marked corrupt
MEDIA_CORRUPT | NUMBER | Number of blocks media corrupt
LOGICALLY_CORRUPT | NUMBER | Number of blocks logically corrupt
DATAFILE_BLOCKS | NUMBER | Size of the datafile in blocks at backup time. This value is also the number of blocks taken by the datafile restarted from this backup.
BLOCKS | NUMBER | Size of the backup datafile in blocks. Unused blocks are not copied to the backup.
BLOCK_SIZE | NUMBER | Block size
OLDEST_OFFLINE_RANGE | NUMBER | The RECID of the oldest offline range record in this backup control file. 0 for datafile backups.
COMPLETION_TIME | DATE | The time completed
CONTROLFILE_TYPE | VARCHAR2(1) | B indicates normal copies S indicates standby copies
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 16 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_DEVICE

This view displays information about supported backup devices. If a device type does not support named devices, then one row with the device type and a null device name is returned for that device type. If a device type supports named devices then one row is returned for each available device of that type. The special device type DISK is not returned by this view because it is always available.

Column | Datatype | Description
DEVICE_TYPE | VARCHAR2(17) | Type of the backup device
DEVICE_NAME | VARCHAR2(512) | Name of the backup device
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 17 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_PIECE

This view displays information about backup pieces from the control file. Each backup set consist of one or more backup pieces.

Column | Datatype | Description
RECID | NUMBER | Backup piece record ID
STAMP | NUMBER | Backup piece record stamp
SET_STAMP | NUMBER | Backup set stamp
SET_COUNT | NUMBER | Backup set count
PIECE# | NUMBER | Backup piece number (1-N)
COPY# | NUMBER | Indicates the copy number for backup pieces created with duplex enabled. 1 if the backup piece is not duplexed.
DEVICE_TYPE | VARCHAR2(17) | Type of the device on which the backup piece resides. Set to DISK for backup sets on disk. See Also: V$BACKUP_DEVICE
HANDLE | VARCHAR2(513) | Backup piece handle identifies the backup piece on restore
COMMENTS | VARCHAR2(81) | Comment returned by the operating system or storage subsystem. Set to NULL for backup pieces on disk. This value is informational only; not needed for restore.
MEDIA | VARCHAR2(65) | Name of the media on which the backup piece resides. This value is informational only; not needed for restore.
MEDIA_POOL | NUMBER | The media pool in which the copy resides. This is the same value that was entered in the POOL operand of the Recovery Manager backup command.
CONCUR | VARCHAR2(3) | (YES | NO) Indicates whether the piece on a media that can be accessed concurrently
TAG | VARCHAR2(32) | Backup piece tag. The tag is specified at backup set level, but stored at piece level.
STATUS | VARCHAR2(1) | Indicates the status of the piece: A (available), D (deleted), or X (expired)
START_TIME | DATE | The starting time
COMPLETION_TIME | DATE | The completion time
ELAPSED_SECONDS | NUMBER | The number of elapsed seconds
DELETED | VARCHAR2(3) | (YES/NO) NO indicates that the file still exists. YES indicates the file no longer exists because it has been deleted.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 18 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_REDOLOG

This view displays information about archived logs in backup sets from the control file. Note that online redo logs cannot be backed up directly; they must be archived first to disk and then backed up. An archive log backup set can contain one or more archived logs.

Column | Datatype | Description
RECID | NUMBER | Record ID for this row; it is an integer that identifies this row
STAMP | NUMBER | Timestamp used with RECID to uniquely identify this row
SET_STAMP | NUMBER | One of the foreign keys for the row of the V$BACKUP_SET table that identifies this backup set
SET_COUNT | NUMBER | One of the foreign keys for the row of the V$BACKUP_SET table that identifies this backup set
THREAD# | NUMBER | Thread number for the log
SEQUENCE# | NUMBER | Log sequence number
RESETLOGS_CHANGE# | NUMBER | Change number of the last resetlogs before the log was written
RESETLOGS_TIME | DATE | Change time of the last resetlogs before the log was written. These will be the same for all logs in a backup set.
FIRST_CHANGE# | NUMBER | SCN when the log was switched into. The redo in the log is at this SCN and greater.
FIRST_TIME | DATE | Time allocated when the log was switched into
NEXT_CHANGE# | NUMBER | SCN when the next log in this thread was switched into. The redo in the log is below this SCN.
NEXT_TIME | DATE | Time when the next log in this thread was switched into
BLOCKS | NUMBER | Size of the log in logical blocks including the header block
BLOCK_SIZE | NUMBER | Size of the log blocks in bytes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 19 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_SET

V$BACKUP_SET displays backup set information from the control file. A backup set record is inserted after the backup set is successfully completed.

Column Datatype Description

RECID

NUMBER

Backup set record ID

STAMP

NUMBER

Backup set record stamp

SET_STAMP

NUMBER

Backup set stamp. The backup set stamp and count uniquely identify the backup set.

Primary key for the V$BACKUP_SET table, and the foreign key for the following tables: V$BACKUP_PIECE, V$BACKUP_DATAFILE, V$BACKUP_REDOLOG, V$BACKUP_CORRUPTION.

SET_COUNT

NUMBER

Backup set count. The backup set count is incremented by one every time a new backup set is started (if the backup set is never completed the number is "lost"). If the control file is re-created then the count is reset to 1. Therefore the count must be used with the stamp to uniquely identify a backup set.

Primary key for the V$BACKUP_SET table, and the foreign key for the following tables: V$BACKUP_PIECE, V$BACKUP_DATAFILE, V$BACKUP_REDOLOG, V$BACKUP_CORRUPTION

BACKUP_TYPE

VARCHAR2(1)

Type of files that are in this backup. If the backup contains archived redo logs, the value is L. If this is a datafile full backup, the value is D. If this is an incremental backup, the value is I.

CONTROLFILE_INCLUDED

VARCHAR2(3)

Set to YES if there is a control file included in this backup set, otherwise set to NO

INCREMENTAL_LEVEL

NUMBER

Location where this backup set fits into the database's backup strategy. Set to zero for full datafile backups, nonzero for incremental datafile backups, and NULL for archivelog backups.

PIECES

NUMBER

Number of distinct backup pieces in the backup set

START_TIME

DATE

The starting time

COMPLETION_TIME

DATE

The time that this backup set completed

ELAPSED_SECONDS

NUMBER

The number of elapsed seconds

BLOCK_SIZE

NUMBER

Block size of the backup set

INPUT_FILE_SCAN_ONLY

VARCHAR2(3)

YES indicates no actual backup is performed, but the datafiles are read. NO indicates a normal backup is performed.

KEEP

VARCHAR2(3)

(YES/NO) Indicates whether or not this backup set has a retention policy that is different than the value for the configure retention policy

KEEP_UNTIL

DATE

If KEEP_UNTIL_TIME is specified, this is the date after which the backup becomes obsolete. If this column is null, then the backup never expires.

KEEP_OPTIONS

VARCHAR2(10)

Lists additional retention options for this backup set. Possible values are:

LOGS - The logs need to recover this backup are kept

NOLOGS - The logs needed to recover this backup will not be kept
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 20 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_SPFILE

V$BACKUP_SPFILE displays information about server parameter files in backup sets.

Column | Datatype | Description
RECID | NUMBER | Backup SPFILE record ID
STAMP | NUMBER | Backup SPFILE record stamp
SET_STAMP | NUMBER | Backup set stamp (of the set which contains this SPFILE backup)
SET_COUNT | NUMBER | Backup set count (of the set which contains this SPFILE backup)
MODIFICATION_TIME | DATE | Time when the SPFILE was last modified (this also includes creation time)
BYTES | NUMBER | Size of the SPFILE (in bytes)
COMPLETION_TIME | DATE | Time when the backup of the SPFILE completed
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 21 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BACKUP_SYNC_IO

This view displays performance information about ongoing and recently completed RMAN backups and restores. For each backup, it contains one row for each input datafile, one row for the aggregate total performance of all datafiles, and one row for the output backup piece. This data is not stored persistently, and is not preserved when the instance is re-started.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for information on how to use this table to tune backup performance

Column | Datatype | Description
SID | NUMBER | The Oracle SID of the session doing the backup or restore
SERIAL | NUMBER | The use count for the SID doing the backup or restore
USE_COUNT | NUMBER | A counter that can be used to identify rows from different backup sets
DEVICE_TYPE | VARCHAR2(17) | The device type where the file is located
TYPE | VARCHAR2(9) | INPUT, OUTPUT, or AGGREGATE
STATUS | VARCHAR2(11) | NOT STARTED, IN PROGRESS, or FINISHED
FILENAME | VARCHAR2(513) | The name of the backup file being read or written
SET_COUNT | NUMBER | The set count of the backup set being read or written
SET_STAMP | NUMBER | The set stamp of the backup set being read or written
BUFFER_SIZE | NUMBER | The size of the buffers being used to read/write this file, in bytes
BUFFER_COUNT | NUMBER | The number of buffers being used to read/write this file
TOTAL_BYTES | NUMBER | The total number of bytes that will be read or written for this file, if known. If not known, this column will be null.
OPEN_TIME | DATE | The time this file was opened. If TYPE='AGGREGATE', then this is the time that the first file in the aggregate was opened.
CLOSE_TIME | DATE | The time this file was closed. If TYPE='AGGREGATE', then this is the time that the last file in the aggregate was closed.
ELAPSED_TIME | NUMBER | The time, in 100ths of seconds, that the file was open
MAXOPENFILES | NUMBER | The number of concurrently open DISK files. This value is only present in rows where TYPE='AGGREGATE'.
BYTES | NUMBER | The number of bytes read or written so far
EFFECTIVE_BYTES_PER_SECOND | NUMBER | The I/O rate that was achieved with this device during this backup
IO_COUNT | NUMBER | The number of I/Os that were performed to this file
IO_TIME_TOTAL | NUMBER | The total time, in 100ths of seconds, taken to do I/O for this file
IO_TIME_MAX | NUMBER | The maximum time taken for a single I/O request
DISCRETE_BYTES_PER_SECOND | NUMBER | The average transfer rate for this file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 22 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BGPROCESS

This view describes the background processes.

Column | Datatype | Description
PADDR | RAW(4 | 8) | Address of the process state object
NAME | VARCHAR2(5) | Name of this background process
DESCRIPTION | VARCHAR2(64) | Description of the background process
ERROR | NUMBER | Error encountered
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 23 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BH

This is an Oracle9i Real Application Clusters view. This view gives the status and number of pings for every buffer in the SGA.

Column Datatype Description

FILE#

NUMBER

Datafile identifier number (to find filename, query DBA_DATA_FILES or V$DBFILES)

BLOCK#

NUMBER

Block number

CLASS#

NUMBER

The class number

STATUS

VARCHAR2(1)

Status of the buffer:

  • FREE - not currently in use
  • XCUR - exclusive
  • SCUR - shared current
  • CR - consistent read
  • READ - being read from disk
  • MREC - in media recovery mode
  • IREC - in instance recovery mode

XNC

NUMBER

Number of PCM x to null lock conversions due to contention with another instance. This column is obsolete but is retained for historical compatibility.

LOCK_ELEMENT_ADDR

RAW(4 | 8)

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

LOCK_ELEMENT_NAME

NUMBER

The address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

LOCK_ELEMENT_CLASS

NUMBER

The address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

FORCED_READS

NUMBER

Number of times the block had to be made re-read from disk because another instance had forced it out of this instance's cache by requesting the PCM lock on this block in lock mode.

FORCED_WRITES

NUMBER

Number of times DBWR had to write this block to disk because this instance had dirtied the block and another instance had requested the PCM lock on the block in conflicting mode.

DIRTY

VARCHAR2(1)

Y - block modified

TEMP

VARCHAR2(1)

Y - temporary block

PING

VARCHAR2(1)

Y - block pinged

STALE

VARCHAR2(1)

Y - block is stale

DIRECT

VARCHAR2(1)

Y - direct block

NEW

VARCHAR2(1)

Always set to N. This column is obsolete but is retained for historical compatibility.

OBJD

NUMBER

Database object number of the block that the buffer represents

TS#

NUMBER

Tablespace number of block
See Also:

Oracle9i Real Application Clusters Concepts
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 24 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BUFFER_POOL

This view displays information about all buffer pools available for the instance. The "sets" pertain to the number of LRU latch sets.

See Also:

"DB_BLOCK_SIZE"

Column | Datatype | Description
ID | NUMBER | Buffer pool ID number
NAME | VARCHAR2(20) | Buffer pool name. Possible values: DEFAULT, KEEP, RECYCLE. Note: Currently, KEEP and RECYCLE pools only exist for the standard block size. All non-standard block size pools are DEFAULT.
BLOCK_SIZE | NUMBER | Block size in bytes for buffers in this pool. Possible values: the standard block size, the power of 2 non-standard block sizes, 2048, 4096, 8192, 16384, 32768.
RESIZE_STATE | VARCHAR2(10) | Current state of the resize operation STATIC - not being resized ALLOCATING - memory is being allocated (can be cancelled by the user) ACTIVATING - new buffers are being created (user cannot cancel) SHRINKING - buffers are being deleted (can be cancelled by the user)
CURRENT_SIZE | NUMBER | Present size of the sub-cache in megabytes
BUFFERS | NUMBER | Current instantaneous number of buffers
TARGET_SIZE | NUMBER | If a resize is in progress (state is not STATIC), records new target size in megabytes. If the pool is STATIC, the value in this column is the same as the current size of the pool.
TARGET_BUFFERS | NUMBER | If a resize is in progress, records new target size in terms of buffers. Otherwise, the value in this column is the same as the current number of buffers.
PREV_SIZE | NUMBER | Previous buffer pool size. If the buffer pool has never been resized, the previous size is zero.
PREV_BUFFERS | NUMBER | Previous number of buffers in the buffer pool. Value is zero if the buffer pool has never been resized.
LO_BNUM | NUMBER | Obsolete column
HI_BNUM | NUMBER | Obsolete column
LO_SETID | NUMBER | Obsolete column
HI_SETID | NUMBER | Obsolete column
SET_COUNT | NUMBER | Obsolete column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 25 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$BUFFER_POOL_STATISTICS

V$BUFFER_POOL_STATISTICS displays information about all buffer pools available for the instance. The "sets" pertain to the number of LRU latch sets.

See Also:

"DB_CACHE_SIZE"

Column | Datatype | Description
ID | NUMBER | Buffer pool ID number
NAME | VARCHAR2(20) | Buffer pool name
SET_MSIZE | NUMBER | Buffer pool maximum set size
CNUM_REPL | NUMBER | Number of buffers on replacement list
CNUM_WRITE | NUMBER | Number of buffers on write list
CNUM_SET | NUMBER | Number of buffers in set
BUF_GOT | NUMBER | Number of buffers gotten by the set
SUM_WRITE | NUMBER | Number of buffers written by the set
SUM_SCAN | NUMBER | Number of buffers scanned in the set
FREE_BUFFER_WAIT | NUMBER | Free buffer wait statistic
WRITE_COMPLETE_WAIT | NUMBER | Write complete wait statistic
BUFFER_BUSY_WAIT | NUMBER | Buffer busy wait statistic
FREE_BUFFER_INSPECTED | NUMBER | Free buffer inspected statistic
DIRTY_BUFFERS_INSPECTED | NUMBER | Dirty buffers inspected statistic
DB_BLOCK_CHANGE | NUMBER | Database blocks changed statistic
DB_BLOCK_GETS | NUMBER | Database blocks gotten statistic
CONSISTENT_GETS | NUMBER | Consistent gets statistic
PHYSICAL_READS | NUMBER | Physical reads statistic
PHYSICAL_WRITES | NUMBER | Physical writes statistic
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 26 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CACHE

This is an Oracle9i Real Application Clusters view. This view contains information from the block header of each block in the SGA of the current instance as related to particular database objects.

See Also:

Oracle9i Real Application Clusters Concepts
Column Datatype Description

FILE#

NUMBER

Datafile identifier number (to find filename, query DBA_DATA_FILES or V$DBFILES)

BLOCK#

NUMBER

Block number

CLASS#

NUMBER

Class number

STATUS

VARCHAR2(1)

Status of block:

  • FREE - Not currently in use
  • XCUR - Exclusive
  • SCUR - Shared current
  • CR - Consistent read
  • READ - Being read from disk
  • MREC - In media recovery mode
  • IREC - In instance recovery mode

XNC

NUMBER

Number of PCM x to null lock conversions due to contention with another instance. This column is obsolete and maintained only for compatibility reasons.

FORCED_READS

NUMBER

Forced reads

FORCED_WRITES

NUMBER

Forced writes

NAME

VARCHAR2(30)

Name of the database object containing the block

PARTITION_NAME

VARCHAR2(30)

Name of the partition; NULL for non-partitioned objects

KIND

VARCHAR2(12)

Type of database object:

  • 1 - Index
  • 2 - Table
  • 3 - Cluster
  • 4 - View
  • 5 - Synonym
  • 6 - Sequence
  • 7 - Procedure
  • 8 - Function
  • 9 - Package
  • 10 - Nonexistent
  • 11 - Package body
  • 12 - Trigger
  • 13 - Type
  • 14 - Type body
  • 19 - Table partition
  • 20 - Index partition
  • 21 - LOB
  • 22 - Library
  • Null - Unknown

OWNER#

NUMBER

Owner number

LOCK_ELEMENT_ADDR

RAW(4 | 8)

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

LOCK_ELEMENT_NAME

NUMBER

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 27 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CACHE_LOCK

This is an Oracle9i Real Application Clusters view. V$CACHE_LOCK is similar to V$CACHE, except for the platform specific lock manager identifiers. This information may be useful if the platform- specific lock manager provides tools for monitoring the PCM lock operations that are occurring. For example, first query to find the lock element address using INDX and CLASS, then query V$BH to find the buffers that are covered by the lock.

See Also:
  • Oracle9i Real Application Clusters Concepts
  • "V$CACHE"
Column Datatype Description

FILE#

NUMBER

Datafile identifier number (to find filename, query DBA_DATA_FILES or V$DBFILES)

BLOCK#

NUMBER

Block number

STATUS

VARCHAR2(4)

Status of block:

  • FREE - Not currently in use
  • XCUR - Exclusive
  • SCUR - Shared current
  • CR - Consistent read
  • READ - Being read from disk
  • MREC - In media recovery mode
  • IREC - In instance recovery mode

XNC

NUMBER

Number of parallel cache management (PCM) lock conversions due to contention with another instance

NAME

VARCHAR2(30)

Name of the database object containing the block

KIND

VARCHAR2(12)

Type of database object:

  • 1 - Index
  • 2 - Table
  • 3 - Cluster
  • 4 - View
  • 5 - Synonym
  • 6 - Sequence
  • 7 - Procedure
  • 8 - Function
  • 9 - Package
  • 10 - Nonexistent
  • 11 - Package body
  • 12 - Trigger
  • 13 - Type
  • 14 - Type body
  • 19 - Table partition
  • 20 - Index partition
  • 21 - LOB
  • 22 - Library
  • Null - Unknown

OWNER#

NUMBER

Owner number

LOCK_ELEMENT_ADDR

RAW(4 | 8)

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

LOCK_ELEMENT_NAME

NUMBER

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

FORCED_READS

NUMBER

Number of times the block had to be made re-read from disk because another instance had forced it out of this instance's cache by requesting the PCM lock on this block in lock mode

FORCED_WRITES

NUMBER

Number of times DBWR had to write this block to disk because this instance had dirtied the block and another instance had requested the PCM lock on the block in conflicting mode.

INDX

NUMBER

Platform-specific lock manager identifier

CLASS

NUMBER

Platform-specific lock manager identifier
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 28 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CACHE_TRANSFER

This is an Oracle9i Real Application Clusters view. The V$CACHE_TRANSFER view is identical to the V$CACHE view but only displays blocks that have been pinged at least once. This view contains information from the block header of each block in the SGA of the current instance as related to particular database objects.

See Also:

"V$CACHE" and Oracle9i Real Application Clusters Concepts
Column Datatype Description

FILE#

NUMBER

Datafile identifier number (to find the filename, query DBA_DATA_FILES or V$DBFILE)

BLOCK#

NUMBER

Block number

CLASS#

NUMBER

Class number

STATUS

VARCHAR2(4)

Status of block:

  • FREE - not currently in use
  • XCUR - exclusive
  • SCUR - shared current
  • CR - consistent read
  • READ - being read from disk
  • MREC - in media recovery mode
  • IREC - in instance recovery mode

XNC

NUMBER

Number of PCM lock conversions due to contention with another instance. This column is obsolete but is retained for historical compatibility.

FORCED_READS

NUMBER

Number of times the block had to be reread from disk because another instance had forced it out of this instance's cache by requesting the PCM lock on the block in exclusive mode

FORCED_WRITES

NUMBER

Number of times DBWR had to write this block to disk because this instance had used the block and another instance had requested the lock on the block in a conflicting mode

NAME

VARCHAR2(30)

Name of the database object containing the block

PARTITION_NAME

VARCHAR2(30)

NULL for non-partitioned objects

KIND

VARCHAR2(15)

Type of database object

See Also: Table 3-1

OWNER#

NUMBER

Owner number

GC_ELEMENT_ADDR

RAW(4 | 8)

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

GC_ELEMENT_NAME

NUMBER

The name of the lock that contains the PCM lock that is covering the buffer
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 29 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CIRCUIT

V$CIRCUIT contains information about virtual circuits, which are user connections to the database through dispatchers and servers.

Column Datatype Description

CIRCUIT

RAW(4 | 8)

Circuit address

DISPATCHER

RAW(4 | 8)

Current dispatcher process address

SERVER

RAW(4 | 8)

Current server process address

WAITER

RAW(4 | 8)

Address of server process that is waiting for the (currently busy) circuit to become available

SADDR

RAW(4 | 8)

Address of session bound to the circuit

STATUS

VARCHAR2(16)

Status of the circuit:

  • BREAK - currently interrupted
  • EOF - about to be removed
  • OUTBOUND - an outward link to a remote database
  • NORMAL - normal circuit into the local database

QUEUE

VARCHAR2(16)

Queue the circuit is currently on:

  • COMMON - on the common queue, waiting to be picked up by a server process
  • DISPATCHER - waiting for the dispatcher
  • SERVER - currently being serviced
  • NONE - idle circuit

MESSAGE0

NUMBER

Size in bytes of the messages in the first message buffer

MESSAGE1

NUMBER

Size in bytes of the messages in the second message buffer

MESSAGE2

NUMBER

Size in bytes of the messages in the third message buffer

MESSAGE3

NUMBER

Size in bytes of the messages in the fourth message buffer

MESSAGES

NUMBER

Total number of messages that have gone through this circuit

BYTES

NUMBER

Total number of bytes that have gone through this circuit

BREAKS

NUMBER

Total number of breaks (interruptions) for this circuit

PRESENTATION

VARCHAR2(16)

The presentation protocol used by the client and server
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 30 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CLASS_CACHE_TRANSFER

V$CLASS_CACHE_TRANSFER displays the number of blocks pinged per block class. Use this view to compare contentions for blocks in different classes.

Column | Datatype | Description
CLASS | VARCHAR2(18) | The block class
X_2_NULL | NUMBER | Number of lock conversions from Exclusive-to-NULL for all blocks of the specified CLASS
X_2_NULL_FORCED_WRITE | NUMBER | Number of forced writes that occur for blocks of the specified CLASS due to Exclusive-to-NULL conversions
X_2_NULL_FORCED_STALE | NUMBER | Number of times a block in the CLASS was made STALE due to Exclusive-to-NULL conversions
X_2_S | NUMBER | Number of lock conversions from Exclusive-to-Shared for all blocks of the specified CLASS
X_2_S_FORCED_WRITE | NUMBER | Number of forced writes that occur for blocks of the specified CLASS due to Exclusive-to-Shared conversions
S_2_NULL | NUMBER | Number of lock conversions from Shared-to-NULL for all blocks of the specified CLASS
S_2_NULL_FORCED_STALE | NUMBER | Number of times a block in the CLASS was made STALE due to Shared-to-NULL conversions
NULL_2_X | NUMBER | Number of lock conversions from NULL-to-Exclusive for all blocks of the specified CLASS
S_2_X | NUMBER | Number of lock conversions from Shared-to-Exclusive for all blocks of the specified CLASS
NULL_2_S | NUMBER | Number of lock conversions from NULL-to-Shared for all blocks of the specified CLASS
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 31 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$COMPATIBILITY

This view displays features in use by the database instance that may prevent downgrading to a previous release. This is the dynamic (SGA) version of this information, and may not reflect features that other instances have used, and may include temporary incompatibilities (like UNDO segments) that will not exist after the database is shut down cleanly.

Column | Datatype | Description
TYPE_ID | VARCHAR2(8) | Internal feature identifier
RELEASE | VARCHAR2(60) | Release in which that feature appeared
DESCRIPTION | VARCHAR2(64) | Description of the feature
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 32 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$COMPATSEG

This view lists the permanent features in use by the database that will prevent moving back to an earlier release.

Column | Datatype | Description
TYPE_ID | VARCHAR2(8) | Internal feature identifier
RELEASE | VARCHAR2(60) | Release in which that feature appeared. The software must be able to interpret data formats added in that release.
UPDATED | VARCHAR2(60) | Release that first used the feature
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 33 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CONTEXT

This view lists set attributes in the current session.

Column | Datatype | Description
NAMESPACE | VARCHAR2(30) | The namespace that the attribute is in
ATTRIBUTE | VARCHAR2(30) | The name of attribute
VALUE | VARCHAR2(4000) | The value of attribute
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 34 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CONTROLFILE

This view lists the names of the control files.

Column | Datatype | Description
STATUS | VARCHAR2(7) | INVALID if the name cannot be determined, which should not occur. NULL if the name can be determined.
NAME | VARCHAR2(257) | The name of the control file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 35 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CONTROLFILE_RECORD_SECTION

This view displays information about the control file record sections.

Column | Datatype | Description
TYPE | VARCHAR2(17) | Identifies the type of record section: DATABASE, CKPT PROGRESS, REDO THREAD, REDO LOG, DATAFILE, FILENAME, TABLESPACE, LOG HISTORY, OFFLINE RANGE, ARCHIVED LOG, BACKUP SET, BACKUP PIECE, BACKUP DATAFILE, BACKUP REDOLOG, DATAFILE COPY, BACKUP CORRUPTION, COPY CORRUPTION, DELETED OBJECT, or PROXY COPY
RECORD_SIZE | NUMBER | Record size in bytes
RECORDS_TOTAL | NUMBER | Number of records allocated for the section
RECORDS_USED | NUMBER | Number of records used in the section
FIRST_INDEX | NUMBER | Index (position) of the first record
LAST_INDEX | NUMBER | Index of the last record
LAST_RECID | NUMBER | Record ID of the last record
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 36 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$COPY_CORRUPTION

This view displays information about datafile copy corruptions from the control file.

Column Datatype Description

RECID

NUMBER

Copy corruption record ID

STAMP

NUMBER

Copy corruption record stamp

COPY_RECID

NUMBER

Datafile copy record ID

COPY_STAMP

NUMBER

Datafile copy record stamp

FILE#

NUMBER

Datafile number

BLOCK#

NUMBER

First block of the corrupted range

BLOCKS

NUMBER

Number of contiguous blocks in the corrupted range

CORRUPTION_CHANGE#

NUMBER

Change# at which the logical corruption was detected. Set to 0 to indicate media corruption.

MARKED_CORRUPT

VARCHAR2(3)

(YES | NO) If set to YES the blocks were not marked corrupted in the datafile, but were detected and marked as corrupted while making the datafile copy

CORRUPTION_TYPE

VARCHAR2(9)

Type of block corruption in the datafile:

  • ALL ZERO - Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.
  • FRACTURED - Block header looks reasonable, but the front and back of the block are different versions.
  • CHECKSUM - optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it probably fails because sectors in the middle of the block are from different versions.
  • CORRUPT - Block is wrongly identified or is not a data block (for example, the data block address is missing)
  • LOGICAL - Specifies the range is for logically corrupt blocks. CORRUPTION_CHANGE# will have a nonzero value.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 37 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$CR_BLOCK_SERVER

This view displays statistics on the block server background processes (BSPn) used in cache fusion.

Column | Datatype | Description
CR_REQUESTS | NUMBER | Number of requests received for a version of a block at a specific SCN ("CR" refers to "consistent-read")
CURRENT_REQUESTS | NUMBER | Number of requests for the most recent (current) version of a block CR_REQUESTS + CURRENT_REQUESTS = total number of requests handled by the BSPn processes
DATA_REQUESTS | NUMBER | Number of current or CR requests for data blocks
UNDO_REQUESTS | NUMBER | Number of CR requests for undo blocks
TX_REQUESTS | NUMBER | Number of CR requests for undo segment header blocks DATA_REQUESTS + UNDO_REQUESTS + TX_REQUESTS = total number of requests handled by the BSPn processes
CURRENT_RESULTS | NUMBER | Number of requests for which no changes were rolled out of the block returned to the requesting instance
PRIVATE_RESULTS | NUMBER | Number of requests for which changes were rolled out of the block returned to the requesting instance, and only the requesting transaction can use the resulting CR block
ZERO_RESULTS | NUMBER | Number of requests for which changes were rolled out of the block returned to the requesting instance. Only zero-XID transactions can use the block.
DISK_READ_RESULTS | NUMBER | Number of requests for which the requesting instance had to read the requested block from disk
FAIL_RESULTS | NUMBER | Number of requests that failed; the requesting transaction must reissue the request
FAIRNESS_DOWN_CONVERTS | NUMBER | Number of times an instance receiving a request has down-converted an X lock on a block because it was not modifying the block
FAIRNESS_CLEARS | NUMBER | Number of times the "fairness counter" was cleared. This counter tracks the number of times a block was modified after it was served.
FREE_GC_ELEMENTS | NUMBER | Number of times a request was received from another instance and the X lock had no buffers
FLUSHES | NUMBER | Number of times the log has been flushed by a BSPn process
LIGHT_WORKS | NUMBER | Number of times the light-work rule was evoked. This rule prevents the BSP back ground process from going to disk while responding to CR requests for data, undo, or undo segment header blocks. This rule can prevent the BSP process from completing its response to the CR request.
See Also:

Oracle9i Real Application Clusters Concepts for more information on these processes and on cache fusion
Note:

This view contains internal diagnostic information for use by Oracle Support Services. It is subject to change without notice.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 38 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATABASE

V$DATABASE contains database information from the control file.

Column Datatype Description

DBID

NUMBER

Database ID calculated when the database is created and stored in all file headers

NAME

VARCHAR2(9)

Name of the database

CREATED

DATE

Creation date

RESETLOGS_CHANGE#

NUMBER

Change number at open resetlogs

RESETLOGS_TIME

DATE

Timestamp of open resetlogs

PRIOR_RESETLOGS_CHANGE#

NUMBER

Change number at prior resetlogs

PRIOR_RESETLOGS_TIME

DATE

Timestamp of prior resetlogs

LOG_MODE

VARCHAR2(12)

Archive log mode (NOARCHIVELOG or ARCHIVELOG)

CHECKPOINT_CHANGE#

NUMBER

Last SCN checkpointed

ARCHIVE_CHANGE#

NUMBER

Last SCN archived

CONTROLFILE_TYPE

VARCHAR2(7)

Type of control file:

  • STANDBY - Indicates that the database is in standby mode
  • CLONE - indicates a clone database
  • BACKUP | CREATED - indicates the database is being recovered using a backup or created control file
  • CURRENT - the control file changes to this type following a standby database activate or database open after recovery

CONTROLFILE_CREATED

DATE

Control file creation timestamp

CONTROLFILE_SEQUENCE#

NUMBER

Control file sequence number incremented by control file transactions

CONTROLFILE_CHANGE#

NUMBER

Last change number in backup control file (null if the control file is not a backup)

CONTROLFILE_TIME

DATE

Last timestamp in backup control file (null if the control file is not a backup)

OPEN_RESETLOGS

VARCHAR2(11)

(NOT ALLOWED | ALLOWED | REQUIRED) Indicates whether the next database open allows or requires the resetlogs option

VERSION_TIME

DATE

Version time

OPEN_MODE

VARCHAR2(10)

Open mode information

PROTECTION_MODE

VARCHAR2(20)

Protection mode currently in effect for the database:

  • MAXIMUM PROTECTION - Database is running in maximized protection mode
  • MAXIMUM AVAILABILITY - Database is running in maximized availability mode
  • RESYNCHRONIZATION - Database is running in resynchronization mode
  • MAXIMUM PERFORMANCE - database is running in maximized protection mode
  • UNPROTECTED - Database is unprotected (this normally occurs when the primary database is mounted and not open)

PROTECTION_LEVEL

VARCHAR2(20)

Aggregated protection mode currently in effect for the database:

  • MAXIMUM PROTECTION - Database is running in maximized protection mode
  • MAXIMUM AVAILABILITY - Database is running in maximized availability mode
  • RESYNCHRONIZATION - Database is running in resynchronization mode
  • MAXIMUM PERFORMANCE - database is running in maximized protection mode
  • UNPROTECTED - Database is unprotected (this normally occurs when the primary database is mounted and not open)

Note:This column is an aggregation of the PROTECTION_MODE of all standby archivelog destinations.

REMOTE_ARCHIVE

VARCHAR2(8)

Value of the REMOTE_ARCHIVE_ENABLE initialization parameter

ACTIVATION#

NUMBER

Number assigned to the database instantiation

DATABASE_ROLE

VARCHAR2(16)

Current role of the database; either primary or standby

ARCHIVELOG_CHANGE#

NUMBER

Highest NEXT_CHANGE# (from the V$ARCHIVED_LOG view) for an archived log

SWITCHOVER_STATUS

VARCHAR2(18)

Indicates whether switchover is allowed:

  • NOT ALLOWED - Either this is a standby database and the primary database has not been switched first or this is a primary database and there are no standby databases.
  • SESSIONS ACTIVE - Indicates that there are active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation is permitted. Query the V$SESSION view to identify the specific processes that need to be terminated.
  • SWITCHOVER PENDING - This is a standby database and the primary database switchover request has been received but not processed.
  • SWITCHOVER LATENT - The switchover was in pending mode, but did not complete and went back to the primary database.
  • TO PRIMARY - This is a standby database and is allowed to switch over to a primary database.
  • TO STANDBY - This is a primary database and is allowed to switch over to a standby database.
  • RECOVERY NEEDED - This is a standby database that has not received the switchover request.

GUARD_STATUS

VARCHAR2(7)

Protects data from being changed:

  • ALL - Indicates all users other than SYS are prevented from making changes to any data in the database.
  • STANDBY - Indicates all users other than SYS are prevented from making changes to any database object being maintained by logical standby.
  • NONE - Indicates normal security for all data in the database.

SUPPLEMENTAL_LOG_DATA_MIN

VARCHAR2(3)

Ensures that LogMiner will have sufficient information to support chained rows and various storage arrangements such as cluster tables.

See Oracle9i SQL Reference for additional information about the ALTER DATABASE ADD SUPPLEMENTAL LOG DATA statement.

SUPPLEMENTAL_LOG_DATA_PK

VARCHAR2(3)

For all tables with a primary key, ensures that all columns of the primary key are placed into the redo log whenever an update operation is performed.

See Oracle9i SQL Reference for additional information about the ALTER DATABASE ADD SUPPLEMENTAL LOG DATA statement.

SUPPLEMENTAL_LOG_DATA_UI

VARCHAR2(3)

For all tables with a unique key, ensures that if any unique key columns are modified, all other columns belonging to the unique key are also placed into the redo log.

See Oracle9i SQL Reference for additional information about the ALTER DATABASE ADD SUPPLEMENTAL LOG DATA statement.

FORCE_LOGGING

VARCHAR2(3)

Indicates whether the database is under force logging mode (YES) or not (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 39 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATABASE_BLOCK_CORRUPTION

V$DATABASE_BLOCK_CORRUPTION displays information about database blocks that were corrupted after the last backup.

Column Datatype Description

FILE#

NUMBER

Absolute file number of the datafile that contains the corrupt blocks

BLOCK#

NUMBER

Block number of the first corrupt block in the range of corrupted blocks

BLOCKS

NUMBER

Number of corrupted blocks found starting with BLOCK#

CORRUPTION_CHANGE#

NUMBER

Change number at which the logical corruption was detected. Set to 0 to indicate media corruption.

CORRUPTION_TYPE

VARCHAR2(9)

Type of block corruption in the datafile:

  • ALL ZERO - Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.
  • FRACTURED - Block header looks reasonable, but the front and back of the block are different versions.
  • CHECKSUM - optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it probably fails because sectors in the middle of the block are from different versions.
  • CORRUPT - Block is wrongly identified or is not a data block (for example, the data block address is missing)
  • LOGICAL - Specifies the range is for logically corrupt blocks. CORRUPTION_CHANGE# will have a nonzero value.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 40 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATABASE_INCARNATION

V$DATABASE_INCARNATION displays information about all database incarnations. Oracle creates a new incarnation whenever you open a database with the RESETLOGS option. Records about the current and immediately previous incarnation are also contained in the V$DATABASE view.

Column | Datatype | Description
RESETLOGS_CHANGE# | NUMBER | SCN of the RESETLOGS operation that created this incarnation
RESETLOGS_TIME | DATE | Timestamp of the RESETLOGS operation that created this incarnation
PRIOR_RESETLOGS_CHANGE# | NUMBER | SCN of the previous RESETLOGS operation
PRIOR_RESETLOGS_TIME | DATE | Timestamp of the previous RESETLOGS operation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 41 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATAFILE

This view contains datafile information from the control file.

See Also:

"V$DATAFILE_HEADER" , which displays information from datafile headers
Column Datatype Description

FILE#

NUMBER

File identification number

CREATION_CHANGE#

NUMBER

Change number at which the datafile was created

CREATION_TIME

DATE

Timestamp of the datafile creation

TS#

NUMBER

Tablespace number

RFILE#

NUMBER

Tablespace relative datafile number

STATUS

VARCHAR2(7)

Type of file (system or user) and its status. Values: OFFLINE, ONLINE, SYSTEM, RECOVER, SYSOFF (an offline file from the SYSTEM tablespace)

ENABLED

VARCHAR2(10)

Describes how accessible the file is from SQL:

  • DISABLED - no SQL access allowed
  • READ ONLY - no SQL updates allowed
  • READ WRITE - full access allowed
  • UNKNOWN - should not occur unless the control file is corrupted

CHECKPOINT_CHANGE#

NUMBER

SCN at last checkpoint

CHECKPOINT_TIME

DATE

Time stamp of the checkpoint#

UNRECOVERABLE_CHANGE#

NUMBER

Last unrecoverable change# made to this datafile. This column is always updated when an unrecoverable operation completes.

UNRECOVERABLE_TIME

DATE

Time stamp of the last unrecoverable change

LAST_CHANGE#

NUMBER

Last change# made to this datafile. Set to NULL if the datafile is being changed.

LAST_TIME

DATE

Timestamp of the last change

OFFLINE_CHANGE#

NUMBER

Offline change# of the last offline range. This column is updated only when the datafile is brought online.

ONLINE_CHANGE#

NUMBER

Online change# of the last offline range

ONLINE_TIME

DATE

Online timestamp of the last offline range

BYTES

NUMBER

Current size in bytes; 0 if inaccessible

BLOCKS

NUMBER

Current datafile size in blocks; 0 if inaccessible

CREATE_BYTES

NUMBER

Size when created, in bytes

BLOCK_SIZE

NUMBER

Block size of the datafile

NAME

VARCHAR2(513)

Datafile name

PLUGGED_IN

NUMBER

Describes whether the tablespace is plugged in. The value is 1 if the tablespace is plugged in and has not been made read-write, 0 if not.

BLOCK1_OFFSET

NUMBER

The offset from the beginning of the file to where the Oracle generic information begins. The exact length of the file can be computed as follows: BYTES+BLOCK1_OFFSET.

AUX_NAME

VARCHAR2(513)

The auxiliary name that has been set for this file via CONFIGURE AUXNAME
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 42 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATAFILE_COPY

This view displays datafile copy information from the control file.

Column | Datatype | Description
RECID | NUMBER | Datafile copy record ID
STAMP | NUMBER | Datafile copy record stamp
NAME | VARCHAR2(513) | Filename of the datafile copy. The maximum length of the name is OS dependent.
TAG | VARCHAR2(32) | Datafile copy tag
FILE# | NUMBER | Absolute datafile number
RFILE# | NUMBER | Tablespace relative datafile number
CREATION_CHANGE# | NUMBER | Datafile creation change#
CREATION_TIME | DATE | Datafile creation timestamp
RESETLOGS_CHANGE# | NUMBER | Resetlogs change# of the datafile when the copy was made
RESETLOGS_TIME | DATE | Resetlogs timestamp of the datafile when the copy was made
INCREMENTAL_LEVEL | NUMBER | The incremental level
CHECKPOINT_CHANGE# | NUMBER | Checkpoint change# of the datafile when the copy was made
CHECKPOINT_TIME | DATE | Checkpoint timestamp of the datafile when the copy was made
ABSOLUTE_FUZZY_CHANGE# | NUMBER | Highest change seen when the datafile was copied
RECOVERY_FUZZY_CHANGE# | NUMBER | Highest change written to the file by media recovery
RECOVERY_FUZZY_TIME | DATE | Timestamp of the highest change written to the file by media recovery
ONLINE_FUZZY | VARCHAR2(3) | (YES|NO) If set to YES, this is a copy taken using an operating system utility after a crash or offline immediate (or an invalid copy taken while datafile was online and the database open). Recovery will need to apply all redo up to the next crash recovery marker to make the file consistent.
BACKUP_FUZZY | VARCHAR2(3) | (YES|NO) If set to YES, this is a copy taken using the BEGIN BACKUP/END BACKUP technique. Recovery will need to apply all redo up to the end backup marker to make this copy consistent.
MARKED_CORRUPT | NUMBER | Number of blocks marked corrupt by this copy operation. That is, blocks that were not marked corrupted in the source datafile, but were detected and marked as corrupted during the copy operation.
MEDIA_CORRUPT | NUMBER | Total number of media corrupt blocks. For example, blocks with checksum errors are marked media corrupt.
LOGICALLY_CORRUPT | NUMBER | Total number of logically corrupt blocks. For example, applying redo for unrecoverable operations will mark affected blocks logically corrupt.
BLOCKS | NUMBER | Size of the datafile copy in blocks (also the size of the datafile when the copy was made)
BLOCK_SIZE | NUMBER | Block size of the datafile
OLDEST_OFFLINE_RANGE | NUMBER | The RECID of the oldest offline range record in this control file copy; 0 for datafile copies
DELETED | VARCHAR2(3) | (YES|NO) If set to YES the datafile copy has been deleted or overwritten
STATUS | VARCHAR2(1) | Identifies the status of this datafile copy. Possible values are: A - Available D - Deleted U - Unavailable X - Expired
COMPLETION_TIME | DATE | Time when the copy was completed
CONTROLFILE_TYPE | VARCHAR2(1) | B indicates normal copies S indicates standby copies
KEEP | VARCHAR2(3) | (YES/NO) Indicates whether or not this backup set has a retention policy that is different than the value for the configure retention policy
KEEP_UNTIL | DATE | If KEEP_UNTIL_TIME is specified, this is the date after which the backup becomes obsolete. If this column is null, then the backup never expires.
KEEP_OPTIONS | VARCHAR2(10) | Lists additional retention options for this backup set. Possible values are: LOGS - The logs need to recover this backup are kept NOLOGS - The logs needed to recover this backup will not be kept
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 43 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATAFILE_HEADER

This view displays datafile information from the datafile headers.

Column | Datatype | Description
FILE# | NUMBER | Datafile number (from control file)
STATUS | VARCHAR2(7) | ONLINE | OFFLINE (from control file)
ERROR | VARCHAR2(18) | NULL if the datafile header read and validation were successful. If the read failed then the rest of the columns are NULL. If the validation failed then the rest of columns may display invalid data. If there is an error then usually the datafile must be restored from a backup before it can be recovered or used.
FORMAT | NUMBER | Indicates the format for the header block. The possible values are 6, 7, 8, or 0. 6 - indicates Oracle Version 6 7 - indicates Oracle Version 7 8 - indicates Oracle Version 8 0 - indicates the format could not be determined (for example, the header could not be read)
RECOVER | VARCHAR2(3) | File needs media recovery (YES | NO)
FUZZY | VARCHAR2(3) | File is fuzzy (YES | NO)
CREATION_CHANGE# | NUMBER | Datafile creation change#
CREATION_TIME | DATE | Datafile creation timestamp
TABLESPACE_NAME | VARCHAR2(30) | Tablespace name
TS# | NUMBER | Tablespace number
RFILE# | NUMBER | Tablespace relative datafile number
RESETLOGS_CHANGE# | NUMBER | Resetlogs change#
RESETLOGS_TIME | DATE | Resetlogs timestamp
CHECKPOINT_CHANGE# | NUMBER | Datafile checkpoint change#
CHECKPOINT_TIME | DATE | Datafile checkpoint timestamp
CHECKPOINT_COUNT | NUMBER | Datafile checkpoint count
BYTES | NUMBER | Current datafile size in bytes
BLOCKS | NUMBER | Current datafile size in blocks
NAME | VARCHAR2(512) | Datafile name
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 44 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DATAGUARD_STATUS

V$DATAGUARD_STATUS displays and logs events that would typically be triggered by any message to the alert log or server process trace files.

Column Datatype Description

FACILITY

VARCHAR2(24)

Facility that encountered the event. Possible values are:

  • CRASH RECOVERY
  • LTS
  • LAS
  • RMS
  • REMOTE FILE SERVER
  • FETCH ARCHIVE LOG
  • DATA GUARD
  • NETWORK SERVICES

SEVERITY

VARCHAR2(13)

Severity of the event. Possible values are:

  • INFORMATIONAL - informational message
  • WARNING - warning message
  • ERROR - indicates the process has failed
  • FATAL
  • CONTROL - an expected change in state such as the start or completion of an archival, log recovery, or switchover operation

DEST_ID

NUMBER

Destination ID number to which the event pertains. If the event does not pertain to a particular destination, then the value is 0.

MESSAGE_NUM

NUMBER

A chronologically increasing number giving each event a unique number

ERROR_CODE

NUMBER

Error ID pertaining to the event

CALLOUT

VARCHAR2(3)

Indicates whether the current entry is a callout event (YES) or not (NO)

A YES value in this column indicates that this event may require the DBA to perform some action. Examine the ERROR_CODE and MESSAGE columns for more information.

A NO value in this column generally corresponds to an INFORMATIONAL or WARNING event which would not require any action by the DBA.

TIMESTAMP

DATE

???

MESSAGE

VARCHAR2(256)

A text message describing the event
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 45 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DB_CACHE_ADVICE

V$DB_CACHE_ADVICE contains rows that predict the number of physical reads for the cache size corresponding to each row. The rows also compute a "physical read factor," which is the ratio of the number of estimated reads to the number of reads actually performed by the real buffer cache during the measurement interval .

See Also:

"DB_CACHE_ADVICE"

Column | Datatype | Description
ID | NUMBER | Buffer pool identifier (ranges from 1 to 8)
NAME | VARCHAR2(20) | Buffer pool name
BLOCK_SIZE | NUMBER | Block size in bytes for buffers in this pool. Possible values: the standard block size, the power of 2 non-standard block sizes, 2048, 4096, 8192, 16384, 32768.
ADVICE_STATUS | VARCHAR2(3) | Status of the advisory. ON indicates it is currently running; OFF indicates it is disabled (in this case the estimates are historical and calculated when last enabled).
SIZE_FOR_ESTIMATE | NUMBER | Cache size for prediction (in megabytes)
BUFFERS_FOR_ESTIMATE | NUMBER | Cache size for prediction (in terms of buffers)
ESTD_PHYSICAL_READ_FACTOR | NUMBER | Physical read factor for this cache size, which is the ratio of the number of estimated physical reads to the number of reads in the real cache. If there are no physical reads in the real cache, the value of this column is null.
ESTD_PHYSICAL_READS | NUMBER | Estimated number of physical reads for this cache size
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 46 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DB_OBJECT_CACHE

This view displays database objects that are cached in the library cache. Objects include tables, indexes, clusters, synonym definitions, PL/SQL procedures and packages, and triggers.

Column | Datatype | Description
OWNER | VARCHAR2(64) | Owner of the object
NAME | VARCHAR2(1000) | Name of the object
DB_LINK | VARCHAR2(64) | Database link name, if any
NAMESPACE | VARCHAR2(28) | Library cache namespace of the object: TABLE/PROCEDURE, BODY, TRIGGER, INDEX, CLUSTER, OBJECT
TYPE | VARCHAR2(28) | Type of the object: INDEX, TABLE, CLUSTER, VIEW, SET, SYNONYM, SEQUENCE, PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY, TRIGGER, CLASS, OBJECT, USER, DBLINK
SHARABLE_MEM | NUMBER | Amount of sharable memory in the shared pool consumed by the object
LOADS | NUMBER | Number of times the object has been loaded. This count also increases when an object has been invalidated.
EXECUTIONS | NUMBER | Not used See: "V$SQLAREA" to see actual execution counts
LOCKS | NUMBER | Number of users currently locking this object
PINS | NUMBER | Number of users currently pinning this object
KEPT | VARCHAR2(3) | (YES | NO) Depends on whether this object has been "kept" (permanently pinned in memory) with the PL/SQL procedure DBMS_SHARED_POOL.KEEP
CHILD_LATCH | NUMBER | Child latch number that is protecting the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 47 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DB_PIPES

This view displays the pipes that are currently represented in the shared pool for this instance.

Column | Datatype | Description
OWNERID | NUMBER | The owner ID of the owner if this is a private pipe. NULL otherwise.
NAME | VARCHAR2(1000) | The name of the pipe (for example, SCOTT.PIPE)
TYPE | VARCHAR2(7) | PUBLIC or PRIVATE
PIPE_SIZE | NUMBER | The amount of memory the pipe uses
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 48 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DBFILE

This view lists all datafiles making up the database. This view is retained for historical compatibility. Use of V$DATAFILE is recommended instead.

Column | Datatype | Description
FILE# | NUMBER | File identifier
NAME | VARCHAR2(513) | Name of the file
See Also:

"V$DATAFILE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 49 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DBLINK

This view describes all database links (links with IN_TRANSACTION = YES) opened by the session issuing the query on V$DBLINK. These database links must be committed or rolled back before being closed.

Column | Datatype | Description
DB_LINK | VARCHAR2(128) | Name of the database link
OWNER_ID | NUMBER | Owner of the database link UID
LOGGED_ON | VARCHAR2(3) | Whether the database link is currently logged on
HETEROGENEOUS | VARCHAR2(3) | Whether the database link is heterogeneous
PROTOCOL | VARCHAR2(6) | Communication protocol for the database link
OPEN_CURSORS | NUMBER | Whether there are open cursors for the database link
IN_TRANSACTION | VARCHAR2(3) | Whether the database link is currently in a transaction
UPDATE_SENT | VARCHAR2(3) | Whether there has been an update on the database link
COMMIT_POINT_STRENGTH | NUMBER | Commit point strength of the transactions on the database link
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 50 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DELETED_OBJECT

This view displays information about deleted archived logs, datafile copies and backup pieces from the control file. The only purpose of this view is to optimize the recovery catalog resync operation. When an archived log, datafile copy, or backup piece is deleted, the corresponding record is marked deleted.

Column | Datatype | Description
RECID | NUMBER | Deleted object record ID
STAMP | NUMBER | Deleted object record stamp
TYPE | VARCHAR2(13) | Identifies the type of deleted object: ARCHIVED LOG, DATAFILE COPY, BACKUP PIECE, PROXY COPY, BACKUP PIECE AVAILABLE, BACKUP PIECE EXPIRED, PROXY COPY AVAILABLE, or PROXY COPY EXPIRED
OBJECT_RECID | NUMBER | Record ID of the deleted object
OBJECT_STAMP | NUMBER | Record timestamp of the deleted object
OBJECT_DATA | NUMBER | Displays additional internal information related to this deleted object. For internal Oracle use only.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 51 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DISPATCHER

This view provides information on the dispatcher processes.

Column Datatype Description

NAME

VARCHAR2(4)

Name of the dispatcher process

NETWORK

VARCHAR2(128)

Network address of the dispatcher

PADDR

RAW(4 | 8)

Process address

STATUS

VARCHAR2(16)

Status of the dispatcher:

  • WAIT - Idle
  • SEND - Sending a message
  • RECEIVE - Receiving a message
  • CONNECT - Establishing a connection
  • DISCONNECT - Handling a disconnect request
  • BREAK - Handling a break
  • TERMINATE - In the process of terminating
  • ACCEPT - Accepting connections (no further information available)
  • REFUSE - Rejecting connections (no further information available)

ACCEPT

VARCHAR2(3)

Indicates whether this dispatcher is accepting new connections (YES) or not (NO)

MESSAGES

NUMBER

Number of messages processed by the dispatcher

BYTES

NUMBER

Size (in bytes) of messages processed by the dispatcher

BREAKS

NUMBER

Number of breaks occurring in the connection

OWNED

NUMBER

Number of circuits owned by the dispatcher

CREATED

NUMBER

Number of circuits created by the dispatcher

IDLE

NUMBER

Total idle time for the dispatcher (in hundredths of a second)

BUSY

NUMBER

Total busy time for the dispatcher (in hundredths of a second)

LISTENER

NUMBER

Most recent Oracle error number the dispatcher received from the listener

CONF_INDX

NUMBER

Zero-based index of the DISPATCHERS configuration used by the dispatcher
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 52 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$DISPATCHER_RATE

This view provides rate statistics for a number of activities performed by the dispatcher processes. Collected samples have an activity-specific "time-to-live" (TTL_* columns). Statistics are reported over the following two types of time intervals:

  • Current statistics (CUR_ columns)

    Current statistics use samples collected over the most recent time-to-live interval.

  • Historical statistics (AVG_ and most of the MAX_ columns)

    Historical statistics make use of all samples that are no longer current.

At the time of collection, a sample is current. After the time-to-live has elapsed, the sample becomes historical. Each type of activity has a specific scale (represented by the SCALE_* columns) at which the statistics are reported.

Column | Datatype | Description
NAME | CHAR | Name of the dispatcher process
PADDR | RAW(4 | 8) | Address of the dispatcher process
CUR_LOOP_RATE | NUMBER | Rate at which the dispatcher has been iterating through its dispatching loop, reported over the past TTL_LOOPS, in iterations/SCALE_LOOPS
CUR_EVENT_RATE | NUMBER | Rate at which the dispatcher has been processing dispatcher events, reported over the past TTL_LOOPS, in events/SCALE_LOOPS. Such dispatcher events include network events and shared server requests.
CUR_EVENTS_PER_LOOP | NUMBER | Average number of events the dispatcher has been processing in each iteration through its dispatching loop, reported over the past TTL_LOOPS, in events/iteration
CUR_MSG_RATE | NUMBER | Rate at which the dispatcher has been relaying messages between clients and shared servers, reported over the past TTL_MSG, in messages/SCALE_MSG
CUR_SVR_BUF_RATE | NUMBER | Rate at which the dispatcher has been relaying buffers to shared servers, reported over the past TTL_SVR_BUF, in messages/SCALE_SVR_BUF
CUR_SVR_BYTE_RATE | NUMBER | Rate at which the dispatcher has been relaying data to shared servers, reported over the past TTL_SVR_BUF, in bytes/SCALE_SVR_BUF
CUR_SVR_BYTE_PER_BUF | NUMBER | Average number of data types in each buffer relayed to shared servers, reported over the past TTL_SVR_BUF, in bytes/buffer
CUR_CLT_BUF_RATE | NUMBER | Rate at which the dispatcher has been relaying buffers to clients, reported over the past TTL_CLT_BUF, in buffers/SCALE_CLT_BUF
CUR_CLT_BYTE_RATE | NUMBER | Rate at which the dispatcher has been relaying data to clients, reported over the past TTL_CLT_BUF, in bytes/SCALE_CLT_BUF
CUR_CLT_BYTE_PER_BUF | NUMBER | Average number of data bytes in each buffer relayed to clients, reported over the past TTL_CLT_BUF, in bytes/buffer
CUR_BUF_RATE | NUMBER | Rate at which the dispatcher has been relaying buffers to either clients or shared servers, reported over the past TTL_BUF, in bytes/SCALE_BUF
CUR_BYTE_RATE | NUMBER | Rate at which the dispatcher has been relaying data to either clients or shared servers, reported over the past TTL_BUF, in bytes/SCALE_BUF
CUR_BYTE_PER_BUF | NUMBER | Average number of data bytes in each buffer relayed to either clients or shared servers, reported over the past TTL_BUF, in bytes/buffer
CUR_IN_CONNECT_RATE | NUMBER | Rate at which the dispatcher has been accepting incoming client connections, reported over the past TTL_IN_CONNECT, in connections/SCALE_IN_CONNECT
CUR_OUT_CONNECT_RATE | NUMBER | Rate at which the dispatcher has been establishing outbound connections, reported over the past TTL_OUT_CONNECT, in connections/SCALE_OUT_CONNECT
CUR_RECONNECT_RATE | NUMBER | In a connection pooling setup, the rate at which clients have been reconnecting to the dispatcher, reported over the past TTL_RECONNECT, in reconnections/SCALE_RECONNECT
MAX_LOOP_RATE | NUMBER | Maximum rate at which the dispatcher has ever iterated through its dispatching loop, reported in iterations/SCALE_LOOPS, over the dispatcher's lifetime excluding the past TTL_LOOPS
MAX_EVENT_RATE | NUMBER | Maximum rate at which the dispatcher has ever processed dispatcher events, reported in events/SCALE_LOOPS, over the dispatcher's lifetime excluding the past TTL_LOOPS
MAX_EVENTS_PER_LOOP | NUMBER | Maximum number of events the dispatcher has ever processed in one iteration through its dispatching loop, reported in events/iteration, over the dispatcher's lifetime
MAX_MSG_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed messages between clients and shared servers, reported in messages/SCALE_MSG, over the dispatcher's lifetime excluding the past TTL_MSG
MAX_SVR_BUF_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed buffers to shared servers, reported in buffers/SCALE_SVR_BUF, over the dispatcher's lifetime excluding the past TTL_SVR_BUF
MAX_SVR_BYTE_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed data to shared servers, reported in bytes/SCALE_SVR_BUF, over the dispatcher's lifetime excluding the past TTL_SVR_BUF
MAX_SVR_BYTE_PER_BUF | NUMBER | Maximum number of data bytes the dispatcher has ever relayed in one buffer to a client, reported in bytes/buffer, over the dispatcher's lifetime
MAX_CLT_BUF_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed buffers to either clients or shared servers, reported in buffers/SCALE_CLT_BUF, over the dispatcher's life time excluding the past TTL_CLT_BUF
MAX_CLT_BYTE_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed buffers to clients, reported in bytes/SCALE_CLT_BUF, over the dispatcher's lifetime excluding the last TTL_CLT_BUF
MAX_CLT_BYTE_PER_BUF | NUMBER | Maximum number of data bytes the dispatcher has ever relayed in one buffer to a client, reported in bytes/buffer, over the dispatcher's lifetime
MAX_BUF_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed buffers to either clients or shared servers, reported in buffers/SCALE_BUF, over the dispatcher's lifetime, excluding the past TTL_BUF
MAX_BYTE_RATE | NUMBER | Maximum rate at which the dispatcher has ever relayed data to either clients or shared servers, reported in bytes/SCALE_BUF, over the dispatcher's lifetime excluding the past TTL_BUF
MAX_BYTE_PER_BUF | NUMBER | Maximum number of data bytes the dispatcher has ever relayed in one buffer to either a client or a shared server, reported in bytes/buffer, over the dispatcher's lifetime
MAX_IN_CONNECT_RATE | NUMBER | Maximum rate at which the dispatcher has ever accepted incoming client connections, reported in connections/SCALE_IN_CONNECT, over the dispatcher's lifetime excluding the past TTL_IN_CONNECT
MAX_OUT_CONNECT_RATE | NUMBER | Maximum rate at which the dispatcher has ever established outbound connections, reported in connections/SCALE_OUT_CONNECT, over the dispatcher's lifetime excluding the past TTL_OUT_CONNECT
MAX_RECONNECT_RATE | NUMBER | In a connection pooling setup, the maximum rate at which clients have ever reconnected to this dispatcher, reported in reconnections/SCALE_RECONNECT, over the dispatcher's lifetime excluding the past TTL_RECONNECT
AVG_LOOP_RATE | NUMBER | Historical average rate at which the dispatcher has iterated through its dispatching loop, reported in iterations/SCALE_LOOPS, over the dispatcher's lifetime excluding the past TTL_LOOPS
AVG_EVENT_RATE | NUMBER | Historical average rate at which the dispatcher has processed dispatcher events, reported in events/SCALE_LOOPS, over the dispatcher's lifetime excluding the past TTL_LOOPS
AVG_EVENTS_PER_LOOP | NUMBER | Historical average number of events the dispatcher has processed in one iteration through its dispatching loop, reported in events/iteration, over the dispatcher's lifetime excluding the past TTL_LOOPS
AVG_MSG_RATE | NUMBER | Historical average rate at which the dispatcher has relayed messages between clients and shared servers, reported in messages/SCALE_MSG, over the dispatcher's lifetime excluding the past TTL_MSG
AVG_SVR_BUF_RATE | NUMBER | Historical average rate at which the dispatcher has relayed buffers to shared servers, reported in buffers/SCALE_SVR_BUF, over the dispatcher's lifetime excluding the past TTL_SVR_BUF
AVG_SVR_BYTE_RATE | NUMBER | Historical average rate at which the dispatcher has relayed data to shared servers, reported in bytes/SCALE_SVR_BUF, over the dispatcher's lifetime excluding the past TTL_SVR_BUF
AVG_SVR_BYTE_PER_BUF | NUMBER | Historical average number of data bytes per buffer the dispatcher has relayed to shared servers, reported in bytes/buffer, over the dispatcher's lifetime excluding the past TTL_SVR_BUF
AVG_CLT_BUF_RATE | NUMBER | Historical average rate at which the dispatcher has relayed buffers to clients, reported in buffers/SCALE_CLT_BUF, over the dispatcher's lifetime excluding the past TTL_CLT_BUF
AVG_CLT_BYTE_RATE | NUMBER | Historical average rate at which the dispatcher has relayed data to clients, reported in bytes/SCALE_CLT_BUF, over the dispatcher's lifetime excluding the past TTL_CLT_BUF
AVG_CLT_BYTE_PER_BUF | NUMBER | Historical average number of data bytes per buffer the dispatcher has relayed to clients, reported in bytes/buffer, over the dispatcher's lifetime excluding the past TTL_CLT_BUF
AVG_BUF_RATE | NUMBER | Historical average rate at which the dispatcher has relayed buffers to either clients or shared servers, reported in buffers/SCALE_BUF, over the dispatcher's lifetime excluding the past TTL_BUF
AVG_BYTE_RATE | NUMBER | Historical average rate at which the dispatcher has relayed data to either clients or shared servers, reported in bytes/SCALE_BUF, over the dispatcher's lifetime excluding the past TTL_BUF
AVG_BYTE_PER_BUF | NUMBER | Historical average number of data bytes per buffer the dispatcher has relayed to either clients or shared servers, reported in bytes/buffer, over the dispatcher's lifetime excluding the past TTL_BUF
AVG_IN_CONNECT_RATE | NUMBER | Historical average rate at which the dispatcher has accepted incoming client connections, reported in connections/SCALE_IN_CONNECT, over the dispatcher's lifetime excluding the past TTL_IN_CONNECT
AVG_OUT_CONNECT_RATE | NUMBER | Historical average rate at which the dispatcher has established outbound connections, reported in connections/SCALE_OUT_CONNECT, over the dispatcher's lifetime excluding the past TTL_OUT_CONNECT
AVG_RECONNECT_RATE | NUMBER | In a connection pooling setup, the historical average rate at which clients have reconnected to this dispatcher, reported in reconnections/SCALE_RECONNECT, over the dispatcher's lifetime excluding the past TTL_RECONNECT
TTL_LOOPS | NUMBER | Time-to-live for "loops" samples, reported in hundredths of a second. Default is 10 minutes.
TTL_MSG | NUMBER | Time-to-live for "messages" samples, reported in hundredths of a second. Default is 10 seconds.
TTL_SVR_BUF | NUMBER | Time-to-live for "buffers to servers" samples, reported in hundredths of a second. Default is 1 second.
TTL_CLT_BUF | NUMBER | Time-to-live for "buffers to clients" samples, reported in hundredths of a second. Default is 1 second.
TTL_BUF | NUMBER | Time-to-live for "buffers to clients/servers" samples, reported in hundredths of a second. Default is 1 second.
TTL_IN_CONNECT | NUMBER | Time-to-live for "inbound connections" samples, reported in hundredths of a second. Default is 10 minutes.
TTL_OUT_CONNECT | NUMBER | Time-to-live for "outbound connections" samples, reported in hundredths of a second. Default is 10 minutes.
TTL_RECONNECT | NUMBER | Time-to-live for "reconnections" samples, reported in hundredths of a second. Default is 10 minutes.
SCALE_LOOPS | NUMBER | Scale for "loops" statistics, reported in hundredths of a second. Default is 1 minute.
SCALE_MSG | NUMBER | Scale for "messages" statistics, reported in hundredths of a second. Default is 1 second.
SCALE_SVR_BUF | NUMBER | Scale for "buffers to servers" statistics, reported in hundredths of a second. Default is 1/10 second.
SCALE_CLT_BUF | NUMBER | Scale for "buffers to clients" statistics, reported in hundredths of a second. Default is 1/10 second.
SCALE_BUF | NUMBER | Scale for "buffers to clients/servers" statistics, reported in hundredths of a second. Default is 1/10 second.
SCALE_IN_CONNECT | NUMBER | Scale for "inbound connections" statistics, reported in hundredths of a second. Default is 1 minute.
SCALE_OUT_CONNECT | NUMBER | Scale for "outbound connections" statistics, reported in hundredths of a second. Default is 1 minute.
SCALE_RECONNECT | NUMBER | Scale for "reconnections" statistics, reported in hundredths of a second. Default is 1 minute.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 53 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ENABLEDPRIVS

This view displays which privileges are enabled. These privileges can be found in the table SYS.SYSTEM_PRIVILEGES_MAP.

Column | Datatype | Description
PRIV_NUMBER | NUMBER | Numeric identifier of enabled privileges
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 54 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ENQUEUE_LOCK

This view displays all locks owned by enqueue state objects. The columns in this view are identical to the columns in V$LOCK.

See Also:

"V$LOCK"

Column Datatype Description

ADDR

RAW(4 | 8)

Address of lock state object

KADDR

RAW(4 | 8)

Address of lock

SID

NUMBER

Identifier for session holding or acquiring the lock

TYPE

VARCHAR2(2)

Type of lock. Lists user and system types that can have locks.

ID1

NUMBER

Lock identifier #1 (depends on type)

ID2

NUMBER

Lock identifier #2 (depends on type)

LMODE

NUMBER

Lock mode in which the session holds the lock:

  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)

REQUEST

NUMBER

Lock mode in which the process requests the lock:

  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)

CTIME

NUMBER

Time since current mode was granted

BLOCK

NUMBER

The lock is blocking another lock
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 55 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ENQUEUE_STAT

This view displays statistics on the number of enqueue (lock) requests for each type of lock.

Column | Datatype | Description
INST_ID | NUMBER | Database instance number
EQ_TYPE | VARCHAR2(2) | Type of enqueue requested
TOTAL_REQ# | NUMBER | Total number of enqueue requests or enqueue conversions for this type of enqueue
TOTAL_WAIT# | NUMBER | Total number of times an enqueue request or conversion resulted in a wait
SUCC_REQ# | NUMBER | Number of times an enqueue request or conversion was granted
FAILED_REQ# | NUMBER | Number of times an enqueue request or conversion failed
CUM_WAIT_TIME | NUMBER | Total amount of time (in milliseconds) spent waiting for the enqueue or enqueue conversion
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 56 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$EVENT_NAME

This view contains information about wait events.

Column | Datatype | Description
EVENT# | NUMBER | The number of the wait event
NAME | VARCHAR2(64) | The name of the wait event
PARAMETER1 | VARCHAR2(64) | The description of the first parameter for the wait event
PARAMETER2 | VARCHAR2(64) | The description of the second parameter for the wait event
PARAMETER3 | VARCHAR2(64) | The description of the third parameter for the wait event
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 57 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$EXECUTION

This view displays information on parallel execution.

Column | Datatype | Description
PID | NUMBER | Session ID
DEPTH | NUMBER | The depth
FUNCTION | VARCHAR2(10) | Session serial number
TYPE | VARCHAR2(7) | Name of the OBJECT_NODE in plan table
NVALS | NUMBER | Elapsed time for OBJECT_NODE
VAL1 | NUMBER | The value for number 1
VAL2 | NUMBER | The value for number 2
SEQH | NUMBER | A sequence
SEQL | NUMBER | A sequence
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 58 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FALSE_PING

V$FALSE_PING is an Oracle9i Real Application Clusters view. This view displays buffers that may be getting false pings. That is, buffers pinged more than 10 times that are protected by the same lock as another buffer that pinged more than 10 times. Buffers identified as getting false pings can be remapped in "GC_FILES_TO_LOCKS" to reduce lock collisions.

See Also:

"GC_FILES_TO_LOCKS" and Oracle9i Real Application Clusters Concepts
Column Datatype Description

FILE#

NUMBER

Datafile identifier number (to find the filename, query DBA_DATA_FILES or V$DBFILES)

BLOCK#

NUMBER

Block number

STATUS

VARCHAR2(5)

Status of the block:

  • FREE - Not currently in use
  • XCUR - Exclusive
  • SCUR - Shared current
  • CR - Consistent read
  • READ - Being read from disk
  • MREC - In media recovery mode
  • IREC - In instance recovery mode

XNC

NUMBER

Number of PCM lock conversions from Exclusive mode due to contention with another instance. This column is obsolete but is retained for historical compatibility.

FORCED_READS

NUMBER

Number of times the block had to be reread from disk because another instance had forced it out of this instance's cache by requesting the PCM lock on the block in exclusive mode

FORCED_WRITES

NUMBER

Number of times DBWR had to write this block to disk because this instance had used the block and another instance had requested the lock on the block in a conflicting mode

NAME

VARCHAR2(30)

Name of the database object containing the block

PARTITION_NAME

VARCHAR2(30)

NULL for non-partitioned objects

KIND

VARCHAR2(15)

Type of database object

OWNER#

NUMBER

Owner number

LOCK_ELEMENT_ADDR

RAW(4 | 8)

Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.

LOCK_ELEMENT_NAME

NUMBER

Name of the lock that contains the PCM lock that is covering the buffer

LOCK_ELEMENT_CLASS

NUMBER

Lock element class
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 59 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FAST_START_SERVERS

V$FAST_START_SERVERS provides information about all the recovery slaves performing parallel transaction recovery.

See Also:

Oracle9i User-Managed Backup and Recovery Guide

Column | Datatype | Description
STATE | VARCHAR2(11) | State of the server (IDLE or RECOVERING)
UNDOBLOCKSDONE | NUMBER | Number of undo blocks done so far
PID | NUMBER | Process ID
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 60 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FAST_START_TRANSACTIONS

V$FAST_START_TRANSACTIONS contains information about the progress of the transactions that Oracle is recovering.

See Also:

Oracle9i User-Managed Backup and Recovery Guide

Column | Datatype | Description
USN | NUMBER | The undo segment number of the transaction
SLT | NUMBER | The slot within the rollback segment
SEQ | NUMBER | The incarnation number of the slot
STATE | VARCHAR2(16) | The state of the transaction may be TO BE RECOVERED, RECOVERED, or RECOVERING
UNDOBLOCKSDONE | NUMBER | The number of undo blocks completed on this transaction
UNDOBLOCKSTOTAL | NUMBER | The total number of undo blocks that need recovery
PID | NUMBER | The ID of the current server it has been assigned to
CPUTIME | NUMBER | The time for which recovery has progressed, in seconds
PARENTUSN | NUMBER | The undo segment number of the parent transaction in PDML
PARENTSLT | NUMBER | The slot of the parent transaction in PDML
PARENTSEQ | NUMBER | The sequence number of the parent transaction in PDML
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 61 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FILE_CACHE_TRANSFER

V$FILE_CACHE_TRANSFER displays the number of blocks pinged per datafile. This information in turn can be used to determine access patterns to existing datafiles and deciding new mappings from datafile blocks to PCM locks.

Column | Datatype | Description
FILE_NUMBER | NUMBER | Number of the datafile
X_2_NULL | NUMBER | Number of lock conversions from Exclusive-to-NULL for all blocks in the file
X_2_NULL_FORCED_WRITE | NUMBER | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-NULL conversions
X_2_NULL_FORCED_STALE | NUMBER | Number of times a block in the file was made STALE due to Exclusive-to-NULL conversions
X_2_S | NUMBER | Number of lock conversions from Exclusive-to-Shared for all blocks in the file
X_2_S_FORCED_WRITE | NUMBER | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-Shared conversions
S_2_NULL | NUMBER | Number of lock conversions from Shared-to-NULL for all blocks in the file
S_2_NULL_FORCED_STALE | NUMBER | Number of times a block in the file was made STALE due to Shared-to-NULL conversions
RBR | NUMBER | Number of times the instance received a reuse block range cross instance call for this file
RBR_FORCED_WRITE | NUMBER | Number of blocks written due to reuse block range cross instance calls for this file
RBR_FORCED_STALE | NUMBER | Number of times a block in this file was made STALE due to reuse block range cross instance calls
NULL_2_X | NUMBER | Number of lock conversions from NULL-to-Exclusive for all blocks of the specified file
S_2_X | NUMBER | Number of lock conversions from Shared-to-Exclusive for all blocks of the specified file
NULL_2_S | NUMBER | Number of lock conversions from NULL-to-Shared for all blocks of the specified file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 62 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FILESTAT

This view contains information about file read/write statistics.

Column | Datatype | Description
FILE# | NUMBER | Number of the file
PHYRDS | NUMBER | Number of physical reads done
PHYWRTS | NUMBER | Number of times DBWR is required to write
PHYBLKRD | NUMBER | Number of physical blocks read
PHYBLKWRT | NUMBER | Number of blocks written to disk, which may be the same as PHYWRTS if all writes are single blocks
SINGLEBLKRDS | NUMBER | Number of single block reads
READTIM | NUMBER | Time (in hundredths of a second) spent doing reads if the TIMED_STATISTICS parameter is true; 0 if false
WRITETIM | NUMBER | Time (in hundredths of a second) spent doing writes if the TIMED_STATISTICS parameter is true; 0 if false
SINGLEBLKRDTIM | NUMBER | Cumulative single block read time (in hundredths of a second)
AVGIOTIM | NUMBER | Average time (in hundredths of a second) spent on I/O, if the TIMED_STATISTICS parameter is true; 0 if false
LSTIOTIM | NUMBER | Time (in hundredths of a second) spent doing the last I/O, if the TIMED_STATISTICS parameter is true; 0 if false
MINIOTIM | NUMBER | Minimum time (in hundredths of a second) spent on a single I/O, if the TIMED_STATISTICS parameter is true; 0 if false
MAXIORTM | NUMBER | Maximum time (in hundredths of a second) spent doing a single read, if the TIMED_STATISTICS parameter is true; 0 if false
MAXIOWTM | NUMBER | Maximum time (in hundredths of a second) spent doing a single write, if the TIMED_STATISTICS parameter is true; 0 if false
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 63 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FIXED_TABLE

This view displays all dynamic performance tables, views, and derived tables in the database. Some V$ tables (for example, V$ROLLNAME) refer to real tables and are therefore not listed.

Column | Datatype | Description
NAME | VARCHAR2(30) | Name of the object
OBJECT_ID | NUMBER | Identifier of the fixed object
TYPE | VARCHAR2(5) | Object type (TABLE | VIEW)
TABLE_NUM | NUMBER | Number that identifies the dynamic performance table if it is of type TABLE
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 64 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$FIXED_VIEW_DEFINITION

This view contains the definitions of all the fixed views (views beginning with V$). Use this table with caution. Oracle tries to keep the behavior of fixed views the same from release to release, but the definitions of the fixed views can change without notice. Use these definitions to optimize your queries by using indexed columns of the dynamic performance tables.

Column | Datatype | Description
VIEW_NAME | VARCHAR2(30) | The name of the fixed view
VIEW_DEFINITION | VARCHAR2(2000) | The definition of the fixed view
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 65 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GC_ELEMENT

This is an Oracle9i Real Application Clusters view. There is one entry in V$GC_ELEMENT for each PCM lock that is used by the buffer cache. The name of the PCM lock that corresponds to a lock element is {'BL', indx, class}.

See Also:

Oracle9i Real Application Clusters Concepts

Column | Datatype | Description
GC_ELEMENT_ADDR | RAW(4 | 8) | Address of the lock element that contains the PCM lock that is covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.
INDX | NUMBER | Platform specific lock manager identifier
CLASS | NUMBER | Platform specific lock manager identifier
GC_ELEMENT_NAME | NUMBER | Name of the lock that contains the PCM lock that is covering the buffer
MODE_HELD | NUMBER | Platform dependent value for lock mode held; often: 3 = share; 5 = exclusive
BLOCK_COUNT | NUMBER | Number of blocks covered by PCM lock
RELEASING | NUMBER | Nonzero if PCM lock is being downgraded
ACQUIRING | NUMBER | Nonzero if PCM lock is being upgraded
INVALID | NUMBER | Nonzero if PCM lock is invalid (a lock may become invalid after a system failure)
FLAGS | NUMBER | Process level flags for the lock element
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 66 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GC_ELEMENTS_WITH_COLLISIONS

This is an Oracle9i Real Application Clusters view. Use this view to find the locks that protect multiple buffers, each of which has been either force-written or force-read at least 10 times. It is very likely that those buffers are experiencing false pings due to being mapped to the same lock.

See Also:

Oracle9i Real Application Clusters Concepts

Column | Datatype | Description
GC_ELEMENT_ADDR | RAW(4 | 8) | Address of the lock element that contains the PCM lock covering the buffer. If more than one buffer has the same address, then these buffers are covered by the same PCM lock.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 67 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GCSHVMASTER_INFO

V$GCSHVMASTER_INFO describes the current and previous master instances and the number of re-masterings of Global Cache Service resources except those belonging to files mapped to a particular master.

Column | Datatype | Description
HV_ID | NUMBER | PCM hash value ID
CURRENT_MASTER | NUMBER | Master instance of this PCM hash value ID
PREVIOUS_MASTER | NUMBER | Previous master instance of this PCM hash value ID
REMASTER_CNT | NUMBER | Number of times this has been remastered
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 68 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GCSPFMASTER_INFO

V$GCSPFMASTER_INFO describes the current and previous master instances and the number of re-masterings of Global Cache Service resources belonging to files mapped to instances.

Column | Datatype | Description
FILE_ID | NUMBER | File number
CURRENT_MASTER | NUMBER | Master instance of this file
PREVIOUS_MASTER | NUMBER | Previous master instance of this file
REMASTER_CNT | NUMBER | Number of times this has been remastered
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 69 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_BLOCKING_ENQUEUE

This Oracle9i Real Application Clusters view describes all locks currently known to lock manager that are being blocked or blocking others. The output of this view is a subset of the output from V$GES_ENQUEUE.

See Also:

"V$GES_ENQUEUE" for a description of all locks known to the lock manager

Column | Datatype | Description
HANDLE | RAW(4 | 8) | Lock pointer
GRANT_LEVEL | VARCHAR2(9) | Granted level of the lock
REQUEST_LEVEL | VARCHAR2(9) | Requested level of the lock
RESOURCE_NAME1 | VARCHAR2(30) | Resource name for the lock
RESOURCE_NAME2 | VARCHAR2(30) | Resource name for the lock
PID | NUMBER | Process identifier which holds the lock
TRANSACTION_ID0 | NUMBER | Lower 4 bytes of the transaction identifier where the lock belongs to
TRANSACTION_ID1 | NUMBER | Upper 4 bytes of the transaction identifier where the lock belongs to
GROUP_ID | NUMBER | Group identifier for the lock
OPEN_OPT_DEADLOCK | NUMBER | 1 if DEADLOCK open option is set, otherwise 0
OPEN_OPT_PERSISTENT | NUMBER | 1 if PERSISTENT open option is set, otherwise 0
OPEN_OPT_PROCESS_OWNED | NUMBER | 1 if PROCESS_OWNED open option is set, otherwise 0
OPEN_OPT_NO_XID | NUMBER | 1 if NO_XID open option is set, otherwise 0
CONVERT_OPT_GETVALUE | NUMBER | 1 if GETVALUE convert option is set, otherwise 0
CONVERT_OPT_PUTVALUE | NUMBER | 1 if PUTVALUE convert option is set, otherwise 0
CONVERT_OPT_NOVALUE | NUMBER | 1 if NOVALUE convert option is set, otherwise 0
CONVERT_OPT_DUBVALUE | NUMBER | 1 if DUBVALUE convert option is set, otherwise 0
CONVERT_OPT_NOQUEUE | NUMBER | 1 if NOQUEUE convert option is set, otherwise 0
CONVERT_OPT_EXPRESS | NUMBER | 1 if EXPRESS convert option is set, otherwise 0
CONVERT_OPT_NODEADLOCKWAIT | NUMBER | 1 if NODEADLOCKWAIT convert option is set, otherwise 0
CONVERT_OPT_NODEADLOCKBLOCK | NUMBER | 1 if NODEADLOCKBLOCK convert option is set, otherwise 0
WHICH_QUEUE | NUMBER | Which queue the lock is currently located. 0 for NULL queue; 1 for GRANTED queue; 2 for CONVERT queue.
STATE | VARCHAR2(64) | State of lock as owner sees it
AST_EVENT0 | NUMBER | Last AST event
OWNER_NODE | NUMBER | Node identifier
BLOCKED | NUMBER | 1 if this lock request is blocked by others, otherwise 0
BLOCKER | NUMBER | 1 if this lock is blocking others, otherwise 0
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 70 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_CONVERT_LOCAL

V$GES_CONVERT_LOCAL displays average convert time, count information, and timed statistics for remote GES enqueue operations.

Column | Datatype | Description
INST_ID | NUMBER | ID of the instance
CONVERT_TYPE | VARCHAR2(64) | Conversion types are listed in Table 3-3
AVERAGE_CONVERT_TIME | NUMBER | Average conversion time for each type of lock operation (in 100th of a second)
CONVERT_COUNT | NUMBER | The number of operations
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 71 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_CONVERT_REMOTE

V$GES_CONVERT_REMOTE displays average convert time, count information, and timed statistics for remote GES enqueue operations.

Column Datatype Description

INST_ID

NUMBER

ID of the instance

CONVERT_TYPE

VARCHAR2(64)

Conversion types are listed in Table 3-3

  • NULL -> SS - NULL mode to subshared mode
  • NULL -> SX - NULL mode to shared exclusive mode
  • NULL -> S - NULL mode to shared mode
  • NULL -> SSX - NULL mode to subshared exclusive mode
  • NULL -> X - NULL mode to exclusive mode
  • SS -> SX - Subshared mode to shared exclusive mode
  • SS -> S - Subshared mode to shared mode
  • SS -> SSX - Subshared mode to subshared exclusive mode
  • SS -> X - Subshared mode to exclusive mode
  • SX -> S - Shared exclusive mode to shared mode
  • SX -> SSX - Shared exclusive mode to subshared exclusive mode
  • SX -> X - Shared exclusive mode to exclusive mode
  • S -> SX - Shared mode to shared exclusive mode
  • S -> SSX - Shared mode to subshared exclusive mode
  • S -> X - Shared mode to exclusive mode
  • SSX -> X - Sub-shared exclusive mode to exclusive mode

AVERAGE_CONVERT_TIME

NUMBER

Average conversion time for each type of lock operation (in hundredths of a second)

CONVERT_COUNT

NUMBER

Number of operations
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 72 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_ENQUEUE

This Oracle9i Real Application Clusters view describes all locks currently known to lock manager.

See Also:

"V$GES_BLOCKING_ENQUEUE" for a description of all such locks that are currently blocking or being blocked

Column | Datatype | Description
HANDLE | RAW(4 | 8) | Lock pointer
GRANT_LEVEL | VARCHAR2(9) | Granted level of the lock
REQUEST_LEVEL | VARCHAR2(9) | Requested level of the lock
RESOURCE_NAME1 | VARCHAR2(30) | Resource name for the lock
RESOURCE_NAME2 | VARCHAR2(30) | Resource name for the lock
PID | NUMBER | Process identifier which holds the lock
TRANSACTION_ID0 | NUMBER | Lower 4 bytes of the transaction identifier to which the lock belongs
TRANSACTION_ID1 | NUMBER | Upper 4 bytes of the transaction identifier to which the lock belongs
GROUP_ID | NUMBER | Group identifier for the lock
OPEN_OPT_DEADLOCK | NUMBER | 1 if DEADLOCK open option is set, otherwise 0
OPEN_OPT_PERSISTENT | NUMBER | 1 if PERSISTENT open option is set, otherwise 0
OPEN_OPT_PROCESS_OWNED | NUMBER | 1 if PROCESS_OWNED open option is set, otherwise 0
OPEN_OPT_NO_XID | NUMBER | 1 if NO_XID open option is set, otherwise 0
CONVERT_OPT_GETVALUE | NUMBER | 1 if GETVALUE convert option is set, otherwise 0
CONVERT_OPT_PUTVALUE | NUMBER | 1 if PUTVALUE convert option is set, otherwise 0
CONVERT_OPT_NOVALUE | NUMBER | 1 if NOVALUE convert option is set, otherwise 0
CONVERT_OPT_DUBVALUE | NUMBER | 1 if DUBVALUE convert option is set, otherwise 0
CONVERT_OPT_NOQUEUE | NUMBER | 1 if NOQUEUE convert option is set, otherwise 0
CONVERT_OPT_EXPRESS | NUMBER | 1 if EXPRESS convert option is set, otherwise 0
CONVERT_OPT_NODEADLOCKWAIT | NUMBER | 1 if NODEADLOCKWAIT convert option is set, otherwise 0
CONVERT_OPT_NODEADLOCKBLOCK | NUMBER | 1 if NODEADLOCKBLOCK convert option is set, otherwise 0
WHICH_QUEUE | NUMBER | Which queue the lock is currently located. 0 for NULL queue; 1 for GRANTED queue; 2 for CONVERT queue.
STATE | VARCHAR2(64) | State of the lock as the owner sees it
AST_EVENT0 | NUMBER | Last AST event
OWNER_NODE | NUMBER | Node identifier
BLOCKED | NUMBER | 1 if this lock request is blocked by others, otherwise 0
BLOCKER | NUMBER | 1 if this lock is blocking others, otherwise 0
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 73 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_LATCH

V$GES_LATCH is obsolete.

See Also:

"V$LATCH" for statistics about GES latch performance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 74 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_RESOURCE

V$GES_RESOURCE is an Oracle9i Real Application Clusters view. It displays information of all resources currently known to the lock manager.

Column | Datatype | Description
RESP | RAW(4 | 8) | Resource pointer
RESOURCE_NAME | VARCHAR2(30) | Resource name in hexadecimal for the lock
ON_CONVERT_Q | NUMBER | 1 if on convert queue, 0 otherwise
ON_GRANT_Q | NUMBER | 1 if on granted queue, 0 otherwise
PERSISTENT_RES | NUMBER | 1 if it is a persistent resource, 0 otherwise
RDOMAIN_NAME | VARCHAR2(25) | Recovery domain name
RDOMAINP | RAW(4 | 8) | Recovery domain pointer
MASTER_NODE | NUMBER | Master node ID
NEXT_CVT_LEVEL | VARCHAR2(9) | Next lock level to convert on global convert queue
VALUE_BLK_STATE | VARCHAR2(32) | State of the value block
VALUE_BLK | VARCHAR2(64) | First 64 bytes of the value block
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 75 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GES_STATISTICS

V$GES_STATISTICS displays miscellaneous GES statistics.

Column | Datatype | Description
STATISTIC# | NUMBER | Statistic number
NAME | VARCHAR2(64) | Name of the statistic
VALUE | NUMBER | Value associated with the statistic
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 76 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GLOBAL_BLOCKED_LOCKS

This view displays global blocked locks.

Column | Datatype | Description
ADDR | RAW(4 | 8) | Address of lock state object
KADDR | RAW(4 | 8) | Address of lock
SID | NUMBER | Identifier of session holding the lock (number)
TYPE | VARCHAR2(2) | Resource type (char)
ID1 | NUMBER | Resource identifier #1 (number)
ID2 | NUMBER | Resource identifier #2 (number)
LMODE | NUMBER | Lock mode held (number)
REQUEST | NUMBER | Lock mode requested (number)
CTIME | NUMBER | Time since current mode was granted
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 77 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$GLOBAL_TRANSACTION

This view displays information on the currently active global transactions.

Column | Datatype | Description
FORMATID | NUMBER | Format identifier of the global transaction
GLOBALID | RAW(64) | Global transaction identifier of the global transaction
BRANCHID | RAW(64) | Branch qualifier of the global transaction
BRANCHES | NUMBER | Total number of branches in the global transaction
REFCOUNT | NUMBER | Number of siblings for this global transaction, must be the same as branches
PREPARECOUNT | NUMBER | Number of branches of the global transaction that have prepared
STATE | VARCHAR2(18) | State of the branch of the global transaction
FLAGS | NUMBER | The numerical representation of the state
COUPLING | VARCHAR2(15) | Whether the branches are loosely coupled or tightly coupled
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 78 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$HS_AGENT

This view identifies the set of HS agents currently running on a given host, using one row per agent process.

Column | Datatype | Description
AGENT_ID | NUMBER | Net8 session identifier used for connections to agent (the identifier used in the LISTENER.ORA file). Maps to the AGENT_ID column of V$HS_AGENT.
MACHINE | VARCHAR2(64) | Operating system machine name
PROCESS | VARCHAR2(9) | Operating system process identifier of agent
PROGRAM | VARCHAR2(48) | Program name of agent
OSUSER | VARCHAR2(30) | Operating system user
STARTTIME | DATE | The starting time
AGENT_TYPE | NUMBER | Type of agent
FDS_CLASS_ID | NUMBER | The ID of the Foreign Data Store class
FDS_INST_ID | NUMBER | The instance name of the Foreign Data Store
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 79 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$HS_PARAMETER

This view describes the initialization parameters in use by the server and agent.

Column | Datatype | Description
HS_SESSION_ID | NUMBER | Unique HS session identifier. This column maps to the HS_SESSION_ID column of V$HS_SESSION.
PARAMETER | VARCHAR2(64) | Name of the parameter
VALUE | VARCHAR2(64) | Value of the parameter
SOURCE | CHAR(1) | Whether the parameter was defined in the agent (A) or server (S)
ENV | CHAR(1) | Whether the parameter was also set as an environment variable in the agent or elsewhere (T | F)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 80 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$HS_SESSION

This view describes the current HS session.

Column | Datatype | Description
HS_SESSION_ID | NUMBER | Unique HS session identifier
AGENT_ID | NUMBER | Net8 session identifier used for connections to the agent. Maps to the AGENT_ID column of V$HS_AGENT.
SID | NUMBER | User session identifier. Maps to the SID column of V$SESSION.
DB_LINK | VARCHAR2(128) | Server database link name used to access the agent. Blank if no database link is used (for example, when using external procedures).
DB_LINK_OWNER | NUMBER | Owner of the database link in DB_LINK
STARTTIME | DATE | Time the connection was initiated
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 81 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$HVMASTER_INFO

V$HVMASTER_INFO describes the current and previous master instances and the number of re-masterings of Global Enqueue Service resources.

Column | Datatype | Description
HV_ID | NUMBER | Hash value ID
CURRENT_MASTER | NUMBER | Master instance of this hash value ID
PREVIOUS_MASTER | NUMBER | Previous master instance of this hash value ID
REMASTER_CNT | NUMBER | Number of times this has been remastered
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 82 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$INDEXED_FIXED_COLUMN

This view displays the columns in dynamic performance tables that are indexed (X$ tables). The X$ tables can change without notice. Use this view only to write queries against fixed views (V$ views) more efficiently.

Column | Datatype | Description
TABLE_NAME | VARCHAR2(30) | The name of the dynamic performance table that is indexed
INDEX_NUMBER | NUMBER | Number that distinguishes to which index a column belongs
COLUMN_NAME | VARCHAR2(30) | Name of the column that is being indexed
COLUMN_POSITION | NUMBER | Position of the column in the index key (this is mostly relevant for multicolumn indexes)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 83 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$INSTANCE

This view displays the state of the current instance.

Column Datatype Description

INSTANCE_NUMBER

NUMBER

Instance number used for instance registration. Corresponds to INSTANCE_NUMBER initialization parameter.

See Also: "INSTANCE_NUMBER"

INSTANCE_NAME

VARCHAR2(16)

Instance name

HOST_NAME

VARCHAR2(64)

Name of the host machine

VERSION

VARCHAR2(17)

RDBMS version

STARTUP_TIME

DATE

Time when instance was started up

STATUS

VARCHAR2(12)

Instance status:

  • STARTED: after STARTUP NOMOUNT
  • MOUNTED: after STARTUP MOUNT or ALTER DATABASE CLOSE
  • OPEN: after STARTUP or ALTER DATABASE OPEN
  • OPEN MIGRATE: after ALTER DATABASE OPEN MIGRATE

PARALLEL

VARCHAR2(3)

(YES/NO) Indicates whether the instance is mounted in cluster database mode

THREAD#

NUMBER

Redo thread opened by the instance

ARCHIVER

VARCHAR2(7)

(STOPPED | STARTED | FAILED) FAILED means that the archiver failed to archive a log last time, but will try again within 5 minutes

LOG_SWITCH_WAIT

VARCHAR2(11)

The ARCHIVE LOG/CLEAR LOG/CHECKPOINT event log switching is waiting for. Note that if ALTER SYSTEM SWITCH LOGFILE is hung, but there is room in the current online redo log, then value is NULL

LOGINS

VARCHAR2(10)

ALLOWED | RESTRICTED

SHUTDOWN_PENDING

VARCHAR2(3)

YES | NO

DATABASE_STATUS

VARCHAR2(17)

The status of the database

INSTANCE_ROLE

VARCHAR2(18)

Describes whether the instance is an active instance (PRIMARY_INSTANCE) or a inactive secondary instance (SECONDARY_INSTANCE), or UNKNOWN if the instance has been started but not mounted

ACTIVE_STATE

VARCHAR2(9)

(NORMAL|QUIESCING|QUIESCED).

NORMAL indicates the database is in a normal state.

QUIESCING indicates that the ALTER SYSTEM QUIESCE RESTRICTED statement has been issued: no new user transactions, queries, or PL/SQL statements are processed in this instance. User transactions, queries, or PL/SQL statements issued before the ALTER SYSTEM QUIESCE RESTRICTED statement are unaffected. DBA transactions, queries, or PL/SQL statements are also unaffected.

QUIESCED indicates that the ALTER SYSTEM QUIESCE RESTRICTED statement has been issued: no user transactions, queries, or PL/SQL statements are processed. DBA transactions, queries, or PL/SQL statements are unaffected. User transactions, queries, or PL/SQL statements issued after the ALTER SYSTEM QUIESCE RESTRICTED statement are not processed.

Note that a single ALTER SYSTEM QUIESCE RESTRICTED statement quiesces all instances in an Oracle9i Real Application Clusters environment. After this statement has been issued, some instances may enter into a quiesced state before other instances; the system is quiesced when all instances enter the quiesced state.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 84 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$INSTANCE_RECOVERY

This view monitors the mechanisms available to users to limit recovery I/O. Those mechanisms are:

  • Set the initialization parameter LOG_CHECKPOINT_TIMEOUT
  • Set the initialization parameter LOG_CHECKPOINT_INTERVAL
  • Set the initialization parameter FAST_START_MTTR_TARGET
  • Set the size of the smallest redo log

    See Also:
    • Oracle9i Database Performance Tuning Guide and Reference for more information on limiting recovery I/O, and how MTTR recovery times are determined by Oracle
    • LOG_CHECKPOINT_INTERVAL
    • FAST_START_MTTR_TARGET
    Column Datatype Description

    RECOVERY_ESTIMATED_IOS

    NUMBER

    Contains the number of dirty buffers in the buffer cache. In the Standard Edition, this column is always NULL.

    ACTUAL_REDO_BLKS

    NUMBER

    The current actual number of redo blocks required for recovery

    TARGET_REDO_BLKS

    NUMBER

    The current target number of redo blocks that must be processed for recovery. This value is the minimum value of the following 3 columns, and identifies which of the 3 user-defined limits determines checkpointing.

    LOG_FILE_SIZE_REDO_BLKS

    NUMBER

    Maximum number of redo blocks required to guarantee that a log switch does not occur before the checkpoint completes.

    LOG_CHKPT_TIMEOUT_REDO_BLKS

    NUMBER

    Number of redo blocks that need to be processed during recovery to satisfy the LOG_CHECKPOINT_TIMEOUT parameter. The value displayed is not meaningful unless that parameter has been set.

    LOG_CHKPT_INTERVAL_REDO_BLKS

    NUMBER

    Number of redo blocks that need to be processed during recovery to satisfy the LOG_CHECKPOINT_INTERVAL parameter. The value displayed is not meaningful unless that parameter has been set.

    FAST_START_IO_TARGET_REDO_BLKS

    NUMBER

    This column is obsolete and maintained only for compatibility reasons. The value of this column is always NULL.

    TARGET_MTTR

    NUMBER

    Effective MTTR (mean time to recover) target value in seconds. The TARGET_MTTR value is calculated based on the value of the FAST_START_MTTR_TARGET parameter (the TARGET_MTTR value is used internally), and is usually an approximation of the parameter's value. However, if the FAST_START_MTTR_TARGET parameter value is very small (for example, one second), or very large (for example, 3600 seconds), the calculation will produce a target value dictated by system limitations. In such cases, the TARGET_MTTR value will be the shortest calculated time, or the longest calculated time that recovery is expected to take.

    If FAST_START_MTTR_TARGET is not specified, the value of this field is the current estimated MTTR.

    ESTIMATED_MTTR

    NUMBER

    The current estimated mean time to recover (MTTR) based on the number of dirty buffers and log blocks (0 if FAST_START_MTTR_TARGET is not specified). Basically, this value tells you how long you could expect recovery to take based on the work your system is doing right now.

    CKPT_BLOCK_WRITES

    NUMBER

    Number of blocks written by checkpoint writes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 85 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LATCH

V$LATCH shows aggregate latch statistics for both parent and child latches, grouped by latch name. Individual parent and child latch statistics are broken down in the views V$LATCH_PARENT and V$LATCH_CHILDREN.

Column | Datatype | Description
ADDR | RAW(4 | 8) | Address of the latch object
LATCH# | NUMBER | Latch number
LEVEL# | NUMBER | Latch level
NAME | VARCHAR2(64) | Latch name
GETS | NUMBER | Number of times the latch was requested in willing-to-wait mode
MISSES | NUMBER | Number of times the latch was requested in willing-to-wait mode and the requestor had to wait
SLEEPS | NUMBER | Number of times a willing-to-wait latch request resulted in a session sleeping while waiting for the latch
IMMEDIATE_GETS | NUMBER | Number of times a latch was requested in no-wait mode
IMMEDIATE_MISSES | NUMBER | Number of times a no-wait latch request did not succeed (that is, missed)
WAITERS_WOKEN | NUMBER | For some latches, the session releasing the latch posts a session waiting for the latch. This counts the number of times a waiting session was awakened.
WAITS_HOLDING_LATCH | NUMBER | Number of waits for the latch while the waiter was holding a different latch
SPIN_GETS | NUMBER | Willing-to-wait latch requests which missed the first try but succeeded while spinning
SLEEP[1 | 2 | 3] | NUMBER | Waits that slept 1 time through 3 times, respectively
SLEEP4 | NUMBER | Waits that slept 4 or more times
SLEEP[5 | 6 | 7 | 8 | 9 | 10 | 11] | NUMBER | These columns are present for compatibility with previous releases of Oracle. No data is accumulated for these columns.
WAIT_TIME | NUMBER | Elapsed time spent waiting for the latch (in microseconds)
See Also:
  • "V$LATCH_CHILDREN"
  • "V$LATCH_PARENT"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 86 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LATCH_CHILDREN

V$LATCH_CHILDREN contains statistics about child latches. This view includes all columns of V$LATCH plus the CHILD# column. Note that child latches have the same parent if their LATCH# columns match each other.

Column | Datatype | Description
ADDR | RAW(4 | 8) | Address of the latch object
LATCH# | NUMBER | Latch number of the parent latch
CHILD# | NUMBER | Child latch number (unique only to each parent latch)
LEVEL# | NUMBER | Latch level
NAME | VARCHAR2(64) | Latch name
GETS | NUMBER | Number of times the latch was requested in willing-to-wait mode
MISSES | NUMBER | Number of times the latch was requested in willing-to-wait mode and the requestor had to wait
SLEEPS | NUMBER | Number of times a willing-to-wait latch request resulted in a session sleeping while waiting for the latch
IMMEDIATE_GETS | NUMBER | Number of times a latch was requested in no-wait mode
IMMEDIATE_MISSES | NUMBER | Number of times a no-wait latch request did not succeed (that is, missed)
WAITERS_WOKEN | NUMBER | For some latches, the session releasing the latch posts a session waiting for the latch. This counts the number of times a waiting session was awakened.
WAITS_HOLDING_LATCH | NUMBER | Number of waits for the latch while the waiter was holding a different latch
SPIN_GETS | NUMBER | Willing-to-wait latch requests which missed the first try but succeeded while spinning
SLEEP[1 | 2 | 3] | NUMBER | Waits that slept 1 time through 3 times, respectively
SLEEP4 | NUMBER | Waits that slept 4 or more times
SLEEP[5 | 6 | 7 | 8 | 9 | 10 | 11] | NUMBER | These columns are present for compatibility with previous releases of Oracle. No data is accumulated for these columns.
WAIT_TIME | NUMBER | Elapsed time spent waiting for the latch (in microseconds)
See Also:

"V$LATCH"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 87 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LATCH_MISSES

This view contains statistics about missed attempts to acquire a latch.

Column | Datatype | Description
PARENT_NAME | VARCHAR2(50) | Latch name of a parent latch
WHERE | VARCHAR2(64) | This column is obsolete and maintained only for compatibility reasons. The value of this column is always equal to the value in LOCATION.
NWFAIL_COUNT | NUMBER | Number of times that no-wait acquisition of the latch failed
SLEEP_COUNT | NUMBER | Number of times that acquisition attempts caused sleeps
WTR_SLP_COUNT | NUMBER |
LONGHOLD_COUNT | NUMBER |
LOCATION | VARCHAR2(64) | Location that attempted to acquire the latch
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 88 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LATCH_PARENT

V$LATCH_PARENT contains statistics about parent latches. The columns of V$LATCH_PARENT are identical to those in V$LATCH.

See Also:

"V$LATCH"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 89 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LATCHHOLDER

This view contains information about the current latch holders.

Column | Datatype | Description
PID | NUMBER | Identifier of the process holding the latch
SID | NUMBER | Identifier of the session that owns the latch
LADDR | RAW(4 | 8) | Latch address
NAME | VARCHAR2(64) | Name of the latch being held
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 90 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LATCHNAME

This view contains information about decoded latch names for the latches shown in V$LATCH. The rows of V$LATCHNAME have a one-to-one correspondence to the rows of V$LATCH.

Column | Datatype | Description
LATCH# | NUMBER | Latch number
NAME | VARCHAR2(64) | Latch name
See Also:

"V$LATCH"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 91 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LIBRARY_CACHE_MEMORY

V$LIBRARY_CACHE_MEMORY displays information about memory allocated to library cache memory objects in different namespaces. A memory object is an internal grouping of memory for efficient management. A library cache object may be comprised of one or more memory objects.

Column | Datatype | Description
LC_NAMESPACE | VARCHAR2(15) | Library cache namespace
LC_INUSE_MEMORY_OBJECTS | NUMBER | Number of library cache memory objects currently in use in the shared pool
LC_INUSE_MEMORY_SIZE | NUMBER | Total size of library cache in-use memory objects (in megabytes)
LC_FREEABLE_MEMORY_OBJECTS | NUMBER | Number of freeable library cache memory objects in the shared pool
LC_FREEABLE_MEMORY_SIZE | NUMBER | Size of library cache freeable memory objects (in megabytes)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 92 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LIBRARYCACHE

This view contains statistics about library cache performance and activity.

Column | Datatype | Description
NAMESPACE | VARCHAR2(15) | The library cache namespace
GETS | NUMBER | The number of times a lock was requested for objects of this namespace
GETHITS | NUMBER | The number of times an object's handle was found in memory
GETHITRATIO | NUMBER | The ratio of GETHITS to GETS
PINS | NUMBER | The number of times a PIN was requested for objects of this namespace
PINHITS | NUMBER | The number of times all of the metadata pieces of the library object were found in memory
PINHITRATIO | NUMBER | The ratio of PINHITS to PINS
RELOADS | NUMBER | Any PIN of an object that is not the first PIN performed since the object handle was created, and which requires loading the object from disk
INVALIDATIONS | NUMBER | The total number of times objects in this namespace were marked invalid because a dependent object was modified
DLM_LOCK_REQUESTS | NUMBER | The number of GET requests lock instance locks
DLM_PIN_REQUESTS | NUMBER | The number of PIN requests lock instance locks
DLM_PIN_RELEASES | NUMBER | The number of release requests PIN instance locks
DLM_INVALIDATION_REQUESTS | NUMBER | The number of GET requests for invalidation instance locks
DLM_INVALIDATIONS | NUMBER | The number of invalidation pings received from other instances
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 93 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LICENSE

This view contains information about license limits.

Column | Datatype | Description
SESSIONS_MAX | NUMBER | Maximum number of concurrent user sessions allowed for the instance
SESSIONS_WARNING | NUMBER | Warning limit for concurrent user sessions for the instance
SESSIONS_CURRENT | NUMBER | Current number of concurrent user sessions
SESSIONS_HIGHWATER | NUMBER | Highest number of concurrent user sessions since the instance started
USERS_MAX | NUMBER | Maximum number of named users allowed for the database
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 94 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOADISTAT

This view contains errors that occurred when updating indexes on a table during a load using the Direct Path API.

Column | Datatype | Description
OWNER | VARCHAR2(31) | Schema name
TABNAME | VARCHAR2(31) | Table name
INDEXNAME | VARCHAR2(31) | Index name
SUBNAME | VARCHAR2(31) | Index sub name
MESSAGE | VARCHAR2(4000) | Error message
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 95 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOADPSTAT

This view contains statistics about the number of rows loaded into a partition, or subpartition, during a load using the Direct Path API.

Column | Datatype | Description
OWNER | VARCHAR2(31) | Schema name
TABNAME | VARCHAR2(31) | Table name
PARTNAME | VARCHAR2(31) | Partition name
LOADED | NUMBER | Number of rows loaded
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 96 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOCK

This view lists the locks currently held by the Oracle database server and outstanding requests for a lock or latch.

Column Datatype Description

ADDR

RAW(4 | 8)

Address of lock state object

KADDR

RAW(4 | 8)

Address of lock

SID

NUMBER

Identifier for session holding or acquiring the lock

TYPE

VARCHAR2(2)

Type of user or system lock

The locks on the user types are obtained by user applications. Any process that is blocking others is likely to be holding one of these locks. The user type locks are:

TM - DML enqueue

TX - Transaction enqueue

UL - User supplied

The locks on the system types are held for extremely short periods of time. The system type locks are listed in Table 3-1.

ID1

NUMBER

Lock identifier #1 (depends on type)

ID2

NUMBER

Lock identifier #2 (depends on type)

LMODE

NUMBER

Lock mode in which the session holds the lock:

  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)

REQUEST

NUMBER

Lock mode in which the process requests the lock:

  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)

CTIME

NUMBER

Time since current mode was granted

BLOCK

NUMBER

The lock is blocking another lock
Table 3-1 Values for the TYPE Column: System Types
System Type | Description | System Type | Description
BL | Buffer hash table instance | NA..NZ | Library cache pin instance (A..Z = namespace)
CF | Control file schema global enqueue | PF | Password File
CI | Cross-instance function invocation instance | PI, PS | Parallel operation
CU | Cursor bind | PR | Process startup
DF | Data file instance | QA..QZ | Row cache instance (A..Z = cache)
DL | Direct loader parallel index create | RT | Redo thread global enqueue
DM | Mount/startup db primary/secondary instance | SC | System commit number instance
DR | Distributed recovery process | SM | SMON
DX | Distributed transaction entry | SN | Sequence number instance
FS | File set | SQ | Sequence number enqueue
HW | Space management operations on a specific segment | SS | Sort segment
IN | Instance number | ST | Space transaction enqueue
IR | Instance recovery serialization global enqueue | SV | Sequence number value
IS | Instance state | TA | Generic enqueue
IV | Library cache invalidation instance | TS | Temporary segment enqueue (ID2=0)
JQ | Job queue | TS | New block allocation enqueue (ID2=1)
KK | Thread kick | TT | Temporary table enqueue
LA .. LP | Library cache lock instance lock (A..P = namespace) | UN | User name
MM | Mount definition global enqueue | US | Undo segment DDL
MR | Media recovery | WL | Being-written redo log instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 97 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOCK_ACTIVITY

This is an Oracle9i Real Application Clusters view. V$LOCK_ACTIVITY displays the DLM lock operation activity of the current instance. Each row corresponds to a type of lock operation.

See Also:

Oracle9i Real Application Clusters Concepts
Column Datatype Description

FROM_VAL

VARCHAR2(4)

PCM lock initial state: NULL; S; X; SSX

TO_VAL

VARCHAR2(4)

PCM lock initial state: NULL; S; X; SSX

ACTION_VAL

VARCHAR2(51)

Description of lock conversions:

  • Lock buffers for read
  • Lock buffers for write
  • Make buffers CR (no write)
  • Upgrade read lock to write
  • Make buffers CR (write dirty buffers)
  • Downgrade write lock to read (write dirty buffers)
  • Write transaction table/undo blocks
  • Transaction table/undo blocks (write dirty buffers)
  • Make transaction table/undo blocks available share
  • Rearm transaction table write mechanism

COUNTER

NUMBER

Number of times the lock operation executed
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 98 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOCKED_OBJECT

This view lists all locks acquired by every transaction on the system.

Column | Datatype | Description
XIDUSN | NUMBER | Undo segment number
XIDSLOT | NUMBER | Slot number
XIDSQN | NUMBER | Sequence number
OBJECT_ID | NUMBER | Object ID being locked
SESSION_ID | NUMBER | Session ID
ORACLE_USERNAME | VARCHAR2(30) | Oracle user name
OS_USER_NAME | VARCHAR2(15) | OS user name
PROCESS | VARCHAR2(9) | OS process ID
LOCKED_MODE | NUMBER | Lock mode
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 99 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOG

This view contains log file information from the control files.

Column Datatype Description

GROUP#

NUMBER

Log group number

THREAD#

NUMBER

Log thread number

SEQUENCE#

NUMBER

Log sequence number

BYTES

NUMBER

Size of the log (in bytes)

MEMBERS

NUMBER

Number of members in the log group

ARCHIVED

VARCHAR2(3)

Archive status (YES |NO)

STATUS

VARCHAR2(16)

Log status:

  • UNUSED - Online redo log has never been written to. This is the state of a redo log that was just added, or just after a RESETLOGS, when it is not the current redo log.
  • CURRENT - Current redo log. This implies that the redo log is active. The redo log could be open or closed.
  • ACTIVE - Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It might or might not be archived.
  • CLEARING - Log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE statement. After the log is cleared, the status changes to UNUSED.
  • CLEARING_CURRENT - Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.
  • INACTIVE - Log is no longer needed for instance recovery. It may be in use for media recovery. It might or might not be archived.

FIRST_CHANGE#

NUMBER

Lowest SCN in the log

FIRST_TIME

DATE

Time of first SCN in the log
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 100 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_BUFFER

Parameter type | Integer
Default value | 512 KB or 128 KB * CPU_COUNT, whichever is greater
Parameter class | Static
Range of values | Operating system-dependent

LOG_BUFFER specifies the amount of memory (in bytes) that Oracle uses when buffering redo entries to a redo log file. Redo log entries contain a record of the changes that have been made to the database block buffers. The LGWR process writes redo log entries from the log buffer to a redo log file.

In general, larger values for LOG_BUFFER reduce redo log file I/O, particularly if transactions are long or numerous. In a busy system, a value 65536 or higher is reasonable.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Your operating system-specific Oracle documentation for the default value and range of values
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 101 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_CHECKPOINT_INTERVAL

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Unlimited
Real Application Clusters | Multiple instances can have different values.

LOG_CHECKPOINT_INTERVAL specifies the frequency of checkpoints in terms of the number of redo log file blocks that can exist between an incremental checkpoint and the last block written to the redo log. This number refers to physical operating system blocks, not database blocks.

Regardless of this value, a checkpoint always occurs when switching from one online redo log file to another. Therefore, if the value exceeds the actual redo log file size, checkpoints occur only when switching logs. Checkpoint frequency is one of the factors that influence the time required for the database to recover from an unexpected failure.

Notes:
  • Specifying a value of 0 (zero) for LOG_CHECKPOINT_INTERVAL has the same effect as setting the parameter to infinity and causes the parameter to be ignored. Only nonzero values of this parameter are considered meaningful.
  • Recovery I/O can also be limited by setting the FAST_START_IO_TARGET or LOG_CHECKPOINT_TIMEOUT parameter or by the size specified for the smallest redo log. For information on which mechanism is controlling checkpointing behavior, query the V$INSTANCE_RECOVERY view.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • "FAST_START_IO_TARGET" , "LOG_CHECKPOINT_TIMEOUT" , and "V$INSTANCE_RECOVERY"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 102 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_CHECKPOINT_TIMEOUT

Parameter type | Integer
Default value | 1800
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to unlimited
Real Application Clusters | Multiple instances can have different values.

LOG_CHECKPOINT_TIMEOUT specifies (in seconds) the amount of time that has passed since the incremental checkpoint at the position where the last write to the redo log (sometimes called the tail of the log) occurred. This parameter also signifies that no buffer will remain dirty (in the cache) for more than integer seconds.

Specifying a value of 0 for the timeout disables time-based checkpoints. Hence, setting the value to 0 is not recommended.

Notes:
  • A checkpoint scheduled to occur because of this parameter is delayed until the completion of the previous checkpoint if the previous checkpoint has not yet completed.
  • Recovery I/O can also be limited by setting the FAST_START_IO_TARGET or LOG_CHECKPOINT_INTERVAL parameter or by the size specified for the smallest redo log. For information on which mechanism is controlling checkpointing behavior, query the V$INSTANCE_RECOVERY view.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • "FAST_START_IO_TARGET" , "LOG_CHECKPOINT_TIMEOUT" , and "V$INSTANCE_RECOVERY"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 103 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_CHECKPOINTS_TO_ALERT

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

LOG_CHECKPOINTS_TO_ALERT lets you log your checkpoints to the alert file. Doing so is useful for determining whether checkpoints are occurring at the desired frequency.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 104 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_FILE_NAME_CONVERT

Parameter type

String

Syntax

LOG_FILE_NAME_CONVERT = [(]'string1' , 'string2' , 'string3' , 'string4' , ...[)]

Where:

  • string1 is the pattern of the primary database filename
  • string2 is the pattern of the standby database filename
  • string3 is the pattern of the primary database filename
  • string4 is the pattern of the standby database filename

You can use as many pairs of primary and standby replacement strings as required. You can use single or double quotation marks. The parentheses are optional.

Following are example settings that are acceptable:

LOG_FILE_NAME_CONVERT=('/dbs/t1/','/dbs/t1/s_','dbs/t2/ ','dbs/t2/s_')

Default value

None

Parameter class

Static

Range of values

Character strings

LOG_FILE_NAME_CONVERT converts the filename of a new log file on the primary database to the filename of a log file on the standby database. If you add a log file to the primary database, you must add a corresponding file to the standby database.

If you specify an odd number of strings (the last string has no corresponding replacement string), an error is signalled during startup. If the filename being converted matches more than one pattern in the pattern/replace string list, the first matched pattern takes effect. There is no limit on the number of pairs that you can specify in this parameter (other than the hard limit of the maximum length of multivalue parameters).

When the standby database is updated, this parameter converts the log file name on the primary database to the log file name on the standby database. The file must exist on the standby database and must be writable or the recovery process will halt with an error.

The first string is the pattern found in the log file names on the primary database. The second string is the pattern found in the log file names on the standby database.

You should also use LOG_FILE_NAME_CONVERT to rename the logfiles in the clone controlfile when setting up the clone database during tablespace point-in-time recovery.

See Also:

Oracle9i User-Managed Backup and Recovery Guide and Oracle9i Data Guard Concepts and Administration
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 105 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOG_PARALLELISM

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 1 to 255

LOG_PARALLELISM specifies the level of concurrency for redo allocation within Oracle.

If you are using Oracle on high-end servers that have more than 16 processors, and you are experiencing very high contention on the redo allocation latch, then you should consider enabling parallel redo. This allows the parallel generation of redo and can increase the throughput of certain update-intensive workloads. You can examine the V$LATCH view to observe the cumulative wait times on the redo allocation latch.

To enable parallel redo, set the LOG_PARALLELISM parameter in the initialization parameter file to the desired level of concurrency for redo allocation. Oracle Corporation recommends setting LOG_PARALLELISM to a value between 2 and 8 when running on systems with 16 to 64 processors. You can start with a low value (such as 2) and increment it by 1 until you determine that the redo allocation latch is no longer contended, and that the parameter improves the performance of the application.

Setting LOG_PARALLELISM to values greater than 8 is not currently recommended.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 106 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

LOGMNR_MAX_PERSISTENT_SESSIONS

Parameter type | Integer
Default value | 1
Parameter class | Static
Range of values | 1 to LICENSE_MAX_SESSIONS

LOGMNR_MAX_PERSISTENT_SESSIONS enables you to specify the maximum number of persistent LogMiner mining sessions (which are LogMiner sessions that are backed up on disk) that are concurrently active when all sessions are mining redo logs generated by standalone instances. This pre-allocates 2*LOGMNR_MAX_PERSISTENT_SESSIONS MB of contiguous memory in the SGA for use by LogMiner.

LogMiner requires 2 MB of contiguous memory for mining the redo log stream generated by a non-cluster database instance. To mine redo logs generated by an n-instance cluster database system, 2 MB of contiguous memory is required for each redo thread (or, a total of 2*n). Because persistent LogMiner sessions stage all data in the SGA, read buffers must be allocated in the SGA. The required contiguous memory is allocated at instance startup.

LOGMNR_MAX_PERSISTENT_SESSIONS is normalized for redo logs generated by non-cluster database instances. If you wish to mine a redo log stream generated by a 3-node cluster database instance, you should set this parameter to 3 (because one persistent session mining redo log generated in a 3-node cluster database instance is equivalent to 3 persistent sessions, each with mining redo logs generated by a non-cluster database instance). The memory remains exclusively allocated for LogMiner persistent sessions. This parameter does not affect transient LogMiner sessions that are not backed up on disk and are staged entirely in the Process Global Area (PGA).

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_LOGMNR_SESSION package
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 107 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX_COMMIT_PROPAGATION_DELAY

Parameter type | Integer
Default value | 700
Parameter class | Static
Range of values | 0 to 90000
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have identical values.
Caution:

Change this parameter only when it is absolutely necessary to see the most current version of the database when performing a query.

MAX_COMMIT_PROPAGATION_DELAY is an Oracle9i Real Application Clusters parameter. This initialization parameter should not be changed except under a limited set of circumstances specific to the cluster database.

This parameter specifies the maximum amount of time allowed before the system change number (SCN) held in the SGA of an instance is refreshed by the log writer process (LGWR). It determines whether the local SCN should be refreshed from the lock value when getting the snapshot SCN for a query. Units are in hundredths of seconds.

Under very unusual circumstances involving rapid updates and queries of the same data from different instances, the SCN might not be refreshed in a timely manner. Setting the parameter to zero causes the SCN to be refreshed immediately after a commit. The default value (700 hundredths of a second, or seven seconds) is an upper bound that allows the preferred existing high performance mechanism to remain in place.

See Also:

Oracle9i Real Application Clusters Administration for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 108 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX_DISPATCHERS

Parameter type | Integer
Default value | 5
Parameter class | Static
Range of values | 5 or the number of dispatchers configured, whichever is greater

MAX_DISPATCHERS specifies the maximum number of dispatcher processes allowed to be running simultaneously. The default value applies only if dispatchers have been configured for the system.

The value of MAX_DISPATCHERS should at least equal the maximum number of concurrent sessions divided by the number of connections for each dispatcher. For most systems, a value of 250 connections for each dispatcher provides good performance.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Your operating system-specific Oracle documentation for the default value and range of values
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 109 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX_DUMP_FILE_SIZE

Parameter type | String
Syntax | MAX_DUMP_FILE_SIZE = {integer [K | M] | UNLIMITED}
Default value | UNLIMITED
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | 0 to unlimited, or UNLIMITED

MAX_DUMP_FILE_SIZE specifies the maximum size of trace files (excluding the alert file). Change this limit if you are concerned that trace files may use too much space.

  • A numerical value for MAX_DUMP_FILE_SIZE specifies the maximum size in operating system blocks.
  • A number followed by a K or M suffix specifies the file size in kilobytes or megabytes.
  • The special value string UNLIMITED means that there is no upper limit on trace file size. Thus, dump files can be as large as the operating system permits.

    See Also:

    Oracle9i Database Administrator's Guide and Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 110 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX_ENABLED_ROLES

Parameter type | Integer
Default value | 20
Parameter class | Static
Range of values | 0 to 148

MAX_ENABLED_ROLES specifies the maximum number of database roles that users can enable, including roles contained within other roles.

The actual number of roles users can enable is 2 plus the value of MAX_ENABLED_ROLES, because each user has two additional roles, PUBLIC and the user's own role. For example, if MAX_ENABLED_ROLES is set to 5, user HR can have seven roles enabled: the five enabled by MAX_ENABLED_ROLES, plus PUBLIC and HR.

See Also:

Oracle9i Database Administrator's Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 111 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX_ROLLBACK_SEGMENTS

Parameter type | Integer
Default value | MAX(30, TRANSACTIONS/TRANSACTIONS_PER_ROLLBACK_SEGMENT)
Parameter class | Static
Range of values | 2 to 65535

MAX_ROLLBACK_SEGMENTS specifies the maximum size of the rollback segment cache in the SGA. The number specified signifies the maximum number of rollback segments that can be kept online (that is, status of ONLINE) simultaneously by one instance.

See Also:

Oracle9i Database Administrator's Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 112 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAX_SHARED_SERVERS

Parameter type | Integer
Default value | Derived from SHARED_SERVERS (either 20 or 2*SHARED_SERVERS)
Parameter class | Static
Range of values | Operating system-dependent

MAX_SHARED_SERVERS specifies the maximum number of shared server processes allowed to be running simultaneously. If artificial deadlocks occur too frequently on your system, you should increase the value of MAX_SHARED_SERVERS.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Oracle9i Database Concepts for information on artificial deadlocks
  • Your operating system-specific Oracle documentation for the default value and range of values
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 113 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_CALENDAR

Parameter type | String
Syntax | NLS_CALENDAR = "calendar_system"
Default value | None
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid calendar format name

NLS_CALENDAR specifies which calendar system Oracle uses. It can have one of the following values:

  • Arabic Hijrah
  • English Hijrah
  • Gregorian
  • Japanese Imperial
  • Persian
  • ROC Official (Republic of China)
  • Thai Buddha

For example, suppose NLS_CALENDAR is set to "Japanese Imperial", the date format is "E YY-MM-DD". ("E" is the date format element for the abbreviated era name.) If the date is May 15, 1997, then the SYSDATE is displayed as follows:

SELECT SYSDATE FROM DUAL;
SYSDATE
--------
H 09-05-15
See Also:

Oracle9i Database Globalization Support Guide for a listing of available calendar systems
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 114 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_COMP

Parameter type | String
Syntax | NLS_COMP = {BINARY | ANSI}
Default value | BINARY
Parameter class | Dynamic: ALTER SESSION

Normally, comparisons in the WHERE clause and in PL/SQL blocks is binary unless you specify the NLSSORT function. By setting NLS_COMP to ANSI, you indicate that comparisons in the WHERE clause and in PL/SQL blocks should use the linguistic sort specified in the NLS_SORT parameter. You must also define an index on the column for which you want linguistic sorts.

See Also:

Oracle9i Database Globalization Support Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 115 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_CURRENCY

Parameter type | String
Syntax | NLS_CURRENCY = currency_symbol
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid character string, with a maximum of 10 bytes (not including null)

NLS_CURRENCY specifies the string to use as the local currency symbol for the L number format element. The default value of this parameter is determined by NLS_TERRITORY.

See Also:
  • Oracle9i Database Globalization Support Guide for more information on setting this parameter
  • Oracle9i SQL Reference for information on number format elements
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 116 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_DATE_FORMAT

Parameter type | String
Syntax | NLS_DATE_FORMAT = "format"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid date format mask but not exceeding a fixed length

NLS_DATE_FORMAT specifies the default date format to use with the TO_CHAR and TO_DATE functions. The default value of this parameter is determined by NLS_TERRITORY.

The value of this parameter can be any valid date format mask, and the value must be surrounded by double quotation marks. For example:

NLS_DATE_FORMAT = "MM/DD/YYYY"
See Also:
  • Oracle9i Database Globalization Support Guide for more information on setting this parameter
  • Oracle9i Heterogeneous Connectivity Administrator's Guide for information on setting this parameter in heterogeneous systems
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Initialization Parameters, 117 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_DATE_LANGUAGE

Parameter type | String
Syntax | NLS_DATE_LANGUAGE = language
Default value | Derived from NLS_LANGUAGE
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid NLS_LANGUAGE value

NLS_DATE_LANGUAGE specifies the language to use for the spelling of day and month names and date abbreviations (a.m., p.m., AD, BC) returned by the TO_DATE and TO_CHAR functions.

See Also:
  • Oracle9i Database Globalization Support Guide for more information on setting this parameter
  • Oracle9i SQL Reference for information on the TO_DATE and TO_CHAR functions.
  • Oracle9i Heterogeneous Connectivity Administrator's Guide for information on setting this parameter in heterogeneous systems
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 118 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_DUAL_CURRENCY

Parameter type | String
Syntax | NLS_DUAL_CURRENCY = currency_symbol
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid format name up to 10 characters

NLS_DUAL_CURRENCY specifies the dual currency symbol (such as "Euro") for the territory. The default is the dual currency symbol defined in the territory of your current language environment.

See Also:

Oracle9i Database Globalization Support Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 119 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_ISO_CURRENCY

Parameter type | String
Syntax | NLS_ISO_CURRENCY = territory
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic : ALTER SESSION
Range of values | Any valid NLS_TERRITORY value

NLS_ISO_CURRENCY specifies the string to use as the international currency symbol for the C number format element.

Local currency symbols can be ambiguous. For example, a dollar sign ($) can refer to U.S. dollars or Australian dollars. ISO Specification 4217 1987-07-15 defines unique "international" currency symbols for the currencies of specific territories or countries.

See Also:
  • Oracle9i Database Globalization Support Guide for more information on setting this parameter
  • Oracle9i SQL Reference for information on number format elements
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 120 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_LANGUAGE

Parameter type | String
Syntax | NLS_LANGUAGE = language
Default value | Operating system-dependent, derived from the NLS_LANG environment variable
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid language name

NLS_LANGUAGE specifies the default language of the database. This language is used for messages, day and month names, symbols for AD, BC, a.m., and p.m., and the default sorting mechanism. This parameter also determines the default values of the parameters NLS_DATE_LANGUAGE and NLS_SORT.

See Also:
  • Oracle9i Database Globalization Support Guide for a complete list of languages and additional information on this parameter
  • Your operating system-specific Oracle documentation and the release notes for your country
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 121 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_LENGTH_SEMANTICS

Parameter type | String
Syntax | NLS_LENGTH_SEMANTICS = string Example: NLS_LENGTH_SEMANTICS = 'CHAR'
Default value | BYTE
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | BYTE | CHAR

NLS_LENGTH_SEMANTICS enables you to create CHAR and VARCHAR2 columns using either byte or character length semantics. Existing columns are not affected.

NCHAR, NVARCHAR2, CLOB, and NCLOB columns are always character-based. You may be required to use byte semantics in order to maintain compatibility with existing applications.

NLS_LENGTH_SEMANTICS does not apply to tables in SYS and SYSTEM. The data dictionary always uses byte semantics.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 122 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_NCHAR_CONV_EXCP

Parameter type | String
Syntax | NLS_NCHAR_CONV_EXCP = {TRUE | FALSE}
Default value | FALSE
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

NLS_NCHAR_CONV_EXCP determines whether data loss during an implicit or explicit character type conversion will report an error.

See Also:

Oracle9i Database Globalization Support Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 123 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_NUMERIC_CHARACTERS

Parameter type | String
Syntax | NLS_NUMERIC_CHARACTERS = "decimal_character group_separator"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION

NLS_NUMERIC_CHARACTERS specifies the characters to use as the group separator and decimal character. It overrides those characters defined implicitly by NLS_TERRITORY. The group separator separates integer groups (that is, thousands, millions, billions, and so on). The decimal separates the integer portion of a number from the decimal portion.

You can specify any character as the decimal or group separator. The two characters specified must be single-byte and must be different from each other. The characters cannot be any numeric character or any of the following characters: plus (+), minus sign (-), less than sign (<), greater than sign (>). Either character can be a space.

For example, if you wish to specify a comma as the decimal character and a space as the group separator, you would set this parameter as follows:

NLS_NUMERIC_CHARACTERS = ", "
See Also:

Oracle9i Database Globalization Support Guide for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 124 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_SORT

Parameter type | String
Syntax | NLS_SORT = {BINARY | linguistic_definition}
Default value | Derived from NLS_LANGUAGE
Parameter class | Dynamic: ALTER SESSION
Range of values | BINARY or any valid linguistic definition name

NLS_SORT specifies the collating sequence for ORDER BY queries.

  • If the value is BINARY, then the collating sequence for ORDER BY queries is based on the numeric value of characters (a binary sort that requires less system overhead).
  • If the value is a named linguistic sort, sorting is based on the order of the defined linguistic sort. Most (but not all) languages supported by the NLS_LANGUAGE parameter also support a linguistic sort with the same name.

    Note:

    Setting NLS_SORT to anything other than BINARY causes a sort to use a full table scan, regardless of the path chosen by the optimizer. BINARY is the exception because indexes are built according to a binary order of keys. Thus the optimizer can use an index to satisfy the ORDER BY clause when NLS_SORT is set to BINARY. If NLS_SORT is set to any linguistic sort, the optimizer must include a full table scan and a full sort in the execution plan.

You must use the NLS_SORT operator with comparison operations if you want the linguistic sort behavior.

See Also:
  • Oracle9i Database Globalization Support Guide for a current listing of values you can specify for this parameter
  • Oracle9i Database Concepts for more information on this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 125 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_TERRITORY

Parameter type | String
Syntax | NLS_TERRITORY = territory
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid territory name

NLS_TERRITORY specifies the name of the territory whose conventions are to be followed for day and week numbering.

This parameter also establishes the default date format, the default decimal character and group separator, and the default ISO and local currency symbols.

For information on these settings, see "NLS_DATE_FORMAT" , "NLS_NUMERIC_CHARACTERS" , "NLS_CURRENCY" , and "NLS_ISO_CURRENCY" .

See Also:
  • Oracle9i Database Globalization Support Guide for a complete list of territories
  • Your operating system-specific Oracle documentation for the territory-dependent default values for these parameters
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 126 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_TIMESTAMP_FORMAT

Parameter type | String
Syntax | NLS_TIMESTAMP_FORMAT = "format"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid datetime format mask

NLS_TIMESTAMP_FORMAT defines the default timestamp format to use with the TO_CHAR and TO_TIMESTAMP functions.

The value must be surrounded by quotation marks as follows:

NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH:MI:SS.FF'

You can specify the value of NLS_TIMESTAMP_FORMAT by setting it in the initialization parameter file. You can specify its value for a client as a client environment variable.

You can also alter the value of NLS_TIMESTAMP_FORMAT by changing its value in the initialization parameter and then restarting the instance. To alter the value during a session use the ALTER SESSION SET statement.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 127 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_TIMESTAMP_TZ_FORMAT

Parameter type | String
Syntax | NLS_TIMESTAMP_TZ_FORMAT = "format"
Default value | Derived from NLS_TERRITORY
Parameter class | Dynamic: ALTER SESSION
Range of values | Any valid datetime format mask

NLS_TIMESTAMP_TZ_FORMAT defines the default timestamp with time zone format to use with the TO_CHAR and TO_TIMESTAMP_TZfunctions.

The value must be surrounded by quotation marks as follows:

NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD HH:MI:SS.FF TZH:TZM'

You can specify the value of NLS_TIMESTAMP_TZ_FORMAT by setting it in the initialization parameter file. You can specify its value for a client as a client environment variable.

You can also alter the value of NLS_TIMESTAMP_TZ_FORMAT by changing its value in the initialization parameter and then restarting the instance. To alter the value during a session use the ALTER SESSION SET statement.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 128 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

O7_DICTIONARY_ACCESSIBILITY

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

O7_DICTIONARY_ACCESSIBILITY is intended for use when you migrate from Oracle7 to Oracle9i. It controls restrictions on SYSTEM privileges. If the parameter is set to true, access to objects in the SYS schema is allowed (Oracle7 behavior). The default setting of false ensures that system privileges that allow access to objects in "any schema" do not allow access to objects in SYS schema.

For example, if O7_DICTIONARY_ACCESSIBILITY = false, then the SELECT ANY TABLE privilege allows access to views or tables in any schema except the SYS schema (data dictionary tables cannot be accessed). The system privilege EXECUTE ANY PROCEDURE allows access on the procedures in any schema except the SYS schema.

If this parameter is set to false and you need to access objects in the SYS schema, then you must be granted explicit object privilege. Also, the following roles, which can be granted to the database administrator, also allow access to dictionary objects: SELECT_CATALOG_ROLE, EXECUTE_CATALOG_ROLE, and DELETE_CATALOG_ROLE.

See Also:
  • Oracle9i Database Migration for more information on this parameter and the roles mentioned here
  • Oracle9i SQL Reference for information on granting roles
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 129 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OBJECT_CACHE_MAX_SIZE_PERCENT

Parameter type | Integer
Default value | 10
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | 0 to operating system-dependent maximum

The object cache is a memory block on the client that allows applications to store entire objects and to navigate among them without round trips to the server. OBJECT_CACHE_MAX_SIZE_PERCENT specifies the percentage of the optimal cache size that the session object cache can grow past the optimal size. The maximum size is equal to the optimal size plus the product of this percentage and the optimal size. When the cache size exceeds this maximum size, the system will attempt to shrink the cache to the optimal size.

See Also:
  • "OBJECT_CACHE_OPTIMAL_SIZE" for a description of the object cache
  • Oracle9i Database Concepts, Pro*C/C++ Precompiler Programmer's Guide, and Oracle Call Interface Programmer's Guide for information on precompiler use of the object cache
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 130 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OBJECT_CACHE_OPTIMAL_SIZE

Parameter type | Integer
Default value | 102400 (100K)
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | 10 KB to operating system-dependent maximum

The object cache is a memory block on the client that allows applications to store entire objects and to navigate among them without round trips to the server. OBJECT_CACHE_OPTIMAL_SIZE specifies (in bytes) the size to which the session object cache is reduced when the size of the cache exceeds the maximum size.

See Also:

Oracle9i Database Concepts, Pro*C/C++ Precompiler Programmer's Guide, and Oracle Call Interface Programmer's Guide for information on precompiler use of the object cache
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 131 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OLAP_PAGE_POOL_SIZE

Parameter type | Integer
Default value | 32 MB
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | 32 MB to 2 GB

OLAP_PAGE_POOL_SIZE specifies the size (in bytes) of the OLAP pool.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 132 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPEN_CURSORS

Parameter type | Integer
Default value | 50
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 1 to 4294967295 (4 GB -1)

OPEN_CURSORS specifies the maximum number of open cursors (handles to private SQL areas) a session can have at once. You can use this parameter to prevent a session from opening an excessive number of cursors. This parameter also constrains the size of the PL/SQL cursor cache which PL/SQL uses to avoid having to reparse as statements are reexecuted by a user.

It is important to set the value of OPEN_CURSORS high enough to prevent your application from running out of open cursors. The number will vary from one application to another. Assuming that a session does not open the number of cursors specified by OPEN_CURSORS, there is no added overhead to setting this value higher than actually needed.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Your operating system-specific Oracle documentation for the range of values
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 133 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPEN_LINKS

Parameter type | Integer
Default value | 4
Parameter class | Static
Range of values | 0 to 255

OPEN_LINKS specifies the maximum number of concurrent open connections to remote databases in one session. These connections include database links, as well as external procedures and cartridges, each of which uses a separate process.

Oracle counts one open link for the following:

  • For each user that references a public or private database link
  • For each external procedure or cartridge connection when it is executed for the first time

Both types of connections close when the session ends. You can also close a database link connection explicitly by issuing an ALTER SESSION CLOSE DATABASE LINK statement.

You should set this parameter to allow for the external procedure and cartridge connections expected during the session plus the number of databases referred to in typical distributed transactions (that is, a single SQL statement that references multiple databases), so that all the databases can be open to execute the statement. For example, if queries alternately access databases A, B, and C, and OPEN_LINKS is set to 2, time will be lost waiting while one connection is broken and another made. Increase the value if many different databases are accessed over time.

This parameter refers only to connections used for distributed transactions. Direct connections to a remote database specified as an application connects are not counted.

If you set OPEN_LINKS to 0, then no distributed transactions are allowed.

See Also:

"OPEN_LINKS_PER_INSTANCE" for information on setting open connections globally for a database instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Initialization Parameters, 134 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPEN_LINKS_PER_INSTANCE

Parameter type | Integer
Default value | 4
Parameter class | Static
Range of values | 0 to 4294967295 (4 GB -1)
Real Application Clusters | Multiple instances can have different values.

OPEN_LINKS_PER_INSTANCE specifies the maximum number of migratable open connections globally for each database instance. XA transactions use migratable open connections so that the connections are cached after a transaction is committed. Another transaction can use the connection, provided the user who created the connection is the same as the user who owns the transaction.

OPEN_LINKS_PER_INSTANCE is different from OPEN_LINKS, which indicates the number of connections from a session. The OPEN_LINKS parameter is not applicable to XA applications.

See Also:

"OPEN_LINKS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 135 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPTIMIZER_DYNAMIC_SAMPLING

Parameter type | Integer
Default value | If OPTIMIZER_FEATURES_ENABLE is set to 9.2.0 or higher, then 1 If OPTIMIZER_FEATURES_ENABLE is set to 9.0.1 or lower, then 0
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | 0 to 10

OPTIMIZER_DYNAMIC_SAMPLING controls the level of dynamic sampling performed by the optimizer.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 136 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPTIMIZER_FEATURES_ENABLE

Parameter type | String
Syntax | OPTIMIZER_FEATURES_ENABLE = {8.0.0 | 8.0.3 | 8.0.4 | 8.0.5 | 8.0.6 | 8.0.7 | 8.1.0 | 8.1.3 | 8.1.4 | 8.1.5 | 8.1.6 | 8.1.7 | 9.0.0 | 9.0.1 | 9.2.0}
Default value | 9.2.0
Parameter class | Static

OPTIMIZER_FEATURES_ENABLE acts as an umbrella parameter for enabling a series of optimizer features based on an Oracle release number.

For example, if you upgrade your database from release 8.0.6 to release 9.2, but you want to keep the release 8.0.6 optimizer behavior, you can do so by setting this parameter to 8.0.6. At a later time, you can try the enhancements introduced in releases up to and including release 9.2 by setting the parameter to 9.2.0.

Table 1-2 describes some of the optimizer features that are enabled when you set the OPTIMIZER_FEATURES_ENABLE parameter to an 8.0 release or an 8.1 release. Table 1-3 describes some of the optimizer features that are enabled when you set the OPTIMIZER_FEATURES_ENABLE parameter to a 9.0 release or a 9.2 release.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information about the optimizer and for information about the features listed in the following tables
Table 1-2 Release 8.0 and Release 8.1 Optimizer Features
Features | Release
8.0.0 | 8.0.3 | 8.0.4 | 8.0.5 | 8.0.6 | 8.0.7 | 8.1.0 | 8.1.3 | 8.1.4 | 8.1.5 | 8.1.6 | 8.1.7
Index fast full scan |  |  | X | X | X | X | X | X | X | X | X | X
Consideration of bitmap access paths for tables with only B-tree indexes |  |  | X | X | X | X |  |  |  |  |  |
Complex view merging |  |  | X | X | X | X |  |  |  |  |  |
Push-join predicate |  |  | X | X | X | X |  |  |  |  |  |
Ordered nested loop costing |  |  | X | X | X | X |  |  |  |  |  |
Improved outer join cardinality calculation |  |  |  |  | X | X | X | X | X | X | X | X
Improved verification of NULLs inclusion in B-tree indexes |  |  |  |  |  |  |  |  |  | X | X | X
Random distribution method for left of nested loops |  |  |  |  |  |  |  |  |  |  | X | X
Type-dependent selectivity estimates |  |  |  |  |  |  |  |  |  |  | X | X
Setting of optimizer mode for user recursive SQL |  |  |  |  |  |  |  |  |  |  | X | X
Improved average row length calculation |  |  |  |  |  |  |  |  |  |  | X | X
Partition pruning based on subquery predicates |  |  |  |  |  |  |  |  |  |  | X | X
Common subexpression elimination |  |  |  |  |  |  |  |  |  |  |  | X
Use statistics of a column imbedded in some selected functions such as TO_CHAR to compute selectivity |  |  |  |  |  |  |  |  |  |  |  | X
Improved partition statistics aggregation |  |  |  |  |  |  |  |  |  |  |  | X
Table 1-3 Release 9.0 and Release 9.2 Optimizer Features
Features | Release
9.0.0 | 9.0.1 | 9.2.0
Index fast full scan | X | X | X
Consideration of bitmap access paths for tables with only B-tree indexes | X | X | X
Complex view merging | X | X | X
Push-join predicate | X | X | X
Ordered nested loop costing | X | X | X
Improved outer join cardinality calculation | X | X | X
Improved verification of NULLs inclusion in B-tree indexes | X | X | X
Random distribution method for left of nested loops | X | X | X
Type-dependent selectivity estimates | X | X | X
Setting of optimizer mode for user recursive SQL | X | X | X
Improved average row length calculation | X | X | X
Partition pruning based on subquery predicates | X | X | X
Common subexpression elimination | X | X | X
Use statistics of a column imbedded in some selected functions such as TO_CHAR to compute selectivity | X | X | X
Improved partition statistics aggregation | X | X | X
Peeking at user-defined bind variables | X | X | X
Index joins | X | X | X
Subquery unnesting | X | X | X
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 137 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPTIMIZER_INDEX_CACHING

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to 100

OPTIMIZER_INDEX_CACHING lets you adjust the behavior of cost-based optimization to favor nested loops joins and IN-list iterators.

The cost of executing an index using an IN-list iterator or of executing a nested loops join when an index is used to access the inner table depends on the caching of that index in the buffer cache. The amount of caching depends on factors that the optimizer cannot predict, such as the load on the system and the block access patterns of different users.

You can modify the optimizer's assumptions about index caching for nested loops joins and IN-list iterators by setting this parameter to a value between 0 and 100 to indicate the percentage of the index blocks the optimizer should assume are in the cache. Setting this parameter to a higher value makes nested loops joins and IN-list iterators look less expensive to the optimizer. As a result, it will be more likely to pick nested loops joins over hash or sort-merge joins and to pick indexes using IN-list iterators over other indexes or full table scans. The default for this parameter is 0, which results in default optimizer behavior.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 138 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPTIMIZER_INDEX_COST_ADJ

Parameter type | Integer
Default value | 100
Parameter class | Dynamic: ALTER SESSION
Range of values | 1 to 10000

OPTIMIZER_INDEX_COST_ADJ lets you tune optimizer behavior for access path selection to be more or less index friendly--that is, to make the optimizer more or less prone to selecting an index access path over a full table scan.

The default for this parameter is 100 percent, at which the optimizer evaluates index access paths at the regular cost. Any other value makes the optimizer evaluate the access path at that percentage of the regular cost. For example, a setting of 50 makes the index access path look half as expensive as normal.

Note:

The adjustment does not apply to user-defined cost functions for domain indexes.
See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter, and on its relationship to "OPTIMIZER_INDEX_CACHING"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 139 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPTIMIZER_MAX_PERMUTATIONS

Parameter type | Integer
Default value | If OPTIMIZER_FEATURES_ENABLE is set to 9.0.0 or higher, then 2000 If OPTIMIZER_FEATURES_ENABLE is set to 8.1.7 or lower, then 80000
Parameter class | Dynamic: ALTER SESSION
Range of values | 4 to 80000

OPTIMIZER_MAX_PERMUTATIONS restricts the number of permutations of the tables the optimizer will consider in queries with joins. Such a restriction ensures that the parse time for the query stays within acceptable limits. However, a slight risk exists that the optimizer will overlook a good plan it would otherwise have found.

The default value for this parameter is 80000, which corresponds to no limitation at all. Setting this parameter to a value less than 1000 normally ensures parse times of a few seconds or less.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 140 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OPTIMIZER_MODE

Parameter type | String
Syntax | OPTIMIZER_MODE = {first_rows_[1 | 10 | 100 | 1000] | first_rows | all_rows | choose | rule}
Default value | choose
Parameter class | Dynamic: ALTER SESSION

OPTIMIZER_MODE establishes the default behavior for choosing an optimization approach for the instance.

Values:

  • rule

    The optimizer chooses a rule-based approach for all SQL statements regardless of the presence of statistics.

  • choose

    The optimizer chooses between a cost-based approach and a rule-based approach based on whether statistics are available.

    If the data dictionary contains statistics for at least one of the accessed tables, then the optimizer uses a cost-based approach and optimizes with a goal of best throughput. If the data dictionary contains only some statistics, then the cost-based approach is used, and the optimizer must guess the statistics for the subjects without any statistics. This can result in sub-optimal execution plans. If the data dictionary contains no statistics for any of the accessed tables, then the optimizer uses a rule-based approach.

  • first_rows_n

    The optimizer uses a cost-based approach, regardless of the presence of statistics, and optimizes with a goal of best response time to return the first n rows (where n = 1, 10, 100, 1000).

  • first_rows

    The optimizer uses a mix of costs and heuristics to find a best plan for fast delivery of the first few rows.

  • all_rows

    The optimizer uses a cost-based approach for all SQL statements in the session regardless of the presence of statistics and optimizes with a goal of best throughput (minimum resource use to complete the entire statement).

    See Also:
    • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
    • Oracle9i Database Concepts and Oracle9i Database Performance Tuning Guide and Reference for more information about the optimizer
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 141 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ORACLE_TRACE_COLLECTION_NAME

Parameter type | String
Syntax | ORACLE_TRACE_COLLECTION_NAME = collection_name
Default value | There is no default value.
Parameter class | Static
Range of values | Valid collection name up to 16 characters long (except for platforms that enforce 8-character file names)

A collection is data collected for events that occurred while an instrumented product was running. ORACLE_TRACE_COLLECTION_NAME specifies the Oracle Trace collection name for this instance. Oracle also uses this parameter in the output file names (collection definition file .cdf and data collection file .dat). If you set ORACLE_TRACE_ENABLE to true, setting this value to a non-null string will start a default Oracle Trace collection that will run until this value is set to null again.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on the Oracle Trace facility and on setting this parameter
  • "ORACLE_TRACE_ENABLE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 142 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ORACLE_TRACE_COLLECTION_PATH

Parameter type | String
Syntax | ORACLE_TRACE_COLLECTION_PATH = pathname
Default value | Operating system-specific
Parameter class | Static
Range of values | Full directory pathname

ORACLE_TRACE_COLLECTION_PATH specifies the directory pathname where the Oracle Trace collection definition (.cdf) and data collection (.dat) files are located. If you accept the default, the Oracle Trace .cdf and .dat files will be located in ORACLE_HOME/otrace/admin/cdf.

You must specify this parameter if you set the ORACLE_TRACE_FACILITY_NAME parameter.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on the Oracle Trace facility and on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 143 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ORACLE_TRACE_COLLECTION_SIZE

Parameter type | Integer
Default value | 5242880
Parameter class | Static
Range of values | 0 to 4294967295

ORACLE_TRACE_COLLECTION_SIZE specifies (in bytes) the maximum size of the Oracle Trace collection file (.dat). Once the collection file reaches this maximum, the collection is disabled. A value of 0 means that the file has no size limit.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on the Oracle Trace facility and on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 144 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ORACLE_TRACE_ENABLE

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

To enable Oracle Trace collections for the server, set ORACLE_TRACE_ENABLE to true. This setting alone does not start an Oracle Trace collection, but it allows Oracle Trace to be used for the server.

With ORACLE_TRACE_ENABLE set to true, you can perform Oracle Trace collection of server event data in any of the following ways:

  • By using Oracle Trace Manager, which is supplied with the Oracle Diagnostic Pack
  • By using the Oracle Trace command line interface, which is supplied with the server
  • By specifying a collection name in the ORACLE_TRACE_COLLECTION_NAME parameter

    See Also:
    • Oracle9i Database Performance Tuning Guide and Reference for more information on the Oracle Trace facility and on setting this parameter
    • "ORACLE_TRACE_COLLECTION_NAME"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 145 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ORACLE_TRACE_FACILITY_NAME

Parameter type | String
Syntax | ORACLE_TRACE_FACILITY_NAME = {ORACLED | ORACLEE | ORACLESM | ORACLEC}
Default value | ORACLED
Parameter class | Static

ORACLE_TRACE_FACILITY_NAME specifies the event set that Oracle Trace collects. The value of this parameter, followed by the .fdf extension, is the name of the Oracle Trace product definition file. That file must be located in the directory specified by the ORACLE_TRACE_FACILITY_PATH parameter. The product definition file contains definition information for all the events and data items that can be collected for products that use the Oracle Trace data collection API.

The Oracle server has multiple event sets and therefore multiple product definition files:

  • ORACLE is the ALL event set
  • ORACLED is the DEFAULT event set
  • ORACLEE is the EXPERT event set
  • ORACLESM is the SUMMARY event set
  • ORACLEC is the CACHEIO event set

Oracle Corporation recommends that you use the DEFAULT event set for Oracle server collections, ORACLED.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on the Oracle Trace facility and on setting this parameter
  • "ORACLE_TRACE_COLLECTION_PATH"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 146 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ORACLE_TRACE_FACILITY_PATH

Parameter type | String
Syntax | ORACLE_TRACE_FACILITY_PATH = pathname
Default value | Operating system-specific
Parameter class | Static
Range of values | Full directory pathname

ORACLE_TRACE_FACILITY_PATH specifies the directory pathname where Oracle Trace facility definition files are located. On Solaris, the default path is ORACLE_HOME/otrace/admin/fdf/. On NT, the default path is %OTRACE80%\ADMIN\FDF\.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on the Oracle Trace facility and on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 147 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OS_AUTHENT_PREFIX

Parameter type | String
Syntax | OS_AUTHENT_PREFIX = authentication_prefix
Default value | OPS$
Parameter class | Static

OS_AUTHENT_PREFIX specifies a prefix that Oracle uses to authenticate users attempting to connect to the server. Oracle concatenates the value of this parameter to the beginning of the user's operating system account name and password. When a connection request is attempted, Oracle compares the prefixed username with Oracle usernames in the database.

The default value of this parameter is OPS$ for backward compatibility with previous versions. However, you might prefer to set the prefix value to "" (a null string), thereby eliminating the addition of any prefix to operating system account names.

Note:

The text of the OS_AUTHENT_PREFIX parameter is case sensitive on some operating systems.
See Also:
  • Oracle Advanced Security Administrator's Guide for more information on setting this parameter
  • Your operating system-specific Oracle documentation for the default value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 148 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OS_ROLES

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

OS_ROLES determines whether Oracle or the operating system identifies and manages the roles of each username.

Values:

  • TRUE

    The operating system completely manages the role grants for all database usernames. When a user attempts to create a session, the username's security domain is initialized using the roles identified by the operating system. A user can subsequently enable as many roles identified by the operating system as specified by the parameter MAX_ENABLED_ROLES.

    Revocation by Oracle of roles granted by the operating system is ignored, as are any roles previously granted by Oracle.

  • FALSE

    Oracle identifies and manages the roles.

    See Also:
    • Oracle9i Database Administrator's Guide and Oracle Advanced Security Administrator's Guide for more information on roles and on setting this parameter
    • "MAX_ENABLED_ROLES" and "REMOTE_OS_ROLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 149 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_ADAPTIVE_MULTI_USER

Parameter type | Boolean
Default value | Derived from the value of PARALLEL_AUTOMATIC_TUNING
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

PARALLEL_ADAPTIVE_MULTI_USER, when set to true, enables an adaptive algorithm designed to improve performance in multiuser environments that use parallel execution. The algorithm automatically reduces the requested degree of parallelism based on the system load at query startup time. The effective degree of parallelism is based on the default degree of parallelism, or the degree from the table or hints, divided by a reduction factor.

The algorithm assumes the following:

  • The system has been tuned for optimal performance in a single-user environment
  • The parameter PARALLEL_AUTOMATIC_TUNING parameter is set to TRUE

Tables and hints use the default degree of parallelism.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution and on the algorithm described here
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 150 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_AUTOMATIC_TUNING

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

When PARALLEL_AUTOMATIC_TUNING is set to true, Oracle determines the default values for parameters that control parallel execution. In addition to setting this parameter, you must specify the PARALLEL clause for the target tables in the system. Oracle then tunes all subsequent parallel operations automatically.

If you used parallel execution in a previous release and are now enabling PARALLEL_AUTOMATIC_TUNING, you should reduce the amount of memory allocated from the shared pool to account for the decreased demand on that pool. This memory will now be allocated from the large pool, and will be computed automatically if LARGE_POOL_SIZE is left unset.

As part of the automatic tuning, Oracle will enable the PARALLEL_ADAPTIVE_MULTI_USER parameter. You can override any of the system-provided defaults if desired.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 151 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_EXECUTION_MESSAGE_SIZE

Parameter type | Integer
Default value | Operating system-dependent
Parameter class | Static
Range of values | 2148 to 65535 (64 KB - 1)
Real Application Clusters | Multiple instances must have the same value.

PARALLEL_EXECUTION_MESSAGE_SIZE specifies the size of messages for parallel execution (formerly referred to as parallel query, PDML, Parallel Recovery, replication).

On most platforms, the default value is 2148bytes if PARALLEL_AUTOMATIC_TUNING is set to false, and 4096 bytes if PARALLEL_AUTOMATIC_TUNING is set to true. The default value is adequate for most applications. Larger values require a larger shared pool. Larger values result in better performance at the cost of higher memory use. For this reason, replication gets no benefit from increasing the size.

Note:

When PARALLEL_AUTOMATIC_TUNING is set to TRUE, message buffers are allocated out of the large pool. In this case, the default is generally higher.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 152 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_INSTANCE_GROUP

Parameter type | String
Syntax | PARALLEL_INSTANCE_GROUP = group_name
Default value | A group consisting of all instances currently active
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | Any group name specified in the INSTANCE_GROUPS parameter of any active instance
Real Application Clusters | Different instances can have different values.

PARALLEL_INSTANCE_GROUP is an Oracle9i Real Application Clusters parameter that you can specify in parallel mode only. Used in conjunction with the INSTANCE_GROUPS parameter, it lets you restrict parallel query operations to a limited number of instances.

This parameter identifies the parallel instance group Oracle will use for spawning parallel execution processes. Parallel operations will spawn parallel execution processes only on instances that specify a matching group in their INSTANCE_GROUPS parameter.

If the value of PARALLEL_INSTANCE_GROUP does not correspond to an instance group name specified for an active instance, Oracle returns an error.

See Also:

Oracle9i Real Application Clusters Administration for more information on parallel query execution in an Oracle9i Real Application Clusters environment
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 153 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_MAX_SERVERS

Parameter type | Integer
Default value | Derived from the values of CPU_COUNT, PARALLEL_AUTOMATIC_TUNING, and PARALLEL_ADAPTIVE_MULTI_USER
Parameter class | Static
Range of values | 0 to 3599
Real Application Clusters | Multiple instances must have the same value.
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

PARALLEL_MAX_SERVERS specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle increases the number of processes from the number created at instance startup up to this value.

If you set this parameter too low, some queries may not have a parallel execution process available to them during query processing. If you set it too high, memory resource shortages may occur during peak periods, which can degrade performance.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 154 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_MIN_PERCENT

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to 100
Real Application Clusters | Multiple instances can have different values.

PARALLEL_MIN_PERCENT operates in conjunction with PARALLEL_MAX_SERVERS and PARALLEL_MIN_SERVERS. It lets you specify the minimum percentage of parallel execution processes (of the value of PARALLEL_MAX_SERVERS) required for parallel execution. Setting this parameter ensures that parallel operations will not execute sequentially unless adequate resources are available. The default value of 0 means that no minimum percentage of processes has been set.

Consider the following settings:

PARALLEL_MIN_PERCENT = 50
PARALLEL_MIN_SERVERS = 5
PARALLEL_MAX_SERVERS = 10

If 8 of the 10 parallel execution processes are busy, only 2 processes are available. If you then request a query with a degree of parallelism of 8, the minimum 50% will not be met.

You can use this parameter in conjunction with PARALLEL_ADAPTIVE_MULTI_USER. In a multi-user environment, an individual user or application can set PARALLEL_MIN_PERCENT to a minimum value until sufficient resources are available on the system and an acceptable degree of parallelism is returned.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution
  • "PARALLEL_MAX_SERVERS" , "PARALLEL_MIN_SERVERS" , and "PARALLEL_ADAPTIVE_MULTI_USER"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 155 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_MIN_SERVERS

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to value of PARALLEL_MAX_SERVERS
Real Application Clusters | Multiple instances can have different values.
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

PARALLEL_MIN_SERVERS specifies the minimum number of parallel execution processes for the instance. This value is the number of parallel execution processes Oracle creates when the instance is started.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 156 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARALLEL_THREADS_PER_CPU

Parameter type | Integer
Default value | Operating system-dependent, usually 2
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any nonzero number
Note:

This parameter applies to parallel execution in exclusive mode as well as in the Oracle9i Real Application Clusters environment.

PARALLEL_THREADS_PER_CPU specifies the default degree of parallelism for the instance and determines the parallel adaptive and load balancing algorithms. The parameter describes the number of parallel execution processes or threads that a CPU can handle during parallel execution.

The default is platform-dependent and is adequate in most cases. You should decrease the value of this parameter if the machine appears to be overloaded when a representative parallel query is executed. You should increase the value if the system is I/O bound.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on tuning parallel execution
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 157 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARTITION_VIEW_ENABLED

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION
Range of values | true | false
Note:

Oracle Corporation recommends that you use partitioned tables (available starting with Oracle8) rather than partition views. Partition views are supported for backward compatibility only.

PARTITION_VIEW_ENABLED specifies whether the optimizer uses partition views. If you set this parameter to true, the optimizer prunes (or skips) unnecessary table accesses in a partition view and alters the way it computes statistics on a partition view from statistics on underlying tables.

See Also:

Oracle9i Database Concepts for information on the advantages of partitioned tables and how to convert partition views to partitioned tables
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 158 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PGA_AGGREGATE_TARGET

Parameter type | Big integer
Syntax | PGA_AGGREGATE_TARGET = integer [K | M | G]
Default value | 0 (automatic memory management is turned OFF by default)
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: 10 MB Maximum: 4096 GB - 1

PGA_AGGREGATE_TARGET specifies the target aggregate PGA memory available to all server processes attached to the instance. You must set this parameter to enable the automatic sizing of SQL working areas used by memory-intensive SQL operators such as sort, group-by, hash-join, bitmap merge, and bitmap create.

Oracle uses this parameter as a target for PGA memory. Use this parameter to determine the optimal size of each work area allocated in AUTO mode (in other words, when WORKAREA_SIZE_POLICY is set to AUTO.

Oracle attempts to keep the amount of private memory below the target specified by this parameter by adapting the size of the work areas to private memory. When increasing the value of this parameter, you indirectly increase the memory allotted to work areas. Consequently, more memory-intensive operations are able to run fully in memory and less will work their way over to disk.

When setting this parameter, you should examine the total memory on your system that is available to the Oracle instance and subtract the SGA. You can assign the remaining memory to PGA_AGGREGATE_TARGET.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 159 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_COMPILER_FLAGS

Parameter type | String
Syntax | PLSQL_COMPILER_FLAGS = { [DEBUG | NON_DEBUG] [INTERPRETED | NATIVE] }
Default value | INTERPRETED, NON_DEBUG
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

PLSQL_COMPILER_FLAGS is a parameter used by the PL/SQL compiler. It specifies a list of compiler flags as a comma-separated list of strings.

Values:

  • INTERPRETED

    PL/SQL modules will be compiled to PL/SQL bytecode format. Such modules are executed by the PL/SQL interpreter engine.

  • NATIVE

    PL/SQL modules (with the possible exception of top-level anonymous PL/SQL blocks) will be compiled to native (machine) code. Such modules will be executed natively without incurring any interpreter overhead.

  • DEBUG

    PL/SQL modules will be compiled with PROBE debug symbols.

The following combinations of flags are invalid specifications for the PLSQL_COMPILER_FLAGS parameter:

  • NATIVE & DEBUG
  • NATIVE & INTERPRETED

When the value of the parameter is changed, it has no effect on PL/SQL modules that have already been compiled.

The value of this parameter is stored persistently with the library unit. If a pl/sql library unit is compiled native, all subsequent automatic recompilations of that library unit will use native compilation.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 160 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_NATIVE_C_COMPILER

Parameter type | String
Syntax | PLSQL_NATIVE_C_COMPILER = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_C_COMPILER specifies the full path name of a C compiler which is used to compile the generated C file into an object file.

PLSQL_NATIVE_C_COMPILER is optional. The platform-specific make file that is shipped for each platform contains a default value for this parameter. If a value is specified for this parameter, it will override the default value in the make file.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 161 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_NATIVE_LIBRARY_DIR

Parameter type | String
Syntax | PLSQL_NATIVE_LIBRARY_DIR = directory
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid directory path

PLSQL_NATIVE_LIBRARY_DIR is a parameter used by the PL/SQL compiler. It specifies the name of a directory where the shared objects produced by the native compiler are stored.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 162 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 232-1 (max value represented by 32 bits)

PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT specifies the number of subdirectories created by the database administrator in the directory specified by PLSQL_NATIVE_LIBRARY_DIR.

When using the PL/SQL native compiler, Performance of file create/open operations is unacceptably slow if the number of files in a directory is very large. It is usually advisable to create subdirectories and use this parameter if the total number of different PL/SQL packages that may need to be compiled natively by all users of the database instance exceeds 10000.

The subdirectories should have names corresponding to zero-based decimal numbers, prefixed by d. For example, the database administrator can create 1000 subdirectories named d0, d1, ... d999, and set PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT to 1000.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 163 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_NATIVE_LINKER

Parameter type | String
Syntax | PLSQL_NATIVE_LINKER = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_LINKER specifies the full path name of a linker such as ld in UNIX or GNU ld which is used to link the object file into a shared object or DLL.

PLSQL_NATIVE_LINKER is optional. The platform-specific make file that is shipped for each platform contains a default value for this parameter. If a value is specified for this parameter, it will override the default value in the make file.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 164 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_NATIVE_MAKE_FILE_NAME

Parameter type | String
Syntax | PLSQL_NATIVE_MAKE_FILE_NAME = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_MAKE_FILE_NAME specifies the full path name of a make file. The make utility (specified by PLSQL_NATIVE_MAKE_UTILITY) uses this make file to generate the shared object or DLL.

A port-specific make file is shipped for each platform that contains the rules for the make utility to generate DLLs on that platform.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 165 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_NATIVE_MAKE_UTILITY

Parameter type | String
Syntax | PLSQL_NATIVE_MAKE_UTILITY = pathname
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid path name

PLSQL_NATIVE_MAKE_UTILITY specifies the full path name of a make utility such as make in UNIX or gmake (GNU make). The make utility is needed to generate the shared object or DLL from the generated C source.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 166 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLSQL_V2_COMPATIBILITY

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

PL/SQL Version 2 allows some abnormal behavior that Version 8 disallows. If you want to retain that behavior for backward compatibility, set PLSQL_V2_COMPATIBILITY to true. If you set it to false, PL/SQL Version 8 behavior is enforced and Version 2 behavior is not allowed.

See Also:

PL/SQL User's Guide and Reference for a description of the differences between PL/SQL Version 2 and Version 8, and for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 167 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PRE_PAGE_SGA

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

PRE_PAGE_SGA determines whether Oracle reads the entire SGA into memory at instance startup. Operating system page table entries are then prebuilt for each page of the SGA. This setting can increase the amount of time necessary for instance startup, but it is likely to decrease the amount of time necessary for Oracle to reach its full performance capacity after startup.

Note:

This setting does not prevent your operating system from paging or swapping the SGA after it is initially read into memory.

PRE_PAGE_SGA can increase the process startup duration, because every process that starts must access every page in the SGA. The cost of this strategy is fixed; however, you might simply determine that 20,000 pages must be touched every time a process starts. This approach can be useful with some applications, but not with all applications. Overhead can be significant if your system frequently creates and destroys processes by, for example, continually logging on and logging off.

The advantage that PRE_PAGE_SGA can afford depends on page size. For example, if the SGA is 80 MB in size and the page size is 4 KB, then 20,000 pages must be touched to refresh the SGA (80,000/4 = 20,000).

If the system permits you to set a 4 MB page size, then only 20 pages must be touched to refresh the SGA (80,000/4,000 = 20). The page size is operating system-specific and generally cannot be changed. Some operating systems, however, have a special implementation for shared memory whereby you can change the page size.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 168 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PROCESSES

Parameter type | Integer
Default value | Derived from PARALLEL_MAX_SERVERS
Parameter class | Static
Range of values | 6 to operating system-dependent
Real Application Clusters | Multiple instances can have different values.

PROCESSES specifies the maximum number of operating system user processes that can simultaneously connect to Oracle. Its value should allow for all background processes such as locks, job queue processes, and parallel execution processes.

The default values of the SESSIONS and TRANSACTIONS parameters are derived from this parameter. Therefore, if you change the value of PROCESSES, you should evaluate whether to adjust the values of those derived parameters.

See Also:
  • Oracle9i Database Administrator's Guide for information on setting this parameter in exclusive mode
  • Oracle9i Real Application Clusters Administration for information on setting this parameter in an Oracle9i Real Application Clusters environment
  • Your operating system-specific Oracle documentation for the range of values
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 169 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

QUERY_REWRITE_ENABLED

Parameter type | String
Syntax | QUERY_REWRITE_ENABLED = {force | true | false}
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Real Application Clusters | Multiple instances can have different values.

QUERY_REWRITE_ENABLED allows you to enable or disable query rewriting globally for the database.

Values:

  • true

    Oracle costs the query with rewrite and without rewrite and chooses the method with the lower cost.

  • false

    Oracle does not use rewrite.

  • force

    Oracle always uses rewrite and does not evaluate the cost before doing so. Use force when you know that the query will always benefit from rewrite and when reduction in compile time is important.

To take advantage of query rewrite for a particular materialized view, you must enable query rewrite for that materialized view, and you must enable cost-based optimization.

See Also:
  • Oracle9i Data Warehousing Guide for information on query rewrite of materialized views
  • Oracle9i Database Performance Tuning Guide and Reference and "OPTIMIZER_MODE" for information on cost-based optimization
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 170 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

QUERY_REWRITE_INTEGRITY

Parameter type | String
Syntax | QUERY_REWRITE_INTEGRITY = {stale_tolerated | trusted | enforced}
Default value | enforced
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Real Application Clusters | Multiple instances can have different values.

QUERY_REWRITE_INTEGRITY determines the degree to which Oracle must enforce query rewriting. At the safest level, Oracle does not use query rewrite transformations that rely on unenforced relationships.

Values:

  • ENFORCED

    Oracle enforces and guarantees consistency and integrity.

  • TRUSTED

    Oracle allows rewrites using relationships that have been declared, but that are not enforced by Oracle.

  • STALE_TOLERATED

    Oracle allows rewrites using unenforced relationships. Materialized views are eligible for rewrite even if they are known to be inconsistent with the underlying detail data.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 171 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RDBMS_SERVER_DN

Parameter type | X.500 Distinguished Name
Default value | There is no default value.
Parameter class | Static
Range of values | All X.500 Distinguished Name format values

RDBMS_SERVER_DN specifies the Distinguished Name (DN) of the Oracle server. It is used for retrieving Enterprise Roles from an enterprise directory service.

If you do not want to use a directory for enterprise user and privilege management, but prefer to use SSL authentication alone, do not set this parameter.

See Also:

Oracle Advanced Security Administrator's Guide for more information on enterprise roles and the enterprise directory service
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 172 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

READ_ONLY_OPEN_DELAYED

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

READ_ONLY_OPEN_DELAYED determines when datafiles in read-only tablespaces are accessed.

Values:

  • true

    The datafiles are accessed for the first time only when an attempt is made to read data stored within them.

  • false

    The datafiles are accessed at database open time.

You can use this parameter to speed up some operations (primarily opening the database) for very large databases when substantial portions of the database are stored in read-only tablespaces. Consider setting this parameter to true for such databases, especially if portions of the read-only data are stored on slow-access devices or hierarchical storage.

See Also:

Oracle9i Database Administrator's Guide for information on the consequences of delaying access of datafiles in read-only tablespaces
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 173 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RECOVERY_PARALLELISM

Parameter type | Integer
Default value | Operating system-dependent
Parameter class | Static
Range of values | Operating system-dependent, but cannot exceed PARALLEL_MAX_SERVERS

RECOVERY_PARALLELISM specifies the number of processes to participate in instance or crash recovery. A value of 0 or 1 indicates that recovery is to be performed serially by one process.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for information on setting this parameter in exclusive mode
  • Oracle9i Real Application Clusters Administration for information on setting this parameter in an Oracle9i Real Application Clusters environment
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 174 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REMOTE_ARCHIVE_ENABLE

Parameter type | String
Syntax | REMOTE_ARCHIVE_ENABLE = {receive [, send] | false | true}
Default value | true
Parameter class | Static

REMOTE_ARCHIVE_ENABLE enables or disables the sending of redo archival to remote destinations and the receipt of remotely archived redo.

Values:

  • receive

    Disables the sending of redo archival to remote destinations and enables the receipt of remotely archived redo.

  • send

    Enables the sending of redo archival to remote destinations and disables the receipt of remotely archived redo.

  • false

    Disables both the sending of redo archival to remote destinations and the receipt of remotely archived redo.

  • receive, send or true

    Enables both the sending of redo archival to remote destinations and the receipt of remotely archived redo.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 175 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REMOTE_DEPENDENCIES_MODE

Parameter type | String
Syntax | REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
Default value | TIMESTAMP
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

REMOTE_DEPENDENCIES_MODE specifies how Oracle should handle dependencies upon remote PL/SQL stored procedures.

Values:

  • TIMESTAMP

    The client running the procedure compares the timestamp recorded on the server-side procedure with the current timestamp of the local procedure and executes the procedure only if the timestamps match.

  • SIGNATURE

    Oracle allows the procedure to execute as long as the signatures are considered safe. This setting allows client PL/SQL applications to be run without recompilation.

    See Also:

    Oracle9i Application Developer's Guide - Fundamentals for information about the consequences of the settings of this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 176 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REMOTE_LISTENER

Parameter type | String
Syntax | REMOTE_LISTENER = network_name
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM

REMOTE_LISTENER specifies a network name that resolves to an address or address list of Oracle Net remote listeners (that is, listeners that are not running on the same machine as this instance). The address or address list is specified in the TNSNAMES.ORA file or other address repository as configured for your system.

See Also:
  • Oracle9i Database Concepts for more information about instances, listener processes, and dispatcher processes
  • Oracle9i Net Services Administrator's Guide and your operating system-specific Oracle documentation for more information about specifying network addresses for the protocols on your system
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 177 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REMOTE_LOGIN_PASSWORDFILE

Parameter type | String
Syntax | REMOTE_LOGIN_PASSWORDFILE= {NONE | SHARED | EXCLUSIVE}
Default value | NONE
Parameter class | Static
Real Application Clusters | Multiple instances must have the same value.

REMOTE_LOGIN_PASSWORDFILE specifies whether Oracle checks for a password file and how many databases can use the password file.

Values:

  • NONE

    Oracle ignores any password file. Therefore, privileged users must be authenticated by the operating system.

  • SHARED

    More than one database can use a password file. However, the only user recognized by the password file is SYS.

  • EXCLUSIVE

    The password file can be used by only one database and the password file can contain names other than SYS.

    Note:

    This setting is required for Oracle9i Real Application Clusters
    See Also:

    Oracle9i Database Administrator's Guidefor more information about secure connections for privileged users
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 178 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REMOTE_OS_AUTHENT

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

REMOTE_OS_AUTHENT specifies whether remote clients will be authenticated with the value of the OS_AUTHENT_PREFIX parameter.

See Also:
  • Oracle Advanced Security Administrator's Guide for more information on setting this parameter
  • "OS_AUTHENT_PREFIX"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 179 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REMOTE_OS_ROLES

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

REMOTE_OS_ROLES specifies whether operating system roles are allowed for remote clients. The default value, false, causes Oracle to identify and manage roles for remote clients.

See Also:
  • Oracle9i Database Administrator's Guide for more information on setting this parameter
  • "OS_ROLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 180 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

REPLICATION_DEPENDENCY_TRACKING

Parameter type | Boolean
Default value | true
Parameter class | Static
Range of values | true | false

REPLICATION_DEPENDENCY_TRACKING enables or disables dependency tracking for read/write operations to the database. Dependency tracking is essential for propagating changes in a replicated environment in parallel.

Values:

  • TRUE

    Enables dependency tracking.

  • FALSE

    Allows read/write operations to the database to run faster, but does not produce dependency information for Oracle to perform parallel propagation.

    Note:

    Do not specify this value unless you are sure that your application will not perform any read/write operations to the replicated tables.
    See Also:

    Oracle9i Replication for more information on parallel propagation dependency tracking
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 181 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RESOURCE_LIMIT

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false

RESOURCE_LIMIT determines whether resource limits are enforced in database profiles.

Values:

  • TRUE

    Enables the enforcement of resource limits

  • FALSE

    Disables the enforcement of resource limits

    See Also:

    Oracle9i Database Administrator's Guide and Oracle9i SQL Reference for more information on setting resource limits for profiles
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 182 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RESOURCE_MANAGER_PLAN

Parameter type | String
Syntax | RESOURCE_MANAGER_PLAN = plan_name
Default value | There is no default value.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid character string

RESOURCE_MANAGER_PLAN specifies the top-level resource plan to use for an instance. The resource manager will load this top-level plan along with all its descendants (subplans, directives, and consumer groups). If you do not specify this parameter, the resource manager is off by default.

You can change the setting of this parameter using the ALTER SYSTEM statement to turn on the resource manager (if it was previously off) or to turn off the resource manager or change the current plan (if it was previously on). If you specify a plan that does not exist in the data dictionary, Oracle returns an error message.

See Also:
  • Oracle9i Database Administrator's Guide for information on resource plans
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_RESOURCE_MANAGER and DBMS_RESOURCE_MANAGER_PRIVS packages
  • "DBA_RSRC_PLANS" , "DBA_RSRC_PLAN_DIRECTIVES" , and the various V$RSRC_ dynamic performance views in Chapter 3 for information on existing resource plans
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 183 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROLLBACK_SEGMENTS

Parameter type | String
Syntax | ROLLBACK_SEGMENTS = (segment_name [, segment_name] ... )
Default value | The instance uses public rollback segments by default if you do not specify this parameter
Parameter class | Static
Range of values | Any rollback segment names listed in DBA_ROLLBACK_SEGS except SYSTEM
Real Application Clusters | Multiple instances must have different values.

ROLLBACK_SEGMENTS allocates one or more rollback segments by name to this instance. If you set this parameter, the instance acquires all of the rollback segments named in this parameter, even if the number of rollback segments exceeds the minimum number required by the instance (calculated as TRANSACTIONS / TRANSACTIONS_PER_ROLLBACK_SEGMENT).

You cannot change the value of this parameter dynamically, but you can change its value and then restart the instance. Although this parameter usually specifies private rollback segments, it can also specify public rollback segments if they are not already in use.

To find the name, segment ID number, and status of each rollback segment in the database, query the data dictionary view DBA_ROLLBACK_SEGS.

When UNDO_MANAGEMENT is set to AUTO, ROLLBACK_SEGMENTS is ignored.

See Also:
  • Oracle9i Database Administrator's Guide for more information on setting this parameter
  • Oracle9i Real Application Clusters Deployment and Performance for information on setting this parameter in an Oracle9i Real Application Clusters environment
  • "DBA_ROLLBACK_SEGS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 184 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROW_LOCKING

Parameter type | String
Syntax | ROW_LOCKING = {ALWAYS | DEFAULT | INTENT}
Default value | ALWAYS
Parameter class | Static
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

ROW_LOCKING specifies whether row locks are acquired during UPDATE operations.

Values:

  • ALWAYS and DEFAULT

    Row locks are acquired. Table locks are not acquired.

  • INTENT

    In addition to row locks, restricted table-level locks are acquired during UPDATE operations.

The acquisition of table-level locks is a way to ensure data concurrency. However, Oracle Corporation recommends that you use the SQL statement LOCK TABLE for that purpose rather than changing the setting of this parameter from its default setting of ALWAYS.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 185 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SERIAL _REUSE

Parameter type | String
Syntax | SERIAL_REUSE = {DISABLE | SELECT | DML | PLSQL | ALL}
Default value | DISABLE
Parameter class | Static

SERIAL_REUSE specifies which types of cursors make use of the serial-reusable memory feature. This feature allocates private cursor memory in the SGA so that it can be reused (serially, not concurrently) by sessions executing the same cursor.

Values:

  • DISABLE

    Disables the option for all SQL statement types. This value overrides any other values included in the list.

  • SELECT

    Enables the option for SELECT statements.

  • DML

    Enables the option for DML statements.

  • PLSQL

    Currently has no effect (although PLSQL packages do support the serial-reuse memory option using PLSQL pragmas).

  • ALL

    Enables the option for both DML and SELECT statements. Equivalent to setting SELECT, DML, and PLSQL.

    Note:

    If CURSOR_SPACE_FOR_TIME is set to TRUE, then the value of SERIAL_REUSE is ignored and treated as if it were set to DISABLE.
    See Also:

    "CURSOR_SPACE_FOR_TIME"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 186 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SERVICE_NAMES

Parameter type | String
Syntax | SERVICE_NAMES = db_service_name [, db_service_name [,...] ]
Default value | DB_NAME.DB_DOMAIN if defined
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any ASCII string or comma-separated list of string names

SERVICE_NAMES specifies one or more names for the database service to which this instance connects. You can specify multiple service names in order to distinguish among different uses of the same database.

For example:

SERVICE_NAMES = sales.acme.com, widgetsales.acme.com

You can also use service names to identify a single service that is available from two different databases through the use of replication.

In an Oracle9i Real Application Clusters environment, you must set this parameter for every instance.

If you do not qualify the names in this parameter with a domain, Oracle qualifies them with the value of the DB_DOMAIN parameter. If DB_DOMAIN is not specified, Oracle uses the domain of your local database as it currently exists in the data dictionary.

See Also:
  • Oracle9i Net Services Administrator's Guide for more information on this parameter and its settings
  • "DB_DOMAIN"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 187 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSION_CACHED_CURSORS

Parameter type | Integer
Default value | 0
Parameter class | Dynamic: ALTER SESSION
Range of values | 0 to operating system-dependent
Real Application Clusters | Multiple instances can have different values.

SESSION_CACHED_CURSORS lets you specify the number of session cursors to cache. Repeated parse calls of the same SQL statement cause the session cursor for that statement to be moved into the session cursor cache. Subsequent parse calls will find the cursor in the cache and do not need to reopen the cursor. Oracle uses a least recently used algorithm to remove entries in the session cursor cache to make room for new entries when needed.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter and its uses
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 188 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSION_MAX_OPEN_FILES

Parameter type | Integer
Default value | 10
Parameter class | Static
Range of values | 1 to either 50 or the value of MAX_OPEN_FILES defined at the operating system level, whichever is less

SESSION_MAX_OPEN_FILES specifies the maximum number of BFILEs that can be opened in any session. Once this number is reached, subsequent attempts to open more files in the session by using DBMS_LOB.FILEOPEN() or OCILobFileOpen() will fail. The maximum value for this parameter depends on the equivalent parameter defined for the underlying operating system.

See Also:
  • Oracle9i Application Developer's Guide - Large Objects (LOBs) for information on LOBs in general and BFILEs in particular
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on the DBMS_LOB.FILEOPEN() procedure
  • Oracle Call Interface Programmer's Guide for information on the OCILobFileOpen() procedure
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 189 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSIONS

Parameter type | Integer
Default value | Derived: (1.1 * PROCESSES) + 5
Parameter class | Static
Range of values | 1 to 231

SESSIONS specifies the maximum number of sessions that can be created in the system. Because every login requires a session, this parameter effectively determines the maximum number of concurrent users in the system. You should always set this parameter explicitly to a value equivalent to your estimate of the maximum number of concurrent users, plus the number of background processes, plus approximately 10% for recursive sessions.

Oracle uses the default value of this parameter as its minimum. Values between 1 and the default do not trigger errors, but Oracle ignores them and uses the default instead.

The default values of the ENQUEUE_RESOURCES and TRANSACTIONS parameters are derived from SESSIONS. Therefore, if you increase the value of SESSIONS, you should consider whether to adjust the values of ENQUEUE_RESOURCES and TRANSACTIONS as well.

In a shared server environment, the value of PROCESSES can be quite small. Therefore, Oracle Corporation recommends that you adjust the value of SESSIONS to approximately 1.1 * total number of connections.

See Also:
  • Oracle9i Database Concepts for more information on memory structures and processes
  • "ENQUEUE_RESOURCES" and "TRANSACTIONS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 190 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SGA_MAX_SIZE

Parameter type | Big integer
Syntax | SGA_MAX_SIZE = integer [K | M | G]
Default value | Initial size of SGA at startup, dependent on the sizes of different pools in the SGA, such as buffer cache, shared pool, large pool, and so on.
Parameter class | Static
Range of values | 0 to operating system-dependent

SGA_MAX_SIZE specifies the maximum size of SGA for the lifetime of the instance.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 191 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SHADOW_CORE_DUMP

Parameter type | String
Syntax | SHADOW_CORE_DUMP = {partial | full | none}
Default value | partial
Parameter class | Static

SHADOW_CORE_DUMP specifies whether Oracle includes the SGA in the core file for foreground (client) processes.

Values:

  • partial

    Oracle does not include the SGA in the core dump.

  • full

    Oracle includes the SGA in the core dump.

  • none

    No core files will be generated for foreground processes.

    See Also:

    "BACKGROUND_CORE_DUMP"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 192 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SHARED_MEMORY_ADDRESS

Parameter type | Integer
Default value | 0
Parameter class | Static

SHARED_MEMORY_ADDRESS and HI_SHARED_MEMORY_ADDRESS specify the starting address at runtime of the system global area (SGA). This parameter is ignored on the many platforms that specify the SGA's starting address at linktime.

Use this parameter to specify the entire address on 32-bit platforms and to specify the low-order 32 bits of a 64-bit address on 64-bit platforms. Use HI_SHARED_MEMORY_ADDRESS to specify the high-order 32 bits of a 64-bit address on 64-bit platforms. If both parameters are 0 or unspecified, the SGA address defaults to a platform-specific location.

See Also:

"HI_SHARED_MEMORY_ADDRESS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 193 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SHARED_POOL_RESERVED_SIZE

Parameter type | Big integer
Syntax | SHARED_POOL_RESERVED_SIZE = integer [K | M | G]
Default value | 5% of the value of SHARED_POOL_SIZE
Parameter class | Static
Range of values | Minimum: 5000 Maximum: one half of the value of SHARED_POOL_SIZE

SHARED_POOL_RESERVED_SIZE specifies (in bytes) the shared pool space that is reserved for large contiguous requests for shared pool memory.

You can use this parameter to avoid performance degradation in the shared pool in situations where pool fragmentation forces Oracle to search for and free chunks of unused pool to satisfy the current request.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • "SHARED_POOL_SIZE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 194 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SHARED_POOL_SIZE

Parameter type | Big integer
Syntax | SHARED_POOL_SIZE = integer [K | M | G]
Default value | 32-bit platforms: 8 MB, rounded up to the nearest granule size 64-bit platforms: 64 MB, rounded up to the nearest granule size
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Minimum: the granule size Maximum: operating system-dependent

SHARED_POOL_SIZE specifies (in bytes) the size of the shared pool. The shared pool contains shared cursors, stored procedures, control structures, and other structures. If you set PARALLEL_AUTOMATIC_TUNING to false, then Oracle also allocates parallel execution message buffers from the shared pool. Larger values improve performance in multi-user systems. Smaller values use less memory.

You can monitor utilization of the shared pool by querying the view V$SGASTAT.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Oracle9i Database Migration for information on parallel execution message buffers
  • "PARALLEL_AUTOMATIC_TUNING" and "V$SGASTAT"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Initialization Parameters, 195 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SHARED_SERVER_SESSIONS

Parameter type | Integer
Default value | Derived: the lesser of CIRCUITS and SESSIONS - 5
Parameter class | Static
Range of values | 0 to SESSIONS - 5

SHARED_SERVER_SESSIONS specifies the total number of shared server architecture user sessions to allow. Setting this parameter enables you to reserve user sessions for dedicated servers.

See Also:

Oracle9i Database Concepts for more information on memory structures and processes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 196 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SHARED_SERVERS

Parameter type | Integer
Default value | If you are using shared server architecture, then the value is 1. If you are not using shared server architecture, then the value is 0.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Operating system-dependent

SHARED_SERVERS specifies the number of server processes that you want to create when an instance is started up. If system load decreases, this minimum number of servers is maintained. Therefore, you should take care not to set SHARED_SERVERS too high at system startup.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 197 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SORT_AREA_RETAINED_SIZE

Parameter type | Integer
Default value | Derived from SORT_AREA_SIZE
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | From the value equivalent of two database blocks to the value of SORT_AREA_SIZE
Note:

Oracle does not recommend using the SORT_AREA_RETAINED_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_RETAINED_SIZE is retained for backward compatibility.

SORT_AREA_RETAINED_SIZE specifies (in bytes) the maximum amount of the user global area (UGA) memory retained after a sort run completes. The retained size controls the size of the read buffer, which Oracle uses to maintain a portion of the sort in memory. This memory is released back to the UGA, not to the operating system, after the last row is fetched from the sort space.

Oracle may allocate multiple sort spaces of this size for each query. Usually, only one or two sorts occur at one time, even for complex queries. In some cases, however, additional concurrent sorts are required, and each sort keeps its own memory area. If the shared server is used, allocation is to the SGA until the value in SORT_AREA_RETAINED_SIZE is reached. The difference between SORT_AREA_RETAINED_SIZE and SORT_AREA_SIZE is allocated to the PGA.

Note:

The default value as reflected in the V$PARAMETER dynamic performance view is 0. However, if you do not explicitly set this parameter, Oracle actually uses the value of the SORT_AREA_SIZE parameter.
See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • "SORT_AREA_SIZE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 198 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SORT_AREA_SIZE

Parameter type | Integer
Default value | 65536
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM ... DEFERRED
Range of values | Minimum: the value equivalent of six database blocks Maximum: operating system-dependent
Note:

Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility.

SORT_AREA_SIZE specifies in bytes the maximum amount of memory Oracle will use for a sort. After the sort is complete, but before the rows are returned, Oracle releases all of the memory allocated for the sort, except the amount specified by the SORT_AREA_RETAINED_SIZE parameter. After the last row is returned, Oracle releases the remainder of the memory.

Increasing SORT_AREA_SIZE size improves the efficiency of large sorts. Multiple allocations never occur. Only one memory area of SORT_AREA_SIZE exists for each user process at any time.

SORT_AREA_SIZE is also used for inserts and updates to bitmap indexes. Setting this value appropriately results in a bitmap segment being updated only once for each DML operation, even if more than one row in that segment changes.

Larger values of SORT_AREA_SIZE permit more sorts to be performed in memory. If more space is required to complete the sort than will fit into the memory provided, then temporary segments on disk are used to hold the intermediate sort runs.

The default is adequate for most OLTP operations. You might want to adjust this parameter for decision support systems, batch jobs, or large CREATE INDEX operations.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter
  • Oracle9i Database Concepts for information on logical storage structures such as sort areas
  • Your operating system-specific Oracle documentation for the default value on your system
  • "SORT_AREA_RETAINED_SIZE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 199 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SPFILE

Parameter type | String
Syntax | SPFILE = spfile_name
Default value | ORACLE_HOME/dbs/spfile.ora
Parameter class | Static
Range of values | Any valid SPFILE
Real Application Clusters | Multiple instances should have the same value.

The value of this parameter is the name of the current server parameter file (SPFILE) in use. This parameter can be defined in a client side PFILE to indicate the name of the server parameter file to use.

When the default server parameter file is used by the server, the value of SPFILE is internally set by the server.

The SPFILE resides in the ORACLE_HOME/dbs directory; however, users can place it anywhere on their machine as long as it is specified in an initialization parameter file.

See Also:

Oracle9i Database Administrator's Guide for more information about creating the server parameter file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 200 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SQL_TRACE

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

The value of SQL_TRACE disables or enables the SQL trace facility. Setting this parameter to true provides information on tuning that you can use to improve performance. You can change the value using the DBMS_SYSTEM package.

Caution::

Using this initialization parameter to enable the SQL trace facility for the entire instance can have a severe performance impact. Enable the facility for specific sessions using the ALTER SESSION statement. If you must enable the facility on an entire production environment, you can minimize performance impact by:

  • Maintaining at least 25% idle CPU capacity
  • Maintaining adequate disk space for the USER_DUMP_DEST location
  • Striping disk space over sufficient disks
Note:

If you change the value of this parameter by using the ALTER SESSION SET SQL_TRACE statement, the resulting change will not be reflected in the V$PARAMETER dynamic performance view. Therefore, this parameter is not considered dynamic. For information on the ALTER SESSION statement, see Oracle9i SQL Reference.
See Also:

Oracle9i Database Performance Tuning Guide and Referencefor more information about performance diagnostic tools
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 201 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SQL92_SECURITY

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

The SQL92 standards specify that security administrators should be able to require that users have SELECT privilege on a table when executing an UPDATE or DELETE statement that references table column values in a WHERE or SET clause. SQL92_SECURITY lets you specify whether users must have been granted the SELECT object privilege in order to execute such UPDATE or DELETE statements.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 202 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STANDBY_ARCHIVE_DEST

Parameter type | String
Syntax | STANDBY_ARCHIVE_DEST = filespec
Default value | Operating system-specific
Parameter class | Dynamic: ALTER SYSTEM
Range of values | A valid path or device name other than RAW

STANDBY_ARCHIVE_DEST is relevant only for a standby database in managed recovery mode. It specifies the location of archive logs arriving from a primary database. Oracle uses STANDBY_ARCHIVE_DEST and LOG_ARCHIVE_FORMAT to fabricate the fully qualified standby log filenames and stores the filenames in the standby control file.

You can see the value of this parameter by querying the V$ARCHIVE_DEST data dictionary view.

See Also:
  • Oracle9i Data Guard Concepts and Administration for more information on setting this parameter and on managed recovery mode in general
  • "LOG_ARCHIVE_DEST" and "V$ARCHIVE_DEST"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 203 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STANDBY_FILE_MANAGEMENT

Parameter type | String
Syntax | STANDBY_FILE_MANAGEMENT = {MANUAL | AUTO}
Default value | MANUAL
Parameter class | Dynamic: ALTER SYSTEM

STANDBY_FILE_MANAGEMENT enables or disables automatic standby file management. When automatic standby file management is enabled, operating system file additions and deletions on the primary database are replicated on the standby database.

Values:

  • MANUAL

    disables automatic standby file management

  • AUTO

    enables automatic standby file management

Setting STANDBY_FILE_MANAGEMENT to AUTO causes Oracle to automatically create files on the standby database and, in some cases, overwrite existing files. Care must be taken when setting STANDBY_FILE_MANAGEMENT and DB_FILE_NAME_CONVERT so that existing standby files will not be accidentally overwritten.

If the standby database is on the same system as the primary database, then ensure that the primary and standby systems do not point to the same files.

See Also:

Oracle9i Data Guard Concepts and Administration for more information about setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 204 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STAR_TRANSFORMATION_ENABLED

Parameter type | String
Syntax | STAR_TRANSFORMATION_ENABLED = {TEMP_DISABLE | TRUE | FALSE}
Default value | FALSE
Parameter class | Dynamic: ALTER SESSION

STAR_TRANSFORMATION_ENABLED determines whether a cost-based query transformation will be applied to star queries.

Values:

  • TRUE

    The optimizer will consider performing a cost-based query transformation on the star query.

  • FALSE

    The transformation will not be applied.

  • TEMP_DISABLE

    The optimizer will consider performing a cost-based query transformation on the star query but will not use temporary tables in the star transformation.

    See Also:
    • Oracle9i Database Concepts for information on star queries
    • Oracle9i Database Performance Tuning Guide and Reference for information on enabling star query
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Initialization Parameters, 205 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STATISTICS_LEVEL

Parameter type | String
Syntax | STATISTICS_LEVEL = {ALL | TYPICAL | BASIC}
Default value | TYPICAL
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

STATISTICS_LEVEL sets the statistics collection level of the database.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Initialization Parameters, 206 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TAPE_ASYNCH_IO

Parameter type | Boolean
Default value | true
Parameter class | Static
Range of values | true | false

TAPE_ASYNCH_IO controls whether I/O to sequential devices (for example, backup or restore of Oracle data to or from tape) is asynchronous--that is, whether parallel server processes can overlap I/O requests with CPU processing during table scans. If your platform supports asynchronous I/O to sequential devices, Oracle Corporation recommends that you leave this parameter set to its default. However, if the asynchronous I/O implementation is not stable, you can set TAPE_ASYNCH_IO to false to disable asynchronous I/O. If your platform does not support asynchronous I/O to sequential devices, this parameter has no effect.

See Also:

Oracle9i Database Performance Tuning Guide and Reference for more information on asynchronous I/O and on setting this parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 207 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

THREAD

Parameter type | Integer
Default value | 0
Parameter class | Static
Range of values | 0 to the maximum number of enabled threads
Real Application Clusters | If specified, multiple instances must have different values.

THREAD is an Oracle9i Real Application Clusters parameter that specifies the number of the redo thread to be used by an instance.

When you create a database, Oracle creates and enables thread 1 as a public thread (one that can be used by any instance). You must create and enable subsequent threads using the ADD LOGFILE THREAD clause and ENABLE THREAD clause of the ALTER DATABASE statement. The number of threads you create is limited by the MAXINSTANCES parameter specified in the CREATE DATABASE statement.

In exclusive mode, thread 1 is the default thread. However, you can specify THREAD for an instance running in exclusive mode if you want to use the redo log files in a thread other than thread 1.

In parallel mode, you can specify any available redo thread number, as long as that thread number is enabled and is not in use by another instance.

A value of zero specifies that this instance can use any available, enabled public thread.

See Also:

Oracle9i Real Application Clusters Administration and Oracle9i SQL Reference
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 208 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TIMED_OS_STATISTICS

Parameter type | Integer
Default value | If STATISTICS_LEVEL is set to ALL, then 5 If STATISTICS_LEVEL is set to BASIC or TYPICAL, then 0
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | Unlimited

TIMED_OS_STATISTICS specifies the interval (in seconds) at which Oracle collects operating system statistics when a request is made from the client to the server or when a request completes.

  • On dedicated servers, Oracle collects operating system statistics at user logon and after each subsequent client invocation through the OCI into the Oracle server as a remote procedure call message.
  • On shared servers, Oracle collects statistics when client calls to Oracle are processed.

A value of zero specifies that operating system statistics are not gathered. To collect statistics, set a value meaningful for your application and site needs.

Note:

Gathering operating system statistics is very expensive. Oracle Corporation recommends that you set this parameter in an ALTER SYSTEM statement rather than in the initialization parameter file, and that you reset the value to zero as soon as the needed statistics have been gathered.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 209 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TIMED_STATISTICS

Parameter type | Boolean
Default value | If STATISTICS_LEVEL is set to TYPICAL or ALL, then true If STATISTICS_LEVEL is set to BASIC, then false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

TIMED_STATISTICS specifies whether or not statistics related to time are collected.

Values:

  • true

    The statistics are collected and stored in trace files or displayed in the V$SESSTATS and V$SYSSTATS dynamic performance views.

  • false

    The value of all time-related statistics is set to zero. This setting lets Oracle avoid the overhead of requesting the time from the operating system. Normally, TIMED_STATISTICS should be false.

On some systems with very fast timer access, Oracle might enable timing even if this parameter is set to false. On these systems, setting the parameter to true can sometimes produce more accurate statistics for long-running operations.

See Also:
  • Oracle9i Database Performance Tuning Guide and Reference for more information on setting this parameter and on performance diagnostic tools in general
  • Appendix C, "Statistics Descriptions" indicates which statistics depend on the setting of this parameter.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 210 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRACE_ENABLED

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM
Range of values | true | false
Real Application Clusters | You must set this parameter for every instance, and multiple instances must have the same value.

TRACE_ENABLED controls tracing of the execution history, or code path, of Oracle. Oracle Support Services uses this information for debugging.

When TRACE_ENABLED is set to true, Oracle records information in specific files when errors occur. See Oracle9i Real Application Clusters Deployment and Performance for the types of files and the default destination directories in which Oracle records the execution history.

Oracle records this information for all instances, even if only one instance terminates. This allows Oracle to retain diagnostics for the entire cluster.

Although the overhead incurred from this processing is not excessive, you can improve performance by setting TRACE_ENABLED to false. You might do this, for example, to meet high-end benchmark requirements. However, if you leave this parameter set to false, you may lose valuable diagnostic information. Therefore, always set TRACE_ENABLED to true to trace system problems and to reduce diagnostic efforts in the event of unexplained instance failures.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Initialization Parameters, 211 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRACEFILE_IDENTIFIER

Parameter type | String
Syntax | TRACEFILE_IDENTIFIER = "traceid"
Default value | There is no default value.
Parameter class | Dynamic: ALTER SESSION
Range of values | Any characters that can occur as part of a file name on the customer platform

TRACEFILE_IDENTIFIER specifies a custom identifier that becomes part of the Oracle Trace file name. Such a custom identifier is used to identify a trace file simply from its name and without having to open it or view its contents.

Each time this parameter is dynamically modified, the next trace dump will be written to a trace file which has the new parameter value embedded in its name. Trace file continuity information is automatically added to both the old and new trace files to indicate that these trace files belong to the same process.

This parameter can only be used to change the name of the foreground process' trace file; the background processes continue to have their trace files named in the regular format. For foreground processes, the TRACEID column of the V$PROCESS view contains the current value of the TRACEFILE_IDENTIFIER parameter. When this parameter value is set, the trace file name has the following format:

sid_ora_pid_traceid.trc

In this example, sid is the oracle instance ID, pid is the process ID, and traceid is the value of the TRACEFILE_IDENTIFIER parameter.

See Also:

This parameter is not supported on all operating systems. See your operating system-specific Oracle documentation for more information.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Initialization Parameters, 212 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRANSACTION_AUDITING

Parameter type | Boolean
Default value | true
Parameter class | Dynamic: ALTER SYSTEM ... DEFERRED
Range of values | true | false

If TRANSACTION_AUDITING is true, Oracle generates a special redo record that contains the user logon name, username, the session ID, some operating system information, and client information. For each successive transaction, Oracle generates a record that contains only the session ID. These subsequent records link back to the first record, which also contains the session ID.

These records might be useful if you are using a redo log analysis tool. You can access the records by dumping the redo log.

If TRANSACTION_AUDITING is false, no redo record will be generated.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Initialization Parameters, 213 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRANSACTIONS

Parameter type | Integer
Default value | Derived: (1.1 * SESSIONS)
Parameter class | Static
Range of values | 4 to 232
Real Application Clusters | Multiple instances can have different values.

TRANSACTIONS specifies the maximum number of concurrent transactions. Greater values increase the size of the SGA and can increase the number of rollback segments allocated. The default value is greater than SESSIONS (and, in turn, PROCESSES) to allow for recursive transactions.

See Also:
  • Oracle9i Database Administrator's Guide for information on setting this parameter
  • Oracle9i Real Application Clusters Administration for the relationship of this parameter to the number of rollback segments
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 214 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRANSACTIONS_PER_ROLLBACK_SEGMENT

Parameter type | Integer
Default value | 5
Parameter class | Static
Range of values | 1 to operating system-dependent
Real Application Clusters | Multiple instances can have different values.

TRANSACTIONS_PER_ROLLBACK_SEGMENT specifies the number of concurrent transactions you expect each rollback segment to have to handle. The minimum number of rollback segments acquired at startup is TRANSACTIONS divided by the value for this parameter. For example, if TRANSACTIONS is 101 and this parameter is 10, then the minimum number of rollback segments acquired would be the ratio 101/10, rounded up to 11.

You can acquire more rollback segments by naming them in the parameter ROLLBACK_SEGMENTS.

See Also:
  • Oracle9i Database Administrator's Guide for information on setting this parameter.
  • Oracle9i Real Application Clusters Administration for how Oracle acquires rollback segments.
  • Your operating system-specific Oracle documentation for the range of values for this parameter.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Initialization Parameters, 215 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNDO_MANAGEMENT

Parameter type | String
Syntax | UNDO_MANAGEMENT = {MANUAL | AUTO}
Default value | MANUAL
Parameter class | Static
Real Application Clusters | Multiple instances must have the same value.

UNDO_MANAGEMENT specifies which undo space management mode the system should use. When set to AUTO, the instance starts in automatic undo management mode. In manual undo management mode, undo space is allocated externally as rollback segments.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 216 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNDO_RETENTION

Parameter type | Integer
Default value | 900
Parameter class | Dynamic: ALTER SYSTEM
Range of values | 0 to 232-1 (max value represented by 32 bits)
Real Application Clusters | Multiple instances must have the same value.

UNDO_RETENTION specifies (in seconds) the amount of committed undo information to retain in the database. You can use UNDO_RETENTION to satisfy queries that require old undo information to rollback changes to produce older images of data blocks. You can set the value at instance startup.

The UNDO_RETENTION parameter works best if the current undo tablespace has enough space for the active transactions. If an active transaction needs undo space and the undo tablespace does not have any free space, then the system will start reusing undo space that would have been retained. This may cause long queries to fail. Be sure to allocate enough space in the undo tablespace to satisfy the space requirement for the current setting of this parameter.

See Also:

Oracle9i SQL Reference for more information about creating undo tablespaces
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Initialization Parameters, 217 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNDO_SUPPRESS_ERRORS

Parameter type | Boolean
Default value | false
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values | true | false

UNDO_SUPPRESS_ERRORS enables users to suppress errors while executing manual undo management mode operations (for example, ALTER ROLLBACK SEGMENT ONLINE) in automatic undo management mode. Setting this parameter enables users to use the undo tablespace feature before all application programs and scripts are converted to automatic undo management mode. For example, if you have a tool that uses SET TRANSACTION USE ROLLBACK SEGMENT statement, you can add the statement "ALTER SESSION SET UNDO_SUPPRESS_ERRORS = true" to the tool to suppress the ORA-30019 error.

If you want to run in automatic undo management mode, ensure that your tools or applications are updated to run in automatic undo management mode.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 218 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNDO_TABLESPACE

Parameter type | String
Syntax | UNDO_TABLESPACE = undoname
Default value | The first available undo tablespace in the database.
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Legal name of an existing undo tablespace
Real Application Clusters | Multiple instances can have different values.

UNDO_TABLESPACE specifies the undo tablespace to be used when an instance starts up. If this parameter is specified when the instance is in manual undo management mode, an error will occur and startup will fail.

If the UNDO_TABLESPACE parameter is omitted, the first available undo tablespace in the database is chosen. If no undo tablespace is available, the instance will start without an undo tablespace. In such cases, user transactions will be executed using the SYSTEM rollback segment. You should avoid running in this mode under normal circumstances.

You can replace an undo tablespace with another undo tablespace while the instance is running.

See Also:

Oracle9i SQL Reference.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Initialization Parameters, 219 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USE_INDIRECT_DATA_BUFFERS

Parameter type | Boolean
Default value | false
Parameter class | Static
Range of values | true | false

USE_INDIRECT_DATA_BUFFERS controls how the system global area (SGA) uses memory. It enables or disables the use of the extended buffer cache mechanism for 32-bit platforms that can support more than 4 GB of physical memory. On platforms that do not support this much physical memory, this parameter is ignored.

See Also:
  • "LOCK_SGA" , "SHARED_MEMORY_ADDRESS" , and "HI_SHARED_MEMORY_ADDRESS" , which are other parameters that control how the SGA uses memory.
  • Oracle9i Database Concepts for more information about the SGA.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 220 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DUMP_DEST

Parameter type | String
Syntax | USER_DUMP_DEST = {pathname | directory}
Default value | Operating system-dependent
Parameter class | Dynamic: ALTER SYSTEM
Range of values | Any valid local path, directory, or disk

USER_DUMP_DEST specifies the pathname for a directory where the server will write debugging trace files on behalf of a user process.

For example, this directory might be set as follows:

  • On MS-DOS: C:\ORACLE\UTRC
  • On UNIX: /oracle/utrc
  • On VMS: DISK$UR3:[ORACLE.UTRC]

    See Also:
    • Oracle9i Database Performance Tuning Guide and Reference for more information about the use of trace files
    • Your operating system-specific Oracle documentation for the range of values
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Initialization Parameters, 221 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UTL_FILE_DIR

Parameter type | String
Syntax | UTL_FILE_DIR = pathname
Default value | There is no default value.
Parameter class | Static
Range of values | Any valid directory path

UTL_FILE_DIR lets you specify one or more directories that Oracle should use for PL/SQL file I/O. If you are specifying multiple directories, you must repeat the UTL_FILE_DIR parameter for each directory on separate lines of the initialization parameter file.

All users can read or write to all files specified by this parameter. Therefore all PL/SQL users must be trusted with the information in the directories specified by this parameter.

Note:

If you list multiple values, all entries of this parameter must be on contiguous lines of the parameter file. If you separate them with other parameters, Oracle will read only the last (contiguous) lines.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Initialization Parameters, 222 of 222

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

WORKAREA_SIZE_POLICY

Parameter type | String
Syntax | WORKAREA_SIZE_POLICY = {AUTO | MANUAL}
Default value | If PGA_AGGREGATE_TARGET is set, then AUTO If PGA_AGGREGATE_TARGET is not set, then MANUAL
Parameter class | Dynamic: ALTER SESSION, ALTER SYSTEM

WORKAREA_SIZE_POLICY specifies the policy for sizing work areas. This parameter controls the mode in which working areas are tuned.

Values:

  • AUTO

    Work areas used by memory-intensive operators are sized automatically, based on the PGA memory used by the system, the target PGA memory set in PGA_AGGREGATE_TARGET, and the requirement of each individual operator. You can specify AUTO only when PGA_AGGREGATE_TARGET is defined.

  • MANUAL

    The sizing of work areas is manual and based on the values of the *_AREA_SIZE parameter corresponding to the operation (for example, a sort uses SORT_AREA_SIZE). Specifying MANUAL may result in sub-optimal performance and poor PGA memory utilization.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 100 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PART_INDEXES

ALL_PART_INDEXES describes the object-level partitioning information for the partitioned indexes accessible to the current user.

Related Views

  • DBA_PART_INDEXES describes the object-level partitioning information for all partitioned indexes in the database.
  • USER_PART_INDEXES describes the object-level partitioning information for the partitioned indexes owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the partitioned index

    INDEX_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the partitioned index

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the partitioned table

    PARTITIONING_TYPE

    VARCHAR2(7)

    RANGE, HASH, SYSTEM, or UNKNOWN

    SUBPARTITIONING_TYPE

    VARCHAR2(7)

    HASH, SYSTEM, or NONE

    PARTITION_COUNT

    NUMBER

    NOT NULL

    Number of partitions in this index

    DEF_SUBPARTITION_COUNT

    NUMBER

    NOT NULL

    For a composite-partitioned index, the default number of subpartitions, if specified

    PARTITIONING_KEY_COUNT

    NUMBER

    NOT NULL

    Number of columns in the partitioning key

    SUBPARTITIONING_KEY_COUNT

    NUMBER

    NOT NULL

    For a composite-partitioned index, the number of columns in the subpartitioning key

    LOCALITY

    VARCHAR2(6)

    Whether this partitioned index is LOCAL or GLOBAL

    ALIGNMENT

    VARCHAR2(12)

    Whether this partitioned index is PREFIXED or NON-PREFIXED

    DEF_TABLESPACE_NAME

    VARCHAR2(30)

    For a local index, the default tablespace to be used when adding or splitting a table partition

    DEF_PCT_FREE

    NUMBER

    NOT NULL

    For a local index, the default PCTFREE value to be used when adding a table partition

    DEF_INI_TRANS

    NUMBER

    NOT NULL

    For a local index, the default INITRANS to be used when adding a table partition

    DEF_MAX_TRANS

    NUMBER

    NOT NULL

    For a local index, the default MAXTRANS to be used when adding a table partition

    DEF_INITIAL_EXTENT

    VARCHAR2(40)

    NOT NULL

    For a local index, the default INITIAL value to be used when adding a table partition, or DEFAULT if no INITIAL value was specified

    DEF_NEXT_EXTENT

    VARCHAR2(40)

    NOT NULL

    For a local index, the default NEXT, or DEFAULT if no NEXT value was specified

    DEF_MIN_EXTENTS

    VARCHAR2(40)

    NOT NULL

    For a local index, the default MINEXTENTS value to be used when adding a table partition, or DEFAULT if no MINEXTENTS value was specified

    DEF_MAX_EXTENTS

    VARCHAR2(40)

    NOT NULL

    For a local index, the default MAXEXTENTS value to be used when adding a table partition, or DEFAULT if no MAXEXTENTS value was specified

    DEF_PCT_INCREASE

    VARCHAR2(40)

    NOT NULL

    For a local index, the default PCTINCREASE value to be used when adding a table partition, or DEFAULT if no PCTINCREASE value was specified

    DEF_FREELISTS

    NUMBER

    NOT NULL

    For a local index, the default FREELISTS value to be used when adding a table partition, or DEFAULT if no FREELISTS value was specified

    DEF_FREELIST_GROUPS

    NUMBER

    NOT NULL

    For a local index, the default FREELIST GROUPS value to be used when adding a table partition, or DEFAULT if no FREELIST GROUPS value was specified

    DEF_LOGGING

    VARCHAR2(7)

    For a local index, the default LOGGING attribute to be used when adding a table partition, or DEFAULT if no LOGGING attribute was specified

    DEF_BUFFER_POOL

    VARCHAR2(7)

    For a local index, the default buffer pool to be used when adding a table partition

    DEF_PARAMETERS

    VARCHAR2(1000)

    Default parameter string for domain indexes
    See Also:
    • "DBA_PART_INDEXES"
    • "USER_PART_INDEXES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 101 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PART_KEY_COLUMNS

ALL_PART_KEY_COLUMNS describes the partitioning key columns for the partitioned objects accessible to the current user.

Related Views

  • DBA_PART_KEY_COLUMNS describes the partitioning key columns for all partitioned objects in the database.
  • USER_PART_KEY_COLUMNS describes the partitioning key columns for the partitioned objects owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the partitioned table or index

    NAME

    VARCHAR2(30)

    Name of the partitioned table or index

    OBJECT_TYPE

    CHAR(5)

    Object type:

    • TABLE
    • INDEX

    COLUMN_NAME

    VARCHAR2(30)

    Name of the column

    COLUMN_POSITION

    NUMBER

    Position of the column within the partitioning key
    See Also:
    • "DBA_PART_KEY_COLUMNS"
    • "USER_PART_KEY_COLUMNS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 102 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PART_LOBS

ALL_PART_LOBS provides table-level information about partitioned LOBs that are accessible to the current user, including default attributes for LOB data partitions.

Related Views

  • DBA_PART_LOBS provides such information for all partitioned LOBs in the database.
  • USER_PART_LOBS provides such information for all partitioned LOBs owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the partitioned table containing LOB(s)

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the partitioned table containing LOB(s)

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the LOB column

    LOB_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the partitioned LOB

    LOB_INDEX_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the partitioned LOB index

    DEF_CHUNK

    NUMBER

    NOT NULL

    Default value of CHUNK for a LOB data partition to be used when adding a partition

    DEF_PCTVERSION

    NUMBER

    NOT NULL

    Default value of PCTVERSION for a LOB data partition to be used when adding a partition

    DEF_CACHE

    VARCHAR2(3)

    Whether and how the cluster is to be cached by default in the buffer cache (CACHE, NOCACHE, CACHEREADS)

    DEF_IN_ROW

    VARCHAR2(3)

    Whether LOB data < 4000 bytes is stored in the row (inline)--that is, whether ENABLE STORAGE IN ROW was specified when the LOB column was created or last altered

    DEF_TABLESPACE_NAME

    VARCHAR2(30)

    Default tablespace for a LOB data partition to be used when adding a partition

    DEF_INITIAL_EXTENT

    VARCHAR2(40)

    Default value of INITIAL for a LOB data partition to be used when adding a partition

    DEF_NEXT_EXTENT

    VARCHAR2(40)

    Default value of NEXT for a LOB data partition to be used when adding a partition

    DEF_MIN_EXTENTS

    VARCHAR2(40)

    Default value of MINEXTENT for a LOB data partition to be used when adding a partition

    DEF_MAX_EXTENTS

    VARCHAR2(40)

    Default value of MAXEXTENTS for a LOB data partition to be used when adding a partition

    DEF_PCT_INCREASE

    VARCHAR2(40)

    Default value of PCTINCREASE for a LOB data partition to be used when adding a partition

    DEF_FREELISTS

    VARCHAR2(40)

    Default value of FREELISTS for a LOB data partition to be used when adding a partition

    DEF_FREELIST_GROUPS

    VARCHAR2(40)

    Default value of FREELIST GROUPS for a LOB data partition to be used when adding a partition

    DEF_LOGGING

    VARCHAR2(7)

    Default LOGGING attribute for a LOB data partition to be used when adding a partition

    DEF_BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool for a LOB data partition to be used when adding a partition
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 103 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PART_TABLES

ALL_PART_TABLES describes the object-level partitioning information for the partitioned tables accessible to the current user.

Related Views

  • DBA_PART_TABLES describes the object-level partitioning information for all partitioned tables in the database.
  • USER_PART_TABLES describes the object-level partitioning information for the partitioned tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the partitioned table

    TABLE_NAME

    VARCHAR2(30)

    Name of the partitioned table

    PARTITIONING_TYPE

    VARCHAR2(7)

    Type of partitioning (RANGE | HASH | SYSTEM | LIST)

    SUBPARTITIONING_TYPE

    VARCHAR2(7)

    Type of subpartitioning (NONE | HASH | SYSTEM | LIST)

    PARTITION_COUNT

    NUMBER

    Number of partitions in this table

    DEF_SUBPARTITION_COUNT

    NUMBER

    For a composite-partitioned table, the default number of subpartitions, if specified

    PARTITIONING_KEY_COUNT

    NUMBER

    Number of columns in the partitioning key

    SUBPARTITIONING_KEY_COUNT

    NUMBER

    For a composite-partitioned table, the number of columns in the subpartitioning key

    DEF_TABLESPACE_NAME

    VARCHAR2(30)

    Default tablespace to be used when adding a partition

    DEF_PCT_FREE

    NUMBER

    Default value of PCTFREE to be used when adding a partition

    DEF_PCT_USED

    NUMBER

    Default value of PCTUSED to be used when adding a partition

    DEF_INI_TRANS

    NUMBER

    Default value of INITRANS to be used when adding a partition

    DEF_MAX_TRANS

    NUMBER

    Default value of MAXTRANS to be used when adding a partition

    DEF_INITIAL_EXTENT

    VARCHAR2(40)

    Default value of INITIAL to be used when adding a partition. DEFAULT if INITIAL was not specified.

    DEF_NEXT_EXTENT

    VARCHAR2(40)

    Default value of NEXT to be used when adding a partition. DEFAULT if NEXT was not specified.

    DEF_MIN_EXTENTS

    VARCHAR2(40)

    Default value of MINEXTENTS to be used when adding a partition. DEFAULT if MINEXTENTS was not specified.

    DEF_MAX_EXTENTS

    VARCHAR2(40)

    Default value of MAXEXTENTS to be used when adding a partition. DEFAULT if MAXEXTENTS was not specified.

    DEF_PCT_INCREASE

    VARCHAR2(40)

    Default value of PCTINCREASE to be used when adding a partition. DEFAULT if PCTINCREASE was not specified.

    DEF_FREELISTS

    NUMBER

    Default value of FREELISTS to be used when adding a partition

    DEF_FREELIST_GROUPS

    NUMBER

    Default value of FREELIST GROUPS to be used when adding a partition

    DEF_LOGGING

    VARCHAR2(7)

    Default logging attribute to be used when adding a partition (NONE | YES | NO)

    DEF_COMPRESSION

    VARCHAR2(8)

    Default compression to be used when adding a partition (NONE | ENABLED | DISABLED)

    DEF_BUFFER_POOL

    VARCHAR2(7)

    Default buffer pool to be used when adding a partition (DEFAULT | KEEP | RECYCLE)
    See Also:
    • "DBA_PART_TABLES"
    • "USER_PART_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 104 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PARTIAL_DROP_TABS

ALL_PARTIAL_DROP_TABS describes tables accessible to the current user that have partially completed DROP COLUMN operations. Such operations might have been interrupted by the user or by a system crash.

Related Views

  • DBA_PARTIAL_DROP_TABS describes all tables in the database that have partially completed DROP COLUMN operations.
  • USER_PARTIAL_DROP_TABS describes tables in the schema of the current user that have partially completed DROP COLUMN operations. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 105 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PENDING_CONV_TABLES

ALL_PENDING_CONV_TABLES describes the pending conversion tables (tables which are not upgraded to the latest type version) accessible to the current user.

Related Views

  • DBA_PENDING_CONV_TABLES describes all pending conversion tables in the database.
  • USER_PENDING_CONV_TABLES describes the pending conversion tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table
    See Also:
    • "DBA_PENDING_CONV_TABLES"
    • "USER_PENDING_CONV_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 106 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_POLICIES

ALL_POLICIES describes the security policies on the synonyms, tables, and views accessible to the current user.

Related Views

  • DBA_POLICIES describes all security policies in the database.
  • USER_POLICIES describes the security policies on the synonyms, tables, and views owned by the current user. This view does not display the OBJECT_OWNER column.

    Column Datatype NULL Description

    OBJECT_OWNER

    VARCHAR2(30)

    Owner of the synonym, table, or view

    OBJECT_NAME

    VARCHAR2(30)

    Name of the synonym, table, or view

    POLICY_GROUP

    VARCHAR2(30)

    Name of the policy group

    POLICY_NAME

    VARCHAR2(30)

    Name of the policy

    PF_OWNER

    VARCHAR2(30)

    Owner of the policy function

    PACKAGE

    VARCHAR2(30)

    Name of the package containing the policy function

    FUNCTION

    VARCHAR2(30)

    Name of the policy function

    SEL

    VARCHAR2(3)

    Indicates whether the policy is applied to query on the object (YES) or not (NO)

    INS

    VARCHAR2(3)

    Indicates whether the policy is applied to insert on the object (YES) or not (NO)

    UPD

    VARCHAR2(3)

    Indicates whether the policy is applied to update on the object (YES) or not (NO)

    DEL

    VARCHAR2(3)

    Indicates whether the policy is applied to delete on the object (YES) or not (NO)

    CHK_OPTION

    VARCHAR2(3)

    Indicates whether the check option is enforced for the policy (YES) or not (NO)

    ENABLE

    VARCHAR2(3)

    Indicates whether the policy is enabled (YES) or disabled (NO)

    STATIC_POLICY

    VARCHAR2(3)

    Indicates whether the policy is static (YES) or not (NO)
    See Also:
    • "DBA_POLICIES"
    • "USER_POLICIES"
    • Oracle9i Database Concepts for information on security policies and fine-grained access control
    • The DBMS_RLS package in Oracle9i Supplied PL/SQL Packages and Types Reference for information on administering security policies
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 107 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_POLICY_CONTEXTS

ALL_POLICY_CONTEXTS describes the driving contexts defined for the synonyms, tables, and views accessible to the current user.

Related Views

  • DBA_POLICY_CONTEXTS describes all driving contexts in the database.
  • USER_POLICY_CONTEXTS describes the driving contexts defined for the synonyms, tables, and views owned by the current user. This view does not display the OBJECT_OWNER column.

    Column Datatype NULL Description

    OBJECT_OWNER

    VARCHAR2(30)

    Owner of the synonym, table, or view

    OBJECT_NAME

    VARCHAR2(30)

    Name of the synonym, table, or view

    NAMESPACE

    VARCHAR2(30)

    Namespace of the driving context

    ATTRIBUTE

    VARCHAR2(30)

    Attribute of the driving context
    See Also:
    • "DBA_POLICY_CONTEXTS"
    • "USER_POLICY_CONTEXTS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 108 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_POLICY_GROUPS

ALL_POLICY_GROUPS describes the policy groups defined for the synonyms, tables, and views accessible to the current user.

Related Views

  • DBA_POLICY_GROUPS describes all policy groups in the database.
  • USER_POLICY_GROUPS describes the policy groups defined for the synonyms, tables, and views owned by the current user. This view does not display the OBJECT_OWNER column.

    Column Datatype NULL Description

    OBJECT_OWNER

    VARCHAR2(30)

    Owner of the synonym, table, or view

    OBJECT_NAME

    VARCHAR2(30)

    Name of the synonym, table, or view

    POLICY_GROUP

    VARCHAR2(30)

    Name of the policy group
    See Also:
    • "DBA_POLICY_GROUPS"
    • "USER_POLICY_GROUPS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 109 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PROCEDURES

ALL_PROCEDURES lists all functions and procedures, along with associated properties. For example, ALL_PROCEDURES indicates whether or not a function is pipelined, parallel enabled or an aggregate function. If a function is pipelined or an aggregate function, the associated implementation type (if any) is also identified.

Related Views

  • DBA_PROCEDURES lists all functions and procedures, along with associated properties.
  • USER_PROCEDURES lists all functions and procedures, along with associated properties. It does not contain the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the procedure

    OBJECT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object: top-level function, procedure, or package name

    PROCEDURE_NAME

    VARCHAR2(30)

    Name of the procedure

    AGGREGATE

    VARCHAR2(3)

    Indicates whether the procedure is an aggregate function (YES) or not (NO)

    PIPELINED

    VARCHAR2(3)

    Indicates whether the procedure is a pipelined table function (YES) or not (NO)

    IMPLTYPEOWNER

    VARCHAR2(30)

    Name of the owner of the implementation type, if any

    IMPLTYPENAME

    VARCHAR2(30)

    Name of the implementation type, if any

    PARALLEL

    VARCHAR2(3)

    Indicates whether the procedure or function is parallel-enabled (YES) or not (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 110 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PROPAGATION

ALL_PROPAGATION displays information about the Streams propagations that have a source queue accessible to the current user.

Related View

DBA_PROPAGATION displays information about all Streams propagations in the database.

Column | Datatype | NULL | Description
PROPAGATION_NAME | VARCHAR2(30) | NOT NULL | Name of the Streams propagation
SOURCE_QUEUE_OWNER | VARCHAR2(30) |  | Owner of the source queue of the propagation
SOURCE_QUEUE_NAME | VARCHAR2(30) |  | Name of the source queue of the propagation
DESTINATION_QUEUE_OWNER | VARCHAR2(30) |  | Owner of the destination queue of the propagation
DESTINATION_QUEUE_NAME | VARCHAR2(30) |  | Name of the destination queue of the propagation
DESTINATION_DBLINK | VARCHAR2(128) |  | Database link to propagate events from the source queue to the destination queue
RULE_SET_OWNER | VARCHAR2(30) |  | Propagation rule set owner
RULE_SET_NAME | VARCHAR2(30) |  | Propagation rule set name
See Also:

"DBA_PROPAGATION"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 111 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_PUBLISHED_COLUMNS

ALL_PUBLISHED_COLUMNS describes all existing source table columns for which users have privileges.

Related Views

  • DBA_PUBLISHED_COLUMNS describes all existing source column tables.
  • USER_PUBLISHED_COLUMNS describes all existing source table columns for which a user has privileges.

    Column Datatype Description

    CHANGE_SET_NAME

    VARCHAR2(30)

    Name of the change set

    SOURCE_SCHEMA_NAME

    VARCHAR2(30)

    Table owner in the source system

    SOURCE_TABLE_NAME

    VARCHAR2(31)

    Table name in the source system

    PUB_ID

    NUMBER

    Publication identifier (change table object number)

    COLUMN_NAME

    VARCHAR2(30)

    Column name

    DATA_TYPE

    VARCHAR2(30)

    Column datatype

    DATA_LENGTH

    NUMBER

    Column length (in bytes)

    DATA_PRECISION

    NUMBER

    Decimal precision for NUMBER datatype; binary precision for FLOAT datatype; NULL for all other datatypes

    DATA_SCALE

    NUMBER

    Digits to the right of a decimal point in a number

    NULLABLE

    CHAR(1)

    Nulls allowed (Y |N)?
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 112 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_QUEUE_TABLES

ALL_QUEUE_TABLES describes the queues in the queue tables accessible to the current user.

Related Views

  • DBA_QUEUE_TABLES describes the queues in all queue tables in the database.
  • USER_QUEUE_TABLES describes the queues in the queue tables created in the current user's schema. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Schema of the queue table

    QUEUE_TABLE

    VARCHAR2(30)

    Name of the queue table

    TYPE

    VARCHAR2(7)

    Type of user data:

    • RAW - Raw type
    • OBJECT - User-defined object type
    • VARIANT - Variant type (internal use only)

    OBJECT_TYPE

    VARCHAR2(61)

    Object type of the payload when TYPE is OBJECT

    SORT_ORDER

    VARCHAR2(22)

    User-specified sort order

    RECIPIENTS

    VARCHAR2(8)

    SINGLE or MULTIPLE recipients

    MESSAGE_GROUPING

    VARCHAR2(13)

    NONE or TRANSACTIONAL

    COMPATIBLE

    VARCHAR2(5)

    Lowest release level which the queue table is compatible with (for example, 8.0.3)

    PRIMARY_INSTANCE

    NUMBER

    Indicates the instance number of the instance which is the primary owner of the queue table. A value of 0 indicates that there is no primary owner.

    SECONDARY_INSTANCE

    NUMBER

    Indicates the instance number of the instance which is the secondary owner of the queue table. This instance becomes the owner of the queue table if the primary owner is not alive. A value of 0 indicates that there is no secondary owner.

    OWNER_INSTANCE

    NUMBER

    Instance number of the instance which currently owns the queue table

    USER_COMMENT

    VARCHAR2(50)

    Comment supplied by the user

    SECURE

    VARCHAR2(3)

    Indicates whether the queue table is secure (YES) or not (NO)
    See Also:
    • "DBA_QUEUE_TABLES"
    • "USER_QUEUE_TABLES"
    • Oracle9i Application Developer's Guide - Advanced Queuing for more information about these views and Advanced Queuing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 113 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_QUEUES

ALL_QUEUES describes all queues on which the current user has enqueue or dequeue privileges. If the user has any Advanced Queuing system privileges, like MANAGE ANY QUEUE, ENQUEUE ANY QUEUE or DEQUEUE ANY QUEUE, then this view describes all queues in the database.

Related Views

  • DBA_QUEUES describes all queues in the database.
  • USER_QUEUES describes the operational characteristics of every queue owned by the current user. This view does not display the OWNER column.

    See Also:

    Oracle9i Application Developer's Guide - Advanced Queuing for more information about these views and Advanced Queuing
    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the queue

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the queue

    QUEUE_TABLE

    VARCHAR2(30)

    NOT NULL

    Name of the table the queue data resides in

    QID

    NUMBER

    NOT NULL

    Object number of the queue

    QUEUE_TYPE

    VARCHAR2(15)

    Type of the queue

    MAX_RETRIES

    NUMBER

    Maximum number of retries allowed when dequeuing from the queue

    RETRY_DELAY

    NUMBER

    Time interval between retries

    ENQUEUE_ENABLED

    VARCHAR2(7)

    Queue is enabled for enqueue

    DEQUEUE_ENABLED

    VARCHAR2(7)

    Queue is enabled for dequeue

    RETENTION

    VARCHAR2(40)

    Time interval processed messages retained in the queue

    USER_COMMENT

    VARCHAR2(50)

    User specified comment
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 114 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_REFRESH

ALL_REFRESH describes all the refresh groups accessible to the current user.

Related Views

  • DBA_REFRESH describes all refresh groups in the database.
  • USER_REFRESH describes all refresh groups owned by the current user.

    Column Datatype NULL Description

    ROWNER

    VARCHAR2(30)

    NOT NULL

    Name of the owner of the refresh group

    RNAME

    VARCHAR2(30)

    NOT NULL

    Name of the refresh group

    REFGROUP

    NUMBER

    Internal identifier of refresh group

    IMPLICIT_DESTROY

    VARCHAR2(1)

    (Y |N) If Y, then destroy the refresh group when its last item is subtracted

    PUSH_DEFERRED_RPC

    VARCHAR2(1)

    (Y |N) If Y then push changes from snapshot to master before refresh

    REFRESH_AFTER
    _ERRORS

    VARCHAR2(1)

    If Y, proceed with refresh despite error when pushing deferred RPCs

    ROLLBACK_SEG

    VARCHAR2(30)

    Name of the rollback segment to use while refreshing

    JOB

    NUMBER

    Identifier of job used to refresh the group automatically

    NEXT_DATE

    DATE

    Date that this job will next be refreshed automatically, if not broken

    INTERVAL

    VARCHAR2(200)

    A date function used to compute the next NEXT_DATE

    BROKEN

    VARCHAR2(1)

    (Y |N) Y means the job is broken and will never be run

    PURGE_OPTION

    NUMBER(38)

    The method for purging the transaction queue after each push. 1 indicates quick purge option; 2 indicates precise purge option

    PARALLELISM

    NUMBER(38)

    The level of parallelism for transaction propagation

    HEAP_SIZE

    NUMBER(38)

    The size of the heap
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 115 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_REFRESH_CHILDREN

ALL_REFRESH_CHILDREN lists all the objects in refresh groups that are accessible to the current user.

Related Views

  • DBA_REFRESH_CHILDREN describes the objects in all refresh groups in the database.
  • USER_REFRESH_CHILDREN describes the objects in all refresh groups owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object in the refresh group

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object in the refresh group

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    TYPE

    VARCHAR2(30)

    Type of the object in the refresh group

    ROWNER

    VARCHAR2(30)

    NOT NULL

    Name of the owner of the refresh group

    RNAME

    VARCHAR2(30)

    NOT NULL

    Name of the refresh group

    REFGROUP

    NUMBER

    Internal identifier of refresh group

    IMPLICIT_DESTROY

    VARCHAR2(1)

    (Y| N) If Y, then destroy the refresh group when its last item is subtracted

    PUSH_DEFERRED_RPC

    VARCHAR2(1)

    (Y |N) If Y then push changes from snapshot to master before refresh

    REFRESH_AFTER
    _ERRORS

    VARCHAR2(1)

    If Y, proceed with refresh despite error when pushing deferred RPCs

    ROLLBACK_SEG

    VARCHAR2(30)

    Name of the rollback segment to use while refreshing

    JOB

    NUMBER

    Identifier of job used to refresh the group automatically

    NEXT_DATE

    DATE

    Date that this job will next be refreshed automatically, if not broken

    INTERVAL

    VARCHAR2(200)

    A date function used to compute the next NEXT_DATE

    BROKEN

    VARCHAR2(1)

    (Y |N) Y means the job is broken and will never be run

    PURGE_OPTION

    NUMBER(38)

    The method for purging the transaction queue after each push. 1 indicates quick purge option; 2 indicates precise purge option

    PARALLELISM

    NUMBER(38)

    The level of parallelism for transaction propagation

    HEAP_SIZE

    NUMBER(38)

    The size of the heap
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 116 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_REFRESH_DEPENDENCIES

ALL_REFRESH_DEPENDENCIES lists the names of the dependent detail or container tables of all the summaries or materialized views in the current schema.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the table
TABLE_NAME | VARCHAR2(30) | NOT NULL | Table name, unique within this schema
PARENT_OBJECT_TYPE | CHAR(7) |  | MVIEW or SUMMARY
OLDEST_REFRESH_SCN | NUMBER |  | The minimum SCN of any summary or materialized view that has TABLE_NAME as a detail table
OLDEST_REFRESH_DATE | DATE |  | SYSDATE when last refreshed
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 117 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_REFS

ALL_REFS describes the REF columns and REF attributes in object type columns accessible to the current user.

Related Views

  • DBA_REFS describes all REF columns and REF attributes in the database.
  • USER_REFS describes the REF columns and REF attributes in object type columns owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Name of the owner

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table

    COLUMN_NAME

    VARCHAR2(4000)

    Name of the REF column or attribute. If it is not a top-level attribute, the value of COLUMN_NAME should be a path name starting with the column name

    WITH_ROWID

    VARCHAR2(3)

    Whether the REF value is stored with ROWID (YES|NO)?

    IS_SCOPED

    VARCHAR2(3)

    Whether the REF column is scoped (YES| NO)?

    SCOPE_TABLE_OWNER

    VARCHAR2(30)

    Name of the owner of the scope table, if it exists and is accessible by the user

    SCOPE_TABLE_NAME

    VARCHAR2(30)

    Name of the scope table, if it exists and is accessible by the user

    OBJECT_ID_TYPE

    VARCHAR2(16)

    If user-defined OID, then USER-DEFINED, else if system generated OID, then SYSTEM GENERATED
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 118 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_REGISTERED_MVIEWS

ALL_REGISTERED_MVIEWS describes all registered materialized views (registered at a master site or a master materialized view site) accessible to the current user.

Related Views

  • DBA_REGISTERED_MVIEWS describes all registered materialized views in the database.
  • USER_REGISTERED_MVIEWS describes all registered materialized views owned by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the materialized view

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the materialized view

    MVIEW_SITE

    VARCHAR2(128)

    NOT NULL

    Global name of the materialized view site

    CAN_USE_LOG

    VARCHAR2(3)

    YES if the materialized view can use a materialized view log, NO if the materialized view is too complex to use a log.

    UPDATABLE

    VARCHAR2(3)

    (YES/NO) Indicates whether the materialized view is updatable. If set to NO, then the materialized view is read only.

    REFRESH_METHOD

    VARCHAR2(11)

    Whether the materialized view uses primary key, rowids, or object identifiers for fast refresh

    MVIEW_ID

    NUMBER(38)

    Identifier for the materialized view used by the masters for fast refresh

    VERSION

    VARCHAR2(26)

    Oracle version of the materialized view

    Note: Oracle9i materialized views show ORACLE 8 MATERIALIZED VIEW.

    QUERY_TXT

    LONG

    Query that defines the materialized view
    See Also:
    • "DBA_REGISTERED_MVIEWS"
    • "USER_REGISTERED_MVIEWS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 119 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_REGISTRY_BANNERS

ALL_REGISTRY_BANNERS displays the valid components loaded into the database.

Column | Datatype | NULL | Description
BANNER | VARCHAR2(80) |  | Component display banner
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 120 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_RULE_SET_RULES

ALL_RULE_SET_RULES describes the rules in the rule sets accessible to the current user.

Related Views

  • DBA_RULE_SET_RULES describes the rules in all rule sets in the database.
  • USER_RULE_SET_RULES describes the rules in the rule sets owned by the current user. This view does not display the RULE_SET_OWNER column.

    Column Datatype NULL Description

    RULE_SET_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the rule set

    RULE_SET_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the rule set

    RULE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the rule

    RULE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the rule

    RULE_SET_RULE_ENABLED

    VARCHAR2(8)

    Indicates whether the rule is enabled in the rule set (ENABLED) or not (DISABLED)

    RULE_SET_RULE_EVAL_CTX_OWNER

    VARCHAR2(30)

    Owner of the evaluation context specified when the rule was added to the rule set, if any

    RULE_SET_RULE_EVAL_CTX_NAME

    VARCHAR2(30)

    Name of the evaluation context specified when the rule was added to the rule set, if any

    RULE_SET_RULE_COMMENT

    VARCHAR2(4000)

    Comment specified when the rule was added to the rule set, if any
    See Also:
    • "DBA_RULE_SET_RULES"
    • "USER_RULE_SET_RULES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 121 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_RULE_SETS

ALL_RULE_SETS describes the rule sets accessible to the current user.

Related Views

  • DBA_RULE_SETS describes all rule sets in the database.
  • USER_RULE_SETS describes the rule sets owned by the current user. This view does not display the RULE_SET_OWNER column.

    Column Datatype NULL Description

    RULE_SET_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the rule set

    RULE_SET_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the rule set

    RULE_SET_EVAL_CONTEXT_OWNER

    VARCHAR2(30)

    Owner of the evaluation context associated with the rule set, if any

    RULE_SET_EVAL_CONTEXT_NAME

    VARCHAR2(30)

    Name of the evaluation context associated with the rule set, if any

    RULE_SET_COMMENT

    VARCHAR2(4000)

    Comment specified with the rule set, if any
    See Also:
    • "DBA_RULE_SETS"
    • "USER_RULE_SETS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 122 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_RULES

ALL_RULES describes the rules accessible to the current user.

Related Views

  • DBA_RULES describes all rules in the database.
  • USER_RULES describes the rules owned by the current user. This view does not display the RULE_OWNER column.

    Column Datatype NULL Description

    RULE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the rule

    RULE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the rule

    RULE_CONDITION

    CLOB

    Expressions and operators that constitute the rule condition

    RULE_EVALUATION_CONTEXT_OWNER

    VARCHAR2(30)

    Owner of the evaluation context associated with the rule, if any

    RULE_EVALUATION_CONTEXT_NAME

    VARCHAR2(30)

    Name of the evaluation context associated with the rule, if any

    RULE_ACTION_CONTEXT

    RE$NV_LIST

    Action context associated with the rule, if any

    RULE_COMMENT

    VARCHAR2(4000)

    Comment specified with the rule, if any
    See Also:
    • "DBA_RULES"
    • "USER_RULES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 123 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SEQUENCES

ALL_SEQUENCES describes all sequences accessible to the current user.

Related Views

  • DBA_SEQUENCES describes all sequences in the database.
  • USER_SEQUENCES describes all sequences owned by the current user. This view does not display the SEQUENCE_OWNER column.

    Column Datatype NULL Description

    SEQUENCE_OWNER

    VARCHAR2(30)

    NOT NULL

    Name of the owner of the sequence

    SEQUENCE_NAME

    VARCHAR2(30)

    NOT NULL

    Sequence name

    MIN_VALUE

    NUMBER

    Minimum value of the sequence

    MAX_VALUE

    NUMBER

    Maximum value of the sequence

    INCREMENT_BY

    NUMBER

    NOT NULL

    Value by which sequence is incremented

    CYCLE_FLAG

    VARCHAR2(1)

    Does sequence wrap around on reaching limit

    ORDER_FLAG

    VARCHAR2(1)

    Are sequence numbers generated in order

    CACHE_SIZE

    NUMBER

    NOT NULL

    Number of sequence numbers to cache

    LAST_NUMBER

    NUMBER

    NOT NULL

    Last sequence number written to disk. If a sequence uses caching, the number written to disk is the last number placed in the sequence cache. This number is likely to be greater than the last sequence number that was used.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 124 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SOURCE

ALL_SOURCE describes the text source of the stored objects accessible to the current user.

Related Views

  • DBA_SOURCE describes the text source of all stored objects in the database.
  • USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    TYPE

    VARCHAR2(12)

    Type of object: FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY

    LINE

    NUMBER

    NOT NULL

    Line number of this line of source

    TEXT

    VARCHAR2(4000)

    Text source of the stored object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 125 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SOURCE_TABLES

ALL_SOURCE_TABLES enables publishers to see all existing source tables.

Related Views

  • DBA_SOURCE_TABLES describes all existing source tables.
  • USER_SOURCE_TABLES describes all existing source tables to which the user has subscribe privileges.

    Column Datatype Description

    SOURCE_SCHEMA_NAME

    VARCHAR2(30)

    The table owner in the source system

    SOURCE_TABLE_NAME

    VARCHAR2(31)

    The table name in the source system
    See Also:
    • "DBA_SOURCE_TABLES"
    • "USER_SOURCE_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 126 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SQLJ_TYPE_ATTRS

ALL_SQLJ_TYPE_ATTRS describes the attributes of the SQLJ object types accessible to the current user.

Related Views

  • DBA_SQLJ_TYPE_ATTRS describes the attributes of all SQLJ object types in the database.
  • USER_SQLJ_TYPE_ATTRS describes the attributes of the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    ATTR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the attribute

    EXTERNAL_ATTR_NAME

    VARCHAR2(4000)

    External name of the attribute

    ATTR_TYPE_MOD

    VARCHAR2(7)

    Type modifier of the attribute

    ATTR_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type of the attribute

    ATTR_TYPE_NAME

    VARCHAR2(30)

    Name of the type of the attribute

    LENGTH

    NUMBER

    Length of the CHAR attribute, or maximum length of the VARCHAR or VARCHAR2 attribute.

    PRECISION

    NUMBER

    Decimal precision of the NUMBER or DECIMAL attribute, or binary precision of the FLOAT attribute.

    SCALE

    NUMBER

    Scale of the NUMBER or DECIMAL attribute

    CHARACTER_SET
    _NAME

    VARCHAR2(44)

    Character set name of the attribute (CHAR_CS or NCHAR_CS)

    ATTR_NO

    NUMBER

    NOT NULL

    Syntactical order number or position of the attribute as specified in the type specification or CREATE TYPE statement (not to be used as an ID number)

    INHERITED

    VARCHAR2(3)

    Indicates whether the attribute is inherited from a supertype (YES) or not (NO)
    See Also:
    • "DBA_SQLJ_TYPE_ATTRS"
    • "USER_SQLJ_TYPE_ATTRS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 127 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SQLJ_TYPE_METHODS

ALL_SQLJ_TYPE_METHODS describes the methods of the SQLJ object types accessible to the current user.

Related Views

  • DBA_SQLJ_TYPE_METHODS describes the methods of all SQLJ object types in the database.
  • USER_SQLJ_TYPE_METHODS describes the methods of the SQLJ object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    METHOD_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the method

    EXTERNAL_VAR_NAME

    VARCHAR2(4000)

    Name of the external variable

    METHOD_NO

    NUMBER

    NOT NULL

    Method number that distinguishes overloaded method (not to be used as an ID number)

    METHOD_TYPE

    VARCHAR2(6)

    Type of the method

    PARAMETERS

    NUMBER

    NOT NULL

    Number of parameters to the method

    RESULTS

    NUMBER

    NOT NULL

    Number of results returned by the method

    FINAL

    VARCHAR2(3)

    Indicates whether the method is final (YES) or not (NO)

    INSTANTIABLE

    VARCHAR2(3)

    Indicates whether the method is instantiable (YES) or not (NO)

    OVERRIDING

    VARCHAR2(3)

    Indicates whether the method is overriding a supertype method (YES) or not (NO)

    INHERITED

    VARCHAR2(3)

    Indicates whether the method is inherited from a supertype (YES) or not (NO)
    See Also:
    • "DBA_SQLJ_TYPE_METHODS"
    • "USER_SQLJ_TYPE_METHODS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 128 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SQLJ_TYPES

ALL_SQLJ_TYPES describes the SQLJ object types accessible to the current user.

Related Views

  • DBA_SQLJ_TYPES describes all SQLJ object types in the database.
  • USER_SQLJ_TYPES describes the SQLJ object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    TYPE_OID

    RAW(16)

    NOT NULL

    Object identifier (OID) of the type

    EXTERNAL_NAME

    VARCHAR2(4000)

    External class name of the type

    USING

    VARCHAR2(21)

    Representation of the type

    TYPECODE

    VARCHAR2(30)

    Typecode of the type

    ATTRIBUTES

    NUMBER

    Number of attributes (if any) in the type

    METHODS

    NUMBER

    Number of methods (if any) in the type

    PREDEFINED

    VARCHAR2(3)

    Indicates whether the type is a predefined type (YES) or not (NO)

    INCOMPLETE

    VARCHAR2(3)

    Indicates whether the type is an incomplete type (YES) or not (NO)

    FINAL

    VARCHAR2(3)

    Indicates whether the type is a final type (YES) or not (NO)

    INSTANTIABLE

    VARCHAR2(3)

    Indicates whether the type is an instantiable type (YES) or not (NO)

    SUPERTYPE_OWNER

    VARCHAR2(30)

    Owner of the supertype (NULL if type is not a subtype)

    SUPERTYPE_NAME

    VARCHAR2(30)

    Name of the supertype (NULL if type is not a subtype)

    LOCAL_ATTRIBUTES

    NUMBER

    Number of local (not inherited) attributes (if any) in the subtype

    LOCAL_METHODS

    NUMBER

    Number of local (not inherited) methods (if any) in the subtype
    See Also:
    • "DBA_SQLJ_TYPES"
    • "USER_SQLJ_TYPES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 129 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_STORED_SETTINGS

ALL_STORED_SETTINGS provides information about the persistent parameter settings for stored PL/SQL units for which the current user has execute privileges.

Related Views

  • DBA_STORED_SETTINGS lists information about the persistent parameter settings for stored PL/SQL units for which the current user has execute privileges. It also returns parameter information for all objects in the database and is accessible only to users with the SELECT_CATALOG_ROLE privilege.
  • USER_STORED_SETTINGS lists information about the persistent parameter settings for stored PL/SQL units, but only shows information about PL/SQL units owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Name of the database user owning the stored PL/SQL unit

    OBJECT_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the PL/SQL unit

    OBJECT_ID

    NUMBER

    NOT NULL

    Object number of the PL/SQL unit

    OBJECT_TYPE

    VARCHAR2(12)

    The type of PL/SQL unit: PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY, TRIGGER, TYPE, or TYPE BODY

    PARAM_NAME

    VARCHAR2(30)

    The name of the parameter stored persistently with the PL/SQL unit

    PARAM_VALUE

    VARCHAR2(4000)

    The TO_CHAR() representation of the value of the persistently stored parameter. The width of this column is operating system dependent; however, it is never less than 255.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 130 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_STREAMS_GLOBAL_RULES

ALL_STREAMS_GLOBAL_RULES displays information about the following types of rules:

  • Global rules created for the Streams capture processes that enqueue the captured changes into queues accessible to the current user
  • Global rules created for the Streams propagations that have a source queue accessible to the current user
  • Global rules created for the Streams apply processes that dequeue events from queues accessible to the current user

This view only contains information about rules created using the ADD_GLOBAL_RULES or ADD_GLOBAL_PROPAGATION_RULES procedures in the DBMS_STREAMS_ADM package. It does not contain information about rules created using the DBMS_RULE_ADM package.

Related View

DBA_STREAMS_GLOBAL_RULES displays information about the global rules created for all Streams capture processes, propagations, and apply processes in the database.

Column Datatype NULL Description

STREAMS_NAME

VARCHAR2(30)

Name of the Streams process or propagation

STREAMS_TYPE

VARCHAR2(11)

Type of the Streams process or propagation:

  • CAPTURE
  • PROPAGATION
  • APPLY

RULE_TYPE

VARCHAR2(7)

Type of rule (DML or DDL)

INCLUDE_TAGGED_LCR

VARCHAR2(3)

Indicates whether a redo entry or logical change record (LCR) with a non-null tag is considered for capture, propagation, or apply (YES) or not (NO)

SOURCE_DATABASE

VARCHAR2(128)

Source database in the rule condition. The rule evaluates to true for a redo entry or logical change record (LCR) only if the redo entry or LCR contains this source database.

RULE_NAME

VARCHAR2(30)

Name of the rule

RULE_OWNER

VARCHAR2(30)

Owner of the rule

RULE_CONDITION

VARCHAR2(4000)

First 4000 bytes of the system-generated rule condition evaluated by the rules engine
See Also:

"DBA_STREAMS_GLOBAL_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 131 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_STREAMS_SCHEMA_RULES

ALL_STREAMS_SCHEMA_RULES displays information about the following types of rules:

  • Schema rules created for the Streams capture processes that enqueue the captured changes into queues accessible to the current user
  • Schema rules created for the Streams propagations that have a source queue accessible to the current user
  • Schema rules created for the Streams apply processes that dequeue events from queues accessible to the current user

This view only contains information about rules created using the ADD_SCHEMA_RULES or ADD_SCHEMA_PROPAGATION_RULES procedures in the DBMS_STREAMS_ADM package. It does not contain information about rules created using the DBMS_RULE_ADM package.

Related View

DBA_STREAMS_SCHEMA_RULES displays information about the schema rules created for all Streams capture processes, propagations, and apply processes in the database.

Column Datatype NULL Description

STREAMS_NAME

VARCHAR2(30)

Name of the Streams process or propagation

STREAMS_TYPE

VARCHAR2(11)

Type of the Streams process or propagation:

  • CAPTURE
  • PROPAGATION
  • APPLY

SCHEMA_NAME

VARCHAR2(30)

Schema name in the rule condition. The rule evaluates to true for a redo entry or logical change record (LCR) only if the redo entry or LCR contains this schema name.

RULE_TYPE

VARCHAR2(7)

Type of rule (DML or DDL)

INCLUDE_TAGGED_LCR

VARCHAR2(3)

Indicates whether a redo entry or logical change record (LCR) with a non-null tag is considered for capture, propagation, or apply (YES) or not (NO)

SOURCE_DATABASE

VARCHAR2(128)

Source database in the rule condition. The rule evaluates to true for a redo entry or logical change record (LCR) only if the redo entry or LCR contains this source database.

RULE_NAME

VARCHAR2(30)

Name of the rule

RULE_OWNER

VARCHAR2(30)

Owner of the rule

RULE_CONDITION

VARCHAR2(4000)

First 4000 bytes of the system-generated rule condition evaluated by the rules engine
See Also:

"DBA_STREAMS_SCHEMA_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 132 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_STREAMS_TABLE_RULES

ALL_STREAMS_TABLE_RULES displays information about the following types of rules:

  • Table rules created for the Streams capture processes that enqueue the captured changes into queues accessible to the current user
  • Table rules created for the Streams propagations that have a source queue accessible to the current user
  • Table rules created for the Streams apply processes that dequeue events from queues accessible to the current user
  • Subset rules created for the Streams apply processes that have a source queue accessible to the current user

This view only contains information about rules created using the ADD_TABLE_RULES, ADD_TABLE_PROPAGATION_RULES, or ADD_SUBSET_RULES procedures in the DBMS_STREAMS_ADM package. It does not contain information about rules created using the DBMS_RULE_ADM package.

Related View

DBA_STREAMS_TABLE_RULES displays information about the table rules created for all Streams capture processes, propagations, and apply processes in the database.

Column Datatype NULL Description

STREAMS_NAME

VARCHAR2(30)

Name of the Streams process or propagation

STREAMS_TYPE

VARCHAR2(11)

Type of the Streams process or propagation:

  • CAPTURE
  • PROPAGATION
  • APPLY

TABLE_OWNER

VARCHAR2(30)

Table owner in the rule condition. The rule evaluates to true for a redo entry or logical change record (LCR) only if the redo entry or LCR contains this table owner.

TABLE_NAME

VARCHAR2(30)

Table name in the rule condition. The rule evaluates to true for a redo entry or logical change record (LCR) only if the redo entry or LCR contains this table name.

RULE_TYPE

VARCHAR2(7)

Type of rule (DML or DDL)

DML_CONDITION

VARCHAR2(4000)

Row subsetting condition, if the rule is a subset rule

SUBSETTING_OPERATION

VARCHAR2(6)

DML operation for row subsetting in the rule condition, if the rule is a subset rule:

  • INSERT
  • UPDATE
  • DELETE

The rule evaluates to true for a logical change record (LCR) only if the LCR contains this command type after internal transformation.

INCLUDE_TAGGED_LCR

VARCHAR2(3)

Indicates whether a redo entry or logical change record (LCR) with a non-null tag is considered for capture, propagation, or apply (YES) or not (NO)

SOURCE_DATABASE

VARCHAR2(128)

Source database in the rule condition. The rule evaluates to true for a redo entry or logical change record (LCR) only if the redo entry or LCR contains this source database.

RULE_NAME

VARCHAR2(30)

Name of the rule

RULE_OWNER

VARCHAR2(30)

Owner of the rule

RULE_CONDITION

VARCHAR2(4000)

First 4000 bytes of the system-generated rule condition evaluated by the rules engine
See Also:

"DBA_STREAMS_TABLE_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 133 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBPART_COL_STATISTICS

ALL_SUBPART_COL_STATISTICS describes column statistics and histogram information for subpartitions of partitioned objects accessible to the current user.

Related Views

  • DBA_SUBPART_COL_STATISTICS provides this information for all subpartitions in the database.
  • USER_SUBPART_COL_STATISTICS provides this information for subpartitions of all partitioned objects owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner name

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table name

    SUBPARTITION_NAME

    VARCHAR2(30)

    Table subpartition name

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Column name

    NUM_DISTINCT

    NUMBER

    Number of distinct values in the column

    LOW_VALUE

    RAW(32)

    Low value in the column

    HIGH_VALUE

    RAW(32)

    High value in the column

    DENSITY

    NUMBER

    Density of the column

    NUM_NULLS

    NUMBER

    Number of nulls in the column

    NUM_BUCKETS

    NUMBER

    Number of buckets in histogram for the column

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this column

    LAST_ANALYZED

    DATE

    Date on which this column was most recently analyzed

    GLOBAL_STATS

    VARCHAR2(3)

    Indicates whether column statistics for the subpartition were collected by analyzing the table as a whole (YES) or estimated from statistics gathered on partitions and subpartitions (NO).

    USER_STATS

    VARCHAR2(3)

    Were the statistics entered directly by the user?

    AVG_COL_LEN

    NUMBER

    The average length of the column, in bytes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 134 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBPART_HISTOGRAMS

ALL_SUBPART_HISTOGRAMS lists the actual histogram data (end-points per histogram) for histograms on table subpartitions accessible to the current user.

Related Views

  • DBA_SUBPART_HISTOGRAMS provides this information for all subpartitions in the database.
  • USER_SUBPART_HISTOGRAMS provides this information for subpartitions of all partitioned objects owned by the current user. This view does not display the OWNER column.

    Note:

    These views are populated only if you called statistics on the index using the ANALYZE statement or the DBMS_STATS package.
    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner name

    TABLE_NAME

    VARCHAR2(30)

    Table name

    SUBPARTITION_NAME

    VARCHAR2(30)

    Table subpartition name

    COLUMN_NAME

    VARCHAR2(30)

    Column name

    BUCKET_NUMBER

    NUMBER

    Bucket number

    ENDPOINT_VALUE

    NUMBER

    Normalized endpoint values for this bucket

    ENDPOINT_ACTUAL_VALUE

    VARCHAR2(1000)

    Actual (not normalized) string value of the endpoint for this bucket
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 135 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBPART_KEY_COLUMNS

ALL_SUBPART_KEY_COLUMNS lists subpartitioning key columns for composite-partitioned tables (and local indexes on composite-partitioned tables) accessible to the current user.

Related Views

  • DBA_SUBPART_KEY_COLUMNS provides this information for all subpartitions in the database.
  • USER_SUBPART_KEY_COLUMNS provides this information for subpartitions of all partitioned objects owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    The partitioned table or index owner

    NAME

    VARCHAR2(30)

    The partitioned table or index name

    OBJECT_TYPE

    VARCHAR2(11)

    The object type (TABLE or INDEX)

    COLUMN_NAME

    VARCHAR2(30)

    The column name

    COLUMN_POSITION

    NUMBER

    The position of the column within the subpartitioning key
    See Also:
    • "DBA_SUBPART_KEY_COLUMNS"
    • "USER_SUBPART_KEY_COLUMNS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 136 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBPARTITION_TEMPLATES

ALL_SUBPARTITION_TEMPLATES describes the subpartition templates accessible to the current user.

Related Views

  • DBA_SUBPARTITION_TEMPLATES describes all subpartition templates in the database.
  • USER_SUBPARTITION_TEMPLATES describes the subpartition templates owned by the current user. This view does not display the USER_NAME column.

    Column Datatype NULL Description

    USER_NAME

    VARCHAR2(30)

    NOT NULL

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the table

    SUBPARTITION_NAME

    VARCHAR2(34)

    NOT NULL

    Name of the subpartition

    SUBPARTITION_POSITION

    NUMBER

    Position of the subpartition

    TABLESPACE_NAME

    VARCHAR2(30)

    Tablespace name of the subpartition

    HIGH_BOUND

    LONG

    Literal list values of the subpartition
    See Also:
    • "DBA_SUBPARTITION_TEMPLATES"
    • "USER_SUBPARTITION_TEMPLATES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 137 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBSCRIBED_COLUMNS

ALL_SUBSCRIBED_COLUMNS enables publishers to view the columns of published tables to which they have subscribed.

Related Views

  • DBA_SUBSCRIBED_COLUMNS enables publishers to view the columns of published tables to which they have subscribed. You must have the SELECT_CATALOG_ROLE privilege to access this view.
  • USER_SUBSCRIBED_COLUMNS enables publishers to view the columns of published tables to which they have subscribed.

    Column Datatype Description

    HANDLE

    NUMBER

    The subscription handle

    SOURCE_SCHEMA_NAME

    VARCHAR2(30)

    The source table schema identifier

    SOURCE_TABLE_NAME

    VARCHAR2(31)

    The source table identifier

    COLUMN_NAME

    VARCHAR2(30)

    The source table column identifier
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 138 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBSCRIBED_TABLES

ALL_SUBSCRIBED_TABLES enables subscribers to view all published tables to which they have subscribed.

Related Views

  • DBA_SUBSCRIBED_TABLES enables publishers to view all published tables to which they have subscribed.
  • USER_SUBSCRIBED_TABLES enables subscribers to view all published tables to which they have subscribed.

    Column Datatype Description

    HANDLE

    NUMBER

    The subscription handle

    SOURCE_SCHEMA_NAME

    VARCHAR2(30)

    The source table schema identifier

    SOURCE_TABLE_NAME

    VARCHAR2(31)

    The source table identifier

    VIEW_NAME

    VARCHAR2(30)

    Holds the generated view name so that change data capture can drop the view when necessary

    CHANGE_SET_NAME

    VARCHAR2(30)

    The name of the change set to which the change table belongs
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 139 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUBSCRIPTIONS

ALL_SUBSCRIPTIONS enables subscribers to view all subscriptions. Neither ALL_SUBSCRIPTIONS nor USER_SUBSCRIPTIONS contains the USERNAME column.

Related Views

  • DBA_SUBSCRIPTIONS enables publishers to view all subscriptions. You must have the SELECT_CATALOG_ROLE privilege to access this view. DBA_SUBSCRIPTIONS contains the USERNAME column, which lists the user name of the subscriber.
  • USER_SUBSCRIPTIONS enables subscribers to view all of their subscriptions.

    Column Datatype Description

    HANDLE

    NUMBER

    The subscription handler

    SET_NAME

    VARCHAR2(30)

    The change set identifier

    CREATED

    DATE

    Subscription creation date

    STATUS

    VARCHAR2(1)

    N indicates not yet active, A indicates is currently active

    EARLIEST_SCN

    NUMBER

    Starting point for the select/view

    LATEST_SCN

    NUMBER

    The ending point for the select/view

    DESCRIPTION

    VARCHAR2(30)

    A comment field for the subscriber

    LAST_PURGED

    DATE

    The last time the subscriber called the PURGE_WINDOW for this subscription

    LAST_EXTENDED

    DATE

    The last time the subscriber called the EXTEND_WINDOW for this subscription
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 140 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SUMDELTA

ALL_SUMDELTA lists direct path load entries accessible to the current user.

Column | Datatype | NULL | Description
TABLEOBJ# | NUMBER | NOT NULL | Object number of the table
PARTITIONOBJ# | NUMBER | NOT NULL | Object number of table partitions (if the table is partitioned)
DMLOPERATION | VARCHAR2(1) |  | Type of DML operation applied to the table
SCN | NUMBER | NOT NULL | SCN when the bulk DML occurred
TIMESTAMP | DATE | NOT NULL | Timestamp of log entry
LOWROWID | ROWID | NOT NULL | The start ROWID in the loaded rowid range
HIGHROWID | ROWID | NOT NULL | The end ROWID in the loaded rowid range
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 141 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_SYNONYMS

ALL_SYNONYMS describes all synonyms accessible to the current user.

Related Views

  • DBA_SYNONYMS describes all synonyms in the database.
  • USER_SYNONYMS describes all synonyms owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the synonym

    SYNONYM_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the synonym

    TABLE_OWNER

    VARCHAR2(30)

    Owner of the object referenced by the synonym

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object referenced by the synonym

    DB_LINK

    VARCHAR2(128)

    Name of the database link referenced, if any
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 142 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_COL_STATISTICS

ALL_TAB_COL_STATISTICS provides column statistics and histogram information extracted from "ALL_TAB_COLUMNS" .

Related Views

  • DBA_TAB_COL_STATISTICS provides such information extracted from "DBA_TAB_COLUMNS" .
  • USER_TAB_COL_STATISTICS provides such information extracted from "USER_TAB_COLUMNS" .

    Column Datatype NULL Description

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table name

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Column name

    NUM_DISTINCT

    NUMBER

    Number of distinct values in the column

    LOW_VALUE

    RAW(32)

    Low value in the column

    HIGH_VALUE

    RAW(32)

    High value in the column

    DENSITY

    NUMBER

    Density of the column

    NUM_NULLS

    NUMBER

    Number of nulls in the column

    NUM_BUCKETS

    NUMBER

    Number of buckets in histogram for the column

    LAST_ANALYZED

    DATE

    Date on which this column was most recently analyzed

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this 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)

    Were the statistics entered directly by the user?

    AVG_COL_LEN

    NUMBER

    The average length of the column, in bytes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 143 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

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 SQL ANALYZE 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 the OWNER 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(30)

    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 for FLOAT datatype, null for all other datatypes

    DATA_SCALE

    NUMBER

    Digits to right of decimal point in a number

    NULLABLE

    VARCHAR2(1)

    Specifies whether a column allows 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

    NUMBER

    NOT NULL

    Sequence number of the column as created

    DEFAULT_LENGTH

    NUMBER

    Length of default value for the column

    DATA_DEFAULT

    LONG

    Default value for the column

    NUM_DISTINCT

    NUMBER

    These columns remain for backward compatibility with Oracle7. This information is now in the {TAB|PART}_COL_STATISTICS views. This view now picks up these values from HIST_HEAD$ rather than COL$.

    LOW_VALUE

    RAW(32)

    HIGH_VALUE

    RAW(32)

    DENSITY

    NUMBER

    NUM_NULLS

    NUMBER

    Number of nulls in the column

    NUM_BUCKETS

    NUMBER

    The number of buckets in histogram for the column

    Note: The number of buckets in a histogram is specified in the SIZE parameter of the SQL statement ANALYZE. However, Oracle 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 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

    The date on which this column was most recently analyzed

    SAMPLE_SIZE

    The sample size used in analyzing this column

    CHARACTER_SET_NAME

    VARCHAR2(44)

    The name of the character set: CHAR_CS or NCHAR_CS

    CHAR_COL_DECL_LENGTH

    NUMBER

    The length

    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)

    Were the statistics entered directly by the user?

    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)

    B | C. B indicates that the column uses BYTE length semantics. C indicates that the column uses CHAR length semantics. NULL indicates the datatype is not any of the following:

    • CHAR
    • VARCHAR2
    • NCHAR
    • NVARCHAR2
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 144 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_COMMENTS

ALL_TAB_COMMENTS describes comments on tables and views accessible to the current user.

Related Views

  • DBA_TAB_COMMENTS describes comments on all tables and views in the database.
  • USER_TAB_COMMENTS describes comments on all tables and views owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    TABLE_TYPE

    VARCHAR2(11)

    Type of the object

    COMMENTS

    VARCHAR2(4000)

    Comment on the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 145 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_HISTOGRAMS

ALL_TAB_HISTOGRAMS describes histograms on tables and views accessible to the current user.

Related Views

  • DBA_TAB_HISTOGRAMS describes histograms on all tables and views in the database.
  • USER_TAB_HISTOGRAMS describes histograms on all tables and views owned by the current user. This view does not display the OWNER column.

    Note:

    These views are populated only if you called statistics on the index using the ANALYZE statement or the DBMS_STATS package.
    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of table

    TABLE_NAME

    VARCHAR2(30)

    Name of the table

    COLUMN_NAME

    VARCHAR2(4000)

    Column name or attribute of the object type column

    ENDPOINT_NUMBER

    NUMBER

    Histogram bucket number

    ENDPOINT_VALUE

    NUMBER

    Normalized endpoint value for this bucket

    ENDPOINT_ACTUAL_VALUE

    VARCHAR2(1000)

    Actual (not normalized) string value of the endpoint for this bucket
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 146 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_MODIFICATIONS

ALL_TAB_MODIFICATIONS describes tables accessible to the current user that have been modified since the last time statistics were gathered on the tables.

Related Views

  • DBA_TAB_MODIFICATIONS provides such information for all tables in the database.
  • USER_TAB_MODIFICATIONS provides such information for tables owned by the current user. This view does not display the TABLE_OWNER column.

    Note:

    These views are populated only for tables with the MONITORING attribute. They are intended for statistics collection over a long period of time. For performance reasons, Oracle may not populate these views until a few hours after the actual modifications occurred.
    Column Datatype NULL Description

    TABLE_OWNER

    VARCHAR2(30)

    Owner of the modified table.

    TABLE_NAME

    VARCHAR2(30)

    Name of the modified table

    PARTITION_NAME

    VARCHAR2(30)

    Name of the modified partition

    SUBPARTITION_NAME

    VARCHAR2(30)

    Name of the modified subpartition

    INSERTS

    NUMBER

    Approximate number of inserts since the last time statistics were gathered

    UPDATES

    NUMBER

    Approximate number of updates since the last time statistics were gathered

    DELETES

    NUMBER

    Approximate number of deletes since the last time statistics were gathered

    TIMESTAMP

    DATE

    Indicates the last time the table was modified

    TRUNCATED

    VARCHAR2(3)

    Whether or not the table was truncated since the last time statistics were gathered
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 147 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_PARTITIONS

ALL_TAB_PARTITIONS provides partition-level partitioning information, partition storage parameters, and partition statistics collected by ANALYZE statements for partitions accessible to the current user.

Related Views

  • DBA_TAB_PARTITIONS provides such information for all partitions in the database.
  • USER_TAB_PARTITIONS provides such information for partitions of all partitioned objects owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Table owner

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table name

    COMPOSITE

    VARCHAR2(3)

    YES if the partition belongs to a Local index on a table partitioned using Composite method; NO otherwise

    PARTITION_NAME

    VARCHAR2(30)

    Partition name

    SUBPARTITION_COUNT

    NUMBER

    If this is a Local index on a table partitioned using a Composite method, the number of subpartitions in the partition

    HIGH_VALUE

    LONG

    Partition bound value expression

    HIGH_VALUE_LENGTH

    NUMBER

    NOT NULL

    Length of partition bound value expression

    PARTITION_POSITION

    NUMBER

    NOT NULL

    Position of the partition within the table

    TABLESPACE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the tablespace containing the partition

    PCT_FREE

    NUMBER

    NOT NULL

    Minimum percentage of free space in a block

    PCT_USED

    NUMBER

    NOT NULL

    Minimum percentage of used space in a block

    INI_TRANS

    NUMBER

    NOT NULL

    Initial number of transactions

    MAX_TRANS

    NUMBER

    NOT NULL

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent in bytes

    NEXT_EXTENT

    NUMBER

    Size of secondary extents in bytes

    MIN_EXTENT

    NUMBER

    NOT NULL

    Minimum number of extents allowed in the segment

    MAX_EXTENT

    NUMBER

    NOT NULL

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    NOT NULL

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of process freelists allocated in this segment

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated in this segment

    LOGGING

    VARCHAR2(3)

    Logging attribute of partition

    NUM_ROWS

    NUMBER

    Number of rows in the partition

    BLOCKS

    NUMBER

    Number of used blocks in the partition

    EMPTY_BLOCKS

    NUMBER

    Number of empty (never used) blocks in the partition

    AVG_SPACE

    NUMBER

    Average available free space in the partition

    CHAIN_CNT

    NUMBER

    Number of chained rows in the partition

    AVG_ROW_LEN

    NUMBER

    Average row length, including row overhead

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this partition

    LAST_ANALYZED

    DATE

    Date on which this partition was most recently analyzed

    BUFFER_POOL

    VARCHAR2(7)

    The default buffer pool to be used for the partition blocks

    GLOBAL_STATS

    VARCHAR2(3)

    Indicates whether statistics were collected for the partition as a whole (YES) or were estimated from statistics on underlying subpartitions (NO)

    USER_STATS

    VARCHAR2(3)

    User statistics
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 148 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_PRIVS

ALL_TAB_PRIVS describes the following types of grants:

  • Object grants for which the current user is the object owner, grantor, or grantee
  • Object grants for which an enabled role or PUBLIC is the grantee

Related Views

  • DBA_TAB_PRIVS describes all object grants in the database.
  • USER_TAB_PRIVS describes the object grants for which the current user is the object owner, grantor, or grantee.

    Column Datatype NULL Description

    GRANTOR

    VARCHAR2(30)

    NOT NULL

    Name of the user who performed the grant

    GRANTEE

    VARCHAR2(30)

    NOT NULL

    Name of the user to whom access was granted

    TABLE_SCHEMA

    VARCHAR2(30)

    NOT NULL

    Schema of the object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the object

    PRIVILEGE

    VARCHAR2(40)

    NOT NULL

    Privilege on the object

    GRANTABLE

    VARCHAR2(3)

    Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)

    HIERARCHY

    VARCHAR2(3)

    Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
    See Also:
    • "DBA_TAB_PRIVS"
    • "USER_TAB_PRIVS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 149 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_PRIVS_MADE

ALL_TAB_PRIVS_MADE describes the object grants for which the current user is the object owner or grantor.

Related View

USER_TAB_PRIVS_MADE describes the object grants for which the current user is the object owner. This view does not display the OWNER column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Privilege on the object
GRANTABLE | VARCHAR2(3) |  | Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
HIERARCHY | VARCHAR2(3) |  | Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
See Also:

"USER_TAB_PRIVS_MADE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 150 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_PRIVS_RECD

ALL_TAB_PRIVS_RECD describes the following types of grants:

  • Object grants for which the current user is the grantee
  • Object grants for which an enabled role or PUBLIC is the grantee

Related View

USER_TAB_PRIVS_RECD describes the object grants for which the current user is the grantee. This view does not display the GRANTEE column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Privilege on the object
GRANTABLE | VARCHAR2(3) |  | Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
HIERARCHY | VARCHAR2(3) |  | Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
See Also:

"USER_TAB_PRIVS_RECD"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 151 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TAB_SUBPARTITIONS

ALL_TAB_SUBPARTITIONS describes, for each table subpartition accessible to the current user, the subpartition name, name of the table and partition to which it belongs, and its storage attributes.

Related Views

  • DBA_TAB_SUBPARTITIONS provides such information for all subpartitions in the database.
  • USER_TAB_SUBPARTITIONS provides such information for subpartitions of all partitioned objects owned by the current user. This view does not display the TABLE_OWNER column.

    Note:

    Statistics are not collected on a per-subpartition basis.
    Column Datatype NULL Description

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Table owner

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table name

    PARTITION_NAME

    VARCHAR2(30)

    Partition name

    SUBPARTITION_NAME

    VARCHAR2(30)

    Subpartition name

    SUBPARTITION_POSITION

    NUMBER

    NOT NULL

    Position of a subpartition within a partition

    TABLESPACE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the tablespace containing the subpartition

    PCT_FREE

    NUMBER

    NOT NULL

    Minimum percentage of free space in a block

    PCT_USED

    NUMBER

    NOT NULL

    Minimum percentage of used space in a block

    INI_TRANS

    NUMBER

    NOT NULL

    Initial number of transactions

    MAX_TRANS

    NUMBER

    NOT NULL

    Maximum number of transactions

    INITIAL_EXTENT

    NUMBER

    Size of the initial extent in bytes

    NEXT_EXTENT

    NUMBER

    Size of secondary extents in bytes

    MIN_EXTENT

    NUMBER

    NOT NULL

    Minimum number of extents allowed in the segment

    MAX_EXTENT

    NUMBER

    NOT NULL

    Maximum number of extents allowed in the segment

    PCT_INCREASE

    NUMBER

    NOT NULL

    Percentage increase in extent size

    FREELISTS

    NUMBER

    Number of freelist groups allocated in this segment

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated in this segment

    LOGGING

    VARCHAR2(3)

    Logging attribute of subpartition

    NUM_ROWS

    NUMBER

    The number of rows

    BLOCKS

    NUMBER

    The number of blocks

    EMPTY_BLOCKS

    NUMBER

    The number of empty blocks

    AVG_SPACE

    NUMBER

    The average space

    CHAIN_CNT

    NUMBER

    The chain count

    AVG_ROW_LEN

    NUMBER

    The average row length

    SAMPLE_SIZE

    NUMBER

    The sample size

    LAST_ANALYZED

    DATE

    The date on which this table was most recently analyzed

    BUFFER_POOL

    VARCHAR2(7)

    The default buffer pool for this subpartition

    GLOBAL_STATS

    VARCHAR2(3)

    Indicates whether column statistics for the subpartition were collected by analyzing the table as a whole (YES) or estimated from statistics collected for partitions and subpartitions (NO)

    USER_STATS

    VARCHAR2(3)

    Were the statistics entered directly by the user?
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 152 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TABLES

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

Related Views

  • DBA_TABLES describes all relational tables in the database.
  • USER_TABLES describes all 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)

    Owner of the table

    TABLE_NAME

    VARCHAR2(30)

    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 entry belongs. If IOT_TYPE column is not null, this column contains the base table name.

    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 the secondary extension 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 this segment; NULL for partitioned tables

    FREELIST_GROUPS

    NUMBER

    Number of freelist groups allocated to this segment; NULL for partitioned tables

    LOGGING

    VARCHAR2(3)

    Logging attribute; NULL for partitioned tables

    BACKED_UP

    VARCHAR2(1)

    Has table been backed up since last change

    NUM_ROWS*

    NUMBER

    Number of rows in the table

    BLOCKS*

    NUMBER

    Number of used data blocks in the table

    EMPTY_BLOCKS*

    NUMBER

    Number of empty (never used) data blocks in the table

    AVG_SPACE*

    NUMBER

    Average amount of free space, in bytes, in a data block allocated to the table

    CHAIN_CNT*

    NUMBER

    Number of rows in the table that are chained from one data block to another, or which have migrated to a new block, requiring a link to preserve the old ROWID

    AVG_ROW_LEN*

    NUMBER

    Average length of a row in the table in bytes

    AVG_SPACE_FREELIST
    _BLOCKS

    NUMBER

    The average freespace of all blocks on a freelist

    NUM_FREELIST_BLOCKS

    NUMBER

    The number of blocks on the freelist

    DEGREE

    VARCHAR2(10)

    The number of threads per instance for scanning the table

    INSTANCES

    VARCHAR2(10)

    The number of instances across which the table is to be scanned

    CACHE

    VARCHAR2(5)

    Whether the cluster is to be cached in the buffer cache (CACHE | NOCACHE)

    TABLE_LOCK

    VARCHAR2(8)

    Whether table locking is enabled or disabled

    SAMPLE_SIZE

    NUMBER

    Sample size used in analyzing this table

    LAST_ANALYZED

    DATE

    Date on which this table was most recently analyzed

    PARTITIONED

    VARCHAR2(3)

    Indicates whether this table is partitioned. Set to YES if it is partitioned.

    IOT_TYPE

    VARCHAR2(12)

    If this is an index-organized table, then IOT_TYPE is IOT, IOT_OVERFLOW, or IOT_MAPPING. If this is not an index-organized table, then IOT_TYPE is NULL.

    TEMPORARY

    VARCHAR2(1)

    Can the current session only see data that it place in this object itself?

    SECONDARY

    VARCHAR2(1)

    Whether the trigger is a secondary object created by the ODCIIndexCreate method of the Oracle9i Data Cartridge (Y |N)

    NESTED

    VARCHAR2(3)

    Is the table a nested table?

    BUFFER_POOL

    VARCHAR2(7)

    The default buffer pool for the object. NULL for partitioned tables

    ROW_MOVEMENT

    VARCHAR2(8)

    Whether partitioned row movement is enabled or disabled

    GLOBAL_STATS

    VARCHAR2(3)

    For partitioned tables, indicates whether 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)

    Were the statistics entered directly by the user?

    DURATION

    VARCHAR2(15)

    Indicates the duration of a temporary table:

    • SYS$SESSION: the rows are preserved for the duration of the session
    • SYS$TRANSACTION: the rows are deleted after COMMIT

    Null for a permanent table

    SKIP_CORRUPT

    VARCHAR2(8)

    Whether Oracle ignores blocks marked corrupt during table and index scans (ENABLED) or raises an error (DISABLED). To enable this feature, run the DBMS_REPAIR.SKIP_CORRUPT_BLOCKS procedure.

    MONITORING

    VARCHAR2(3)

    Whether the table has the MONITORING attribute set
    See Also:
    • "DBA_TABLES"
    • "USER_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 153 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TRIGGER_COLS

ALL_TRIGGER_COLS describes the use of columns in triggers owned by user or in triggers on tables owned by user. If the user has the CREATE ANY TRIGGER privilege, this view describes the use of columns in all triggers.

Related Views

  • DBA_TRIGGER_COLS provides such information for all triggers in the database.
  • USER_TRIGGER_COLS provides such information for all triggers owned by the current user.

    Column Datatype NULL Description

    TRIGGER_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the triggers

    TRIGGER_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the trigger

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the table on which the trigger is defined

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table on which the trigger is defined

    COLUMN_NAME

    VARCHAR2(4000)

    Name of the column used in the trigger

    COLUMN_LIST

    VARCHAR2(3)

    Column specified in UPDATE clause (Y | N)

    COLUMN_USAGE

    VARCHAR2(17)

    How the column is used in the trigger. All applicable combinations of NEW, OLD, IN, OUT, and IN OUT.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 154 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TRIGGERS

ALL_TRIGGERS describes owned by the current user and triggers on tables owned by the current user. If the user has the CREATE ANY TRIGGER privilege, then this view describes all triggers in the database.

Related Views

  • DBA_TRIGGERS describes all triggers in the database.
  • USER_TRIGGERS describes all triggers owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the trigger

    TRIGGER_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the trigger

    TRIGGER_TYPE

    VARCHAR2(16)

    When the trigger fires: BEFORE STATEMENT, BEFORE EACH ROW, BEFORE EVENT, AFTER STATEMENT, AFTER EACH ROW, and AFTER EVENT

    TRIGGERING_EVENT

    VARCHAR2(216)

    The DML, DDL, or database event that fires the trigger. For a listing of triggering events, see the CREATE TRIGGER statement in Oracle9i SQL Reference.

    TABLE_OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the table on which the trigger is defined

    BASE_OBJECT_TYPE

    VARCHAR2(16)

    The base object on which the trigger is defined: TABLE, VIEW, SCHEMA, or DATABASE

    TABLE_NAME

    VARCHAR2(30)

    If the base object type of the trigger is SCHEMA or DATABASE, then this column is NULL; if the base object type of the trigger is TABLE or VIEW, this columns indicates the table/view name on which the trigger is defined

    COLUMN_NAME

    VARCHAR2(30)

    Name of the nested table column (if nested table trigger), else null

    REFERENCING_NAMES

    VARCHAR2(87)

    Names used for referencing OLD and NEW column values from within the trigger

    WHEN_CLAUSE

    VARCHAR2(4000)

    Must evaluate to TRUE for TRIGGER_BODY to execute

    STATUS

    VARCHAR2(8)

    Whether the trigger is enabled (ENABLED|DISABLED)

    DESCRIPTION

    VARCHAR2(4000)

    Trigger description; useful for re-creating a trigger creation statement

    ACTION_TYPE

    VARCHAR2(11)

    The action type of the trigger body (CALL or PL/SQL)

    TRIGGER_BODY

    LONG

    Statement(s) executed by the trigger when it fires
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 155 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TYPE_ATTRS

ALL_TYPE_ATTRS describes the attributes of the object types accessible to the current user.

Related Views

  • DBA_TYPE_ATTRS describes the attributes of all object types in the database.
  • USER_TYPE_ATTRS describes the attributes of the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    ATTR_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the attribute

    ATTR_TYPE_MOD

    VARCHAR2(7)

    Type modifier of the attribute

    ATTR_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type of the attribute

    ATTR_TYPE_NAME

    VARCHAR2(30)

    Name of the type of the attribute

    LENGTH

    NUMBER

    Length of the CHAR attribute, or maximum length of the VARCHAR or VARCHAR2 attribute.

    PRECISION

    NUMBER

    Decimal precision of the NUMBER or DECIMAL attribute, or binary precision of the FLOAT attribute.

    SCALE

    NUMBER

    Scale of the NUMBER or DECIMAL attribute

    CHARACTER_SET
    _NAME

    VARCHAR2(44)

    Character set name of the attribute (CHAR_CS or NCHAR_CS)

    ATTR_NO

    NUMBER

    NOT NULL

    Syntactical order number or position of the attribute as specified in the type specification or CREATE TYPE statement (not to be used as an ID number)

    INHERITED

    VARCHAR2(3)

    Indicates whether the attribute is inherited from a supertype (YES) or not (NO)
    See Also:
    • "DBA_TYPE_ATTRS"
    • "USER_TYPE_ATTRS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 156 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TYPE_METHODS

ALL_TYPE_METHODS describes the methods of the object types accessible to the current user.

Related Views

  • DBA_TYPE_METHODS describes the methods of all object types in the database.
  • USER_TYPE_METHODS describes the methods of the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    METHOD_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the method

    METHOD_NO

    NUMBER

    NOT NULL

    Method number for distinguishing overloaded method (not to be used as ID number)

    METHOD_TYPE

    VARCHAR2(6)

    Type of the method

    PARAMETERS

    NUMBER

    NOT NULL

    Number of parameters to the method

    RESULTS

    NUMBER

    NOT NULL

    Number of results returned by the method

    FINAL

    VARCHAR2(3)

    Indicates whether the method is final (YES) or not (NO)

    INSTANTIABLE

    VARCHAR2(3)

    Indicates whether the method is instantiable (YES) or not (NO)

    OVERRIDING

    VARCHAR2(3)

    Indicates whether the method is overriding a supertype method (YES) or not (NO)

    INHERITED

    VARCHAR2(3)

    Indicates whether the method is inherited from a supertype (YES) or not (NO)
    See Also:
    • "DBA_TYPE_METHODS"
    • "USER_TYPE_METHODS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 157 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TYPE_VERSIONS

ALL_TYPE_VERSIONS describes the versions of the object types accessible to the current user.

Related Views

  • DBA_TYPE_VERSIONS describes the versions of all object types in the database.
  • USER_TYPE_VERSIONS describes the versions of the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    VERSION#

    NUMBER

    NOT NULL

    Internal version number of the type

    TYPECODE

    VARCHAR2(30)

    Typecode of the type

    STATUS

    VARCHAR2(7)

    Status of the type

    LINE

    NUMBER

    NOT NULL

    Line number of the type's spec

    TEXT

    VARCHAR2(4000)

    Text of the type's spec

    HASHCODE

    RAW(17)

    Hashcode of the type
    See Also:
    • "DBA_TYPE_VERSIONS"
    • "USER_TYPE_VERSIONS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 158 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_TYPES

ALL_TYPES describes the object types accessible to the current user.

Related Views

  • DBA_TYPES describes all object types in the database.
  • USER_TYPES describes the object types owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the type

    TYPE_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the type

    TYPE_OID

    RAW(16)

    NOT NULL

    Object identifier (OID) of the type

    TYPECODE

    VARCHAR2(30)

    Typecode of the type

    ATTRIBUTES

    NUMBER

    Number of attributes (if any) in the type

    METHODS

    NUMBER

    Number of methods (if any) in the type

    PREDEFINED

    VARCHAR2(3)

    Indicates whether the type is a predefined type (YES) or not (NO)

    INCOMPLETE

    VARCHAR2(3)

    Indicates whether the type is an incomplete type (YES) or not (NO)

    FINAL

    VARCHAR2(3)

    Indicates whether the type is a final type (YES) or not (NO)

    INSTANTIABLE

    VARCHAR2(3)

    Indicates whether the type is an instantiable type (YES) or not (NO)

    SUPERTYPE_OWNER

    VARCHAR2(30)

    Owner of the supertype (NULL if type is not a subtype)

    SUPERTYPE_NAME

    VARCHAR2(30)

    Name of the supertype (NULL if type is not a subtype)

    LOCAL_ATTRIBUTES

    NUMBER

    Number of local (not inherited) attributes (if any) in the subtype

    LOCAL_METHODS

    NUMBER

    Number of local (not inherited) methods (if any) in the subtype

    TYPEID

    RAW(16)

    Type ID value of the type
    See Also:
    • "DBA_TYPES"
    • "USER_TYPES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 159 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_UNUSED_COL_TABS

ALL_UNUSED_COL_TABS describes all tables accessible to the current user that contain unused columns.

Related Views

  • DBA_UNUSED_COL_TABS describes all tables in the database that contain unused columns.
  • USER_UNUSED_COL_TABS describes all tables owned by the current user that contain unused columns. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    The owner of the object

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    The name of the table

    COUNT

    NUMBER

    The number of unused columns
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 160 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_UPDATABLE_COLUMNS

ALL_UPDATABLE_COLUMNS describes all columns in a join view that are updatable by the current user.

Related Views

  • DBA_UPDATABLE_COLUMNS describes all columns in a join view that are updatable by the database administrator.
  • USER_UPDATABLE_COLUMNS describes all columns owned by the current user that are in a join view and are updatable by the current user.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Table owner

    TABLE_NAME

    VARCHAR2(30)

    NOT NULL

    Table name

    COLUMN_NAME

    VARCHAR2(30)

    NOT NULL

    Column name

    UPDATABLE

    VARCHAR2(3)

    Indicates whether the column is updatable

    INSERTABLE

    VARCHAR2(3)

    Indicates whether the column is insertable

    DELETABLE

    VARCHAR2(3)

    Indicates whether the column is deletable
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 161 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_USERS

ALL_USERS lists all users of the database visible to the current user. This view does not describe the users (see the related views).

Related Views

  • DBA_USERS describes all users of the database, and contains more columns than ALL_USERS.
  • USER_USERS describes the current user, and contains more columns than ALL_USERS.

    Column Datatype NULL Description

    USERNAME

    VARCHAR2(30)

    NOT NULL

    Name of the user

    USER_ID

    NUMBER

    NOT NULL

    ID number of the user

    CREATED

    DATE

    NOT NULL

    User creation date
    See Also:
    • "DBA_USERS"
    • "USER_USERS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 162 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_USTATS

ALL_USTATS describes all user-defined statistics accessible to the current user.

Related Views

  • DBA_USTATS describes all user-defined statistics in the database.
  • USER_USTATS describes all user-defined statistics owned by the current user.

    Column Datatype NULL Description

    OBJECT_OWNER

    VARCHAR2(30)

    Owner of the table or index for which the statistics have been collected

    OBJECT_NAME

    VARCHAR2(30)

    Name of the table or index for which the statistics have been collected

    OBJECT_TYPE

    VARCHAR2(6)

    Indicates the type of object for which statistics have been collected: COLUMN or INDEX

    ASSOCIATION

    VARCHAR2(8)

    DIRECT Indicates a direct association with the object for which the statistics have been collected.

    IMPLICIT indicates the association for which the statistics have been collected is with the column type or index type, and the object is an instance of that column type or index type.

    COLUMN_NAME

    VARCHAR2(30)

    Column name, if property is column for which statistics have been collected

    STATSTYPE_SCHEMA

    VARCHAR2(30)

    Schema of statistics type which was used to collect the statistics

    STATSTYPE_NAME

    VARCHAR2(30)

    Name of statistics type which was used to collect statistics

    STATISTICS

    RAW(2000)

    User collected statistics for the object

    PARTITION_NAME

    VARCHAR2(30)

    Partition name of a table. If null, the table is either non-partitioned or the entry corresponds to the aggregate statistics for the table.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 163 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_VARRAYS

ALL_VARRAYS describes all varrays accessible to the current user.

Related Views

  • DBA_VARRAYS describes all varrays in the database.
  • USER_VARRAYS describes all 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)

    DEFAULT value indicates that the storage was defaulted. USER_SPECIFIED value indicates that the storage was user-specified.

    RETURN_TYPE

    VARCHAR2(20)

    Return type of the column

    ELEMENT_SUBSTITUTABLE

    VARCHAR2(25)

    Indicates whether the varray element is substitutable (Y) or not (N)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 164 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_VIEWS

ALL_VIEWS describes the views accessible to the current user.

Related Views

  • DBA_VIEWS describes all views in the database.
  • USER_VIEWS describes the views owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    NOT NULL

    Owner of the view

    VIEW_NAME

    VARCHAR2(30)

    NOT NULL

    Name of the view

    TEXT_LENGTH

    NUMBER

    Length of the view text

    TEXT

    LONG

    View text

    TYPE_TEXT_LENGTH

    NUMBER

    Length of the type clause of the typed view

    TYPE_TEXT

    VARCHAR2(4000)

    Type clause of the typed view

    OID_TEXT_LENGTH

    NUMBER

    Length of the WITH OID clause of the typed view

    OID_TEXT

    VARCHAR2(4000)

    WITH OID clause of the typed view

    VIEW_TYPE_OWNER

    VARCHAR2(30)

    Owner of the type of the view if the view is a typed view

    VIEW_TYPE

    VARCHAR2(30)

    Type of the view if the view is a typed view

    SUPERVIEW_NAME

    VARCHAR2(30)

    Name of the superview
    See Also:
    • "DBA_VIEWS"
    • "USER_VIEWS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 165 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_XML_SCHEMAS

ALL_XML_SCHEMAS describes the registered XML schemas accessible to the current user.

Related Views

  • DBA_XML_SCHEMAS describes all registered XML schemas in the database.
  • USER_XML_SCHEMAS describes the registered XML schemas owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the XML schema

    SCHEMA_URL

    VARCHAR2(700)

    Schema URL of the XML schema

    LOCAL

    VARCHAR2(3)

    Indicates whether the XML schema is local (YES) or global (NO)

    SCHEMA

    XMLTYPE

    XML schema document

    INT_OBJNAME

    VARCHAR2(4000)

    Internal database object name for the schema

    QUAL_SCHEMA_URL

    VARCHAR2(767)

    Fully qualified schema URL
    See Also:
    • "DBA_XML_SCHEMAS"
    • "USER_XML_SCHEMAS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 166 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_XML_TAB_COLS

ALL_XML_TAB_COLS describes the columns of the XML tables accessible to the current user.

Related Views

  • DBA_XML_TAB_COLS describes the columns of all XML tables in the database.
  • USER_XML_TAB_COLS describes the columns of the XML tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the XML table

    TABLE_NAME

    VARCHAR2(30)

    Name of the XML table

    COLUMN_NAME

    VARCHAR2(4000)

    Name of the XML table column

    XMLSCHEMA

    VARCHAR2(700)

    Name of the XML Schema that is used for the table definition

    SCHEMA_OWNER

    VARCHAR2(30)

    Owner of the XML Schema that is used for the table definition

    ELEMENT_NAME

    VARCHAR2(256)

    Name of the XML SChema element that is used for the table

    STORAGE_TYPE

    VARCHAR2(17)

    Storage option for the XMLtype data (OBJECT-RELATIONAL or CLOB)
    See Also:
    • "DBA_XML_TAB_COLS"
    • "USER_XML_TAB_COLS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 167 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_XML_TABLES

ALL_XML_TABLES describes the XML tables accessible to the current user.

Related Views

  • DBA_XML_TABLES describes all XML tables in the database.
  • USER_XML_TABLES describes the XML tables owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the XML table

    TABLE_NAME

    VARCHAR2(30)

    Name of the XML table

    XMLSCHEMA

    VARCHAR2(700)

    Name of the XML Schema that is used for the table definition

    SCHEMA_OWNER

    VARCHAR2(30)

    Owner of the XML Schema that is used for the table definition

    ELEMENT_NAME

    VARCHAR2(256)

    Name of the XML SChema element that is used for the table

    STORAGE_TYPE

    VARCHAR2(17)

    Storage option for the XMLtype data (OBJECT-RELATIONAL or CLOB)
    See Also:
    • "DBA_XML_TABLES"
    • "USER_XML_TABLES"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 168 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_XML_VIEW_COLS

ALL_XML_VIEW_COLS describes the columns of the XML views accessible to the current user.

Related Views

  • DBA_XML_VIEW_COLS describes the columns of all XML views in the database.
  • USER_XML_VIEW_COLS describes the columns of the XML views owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the XML view

    VIEW_NAME

    VARCHAR2(30)

    Name of the XML view

    COLUMN_NAME

    VARCHAR2(4000)

    Name of the XML view column

    XMLSCHEMA

    VARCHAR2(700)

    Name of the XML Schema that is used for the view definition

    SCHEMA_OWNER

    VARCHAR2(30)

    Owner of the XML Schema that is used for the view definition

    ELEMENT_NAME

    VARCHAR2(256)

    Name of the XML SChema element that is used for the view
    See Also:
    • "DBA_XML_VIEW_COLS"
    • "USER_XML_VIEW_COLS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 169 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ALL_XML_VIEWS

ALL_XML_VIEWS describes the XML views accessible to the current user.

Related Views

  • DBA_XML_VIEWS describes all XML views the database.
  • USER_XML_VIEWS describes the XML views owned by the current user. This view does not display the OWNER column.

    Column Datatype NULL Description

    OWNER

    VARCHAR2(30)

    Owner of the XML view

    VIEW_NAME

    VARCHAR2(30)

    Name of the XML view

    XMLSCHEMA

    VARCHAR2(700)

    Name of the XML Schema that is used for the view definition

    SCHEMA_OWNER

    VARCHAR2(30)

    Owner of the XML Schema that is used for the view definition

    ELEMENT_NAME

    VARCHAR2(256)

    Name of the XML SChema element that is used for the view
    See Also:
    • "DBA_XML_VIEWS"
    • "USER_XML_VIEWS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 170 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

AUDIT_ACTIONS

AUDIT_ACTIONS describes audit trail action type codes. This table can be used to map action type numbers to action type names.

Column | Datatype | NULL | Description
ACTION | NUMBER | NOT NULL | Numeric audit trail action type code. These values also appear in the COMMAND column of the V$SESSION dynamic performance view, and are listed with that view. See Also: Table 3-3 for a listing of the action type codes
NAME | VARCHAR2(27) | NOT NULL | Name of the type of audit trail action
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 171 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CATALOG

CATALOG is included for compatibility with Oracle version 5. Oracle Corporation recommends that you not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 172 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CAT

CAT is a synonym for USER_CATALOG.

See Also:

"USER_CATALOG"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 173 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CHAINED_ROWS

CHAINED_ROWS stores the output for the ANALYZE statement with the LIST CHAINED ROWS clause. You must run the utlchain.sql or utlchn1.sql script to create this table.

Column | Description
OWNER_NAME | Table owner
TABLE_NAME | Table name
CLUSTER_NAME | Cluster the table is in, if any
PARTITION_NAME | The name of the partition
SUBPARTITION_NAME | The name of the subpartition
HEAD_ROWID | ROWID the chained row is accessed by
ANALYZE_TIMESTAMP | Date/time that the ANALYZE statement was issued
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 174 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CHANGE_SOURCES

CHANGE_SOURCES enables publishers to view existing change sources. You must have the SELECT_CATALOG_ROLE privilege to access this view.

Column | Datatype | NULL | Description
SOURCE_NAME | VARCHAR2(30) | NOT NULL | User specified identifier. For synchronous change sources, there is one pre-created source with the SOURCE_NAME "SYNC_SOURCE."
DBID | NUMBER |  | The database identifier of the Oracle host instance (set by CDC when the first log is added to LogMiner)
LOG_DIRECTORY | VARCHAR2(4000) | NOT NULL | File system path on the CDC machine where log files for this source are maintained
LOGFILE_PATTERN | VARCHAR2(30) |  | This pattern enables you to recognize log files (for example, *.log) if the log location has files in it other than log files
SOURCE_DESCRIPTION | VARCHAR2(255) |  | Comment field for customers
CREATED | DATE | NOT NULL | Creation date of the change source
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 175 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CHANGE_SETS

CHANGE_SETS enables publishers to view existing change sets. You must have the SELECT_CATALOG_ROLE privilege to access this view.

Column | Datatype | NULL | Description
SET_NAME | VARCHAR2(30) | NOT NULL | User specified identifier. For synchronous change sources, there is one pre-created source with the SET_NAME "SYNC_SET."
CHANGE_SOURCE_NAME | VARCHAR2(30) | NOT NULL | The change source to which this set belongs
BEGIN_DATE | DATE |  | Starting point for capturing change data
END_DATE | DATE |  | Stopping point for capturing change data
BEGIN_SCN | NUMBER |  | Starting point for capturing change data
END_SCN | NUMBER |  | Stopping point for capturing change data
FRESHNESS_DATE | DATE |  | Stopping point for the last successful advance
FRESHNESS_SCN | NUMBER |  | Stopping point for the last successful advance
ADVANCE_ENABLED | VARCHAR2(1) | NOT NULL | Identifies eligibility for advance (Y|N)
IGNORE_DDL | VARCHAR2(1) | NOT NULL | Identifies whether to continue (Y) or stop (N)
CREATED | DATE | NOT NULL | The creation date of the change set
ROLLBACK_SEGMENT_NAME | VARCHAR2(30) |  | Used during advance (optional)
ADVANCING | VARCHAR2(1) | NOT NULL | Identifies whether or not (Y|N) an advance is in progress for this set (set by advance)
PURGING | VARCHAR2(1) | NOT NULL | Identifies whether or not (Y|N) a purge of old data is in progress for this change set (set by advance)
LOWEST_SCN | NUMBER | NOT NULL | Current low water mark for change data remaining in this set after the latest purge
TABLESPACE | VARCHAR2(30) | NOT NULL | Location where advance creates LCR staging tables
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 176 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CHANGE_TABLES

CHANGE_TABLES enables publishers to see existing change tables. You must have the SELECT_CATALOG_ROLE privilege to access this view.

Column | Datatype | NULL | Description
CHANGE_TABLE_SCHEMA | VARCHAR2(30) | NOT NULL | Change table owner
CHANGE_TABLE_NAME | VARCHAR2(30) | NOT NULL | Change table name
CHANGE_SET_NAME | VARCHAR2(30) | NOT NULL | The change set this table belongs to
SOURCE_SCHEMA_NAME | VARCHAR2(30) | NOT NULL | The table owner in the source system
SOURCE_TABLE_NAME | VARCHAR2(30) | NOT NULL | The name of the corresponding table in the source system
CREATED | DATE | NOT NULL | Date on which this change table was created
CREATED_SCN | NUMBER |  | The system commit SCN when this table was created
CAPTURED_VALUES | VARCHAR2(1) | NOT NULL | Indicates the values O (old), N (new), or B (both)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 177 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CLU

CLU is a synonym for USER_CLUSTERS.

See Also:

"USER_CLUSTERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 178 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CODE_PIECES

Oracle accesses this view to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE views.

See Also:

"DBA_OBJECT_SIZE" and "USER_OBJECT_SIZE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 179 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

CODE_SIZE

Oracle accesses this view to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE views.

See Also:

"DBA_OBJECT_SIZE" and "USER_OBJECT_SIZE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 180 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COL

COL is included for compatibility with Oracle version 5. Oracle Corporation recommends that you not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 181 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COLS

COLS is a synonym for USER_TAB_COLUMNS.

See Also:

"USER_TAB_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 182 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

COLUMN_PRIVILEGES

COLUMN_PRIVILEGES is included for compatibility with Oracle version 6. Oracle Corporation does not recommend use of this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 183 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DATABASE_PROPERTIES

DATABASE_PROPERTIES lists Permanent database properties.

Column | Datatype | NULL | Description
PROPERTY_NAME | VARCHAR2(30) | NOT NULL | Property name
PROPERTY_VALUE | VARCHAR2(4000) |  | Property value
DESCRIPTION | VARCHAR2(4000) |  | Property description
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 184 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_2PC_NEIGHBORS

DBA_2PC_NEIGHBORS describes incoming and outgoing connections for pending transactions.

Column | Datatype | NULL | Description
LOCAL_TRAN_ID | VARCHAR2(22) |  | Local identifier of a transaction
IN_OUT | VARCHAR2(3) |  | IN for incoming connections, OUT for outgoing
DATABASE | VARCHAR2(128) |  | IN for client database name, OUT for outgoing database link
DBUSER_OWNER | VARCHAR2(30) |  | IN for name of local user, OUT for owner of database link
INTERFACE | VARCHAR2(1) |  | C for request commit, otherwise N for prepare or request readonly commit
DBID | VARCHAR2(16) |  | The database ID at the other end of the connection
SESS# | NUMBER |  | Session number of the connection at this database
BRANCH | VARCHAR2(128) |  | Transaction branch ID of the connection at this database
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 185 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_2PC_PENDING

DBA_2PC_PENDING describes distributed transactions awaiting recovery.

Column | Datatype | NULL | Description
LOCAL_TRAN_ID | VARCHAR2(22) | NOT NULL | String of form: n.n.n; n is a number
GLOBAL_TRAN_ID | VARCHAR2(169) |  | Globally unique transaction ID
STATE | VARCHAR2(16) | NOT NULL | Collecting, prepared, committed, forced commit, or forced rollback
MIXED | VARCHAR2(3) |  | YES indicates part of the transaction committed and part rolled back
ADVICE | VARCHAR2(1) |  | C for commit, R for rollback, else NULL
TRAN_COMMENT | VARCHAR2(2000) |  | Text for commit work comment text
FAIL_TIME | DATE | NOT NULL | Value of SYSDATE when the row was inserted (transaction or system recovery)
FORCE_TIME | DATE |  | Time of manual force decision (null if not forced locally)
RETRY_TIME | DATE | NOT NULL | Time automatic recovery (RECO) last tried to recover the transaction
OS_USER | VARCHAR2(64) |  | Operating system-specific name for the end-user
OS_TERMINAL | VARCHAR2(255) |  | Operating system-specific name for the end-user terminal
HOST | VARCHAR2(128) |  | Name of the host machine for the end-user
DB_USER | VARCHAR2(30) |  | Oracle user name of the end-user at the topmost database
COMMIT# | VARCHAR2(16) |  | Global commit number for committed transactions
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 186 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ALL_TABLES

DBA_ALL_TABLES displays descriptions of all object tables and relational tables in the database. Its columns are the same as those in "ALL_ALL_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 187 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLICATION_ROLES

DBA_APPLICATION_ROLES describes all the roles that have authentication policy functions defined.

Column | Datatype | NULL | Description
ROLE | VARCHAR2(30) | NOT NULL | Name of the application role
SCHEMA | VARCHAR2(30) | NOT NULL | Schema of the authorized package
PACKAGE | VARCHAR2(30) | NOT NULL | Name of the authorized package
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 188 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY

DBA_APPLY displays information about all apply processes in the database. Its columns are the same as those in ALL_APPLY.

See Also:

"ALL_APPLY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 189 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_CONFLICT_COLUMNS

DBA_APPLY_CONFLICT_COLUMNS displays information about conflict handlers on all tables in the database. Its columns are the same as those in ALL_APPLY_CONFLICT_COLUMNS.

See Also:

"ALL_APPLY_CONFLICT_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 190 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_DML_HANDLERS

DBA_APPLY_DML_HANDLERS displays information about the DML handlers on all tables in the database. Its columns are the same as those in ALL_APPLY_DML_HANDLERS.

See Also:

"ALL_APPLY_DML_HANDLERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 191 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_ERROR

DBA_APPLY_ERROR displays information about error transactions generated by all apply processes in the database. Its columns are the same as those in ALL_APPLY_ERROR.

See Also:

"ALL_APPLY_ERROR"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 192 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_INSTANTIATED_OBJECTS

DBA_APPLY_INSTANTIATED_OBJECTS displays information about objects for which an instantiation SCN has been set.

Column | Datatype | NULL | Description
SOURCE_DATABASE | VARCHAR2(128) | NOT NULL | Name of the database where the object originated
SOURCE_OBJECT_OWNER | VARCHAR2(30) | NOT NULL | Owner of the object at the source database
SOURCE_OBJECT_NAME | VARCHAR2(30) | NOT NULL | Name of the object at the source database
SOURCE_OBJECT_TYPE | NUMBER | NOT NULL | Type of the object at the source database
INSTANTIATION_SCN | NUMBER |  | Instantiation SCN for the object. Only changes committed after this SCN are applied by an apply process.
IGNORE_SCN | NUMBER |  | SCN below which the instantiation SCN cannot be set. This value corresponds to the SCN value at the source database at the time when the object was prepared for instantiation.
APPLY_DATABASE_LINK | VARCHAR2(128) |  | Database link to which changes are applied. If null, then changes are applied to the local database.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 193 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_KEY_COLUMNS

DBA_APPLY_KEY_COLUMNS displays information about substitute key columns for all tables in the database. Its columns are the same as those in ALL_APPLY_KEY_COLUMNS.

See Also:

"ALL_APPLY_KEY_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 194 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_PARAMETERS

DBA_APPLY_PARAMETERS displays information about the parameters for all apply processes in the database. Its columns are the same as those in ALL_APPLY_PARAMETERS.

See Also:

"ALL_APPLY_PARAMETERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 195 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_APPLY_PROGRESS

DBA_APPLY_PROGRESS displays information about the progress made by all apply processes in the database. Its columns are the same as those in ALL_APPLY_PROGRESS.

See Also:

"ALL_APPLY_PROGRESS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 196 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AQ_AGENT_PRIVS

DBA_AQ_AGENT_PRIVS displays information about the registered AQ agents that are mapped to all users in the database.

Related View

USER_AQ_AGENT_PRIVS displays information about the registered AQ agents that are mapped to the current user. This view does not display the DB_USERNAME column.

Column | Datatype | NULL | Description
AGENT_NAME | VARCHAR2(30) | NOT NULL | Name of the AQ agent
DB_USERNAME | VARCHAR2(30) |  | Name of the database user that the agent maps to
HTTP_ENABLED | VARCHAR2(4) |  | Indicates whether the agent is allowed to access AQ through HTTP (YES) or not (NO)
SMTP_ENABLED | VARCHAR2(4) |  | Indicates whether the agent is allowed to access AQ through SMTP (YES) or not (NO)
See Also:

"USER_AQ_AGENT_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 197 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AQ_AGENTS

DBA_AQ_AGENTS displays information about all registered AQ agents in the database.

Column | Datatype | NULL | Description
AGENT_NAME | VARCHAR2(30) | NOT NULL | Name of the AQ agent
HTTP_ENABLED | VARCHAR2(4) |  | Indicates whether the agent is allowed to access AQ through HTTP (YES) or not (NO)
SMTP_ENABLED | VARCHAR2(4) |  | Indicates whether the agent is allowed to access AQ through SMTP (YES) or not (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 198 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ASSOCIATIONS

DBA_ASSOCIATIONS describes all user-defined statistics in the database. Its columns are the same as those for "ALL_ASSOCIATIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 199 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ATTRIBUTE_TRANSFORMATIONS

DBA_ATTRIBUTE_TRANSFORMATIONS displays information about the transformation functions for all transformations in the database.

Related View

USER_ATTRIBUTE_TRANSFORMATIONS displays information about the transformation functions for the transformations owned by the current user. This view does not display the OWNER column.

Column | Datatype | NULL | Description
TRANSFORMATION_ID | NUMBER | NOT NULL | Unique identifier for the transformation
OWNER | VARCHAR2(30) | NOT NULL | Owning user of the transformation
NAME | VARCHAR2(30) | NOT NULL | Transformation name
FROM_TYPE | VARCHAR2(61) |  | Source type name
TO_TYPE | VARCHAR2(91) |  | Target type name
ATTRIBUTE | NUMBER | NOT NULL | Target type attribute number
ATTRIBUTE_TRANSFORMATION | VARCHAR2(4000) |  | Transformation function for the attribute
See Also:

"USER_ATTRIBUTE_TRANSFORMATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 200 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AUDIT_EXISTS

DBA_AUDIT_EXISTS lists audit trail entries produced by AUDIT EXISTS and AUDIT NOT EXISTS.

Column Datatype NULL Description

OS_USERNAME

VARCHAR2(255)

Operating system login username of the user whose actions were audited

USERNAME

VARCHAR2(30)

Name (not ID number) of the user whose actions were audited

USERHOST

VARCHAR2(128)

Numeric instance ID for the Oracle instance from which the user is accessing the database

TERMINAL

VARCHAR2(255)

Identifier of the user's terminal

TIMESTAMP

DATE

NOT NULL

Timestamp for the creation of the audit trail entry

OWNER

VARCHAR2(30)

Intended creator of the non-existent object

OBJ_NAME

VARCHAR2(128)

Name of the object affected by the action

ACTION_NAME

VARCHAR2(27)

Name of the action type corresponding to the numeric code in the ACTION column in DBA_AUDIT_TRAIL

NEW_OWNER

VARCHAR2(30)

Owner of the object named in the NEW_NAME column

NEW_NAME

VARCHAR2(128)

New name of an object after a RENAME or the name of the underlying object

OBJ_PRIVILEGE

VARCHAR2(16)

Object privileges granted or revoked by a GRANT or REVOKE statement

SYS_PRIVILEGE

VARCHAR2(40)

System privileges granted or revoked by a GRANT or REVOKE statement

GRANTEE

VARCHAR2(30)

Name of the grantee specified in a GRANT or REVOKE statement

SESSIONID

NUMBER

NOT NULL

Numeric ID for each Oracle session

ENTRYID

NUMBER

NOT NULL

Numeric ID for each audit trail entry in the session

STATEMENTID

NUMBER

NOT NULL

Numeric ID for each statement run

RETURNCODE

NUMBER

NOT NULL

Oracle error code generated by the action. Some useful values:

  • 0: the action succeeded
  • 2004: security violation

CLIENT_ID

VARCHAR2(64)

Client identifier in each Oracle session

SESSION_CPU

NUMBER

Amount of CPU time used by each Oracle session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 201 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AUDIT_OBJECT

DBA_AUDIT_OBJECT contains audit trail records for all objects in the system.

Related View

USER_AUDIT_OBJECT contains audit trail records for all objects accessible to the current user.

Column Datatype NULL Description

OS_USERNAME

VARCHAR2(255)

Operating system login username of the user whose actions were audited

USERNAME

VARCHAR2(30)

Name (not ID number) of the user whose actions were audited

USERHOST

VARCHAR2(2000)

Numeric instance ID for the Oracle instance from which the user is accessing the database

TERMINAL

VARCHAR2(2000)

Identifier of the user's terminal

TIMESTAMP

DATE

NOT NULL

Timestamp for the creation of the audit trail entry or login time for the CONNECT statement

OWNER

VARCHAR2(30)

Creator of the object affected by the action

OBJ_NAME

VARCHAR2(128)

Name of the object affected by the action

ACTION_NAME

VARCHAR2(27)

Name of the action type corresponding to the numeric code in the ACTION column in DBA_AUDIT_TRAIL

NEW_OWNER

VARCHAR2(30)

Owner of the object named in the NEW_NAME column

NEW_NAME

VARCHAR2(128)

New name of an object after a RENAME or the name of the underlying object

SES_ACTIONS

VARCHAR2(19)

Session summary (a string of 16 characters, one for each action type in the order ALTER, AUDIT, COMMENT, DELETE, GRANT, INDEX, INSERT, LOCK, RENAME, SELECT, UPDATE, REFERENCES, and EXECUTE. Positions 14, 15, and 16 are reserved for future use. The characters are: - for none, S for success, F for failure, and B for both).

COMMENT_TEXT

VARCHAR2(4000)

Text comment on the audit trail

SESSIONID

NUMBER

NOT NULL

Numeric ID for each Oracle session

ENTRYID

NUMBER

NOT NULL

Numeric ID for each audit trail entry in the session

STATEMENTID

NUMBER

NOT NULL

Numeric ID for each statement run

RETURNCODE

NUMBER

NOT NULL

Oracle error code generated by the action. Some useful values:

  • 0: the action succeeded
  • 2004: security violation

PRIV_USED

VARCHAR2(40)

System privilege used to execute the action

CLIENT_ID

VARCHAR2(64)

Client identifier in each Oracle session

SESSION_CPU

NUMBER

Amount of CPU time used by each Oracle session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 202 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AUDIT_POLICIES

DBA_AUDIT_POLICIES describes all fine-grained auditing policies in the database. Its columns are the same as those in ALL_AUDIT_POLICIES.

See Also:

"ALL_AUDIT_POLICIES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 203 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AUDIT_SESSION

DBA_AUDIT_SESSION lists all audit trail records concerning CONNECT and DISCONNECT.

Related View

USER_AUDIT_SESSION contains audit trail records concerning connections and disconnections of the current user.

Column Datatype NULL Description

OS_USERNAME

VARCHAR2(255)

Operating system login username of the user whose actions were audited

USERNAME

VARCHAR2(30)

Name (not ID number) of the user whose actions were audited

USERHOST

VARCHAR2(2000)

Numeric instance ID for the Oracle instance from which the user is accessing the database

TERMINAL

VARCHAR2(2000)

Identifier of the user's terminal

TIMESTAMP

DATE

NOT NULL

Timestamp for the creation of the audit trail entry or login time for the CONNECT statement

ACTION_NAME

VARCHAR2(27)

Name of the action type corresponding to the numeric code in the ACTION column in DBA_AUDIT_TRAIL

LOGOFF_TIME

DATE

Timestamp for user log off

LOGOFF_LREAD

NUMBER

Logical reads for the session

LOGOFF_PREAD

NUMBER

Physical reads for the session

LOGOFF_LWRITE

NUMBER

Logical writes for the session

LOGOFF_DLOCK

VARCHAR2(40)

Deadlocks detected during the session

SESSIONID

NUMBER

NOT NULL

Numeric ID for each Oracle session

RETURNCODE

NUMBER

NOT NULL

Oracle error code generated by the action. Some useful values:

  • 0: the action succeeded
  • 2004: security violation

CLIENT_ID

VARCHAR2(64)

Client identifier in each Oracle session

SESSION_CPU

NUMBER

Amount of CPU time used by each Oracle session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 204 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AUDIT_STATEMENT

DBA_AUDIT_STATEMENT lists audit trail records concerning GRANT, REVOKE, AUDIT, NOAUDIT, and ALTER SYSTEM statements throughout the database.

Related View

USER_AUDIT_STATEMENT contains audit trail records for the same statements issued by the current user.

Column Datatype NULL Description

OS_USERNAME

VARCHAR2(255)

Operating system login username of the user whose actions were audited

USERNAME

VARCHAR2(30)

Name (not ID number) of the user whose actions were audited

USERHOST

VARCHAR2(2000)

Numeric instance ID for the Oracle instance from which the user is accessing the database

TERMINAL

VARCHAR2(2000)

Identifier of the user's terminal

TIMESTAMP

DATE

NOT NULL

Timestamp for the creation of the audit trail entry or login time for the CONNECT statement

OWNER

VARCHAR2(30)

Creator of the object affected by the action

OBJ_NAME

VARCHAR2(128)

Name of object affected by the action

ACTION_NAME

VARCHAR2(27)

Name of the action type corresponding to the numeric code in the ACTION column in DBA_AUDIT_TRAIL

NEW_NAME

VARCHAR2(128)

New name of an object after a RENAME or the name of the underlying object

OBJ_PRIVILEGE

VARCHAR2(16)

Object privileges granted or revoked by a GRANT or REVOKE statement

SYS_PRIVILEGE

VARCHAR2(40)

System privileges granted or revoked by a GRANT or REVOKE statement

ADMIN_OPTION

VARCHAR2(1)

Signifies the role or system privilege was granted with ADMIN option

GRANTEE

VARCHAR2(30)

Name of grantee specified in a GRANT or REVOKE statement

AUDIT_OPTION

VARCHAR2(40)

Auditing option set with the AUDIT statement

SES_ACTIONS

VARCHAR2(19)

Session summary (a string of 16 characters, one for each action type in the order ALTER, AUDIT, COMMENT, DELETE, GRANT, INDEX, INSERT, LOCK, RENAME, SELECT, UPDATE, REFERENCES, and EXECUTE. Positions 14, 15, and 16 are reserved for future use. The characters are: - for none, S for success, F for failure, and B for both).

COMMENT_TEXT

VARCHAR2(4000)

Text comment on the audit trail, inserted by the application

SESSIONID

NUMBER

NOT NULL

Numeric ID for each Oracle session

ENTRYID

NUMBER

NOT NULL

Numeric ID for each audit trail entry in the session

STATEMENTID

NUMBER

NOT NULL

Numeric ID for each statement run

RETURNCODE

NUMBER

NOT NULL

Oracle error code generated by the action. Some useful values:

  • 0: the action succeeded
  • 2004: security violation

PRIV_USED

VARCHAR2(40)

System privilege used to execute the action

CLIENT_ID

VARCHAR2(64)

Client identifier in each Oracle session

SESSION_CPU

NUMBER

Amount of CPU time used by each Oracle session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 205 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AUDIT_TRAIL

DBA_AUDIT_TRAIL lists all audit trail entries.

Related View

USER_AUDIT_TRAIL contains all audit trail entries related to the current user.

Column Datatype NULL Description

OS_USERNAME

VARCHAR2(255)

Operating system login username of the user whose actions were audited

USERNAME

VARCHAR2(30)

Name (not ID number) of the user whose actions were audited

USERHOST

VARCHAR2(128)

Numeric instance ID for the Oracle instance from which the user is accessing the database. Used only in environments with distributed file systems and shared database files.

TERMINAL

VARCHAR2(255)

Identifier of the user's terminal

TIMESTAMP

DATE

NOT NULL

Timestamp for the creation of the audit trail entry or login time for the CONNECT statement

OWNER

VARCHAR2(30)

Creator of the object affected by the action

OBJ_NAME

VARCHAR2(128)

Name of the object affected by the action

ACTION

NUMBER

NOT NULL

Numeric action type code. The corresponding name of the action type is in the ACTION_NAME column.

ACTION_NAME

VARCHAR2(27)

Name of the action type corresponding to the numeric code in the ACTION column

NEW_OWNER

VARCHAR2(30)

Owner of the object named in the NEW_NAME column

NEW_NAME

VARCHAR2(128)

New name of the object after a RENAME or the name of the underlying object

OBJ_PRIVILEGE

VARCHAR2(16)

Object privileges granted or revoked by a GRANT or REVOKE statement

SYS_PRIVILEGE

VARCHAR2(40)

System privileges granted or revoked by a GRANT or REVOKE statement

ADMIN_OPTION

VARCHAR2(1)

Indicates whether the role or system privilege was granted with the ADMIN option

GRANTEE

VARCHAR2(30)

Name of the grantee specified in a GRANT or REVOKE statement

AUDIT_OPTION

VARCHAR2(40)

Auditing option set with the AUDIT statement

SES_ACTIONS

VARCHAR2(19)

Session summary (a string of 16 characters, one for each action type in the order ALTER, AUDIT, COMMENT, DELETE, GRANT, INDEX, INSERT, LOCK, RENAME, SELECT, UPDATE, REFERENCES, and EXECUTE. Positions 14, 15, and 16 are reserved for future use. The characters are:

  • - - None
  • S - Success
  • F - Failure
  • B - Both

LOGOFF_TIME

DATE

Timestamp for user log off

LOGOFF_LREAD

NUMBER

Logical reads for the session

LOGOFF_PREAD

NUMBER

Physical reads for the session

LOGOFF_LWRITE

NUMBER

Logical writes for the session

LOGOFF_DLOCK

VARCHAR2(40)

Deadlocks detected during the session

COMMENT_TEXT

VARCHAR2(4000)

Text comment on the audit trail entry, providing more information about the statement audited

Also indicates how the user was authenticated. The method can be one of the following:

  • DATABASE - Authentication was done by password
  • NETWORK - Authentication was done by Oracle Net Services or the Advanced Security option
  • PROXY - Client was authenticated by another user; the name of the proxy user follows the method type

SESSIONID

NUMBER

NOT NULL

Numeric ID for each Oracle session

ENTRYID

NUMBER

NOT NULL

Numeric ID for each audit trail entry in the session

STATEMENTID

NUMBER

NOT NULL

Numeric ID for each statement run

RETURNCODE

NUMBER

NOT NULL

Oracle error code generated by the action. Some useful values:

  • 0 - Action succeeded
  • 2004 - Security violation

PRIV_USED

VARCHAR2(40)

System privilege used to execute the action

CLIENT_ID

VARCHAR2(64)

Client identifier in each Oracle session

SESSION_CPU

NUMBER

Amount of CPU time used by each Oracle session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 206 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AW_PS

DBA_AW_PS describes the pagespaces in all analytic workspaces in the database.

Related View

USER_AW_PS describes the pagespaces in the analytic workspaces owned by the current user. This view does not display the OWNER column.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the analytic workspace
AW_NUMBER | NUMBER | NOT NULL | Number of the analytic workspace
AW_NAME | VARCHAR2(30) |  | Name of the analytic workspace
PSNUMBER | NUMBER(10) |  | Number of the pagespace
GENERATIONS | NUMBER |  | Number of active generations in the pagespace
See Also:
  • "USER_AW_PS"
  • Oracle9i OLAP User's Guide for more information about this view
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 207 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_AWS

DBA_AWS describes all analytic workspaces in the database.

Related View

USER_AWS describes the analytic workspaces owned by the current user. This view does not display the OWNER column.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the analytic workspace
AW_NUMBER | NUMBER | NOT NULL | Number of the analytic workspace
AW_NAME | VARCHAR2(30) |  | Name of the analytic workspace
PAGESPACES | NUMBER |  | Number of pagespaces in the analytic workspace
GENERATIONS | NUMBER |  | Number of active generations in the analytic workspace
See Also:
  • "USER_AWS"
  • Oracle9i OLAP User's Guide for more information about this view
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 208 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_BASE_TABLE_MVIEWS

DBA_BASE_TABLE_MVIEWS describes all materialized views using materialized view logs in the database. Its columns are the same as those in ALL_BASE_TABLE_MVIEWS.

See Also:

"ALL_BASE_TABLE_MVIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 209 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_BLOCKERS

DBA_BLOCKERS displays a session if it is not waiting for a locked object but is holding a lock on an object for which another session is waiting.

Column | Datatype | NULL | Description
HOLDING_SESSION | NUMBER |  | Session holding a lock
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 210 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CAPTURE

DBA_CAPTURE displays information about all capture processes in the database. Its columns are the same as those in ALL_CAPTURE.

See Also:

"ALL_CAPTURE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 211 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CAPTURE_PARAMETERS

DBA_CAPTURE_PARAMETERS displays information about the parameters for all capture processes in the database. Its columns are the same as those in ALL_CAPTURE_PARAMETERS.

See Also:

"ALL_CAPTURE_PARAMETERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 212 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CAPTURE_PREPARED_DATABASE

DBA_CAPTURE_PREPARED_DATABASE displays information about when the local database was prepared for instantiation. Its columns are the same as those in ALL_CAPTURE_PREPARED_DATABASE.

See Also:

"ALL_CAPTURE_PREPARED_DATABASE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 213 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CAPTURE_PREPARED_SCHEMAS

DBA_CAPTURE_PREPARED_SCHEMAS displays information about all schemas prepared for instantiation at the local database. Its columns are the same as those in ALL_CAPTURE_PREPARED_SCHEMAS.

See Also:

"ALL_CAPTURE_PREPARED_SCHEMAS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 214 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CAPTURE_PREPARED_TABLES

DBA_CAPTURE_PREPARED_TABLES displays information about all tables prepared for instantiation at the local database. Its columns are the same as those in ALL_CAPTURE_PREPARED_TABLES.

See Also:

"ALL_CAPTURE_PREPARED_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 215 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CATALOG

DBA_CATALOG lists all indexes, tables, views, clusters, synonyms, and sequences in the database. Its columns are the same as those in "ALL_CATALOG" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 216 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CLU_COLUMNS

DBA_CLU_COLUMNS maps all table columns to related cluster columns.

Related View

USER_CLU_COLUMNS maps all table columns owned by the current user to related cluster columns. This view does not display the OWNER column.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the cluster
CLUSTER_NAME | VARCHAR2(30) | NOT NULL | Cluster name
CLU_COLUMN_NAME | VARCHAR2(30) | NOT NULL | Key column in the cluster
TABLE_NAME | VARCHAR2(30) | NOT NULL | Clustered table name
TAB_COLUMN_NAME | VARCHAR2(4000) |  | Key column or attribute of the object type column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 217 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CLUSTER_HASH_EXPRESSIONS

DBA_CLUSTER_HASH_EXPRESSIONS lists hash functions for all hash clusters in the database. Its columns are the same as those in "ALL_CLUSTER_HASH_EXPRESSIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 218 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CLUSTERS

DBA_CLUSTERS describes all clusters in the database. Its columns are the same as those in "ALL_CLUSTERS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 219 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_COL_COMMENTS

DBA_COL_COMMENTS describes comments on columns of all tables and views in the database. Its columns are the same as those in "ALL_COL_COMMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 220 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_COL_PRIVS

DBA_COL_PRIVS describes all column object grants in the database.

Related View

USER_COL_PRIVS describes the column object grants for which the current user is the object owner, grantor, or grantee.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
COLUMN_NAME | VARCHAR2(30) | NOT NULL | Name of the column
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Privilege on the column
GRANTABLE | VARCHAR2(3) |  | Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
See Also:

"USER_COL_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 221 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_COLL_TYPES

DBA_COLL_TYPES describes all named collection types (arrays, nested tables, object tables, and so on) in the database. Its columns are the same as those in "ALL_COLL_TYPES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 222 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CONS_COLUMNS

DBA_CONS_COLUMNS describes all columns in the database that are specified in constraint definitions. Its columns are the same as those in "ALL_CONS_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 223 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CONS_OBJ_COLUMNS

DBA_CONS_OBJ_COLUMNS displays information about the types that object columns (or attributes) or collection elements have been constrained to, in all tables in the database. Its columns are the same as those in ALL_CONS_OBJ_COLUMNS.

See Also:

"ALL_CONS_OBJ_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 224 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CONSTRAINTS

DBA_CONSTRAINTS describes all constraint definitions on all tables in the database. Its columns are the same as those in "ALL_CONSTRAINTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 225 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_CONTEXT

DBA_CONTEXT provides all context namespace information in the database. Its columns are the same as those in "ALL_CONTEXT" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 226 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DATA_FILES

DBA_DATA_FILES describes database files.

Column | Datatype | NULL | Description
FILE_NAME | VARCHAR2(513) |  | Name of the database file
FILE_ID | NUMBER | NOT NULL | File identifier number of the database file
TABLESPACE_NAME | VARCHAR2(30) | NOT NULL | Name of the tablespace to which the file belongs
BYTES | NUMBER |  | Size of the file in bytes
BLOCKS | NUMBER | NOT NULL | Size of the file in Oracle blocks
STATUS | VARCHAR2(9) |  | File status: AVAILABLE or INVALID (INVALID means that the file number is not in use, for example, a file in a tablespace that was dropped)
RELATIVE_FNO | NUMBER |  | Relative file number
AUTOEXTENSIBLE | VARCHAR2(3) |  | Autoextensible indicator
MAXBYTES | NUMBER |  | Maximum file size in bytes
MAXBLOCKS | NUMBER |  | Maximum file size in blocks
INCREMENT_BY | NUMBER |  | Autoextension increment
USER_BYTES | NUMBER |  | Corresponding number of bytes
USER_BLOCKS | NUMBER |  | Number of blocks which can be used by the data
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 227 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DB_LINKS

DBA_DB_LINKS describes all database links in the database. Its columns are the same as those in "ALL_DB_LINKS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 228 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DDL_LOCKS

DBA_DDL_LOCKS lists all DDL locks held in the database and all outstanding requests for a DDL lock.

Column Datatype NULL Description

SESSION_ID

NUMBER

Session identifier

OWNER

VARCHAR2(30)

Owner of the lock

NAME

VARCHAR2(30)

Name of the lock

TYPE

VARCHAR2(40)

Lock type:

  • Cursor
  • Table/Procedure/Type
  • Body
  • Trigger
  • Index
  • Cluster
  • Java Source
  • Java Resource
  • Java Data

MODE_HELD

VARCHAR2(9)

Lock mode:

  • None
  • Null
  • Share
  • Exclusive

MODE_REQUESTED

VARCHAR2(9)

Lock request type:

  • None
  • Null
  • Share
  • Exclusive
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 229 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DEPENDENCIES

DBA_DEPENDENCIES describes all dependencies in the database between procedures, packages, functions, package bodies, and triggers, including dependencies on views created without any database links. Its columns are the same as those in "ALL_DEPENDENCIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 230 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIM_ATTRIBUTES

DBA_DIM_ATTRIBUTES describes the relationships between dimension levels and functionally dependent columns in the database. The level columns and the dependent column must be in the same table. This view's columns are the same as those in "ALL_DIM_ATTRIBUTES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 231 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIM_CHILD_OF

DBA_DIM_CHILD_OF describes a hierarchical relationship of 1 to n between all the pairs of levels in the dimensions in the database. Its columns are the same as those in "ALL_DIM_CHILD_OF" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 232 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIM_HIERARCHIES

DBA_DIM_HIERARCHIES describes all the dimension hierarchies in the database. Its columns are the same as those in "ALL_DIM_HIERARCHIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 233 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIM_JOIN_KEY

DBA_DIM_JOIN_KEY describes all joins in the database between two dimension tables. The join is always specified between a parent dimension level column and a child column. This view's columns are the same as those in "ALL_DIM_JOIN_KEY" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 234 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIM_LEVEL_KEY

DBA_DIM_LEVEL_KEY describes the columns of all dimension levels in the database. This view's columns are the same as those in "ALL_DIM_LEVEL_KEY" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 235 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIM_LEVELS

DBA_DIM_LEVELS describes all dimension levels in the database. All columns of a dimension level must come from the same relation. This view's columns are the same as those in "ALL_DIM_LEVELS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 236 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIMENSIONS

DBA_DIMENSIONS represents dimension objects. Its columns are the same as those in "ALL_DIMENSIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 237 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DIRECTORIES

DBA_DIRECTORIES describes all directory objects in the database. Its columns are the same as those in "ALL_DIRECTORIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 238 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DML_LOCKS

DBA_DML_LOCKS lists all DML locks held in the database and all outstanding requests for a DML lock.

Column Datatype NULL Description

SESSION_ID

NUMBER

Session holding or acquiring the lock

OWNER

VARCHAR2(30)

NOT NULL

Owner of the lock

NAME

VARCHAR2(30)

NOT NULL

Name of the lock

MODE_HELD

VARCHAR2(13)

The type of lock held. The values are:

  • ROWS_S (SS): row share lock
  • ROW-X (SX): row exclusive lock
  • SHARE (S): share lock
  • S/ROW-X (SSX): exclusive lock
  • NONE: lock requested but not yet obtained

MODE_REQUESTED

VARCHAR2(13)

Lock request type. The values are:

  • ROWS_S (SS): row share lock
  • ROW-X (SX): row exclusive lock
  • SHARE (S): share lock
  • S/ROW-X (SSX): exclusive lock
  • NONE: Lock identifier obtained; lock not held or requested

LAST_CONVERT

NUMBER

The last convert

BLOCKING_OTHERS

VARCHAR2(40)

Blocking others
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 239 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DMT_FREE_SPACE

DBA_DMT_FREE_SPACE describes the free extents in all dictionary managed tablespaces in the database.

Column | Datatype | NULL | Description
TABLESPACE_ID | NUMBER | NOT NULL | Identifier number of the tablespace containing the extent
FILE_ID | NUMBER | NOT NULL | File identifier number of the file containing the extent
BLOCK_ID | NUMBER | NOT NULL | Starting block number of the extent
BLOCKS | NUMBER | NOT NULL | Size of the extent (in Oracle blocks)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 240 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_DMT_USED_EXTENTS

DBA_DMT_USED_EXTENTS describes the extents comprising the segments in all dictionary managed tablespaces in the database.

Column | Datatype | NULL | Description
SEGMENT_FILEID | NUMBER | NOT NULL | File number of the segment header of the extent
SEGMENT_BLOCK | NUMBER | NOT NULL | Block number of the segment header of the extent
TABLESPACE_ID | NUMBER | NOT NULL | Identifier number of the tablespace containing the extent
EXTENT_ID | NUMBER | NOT NULL | Extent number in the segment
FILEID | NUMBER | NOT NULL | File identifier number of the file containing the extent
BLOCK | NUMBER | NOT NULL | Starting block number of the extent
LENGTH | NUMBER | NOT NULL | Number of blocks in the extent
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 241 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ERRORS

DBA_ERRORS describes current errors on all stored objects (views, procedures, functions, packages, and package bodies) in the database. Its columns are the same as those in "ALL_ERRORS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 242 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EVALUATION_CONTEXT_TABLES

DBA_EVALUATION_CONTEXT_TABLES describes the tables in all rule evaluation contexts in the database. Its columns are the same as those in ALL_EVALUATION_CONTEXT_TABLES.

See Also:

"ALL_EVALUATION_CONTEXT_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 243 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EVALUATION_CONTEXT_VARS

DBA_EVALUATION_CONTEXT_VARS describes the variables in all rule evaluation contexts in the database. Its columns are the same as those in ALL_EVALUATION_CONTEXT_VARS.

See Also:

"ALL_EVALUATION_CONTEXT_VARS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 244 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EVALUATION_CONTEXTS

DBA_EVALUATION_CONTEXTS describes all rule evaluation contexts in the database. Its columns are the same as those in ALL_EVALUATION_CONTEXTS.

See Also:

"ALL_EVALUATION_CONTEXTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 245 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EXP_FILES

DBA_EXP_FILES describes export files.

Column | Datatype | NULL | Description
EXP_VERSION | NUMBER(3) | NOT NULL | Version number of the export session
EXP_TYPE | VARCHAR2(11) |  | Type of export file: complete, cumulative, or incremental
FILE_NAME | VARCHAR2(100) | NOT NULL | Name of the export file
USER_NAME | VARCHAR2(30) | NOT NULL | Name of user who executed export
TIMESTAMP | DATE | NOT NULL | Timestamp of the export session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 246 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EXP_OBJECTS

DBA_EXP_OBJECTS describes objects that have been incrementally exported.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of exported object
OBJECT_NAME | VARCHAR2(30) | NOT NULL | Name of exported object
OBJECT_TYPE | VARCHAR2(12) |  | Type of exported object
CUMULATIVE | DATE |  | Timestamp of last cumulative export
INCREMENTAL | DATE | NOT NULL | Timestamp of last incremental export
EXPORT_VERSION | NUMBER(3) | NOT NULL | The ID of the export session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 247 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EXP_VERSION

DBA_EXP_VERSION displays the version number of the last export session.

Column | Datatype | NULL | Description
EXP_VERSION | NUMBER(3) | NOT NULL | Version number of the last export session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 248 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EXTENTS

DBA_EXTENTS describes the extents comprising the segments in all tablespaces in the database.

Related View

USER_EXTENTS describes the extents comprising the segments owned by the current user's objects. This view does not display the OWNER, FILE_ID, BLOCK_ID, or RELATIVE_FNO columns.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) |  | Owner of the segment associated with the extent
SEGMENT_NAME | VARCHAR2(81) |  | Name of the segment associated with the extent
SEGMENT_TYPE | VARCHAR2(17) |  | Type of the segment: INDEX PARTITION, TABLE PARTITION
TABLESPACE_NAME | VARCHAR2(30) |  | Name of the tablespace containing the extent
EXTENT_ID | NUMBER | NOT NULL | Extent number in the segment
FILE_ID | NUMBER | NOT NULL | File identifier number of the file containing the extent
BLOCK_ID | NUMBER | NOT NULL | Starting block number of the extent
BYTES | NUMBER |  | Size of the extent in bytes
BLOCKS | NUMBER | NOT NULL | Size of the extent in Oracle blocks
RELATIVE_FNO | NUMBER | NOT NULL | Relative file number of the first extent block
PARTITION_NAME | VARCHAR2(30) |  | Object Partition Name (Set to NULL for non-partitioned objects)
See Also:

"USER_EXTENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 249 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EXTERNAL_LOCATIONS

DBA_EXTERNAL_TABLES describes the locations (data sources) of all external tables in the database. Its columns are the same as those in ALL_EXTERNAL_LOCATIONS.

See Also:

"ALL_EXTERNAL_LOCATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 250 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_EXTERNAL_TABLES

DBA_EXTERNAL_TABLES describes all external tables in the database. Its columns are the same as those in ALL_EXTERNAL_TABLES.

See Also:

"ALL_EXTERNAL_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 251 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_FGA_AUDIT_TRAIL

DBA_FGA_AUDIT_TRAIL lists all audit records for fine-grained auditing.

Column | Datatype | NULL | Description
SESSION_ID | NUMBER | NOT NULL | Session id of the query
TIMESTAMP | DATE | NOT NULL | Timestamp of the query
DB_USER | VARCHAR2(30) |  | Database username who executed the query
OS_USER | VARCHAR2(255) |  | Operating system username who executed the query
USERHOST | VARCHAR2(128) |  | Numeric instance ID for the Oracle instance from which the user is accessing the database. Used only in environments with distributed file systems and shared database files.
CLIENT_ID | VARCHAR2(64) |  | Client identifier in each Oracle session
EXT_NAME | VARCHAR2(4000) |  | External name
OBJECT_SCHEMA | VARCHAR2(30) |  | Owner of the table or view
OBJECT_NAME | VARCHAR2(128) |  | Name of the table or view
POLICY_NAME | VARCHAR2(30) |  | Name of the Fine-Grained Auditing Policy
SCN | NUMBER |  | System change number (SCN) of the query
SQL_TEXT | NVARCHAR2(2000) |  | SQL text of the query
SQL_BIND | VARCHAR2(4000) |  | Bind variable data of the query
COMMENT$TEXT | VARCHAR2(4000) |  | Comments
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 252 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_FREE_SPACE

DBA_FREE_SPACE describes the free extents in all tablespaces in the database.

Related View

USER_FREE_SPACE describes the free extents in the tablespaces accessible to the current user.

Column | Datatype | NULL | Description
TABLESPACE_NAME | VARCHAR2(30) |  | Name of the tablespace containing the extent
FILE_ID | NUMBER |  | File identifier number of the file containing the extent
BLOCK_ID | NUMBER |  | Starting block number of the extent
BYTES | NUMBER |  | Size of the extent (in bytes)
BLOCKS | NUMBER |  | Size of the extent (in Oracle blocks)
RELATIVE_FNO | NUMBER |  | Relative file number of the file containing the extent
See Also:

"USER_FREE_SPACE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 253 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_FREE_SPACE_COALESCED

DBA_FREE_SPACE_COALESCED describes statistics on coalesced space in all tablespaces in the database.

Column Datatype NULL Description

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the tablespace

TOTAL_EXTENTS

NUMBER

Total number of free extents in the tablespace

EXTENTS_COALESCED

NUMBER

Total number of coalesced free extents in the tablespace

PERCENT_EXTENTS
_COALESCED

NUMBER

Percentage of coalesced free extents in the tablespace

TOTAL_BYTES

NUMBER

Total number of free bytes in the tablespace

BYTES_COALESCED

NUMBER

Total number of coalesced free bytes in the tablespace

TOTAL_BLOCKS

NUMBER

Total number of free Oracle blocks in the tablespace

BLOCKS_COALESCED

NUMBER

Total number of coalesced free Oracle blocks in the tablespace

PERCENT_BLOCKS
_COALESCED

NUMBER

Percentage of coalesced free Oracle blocks in the tablespace
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 254 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_IND_COLUMNS

DBA_IND_COLUMNS describes the columns of all the indexes on all tables and clusters in the database. Its columns are the same as those in "ALL_IND_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 255 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_IND_EXPRESSIONS

DBA_IND_EXPRESSIONS lists expressions of function-based indexes on all tables and clusters in the database. Its columns are the same as those in "ALL_IND_EXPRESSIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 256 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_IND_PARTITIONS

DBA_IND_PARTITIONS describes, for each index partition in the database, the partition-level partitioning information, the storage parameters for the partition, and various partition statistics collected by ANALYZE statements. Its columns are the same as those in "ALL_IND_PARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 257 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_IND_SUBPARTITIONS

DBA_IND_SUBPARTITIONS describes, for each index subpartition in the database, the partition-level partitioning information, the storage parameters for the subpartition, and various partition statistics collected by ANALYZE statements. Its columns are the same as those in "ALL_IND_SUBPARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 258 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_INDEXES

DBA_INDEXES describes all indexes in the database. To gather statistics for this view, use the SQL ANALYZE statement. This view supports parallel partitioned index scans. Its columns are the same as those in "ALL_INDEXES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 259 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_INDEXTYPE_COMMENTS

DBA_INDEXTYPE_COMMENTS lists all comments for user-defined indextypes in the database. Its columns are the same as those in ALL_INDEXTYPE_COMMENTS.

See Also:

"ALL_INDEXTYPE_COMMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 260 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_INDEXTYPE_OPERATORS

DBA_INDEXTYPE_OPERATORS lists all the operators supported by indextypes in the database. Its columns are the same as those in ALL_INDEXTYPE_OPERATORS.

See Also:

"ALL_INDEXTYPE_OPERATORS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 261 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_INDEXTYPES

DBA_INDEXTYPES describes all indextypes in the database. Its columns are the same as those in ALL_INDEXTYPES.

See Also:

"ALL_INDEXTYPES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 262 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_INTERNAL_TRIGGERS

DBA_INTERNAL_TRIGGERS describes internal triggers on all tables in the database. Its columns are the same as those in "ALL_INTERNAL_TRIGGERS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 263 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_ARGUMENTS

DBA_JAVA_ARGUMENTS displays argument information about all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_ARGUMENTS.

See Also:

"ALL_JAVA_ARGUMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 264 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_CLASSES

DBA_JAVA_CLASSES displays class level information about all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_CLASSES.

See Also:

"ALL_JAVA_CLASSES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 265 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_DERIVATIONS

DBA_JAVA_DERIVATIONS displays mapping information about Java source objects and their derived Java class objects and Java resource objects for all Java classes in the database. Its columns are the same as those in ALL_JAVA_DERIVATIONS.

See Also:

"ALL_JAVA_DERIVATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 266 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_FIELDS

DBA_JAVA_FIELDS displays field information about all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_FIELDS.

See Also:

"ALL_JAVA_FIELDS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 267 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_IMPLEMENTS

DBA_JAVA_IMPLEMENTS describes interfaces implemented by all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_IMPLEMENTS.

See Also:

"ALL_JAVA_IMPLEMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 268 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_INNERS

DBA_JAVA_INNERS displays information about inner classes referred to by all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_INNERS.

See Also:

"ALL_JAVA_INNERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 269 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_LAYOUTS

DBA_JAVA_LAYOUTS displays class layout information about all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_LAYOUTS.

See Also:

"ALL_JAVA_LAYOUTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 270 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_METHODS

DBA_JAVA_METHODS displays method information about all stored Java classes in the database. Its columns are the same as those in ALL_JAVA_METHODS.

See Also:

"ALL_JAVA_METHODS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 271 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_NCOMPS

DBA_JAVA_NCOMPS displays ncomp-related information about all Java classes in the database. Its columns are the same as those in ALL_JAVA_NCOMPS.

See Also:

"ALL_JAVA_NCOMPS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 272 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_POLICY

DBA_JAVA_POLICY describes Java security permissions for all users in the database.

Related View

USER_JAVA_POLICY describes Java security permissions for the current user.

Column | Datatype | NULL | Description
KIND | VARCHAR2(8) |  | Indicates whether this permission is a positive (GRANT) or a limitation (RESTRICT)
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user, schema, or role to which the permission object is assigned
TYPE_SCHEMA | VARCHAR2(30) | NOT NULL | Schema in which the permission object is loaded
TYPE_NAME | VARCHAR2(4000) |  | Permission class type, which is designated by a string containing the full class name, such as, java.io.FilePermission
NAME | VARCHAR2(4000) |  | Target attribute (name) of the permission object. This name is used when defining the permission.
ACTION | VARCHAR2(4000) |  | Action attribute for this permission. Many permissions expect a null value if no action is appropriate for the permission.
ENABLED | VARCHAR2(8) |  | Indicates whether the permission is enabled (ENABLED) or disabled (DISABLED)
SEQ | NUMBER |  | Sequence number used to identify this row. This number should be supplied when disabling, enabling, or deleting the permission.
See Also:

"USER_JAVA_POLICY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 273 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_RESOLVERS

DBA_JAVA_RESOLVERS displays information about resolvers of all Java classes in the database. Its columns are the same as those in ALL_JAVA_RESOLVERS.

See Also:

"ALL_JAVA_RESOLVERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 274 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JAVA_THROWS

DBA_JAVA_THROWS displays information about exceptions thrown from methods of all Java classes in the database. Its columns are the same as those in ALL_JAVA_THROWSa.

See Also:

"ALL_JAVA_THROWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 275 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JOBS

DBA_JOBS describes all jobs in the database. Its columns are the same as those in "ALL_JOBS" .

See Also:

Oracle9i Database Administrator's Guide for more information on jobs
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 276 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JOBS_RUNNING

DBA_JOBS_RUNNING lists all jobs in the database that are currently running.

Column | Datatype | NULL | Description
SID | NUMBER |  | Identifier of process that is executing the job. See "V$LOCK".
JOB | NUMBER |  | Identifier of job. This job is currently executing.
FAILURES | NUMBER |  | Number of times this job started and failed since its last success.
LAST_DATE | DATE |  | Date that this job last successfully executed.
LAST_SEC | VARCHAR2(8) |  | Same as LAST_DATE. This is when the last successful execution started.
THIS_DATE | DATE |  | Date that this job started executing.
THIS_SEC | VARCHAR2(8) |  | Same as THIS_DATE. This is when the last successful execution started.
INSTANCE | NUMBER |  | Indicates which instance can execute or is executing the job; the default is 0.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 277 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_JOIN_IND_COLUMNS

DBA_JOIN_IND_COLUMNS describes all join conditions in the database. Its columns are the same as those in "ALL_JOIN_IND_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 278 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_KGLLOCK

DBA_KGLLOCK lists all the locks and pins held on KGL objects (objects in the Kernel Generic Library cache).

Column | Datatype | NULL | Description
kgllkuse | RAW(4) |  | Address of the user session that holds the lock or pin
kgllkhdl | RAW(4) |  | Address of the handle for the KGL object
kgllkmod | NUMBER |  | Current mode of the lock or pin
kgllkreq | NUMBER |  | Mode in which the lock or pin was requested
kgllktype | VARCHAR2(4) |  | Whether this is a lock or a pin
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 279 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LIBRARIES

DBA_LIBRARIES describes all the libraries in the database. Its columns are the same as those in "ALL_LIBRARIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 280 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LMT_FREE_SPACE

DBA_LMT_FREE_SPACE describes the free extents in all locally managed tablespaces in the database.

Column | Datatype | NULL | Description
TABLESPACE_ID | NUMBER |  | Identifier number of the tablespace containing the extent
FILE_ID | NUMBER |  | File identifier number of the file containing the extent
BLOCK_ID | NUMBER |  | Starting block number of the extent
BLOCKS | NUMBER |  | Size of the extent (in Oracle blocks)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 281 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LMT_USED_EXTENTS

DBA_LMT_USED_EXTENTS describes the extents comprising the segments in all locally managed tablespaces in the database.

Column | Datatype | NULL | Description
SEGMENT_FILEID | NUMBER | NOT NULL | File number of the segment header of the extent
SEGMENT_BLOCK | NUMBER | NOT NULL | Block number of the segment header of the extent
TABLESPACE_ID | NUMBER | NOT NULL | Identifier number of the tablespace containing the extent
EXTENT_ID | NUMBER | NOT NULL | Extent number in the segment
FILEID | NUMBER | NOT NULL | File identifier number of the file containing the extent
BLOCK | NUMBER | NOT NULL | Starting block number of the extent
LENGTH | NUMBER | NOT NULL | Number of blocks in the extent
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 282 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOB_PARTITIONS

DBA_LOB_PARTITIONS displays all LOB partitions in the database. Its columns are the same as those in "ALL_LOB_PARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 283 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOB_SUBPARTITIONS

DBA_LOB_SUBPARTITIONS displays partition-level attributes of all LOB data subpartitions in the database. Its columns are the same as those in "ALL_LOB_SUBPARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 284 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOB_TEMPLATES

DBA_LOB_TEMPLATES describes all LOB subpartition templates in the database. Its columns are the same as those in ALL_LOB_TEMPLATES.

See Also:

"ALL_LOB_TEMPLATES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 285 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOBS

DBA_LOBS displays the BLOBs and CLOBs contained in all tables in the database. BFILEs are stored outside the database, so they are not described by this view. This view's columns are the same as those in "ALL_LOBS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 286 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOCK

DBA_LOCK lists all locks or latches held in the database, and all outstanding requests for a lock or latch.

Column | Datatype | NULL | Description
SESSION_ID | NUMBER |  | Session holding or acquiring the lock
LOCK_TYPE | VARCHAR2(26) |  | Lock type See Also: For a listing of lock types, see Appendix B, "Oracle Enqueue Names"
MODE HELD | VARCHAR2(40) |  | Lock mode
MODE REQUESTED | VARCHAR2(40) |  | Lock mode requested
LOCK_ID1 | VARCHAR2(40) |  | Type-specific lock identifier, part 1
LOCK_ID2 | VARCHAR2(40) |  | Type-specific lock identifier, part 2
LAST_CONVERT | NUMBER |  | The last convert
BLOCKING_OTHERS | VARCHAR2(40) |  | Whether the lock is currently blocking others
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 287 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOCK_INTERNAL

DBA_LOCK_INTERNAL displays a row for each lock or latch that is being held, and one row for each outstanding request for a lock or latch.

Column | Datatype | NULL | Description
SESSION_ID | NUMBER |  | Session holding or acquiring the lock
LOCK_TYPE | VARCHAR2(56) |  | Lock type See Also: For a listing of lock types, see Appendix B, "Oracle Enqueue Names"
MODE HELD | VARCHAR2(40) |  | Lock mode
MODE REQUESTED | VARCHAR2(40) |  | Lock mode requested
LOCK_ID1 | VARCHAR2(1130) |  | Type-specific lock identifier, part 1
LOCK_ID2 | VARCHAR2(40) |  | Type-specific lock identifier, part 2
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 288 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOCKS

DBA_LOCKS is a synonym for DBA_LOCK.

See Also:

"DBA_LOCK"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 289 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOG_GROUP_COLUMNS

DBA_LOG_GROUP_COLUMNS describes all columns in the database that are specified in log groups. Its columns are the same as those in "ALL_LOG_GROUP_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 290 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOG_GROUPS

DBA_LOG_GROUPS describes log group definitions on all tables in the database. Its columns are the same as those in "ALL_LOG_GROUPS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 291 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_EVENTS

DBA_LOGSTDBY_EVENTS displays information about the activity of the logical standby database system. It can be used to determine the cause of failures that occur when applying redo logs.

Column | Datatype | NULL | Description
EVENT_TIME | DATE |  | Time the event was logged
CURRENT_SCN | NUMBER |  | Change vector SCN for the change. If a failure occurred, then examine this column to determine which archived log file contains the source of the failure (for example, an unsupported record).
COMMIT_SCN | NUMBER |  | SCN value on which the change was committed
XIDUSN | NUMBER |  | Transaction ID undo segment number
XIDSLT | NUMBER |  | Transaction ID slot number
XIDSQN | NUMBER |  | Transaction ID sequence number
EVENT | CLOB |  | Statement that was being processed when the failure occurred
STATUS_CODE | NUMBER |  | Status (or Oracle error code) belonging to the STATUS message
STATUS | VARCHAR2(2000) |  | Description of the current activity of the process or the reason why the apply operation stopped
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 292 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_LOG

DBA_LOGSTDBY_LOG shows the logs registered for a logical standby database.

Column | Datatype | NULL | Description
THREAD# | NUMBER | NOT NULL | Thread ID of the archived redo log. The THREAD number is 1 for a single instance. For Real Application Clusters, this column will contain different numbers.
SEQUENCE# | NUMBER | NOT NULL | Sequence number of the archived redo log file
FIRST_CHANGE# | NUMBER |  | System change number (SCN) of the current archived redo log
NEXT_CHANGE# | NUMBER |  | System change number (SCN) of the next archived redo log
FIRST_TIME | DATE |  | Date of the current archived redo log
NEXT_TIME | DATE |  | Date of the next archived redo log
FILE_NAME | VARCHAR2(513) |  | Name of the archived redo log
TIMESTAMP | DATE |  | Time when the archived redo log was registered
DICT_BEGIN | VARCHAR2(3) |  | Indicates whether the beginning of the dictionary build is in this particular archived redo log (YES) or not (NO)
DICT_END | VARCHAR2(3) |  | Indicates whether the end of the dictionary build is in this particular archived redo log (YES) or not (NO)
Note:

The SCN values in this view correlate to the SCN values shown in the DBA_LOGSTDBY_PROGRESS view.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 293 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_NOT_UNIQUE

DBA_LOGSTDBY_NOT_UNIQUE identifies tables that have no primary and no non-null unique indexes. Most of the tables displayed in this view are supported because their columns contain enough information to be maintained in a logical standby database. Some tables, however, cannot be supported because their columns do not contain the necessary information. Unsupported tables usually contain a column defined using an unsupported datatype.

Column Datatype NULL Description

OWNER

VARCHAR2(30)

NOT NULL

Schema name

TABLE_NAME

VARCHAR2(30)

NOT NULL

Name of the table

BAD_COLUMN

VARCHAR2(1)
  • Y - the table column is defined using an unbounded data type, such as LONG or BLOB. If two rows in the table match except in their LOB column, then the table cannot be maintained properly. Log apply services will attempt to maintain these tables, but you must ensure the application does not allow uniqueness only in the unbounded columns.
  • N - enough column information is present to maintain the table in the logical standby database but the log transport services and log apply services would run more efficiently if you added a primary key. You should consider adding a disabled RELY constraint to these tables.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 294 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_PARAMETERS

DBA_LOGSTDBY_PARAMETERS contains the list of parameters used by the log apply services for logical standby databases.

Column Datatype NULL Description

NAME

VARCHAR2(30)

Name of the parameter:

  • MAX_SGA - system global area (SGA) allocated for the log apply services cache (in megabytes)
  • MAX_SLAVES - number of parallel query servers specifically reserved for log apply services
  • MAX_EVENTS_RECORDED - number of events stored in the DBA_LOGSTDBY_EVENTS table
  • TRANSACTION_CONSISTENCY - shows the level of transaction consistency maintained (FULL, READ_ONLY, or NONE)
  • RECORD_SKIP_ERRORS - indicates records that are skipped
  • RECORD_SKIP_DDL - indicates skipped DDL statements
  • RECORD_APPLIED_DDL - indicates applied DDL statements
  • FIRST_SCN - SCN at which log transport services will begin applying redo information
  • PRIMARY - database ID of the database to which logs are being applied
  • LMNR_SID - LogMiner Session ID. This internal value indicates which LogMiner session is in use.
  • UNTIL_SCN - SCN value at which the log apply services will shut down all transactions that have been applied
  • END_PRIMARY_SCN - during a switchover, this value indicates the last SCN applied by the new primary from the old primary
  • NEW_PRIMARY_SCN - during a switchover, this value indicates the starting SCN for the new primary database
  • COMPLETED_SESSION - indicates that the log apply services session has concluded. The value will indicate SWITCHOVER or FAILOVER, as appropriate.

VALUE

VARCHAR2(2000)

Value of the parameter
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 295 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_PROGRESS

DBA_LOGSTDBY_PROGRESS describes the progress of log apply services on the logical standby database.

Column | Datatype | NULL | Description
APPLIED_SCN | NUMBER |  | Shows the newest SCN at which all changes have been applied. The values in the APPLIED_SCN and NEWEST_SCN columns will match if all available redo log data has been processed.
APPLIED_TIME | DATE |  | Estimate of the time and date of the APPLIED_SCN
READ_SCN | NUMBER |  | All log data greater than this SCN has been read and saved
READ_TIME | DATE |  | Estimate of the time and date of the READ_SCN
NEWEST_SCN | NUMBER |  | Most recent SCN available on the standby system. If no more logs are being shipped, then changes could be applied to this SCN. The values in the APPLIED_SCN and NEWEST_SCN columns will match if all available redo log data has been processed.
NEWEST_TIME | DATE |  | Estimate of the time and date of the NEWEST_SCN
Note:

The SCN values shown in this view correlate to the SCN values shown in the DBA_LOGSTDBY_LOG view.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 296 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_SKIP

DBA_LOGSTDBY_SKIP lists the tables that will be skipped by log apply services.

Column | Datatype | NULL | Description
ERROR | VARCHAR2(1) |  | Indicates whether the statement should be skipped (Yes) or just return errors for the statement (No)
STATEMENT_OPT | VARCHAR2(30) |  | Specifies the type of statement that should be skipped. It must be one of the AUDIT_OPTIONS.
OWNER | VARCHAR2(30) |  | Name of the schema under which this skip option should be used
NAME | VARCHAR2(30) |  | Name of the option under which this skip option should be used
PROC | VARCHAR2(98) |  | Name of a stored procedure that will be executed when processing the skip option
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 297 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_SKIP_TRANSACTION

DBA_LOGSTDBY_SKIP_TRANSACTION lists the skip settings chosen.

Column | Datatype | NULL | Description
XIDUSN | NUMBER |  | Transaction ID undo segment number
XIDSLT | NUMBER |  | Transaction ID slot number
XIDSQN | NUMBER |  | Transaction ID sequence number
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 298 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_LOGSTDBY_UNSUPPORTED

DBA_LOGSTDBY_UNSUPPORTED identifies the schemas, tables, and columns in those tables that contain unsupported datatypes. Use this view when you are preparing to create a logical standby database.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Schema name of the unsupported table
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the unsupported table
COLUMN_NAME | VARCHAR2(30) | NOT NULL | Name of the unsupported column
DATA_TYPE | VARCHAR2(106) |  | Data type of the unsupported column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 299 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_METHOD_PARAMS

DBA_METHOD_PARAMS describes the method parameters of all object types in the database. Its columns are the same as those in ALL_METHOD_PARAMS.

See Also:

"ALL_METHOD_PARAMS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 300 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_METHOD_RESULTS

DBA_METHOD_RESULTS describes the method results of all object types in the database. Its columns are the same as those in ALL_METHOD_RESULTS.

See Also:

"ALL_METHOD_RESULTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 301 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_AGGREGATES

DBA_MVIEW_AGGREGATES describes the grouping functions (aggregated measures) that appear in the SELECT list of all aggregated materialized view in the database. Its columns are the same as those in "ALL_MVIEW_AGGREGATES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 302 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_ANALYSIS

DBA_MVIEW_ANALYSIS describes all materialized views in the database that potentially support query rewrite and that provide additional information for analysis by applications. Its columns are the same as those in "ALL_MVIEW_ANALYSIS" .

Note:

This view excludes materialized views that reference remote tables or that include references to non-static values such as SYSDATE or USER. This view also excludes materialized views that were created as snapshots prior to Oracle8i and that were never altered to enable query rewrite.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 303 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_DETAIL_RELATIONS

DBA_MVIEW_DETAIL_RELATIONS represents the named detail relations that are either in the FROM list of a materialized view, or that are indirectly referenced through views in the FROM list. Its columns are the same as those in "ALL_MVIEW_DETAIL_RELATIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 304 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_JOINS

DBA_MVIEW_JOINS describes a join between two columns in the WHERE clause of a subquery that defines a materialized view. Its columns are the same as those in "ALL_MVIEW_JOINS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 305 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_KEYS

DBA_MVIEW_KEYS describes the columns or expressions in the SELECT list upon which materialized views in the database are based. Its columns are the same as those in "ALL_MVIEW_KEYS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 306 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_LOG_FILTER_COLS

DBA_MVIEW_LOG_FILTER_COLS lists all columns (excluding primary key columns) being logged in the materialized view logs.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the master table being logged
NAME | VARCHAR2(30) | NOT NULL | Name of the master table being logged
COLUMN_NAME | VARCHAR2(30) | NOT NULL | Column being logged
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 307 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_LOGS

DBA_MVIEW_LOGS describes all materialized view logs in the database. Its columns are the same as those in ALL_MVIEW_LOGS.

See Also:

"ALL_MVIEW_LOGS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 308 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEW_REFRESH_TIMES

DBA_MVIEW_REFRESH_TIMES describes refresh times of all materialized views in the database. Its columns are the same as those in ALL_MVIEW_REFRESH_TIMES.

See Also:

"ALL_MVIEW_REFRESH_TIMES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 309 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_MVIEWS

DBA_MVIEWS describes all materialized views in the database. Its columns are the same as those in ALL_MVIEWS.

See Also:

"ALL_MVIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 310 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_NESTED_TABLES

DBA_NESTED_TABLES describes all nested tables contained in all tables in the database. Its columns are the same as those in "ALL_NESTED_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 311 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OBJ_AUDIT_OPTS

DBA_OBJ_AUDIT_OPTS describes auditing options on all objects.

Related View

USER_OBJ_AUDIT_OPTS describes auditing options on all objects owned by the current user. This view does not display the OWNER column.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) |  | Owner of the object
OBJECT_NAME | VARCHAR2(30) |  | Name of the object
OBJECT_TYPE | VARCHAR2(9) |  | Type of the object
ALT | VARCHAR2(3) |  | Auditing ALTER WHENEVER SUCCESSFUL/UNSUCCESSFUL
AUD | VARCHAR2(3) |  | Auditing AUDIT WHENEVER SUCCESSFUL/UNSUCCESSFUL
COM | VARCHAR2(3) |  | Auditing COMMENT WHENEVER SUCCESSFUL/UNSUCCESSFUL
DEL | VARCHAR2(3) |  | Auditing DELETE WHENEVER SUCCESSFUL/UNSUCCESSFUL
GRA | VARCHAR2(3) |  | Auditing GRANT WHENEVER SUCCESSFUL/UNSUCCESSFUL
IND | VARCHAR2(3) |  | Auditing INDEX WHENEVER SUCCESSFUL/UNSUCCESSFUL
INS | VARCHAR2(3) |  | Auditing INSERT WHENEVER SUCCESSFUL/UNSUCCESSFUL
LOC | VARCHAR2(3) |  | Auditing LOCK WHENEVER SUCCESSFUL/UNSUCCESSFUL
REN | VARCHAR2(3) |  | Auditing RENAME WHENEVER SUCCESSFUL/UNSUCCESSFUL
SEL | VARCHAR2(3) |  | Auditing SELECT WHENEVER SUCCESSFUL/UNSUCCESSFUL
UPD | VARCHAR2(3) |  | Auditing UPDATE WHENEVER SUCCESSFUL/UNSUCCESSFUL
REF | VARCHAR2(3) |  | Auditing REFERENCE WHENEVER SUCCESSFUL/UNSUCCESSFUL (not used)
EXE | VARCHAR2(3) |  | Auditing EXECUTE WHENEVER SUCCESSFUL/UNSUCCESSFUL
REA | VARCHAR2(3) |  | Auditing READ WHENEVER SUCCESSFUL/UNSUCCESSFUL
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 312 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OBJ_COLATTRS

DBA_OBJ_COLATTRS describes object columns and attributes contained in all tables in the database. Its columns are the same as those in ALL_OBJ_COLATTRS.

See Also:

"ALL_OBJ_COLATTRS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 313 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OBJECT_SIZE

DBA_OBJECT_SIZE lists the sizes, in bytes, of various PL/SQL objects.

Related View

USER_OBJECT_SIZE lists the size of PL/SQL objects owned by the current user.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
NAME | VARCHAR2(30) | NOT NULL | Name of the object
TYPE | VARCHAR2(12) |  | Type of the object: TYPE, TYPE BODY, TABLE, VIEW, SYNONYM, SEQUENCE, PROCEDURE, FUNCTION, PACKAGE, PACKAGE BODY, JAVA SOURCE, JAVA CLASS or JAVA RESOURCE
SOURCE_SIZE | NUMBER |  | Size of the source in bytes. Must be in memory during compilation, or dynamic recompilation.
PARSED_SIZE | NUMBER |  | Size of the parsed form of the object, in bytes. Must be in memory when an object is being compiled that references this object.
CODE_SIZE | NUMBER |  | Code size, in bytes. Must be in memory when this object is executing.
ERROR_SIZE | NUMBER |  | Size of error messages, in bytes. In memory during the compilation of the object when there are compilation errors.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 314 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OBJECT_TABLES

DBA_OBJECT_TABLES describes all object tables in the database. Its columns are the same as those in "ALL_OBJECT_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 315 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OBJECTS

DBA_OBJECTS describes all objects in the database. Its columns are the same as those in "ALL_OBJECTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 316 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OPANCILLARY

DBA_OPANCILLARY provides ancillary information for all operator bindings in the database. Its columns are the same as those in "ALL_OPANCILLARY" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 317 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OPARGUMENTS

DBA_OPARGUMENTS provides argument information for all operator bindings in the database. Its columns are the same as those in "ALL_OPARGUMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 318 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OPBINDINGS

DBA_OPBINDINGS describes bindings of all operators in the database. Its columns are the same as those in "ALL_OPBINDINGS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 319 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OPERATOR_COMMENTS

DBA_OPERATOR_COMMENTS lists all comments for user-defined operators in the database. Its columns are the same as those in ALL_OPERATOR_COMMENTS.

See Also:

"ALL_OPERATOR_COMMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 320 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OPERATORS

DBA_OPERATORS describes all operators in the database. Its columns are the same as those in ALL_OPERATORS.

See Also:

"ALL_OPERATORS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 321 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ORPHAN_KEY_TABLE

DBA_ORPHAN_KEY_TABLE reports key values from indexes where the underlying base table has block corruptions. To create the view, run the DBMS_REPAIR.ADMIN_TABLES procedure. To populate the orphan key table for an index, run the DBMS_REPAIR.DUMP_ORPHAN_KEYS procedure on the index. For each key in the index that points to a corrupt data block, Oracle inserts a row into the orphan key table.

Column | Datatype | NULL | Description
SCHEMA_NAME | VARCHAR2(30) | NOT NULL | Schema name of the index
INDEX_NAME | VARCHAR2(30) | NOT NULL | Name of the index
IPART_NAME | VARCHAR2(30) | NULL | Name of the index partition or subpartition
INDEX_ID | NUMBER | NOT NULL | Dictionary object ID of the index
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the base table of the index
PART_NAME | VARCHAR2(30) | NULL | Name of the base table partition or subpartition
TABLE_ID | NUMBER | NOT NULL | Dictionary object ID of the base table
KEYDATA | UROWID | NOT NULL | Physical rowid of the corrupt data row
KEY | UROWID | NOT NULL | Key values for the index entry
DUMP_TIMESTAMP | DATE | NOT NULL | Timestamp when the entry was made into the orphan key table
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 322 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OUTLINE_HINTS

DBA_OUTLINE_HINTS describes the set of hints that make up the all the outlines in the database. Its columns are the same as those in "ALL_OUTLINE_HINTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 323 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_OUTLINES

DBA_OUTLINES describes all outlines in the database. Its columns are the same as those in "ALL_OUTLINES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 324 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PART_COL_STATISTICS

DBA_PART_COL_STATISTICS provides column statistics and histogram information for partitions of all tables in the database. Its columns are the same as those in "ALL_PART_COL_STATISTICS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 325 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PART_HISTOGRAMS

DBA_PART_HISTOGRAMS provides the histogram data (end-points per histogram) for histograms on all table partitions in the database. Its columns are the same as those in "ALL_PART_HISTOGRAMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 326 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PART_INDEXES

DBA_PART_INDEXES describes the object-level partitioning information for all partitioned indexes in the database. Its columns are the same as those in ALL_PART_INDEXES.

See Also:

"ALL_PART_INDEXES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 327 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PART_KEY_COLUMNS

DBA_PART_KEY_COLUMNS describes the partitioning key columns for all partitioned objects in the database. Its columns are the same as those in ALL_PART_KEY_COLUMNS.

See Also:

"ALL_PART_KEY_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 328 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PART_LOBS

DBA_PART_LOBS provides table-level information for all partitioned LOBs in the database, including default attributes for LOB data partitions. Its columns are the same as those in "ALL_PART_LOBS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 329 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PART_TABLES

DBA_PART_TABLES describes the object-level partitioning information for all partitioned tables in the database. Its columns are the same as those in ALL_PART_TABLES.

See Also:

"ALL_PART_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 330 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PARTIAL_DROP_TABS

DBA_PARTIAL_DROP_TABS describes all tables in the database that have partially completed DROP COLUMN operations. Its columns are the same as those in "ALL_PARTIAL_DROP_TABS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 331 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PENDING_CONV_TABLES

DBA_PENDING_CONV_TABLES describes all pending conversion tables in the database. Its columns are the same as those in ALL_PENDING_CONV_TABLES.

See Also:

"ALL_PENDING_CONV_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 332 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PENDING_TRANSACTIONS

DBA_PENDING_TRANSACTIONS describes unresolved transactions (either due to failure or if the coordinator has not sent a commit/rollback).

Column | Datatype | NULL | Description
FORMATID | NUMBER |  | The format identifier of the transaction identifier
GLOBALID | RAW(64) |  | The global part (gtrid) of the transaction identifier
BRANCHID | RAW(64) |  | The branch qualifier (bqual) of the transaction identifier
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 333 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_POLICIES

DBA_POLICIES describes all security policies in the database. Its columns are the same as those in ALL_POLICIES.

See Also:

"ALL_POLICIES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 334 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_POLICY_CONTEXTS

DBA_POLICY_CONTEXTS describes all driving contexts in the database. Its columns are the same as those in ALL_POLICY_CONTEXTS.

See Also:

"ALL_POLICY_CONTEXTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 335 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_POLICY_GROUPS

DBA_POLICY_GROUPS describes all policy groups in the database. Its columns are the same as those in ALL_POLICY_GROUPS.

See Also:

"ALL_POLICY_GROUPS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 336 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PRIV_AUDIT_OPTS

DBA_PRIV_AUDIT_OPTS describes current system privileges being audited across the system and by user.

Column | Datatype | NULL | Description
USER_NAME | VARCHAR2(30) |  | User name if by user auditing. ANY CLIENT if access by a proxy on behalf of a client is being audited. NULL for system-wide auditing
PROXY_NAME | VARCHAR2(30) |  | The name of the proxy user which is performing an operation for the client; NULL if the client is performing the operation directly.
PRIVILEGE | VARCHAR2(40) | NOT NULL | Name of the system privilege being audited
SUCCESS | VARCHAR2(10) |  | Mode for WHENEVER SUCCESSFUL system auditing
FAILURE | VARCHAR2(10) |  | Mode for WHENEVER NOT SUCCESSFUL system auditing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 337 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PROCEDURES

DBA_PROCEDURES lists all functions and procedures along with their associated properties. Its columns are the same as those in "ALL_PROCEDURES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 338 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PROFILES

DBA_PROFILES displays all profiles and their limits.

Column | Datatype | NULL | Description
PROFILE | VARCHAR2(30) | NOT NULL | Profile name
RESOURCE_NAME | VARCHAR2(32) | NOT NULL | Resource name
RESOURCE_TYPE | VARCHAR2(8) |  | Indicates whether the resource profile is a KERNEL or a PASSWORD parameter
LIMIT | VARCHAR2(40) |  | Limit placed on this resource for this profile
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 339 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PROPAGATION

DBA_PROPAGATION displays information about all Streams propagations in the database. Its columns are the same as those in ALL_PROPAGATION.

See Also:

"ALL_PROPAGATION"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 340 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PROXIES

DBA_PROXIES displays Information about all proxy connections in the system.

Related View

USER_PROXIES displays information about connections the current user is allowed to proxy. This view does not display the PROXY column.

Column | Datatype | NULL | Description
PROXY | VARCHAR2(30) | NOT NULL | Name of the proxy user
CLIENT | VARCHAR2(30) | NOT NULL | Name of the client user who the proxy user can act on behalf of
CREDENTIAL | VARCHAR2(18) |  | Credential passed by the proxy for the client (if any)
TYPE | VARCHAR2(5) |  | Type of the credential
VERSION | VARCHAR2(1) |  | Version of the credential
AUTHORIZATION_CONSTRAINT | VARCHAR2(35) |  | Indicates the proxy's authority to exercise roles on client's behalf.
ROLE | VARCHAR2(30) |  | Name of the role referenced in authorization constraint
See Also:

"USER_PROXIES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 341 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_PUBLISHED_COLUMNS

DBA_PUBLISHED_COLUMNS describes all existing source column tables. You must have the SELECT_CATALOG_ROLE privilege to access this view.

Column | Datatype | Description
CHANGE_SET_NAME | VARCHAR2(30) | Name of the change set
CHANGE_TABLE_SCHEMA | VARCHAR2(30) | Associated change table owner
CHANGE_TABLE_NAME | VARCHAR2(31) | Associated change table name
PUB_ID | NUMBER | Publication identifier (change table object number)
SOURCE_SCHEMA_NAME | VARCHAR2(30) | Table owner in the source system
SOURCE_TABLE_NAME | VARCHAR2(31) | Table name in the source system
COLUMN_NAME | VARCHAR2(30) | Column name
DATA_TYPE | VARCHAR2(30) | Column datatype
DATA_LENGTH | NUMBER | Column length in bytes
DATA_PRECISION | NUMBER | Decimal precision for NUMBER datatype; binary precision for FLOAT datatype; NULL for all other datatypes
DATA_SCALE | NUMBER | Digits to the right of a decimal point in a number
NULLABLE | CHAR(1) | Nulls allowed (Y |N)?
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 342 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_QUEUE_SCHEDULES

DBA_QUEUE_SCHEDULES describes the current schedules for propagating messages.

Related View

USER_QUEUE_SCHEDULES describes current schedules related to the current user. This view does not display the SCHEMA column.

Column | Datatype | NULL | Description
SCHEMA | VARCHAR2(30) | NOT NULL | The schema
QNAME | VARCHAR2(30) | NOT NULL | Source queue name
DESTINATION | VARCHAR2(128) | NOT NULL | Destination name, currently limited to be a DBLINK name
START_DATE | DATE |  | Date to start propagation in the default date format
START_TIME | VARCHAR2(8) |  | Time of day at which to start propagation in HH:MI:SS format
PROPAGATION_WINDOW | NUMBER |  | Duration in seconds for the propagation window
NEXT_TIME | VARCHAR2(200) |  | Function to compute the start of the next propagation window
LATENCY | NUMBER |  | Maximum wait time to propagate a message during the propagation window
SCHEDULE_DISABLED | VARCHAR2(1) |  | N if enabled; Y if disabled and schedule will not be executed
PROCESS_NAME | VARCHAR2(8) |  | The name of the process executing the schedule; NULL if not currently executing
SESSION_ID | NUMBER |  | The session ID (SID, SERIAL#) of the job executing this schedule; NULL if not currently executing
INSTANCE | NUMBER |  | The cluster database instance number executing the schedule
LAST_RUN_DATE | DATE |  | The date on the last successful execution
LAST_RUN_TIME | VARCHAR2(8) |  | The time of the last successful execution in HH:MI:SS format
CURRENT_START_DATE | DATE |  | The date at which the current window of this schedule was started
CURRENT_START_TIME | VARCHAR2(8) |  | The time of day at which the current window of this schedule was started in HH:MI:SS format
NEXT_RUN_DATE | DATE |  | The date at which the next window of this schedule will be started
NEXT_RUN_TIME | VARCHAR2(8) |  | The time of day at which the next window of this schedule will be started in HH:MI:SS format
TOTAL_TIME | NUMBER |  | The total time, in seconds, spent by the system in executing this schedule
TOTAL_NUMBER | NUMBER |  | The total number of messages propagated in this schedule
TOTAL_BYTES | NUMBER |  | The total number of bytes propagated in this schedule
MAX_NUMBER | NUMBER |  | The maximum number of messages propagated in a propagation window
MAX_BYTES | NUMBER |  | The maximum number of bytes propagated in a propagation window
AVG_NUMBER | NUMBER |  | The average number of messages propagated in a propagation window
AVG_SIZE | NUMBER |  | The average size of a propagated message in bytes
AVG_TIME | NUMBER |  | The average time, in seconds, to propagate a message
FAILURES | NUMBER |  | The number of times the execution failed; if 16, the schedule will be disabled
LAST_ERROR_DATE | DATE |  | The date of the last unsuccessful execution
LAST_ERROR_TIME | VARCHAR2(8) |  | The time of the last unsuccessful execution
LAST_ERROR_MSG | VARCHAR2(4000) |  | The error number and error message text of the last unsuccessful execution
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 343 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_QUEUE_TABLES

DBA_QUEUE_TABLES describes the queues in all queue tables in the database. Its columns are the same as those in ALL_QUEUE_TABLES.

See Also:

"ALL_QUEUE_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 344 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_QUEUES

DBA_QUEUES describes the operational characteristics of every queue in a database. Its columns are the same as those in "ALL_QUEUES" .

See Also:

Oracle9i Application Developer's Guide - Advanced Queuing for more information about this view and Advanced Queuing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 345 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RCHILD

DBA_RCHILD lists all the children in any refresh group.

Column | Datatype | NULL | Description
REFGROUP | NUMBER |  | Internal identifier of refresh group
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object in the refresh group
NAME | VARCHAR2(30) | NOT NULL | Name of the object in the refresh group
TYPE# | VARCHAR2(30) |  | Type of the object in the refresh group
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 346 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REFRESH

DBA_REFRESH describes all refresh groups in the database. Its columns are the same as those in "ALL_REFRESH" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 347 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REFRESH_CHILDREN

DBA_REFRESH_CHILDREN lists all of the objects in all refresh groups in the database. Its columns are the same as those in "ALL_REFRESH_CHILDREN" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 348 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REFS

DBA_REFS describes the REF columns and REF attributes in object type columns of all the objects in the database. Its columns are the same as those in "ALL_REFS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 349 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REGISTERED_MVIEW_GROUPS

DBA_REGISTERED_MVIEW_GROUPS lists all the materialized view repgroups at this site.

Column | Datatype | NULL | Description
NAME | VARCHAR2(30) |  | Name of the materialized view replication group
MVIEW_SITE | VARCHAR2(128) |  | Site of the master of the materialized view repgroup
GROUP_COMMENT | VARCHAR2(80) |  | Description of the materialized view repgroup
VERSION | VARCHAR2(8) |  | Version of the materialized view repgroup
FNAME | VARCHAR2(30) |  | Name of the flavor of the materialized view object group
OWNER | VARCHAR2(30) |  | Owner of the materialized view group
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 350 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REGISTERED_MVIEWS

DBA_REGISTERED_MVIEWS describes all registered materialized views (registered at a master site or a master materialized view site) in the database. Its columns are the same as those in ALL_REGISTERED_MVIEWS.

See Also:

"ALL_REGISTERED_MVIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 351 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REGISTRY

DBA_REGISTRY displays information about the components loaded into the database.

Related View

USER_REGISTRY displays information about the components loaded into the database that are owned by the current user.

Column Datatype NULL Description

COMP_ID

VARCHAR2(30)

NOT NULL

Component identifier

COMP_NAME

VARCHAR2(255)

Component name

VERSION

VARCHAR2(30)

Component version loaded

STATUS

VARCHAR2(11)

Component status:

  • INVALID
  • VALID
  • LOADING
  • LOADED
  • UPGRADING
  • UPGRADED
  • DOWNGRADING
  • DOWNGRADED
  • REMOVING
  • REMOVED

MODIFIED

VARCHAR2(20)

Time when the component was last modified

CONTROL

VARCHAR2(30)

NOT NULL

User that created the component entry

SCHEMA

VARCHAR2(30)

NOT NULL

User that contains the objects for the component

PROCEDURE

VARCHAR2(61)

Validation procedure

STARTUP

VARCHAR2(8)

Indicates whether the component requires a startup after the upgrade

PARENT_ID

VARCHAR2(30)

Parent component identifier
See Also:

"USER_REGISTRY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 352 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REGISTRY_HIERARCHY

DBA_REGISTRY_HIERARCHY displays information about the components loaded into the database, grouped by owner and organized in the component hierarchy.

Column Datatype NULL Description

COMP_ID

VARCHAR2(4000)

Component identifier

VERSION

VARCHAR2(30)

Component version loaded

STATUS

VARCHAR2(11)

Component status:

  • INVALID
  • VALID
  • LOADING
  • LOADED
  • UPGRADING
  • UPGRADED
  • DOWNGRADING
  • DOWNGRADED
  • REMOVING
  • REMOVED

MODIFIED

VARCHAR2(20)

Time when the component was last modified
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 353 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_REPAIR_TABLE

DBA_REPAIR_TABLE describes any corruptions found by the DBMS_REPAIR.CHECK_OBJECT procedure. This information is used by the DBMS_REPAIR.FIX_CORRUPT_BLOCKS procedure on execution. To create this view, first run the DBMS_REPAIR.ADMIN_TABLES procedure. To populate the resulting repair table for an object, run the DBMS_REPAIR.CHECK_OBJECT procedure on the object.

Note:

The table created by the DBMS_REPAIR.ADMIN_TABLES procedure is called REPAIR TABLE by default. If you specify a different name, this view will have the name you specify, preceded by "DBA_REPAIR_".

Column | Datatype | NULL | Description
OBJECT_ID | NUMBER | NOT NULL | Dictionary object number of the object with the corruption
TABLESPACE_ID | NUMBER | NOT NULL | Tablespace number of the corrupt object
RELATIVE_FILE_ID | NUMBER) | NOT NULL | Relative file number of the corrupt object
BLOCK_ID | NUMBER | NOT NULL | Block number of the corruption
CORRUPT_TYPE | NUMBER | NOT NULL | Type of corruption encountered
SCHEMA_NAME | VARCHAR2(30) | NOT NULL | Schema of the corrupt object
OBJECT_NAME | VARCHAR2(30) | NOT NULL | Name of the corrupt object
BASEOBJECT_NAME | VARCHAR2(30) | NULL | If the object is an index, the name of its base table
PARTITION_NAME | VARCHAR2(30) | NULL | Partition or subpartition name, if applicable
CORRUPT_DESCRIPTION | VARCHAR2(200) | NULL | Description of corruption
REPAIR_DESCRIPTION | VARCHAR2(200) | NULL | Description of repair action
MARKED_CORRUPT | VARCHAR2(10) | NOT NULL | Whether the block is marked corrupt (TRUE | FALSE)
CHECK_TIMESTAMP | DATE | NOT NULL | Date on which this row was insert into the repair table
FIX_TIMESTAMP | DATE | NULL | Date on which the block was modified by the FIX_CORRUPT_BLOCKS procedure, if applicable
REFORMAT_TIMESTAMP | DATE | NULL | Reserved for future use
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 354 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RESUMABLE

DBA_RESUMABLE lists all resumable statements executed in the system.

Related View

USER_RESUMABLE lists resumable statements executed by the current user. This view does not display the USER_ID column.

Column | Datatype | NULL | Description
USER_ID | NUMBER |  | User ID Number of the Resumable Statement Owner
SESSION_ID | NUMBER |  | Session Identifier of Resumable Statement
INSTANCE_ID | NUMBER |  | Instance Number of Resumable Statement
COORD_SESSION_ID | NUMBER |  | Session Identifier of Parallel Coordinator
COORD_INSTANCE_ID | NUMBER |  | Instance Number on which the Parallel Coordinator is Running
SQL_TEXT | VARCHAR2(1000) |  | The resumable statement, selected from the V$SQL view.
NAME | VARCHAR2(4000) |  | The name given in the resumable clause of this resumable statement.
STATUS | VARCHAR2(16) |  | The status of the resumable statement. Its value can be one of RUNNING, SUSPENDED, ABORTED, ABORTING, TIMEOUT
ERROR_NUMBER | NUMBER |  | The error code of the last correctable error. When STATUS is equal to RUNNING, its value will be set to 0.
ERROR_MSG | VARCHAR2(4000) |  | The error message corresponding to ERROR_NUMBER. It will be set to NULL when ERROR_NUMBER is NULL.
ERROR_PARAMETER1 | VARCHAR2(80) |  | The first parameter for the error message. NULL if no error.
ERROR_PARAMETER2 | VARCHAR2(80) |  | The second parameter for the error message. NULL if no error.
ERROR_PARAMETER3 | VARCHAR2(80) |  | The third parameter for the error message. NULL if no error.
ERROR_PARAMETER4 | VARCHAR2(80) |  | The forth parameter for the error message. NULL if no error.
ERROR_PARAMETER5 | VARCHAR2(80) |  | The fifth parameter for the error message. NULL if no error.
START_TIME | DATE |  | The start local time of the resumable statement.
SUSPEND_TIME | DATE |  | The last local time when the resumable statement was suspended. It is initialized to NULL.
RESUME_TIME | DATE |  | The last local time when the suspended resumable statement is resumed. It is initialized to NULL.
TIMEOUT | NUMBER |  | Timeout of the resumable statement
See Also:

"USER_RESUMABLE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 355 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RGROUP

DBA_RGROUP lists all refresh groups.

Column | Datatype | NULL | Description
REFGROUP | NUMBER |  | Internal identifier of refresh group
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object in the refresh group
NAME | VARCHAR2(30) | NOT NULL | Name of the object in the refresh group
IMPLICIT_DESTROY | VARCHAR2(1) |  | (Y or N) If Y, then destroy the refresh group when its last item is removed
PUSH_DEFERRED_RPC | VARCHAR2(1) |  | (Y or N) If Y, then push changes from snapshot to master before refresh
REFRESH_AFTER_ERRORS | VARCHAR2(1) |  | (Y or N) If Y, proceed with refresh despite error when pushing deferred RPC's
ROLLBACK_SEG | VARCHAR2(30) |  | Name of the rollback segment to use while refreshing
JOB | NUMBER | NOT NULL | Identifier of job used to refresh the group automatically
PURGE_OPTION | NUMBER(38) |  | The method for purging the transaction queue after each push. 1 indicates quick purge option; 2 indicates precise purge option
PARALLELISM | NUMBER(38) |  | The level of parallelism for transaction propagation
HEAP_SIZE | NUMBER(38) |  | The size of the heap
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 356 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ROLE_PRIVS

DBA_ROLE_PRIVS describes the roles granted to all users and roles in the database.

Related View

USER_ROLE_PRIVS describes the roles granted to the current user.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) |  | Name of the user or role receiving the grant
GRANTED_ROLE | VARCHAR2(30) | NOT NULL | Granted role name
ADMIN_OPTION | VARCHAR2(3) |  | Indicates whether the grant was with the ADMIN OPTION (YES) or not (NO)
DEFAULT_ROLE | VARCHAR2(3) |  | Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO)
See Also:

"USER_ROLE_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 357 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ROLES

DBA_ROLES lists all roles that exist in the database.

Column | Datatype | NULL | Description
ROLE | VARCHAR2(30) | NOT NULL | Role name
PASSWORD_REQUIRED | VARCHAR2(8) |  | Indicates if the role requires a password to be enabled
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 358 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_ROLLBACK_SEGS

DBA_ROLLBACK_SEGS describes rollback segments.

Column | Datatype | NULL | Description
SEGMENT_NAME | VARCHAR2(30) | NOT NULL | Name of the rollback segment
OWNER | VARCHAR2(6) |  | Owner of the rollback segment
TABLESPACE_NAME | VARCHAR2(30) | NOT NULL | Name of the tablespace containing the rollback segment
SEGMENT_ID | NUMBER | NOT NULL | ID number of the rollback segment
FILE_ID | NUMBER | NOT NULL | File identifier number of the file containing the segment head
BLOCK_ID | NUMBER | NOT NULL | ID number of the block containing the segment header
INITIAL_EXTENT | NUMBER |  | Initial extent size in bytes
NEXT_EXTENT | NUMBER |  | Secondary extent size in bytes
MIN_EXTENTS | NUMBER | NOT NULL | Minimum number of extents
MAX_EXTENTS | NUMBER | NOT NULL | Maximum number of extent
PCT_INCREASE | NUMBER | NOT NULL | Percent increase for extent size
STATUS | VARCHAR2(16) |  | Rollback segment status
INSTANCE_NUM | VARCHAR2(40) |  | Rollback segment owning Oracle Real Application Cluster instance number
RELATIVE_FNO | NUMBER | NOT NULL | Relative file number of the segment header
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 359 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RSRC_CONSUMER_GROUP_PRIVS

DBA_RSRC_CONSUMER_GROUP_PRIVS lists all resource consumer groups and the users and roles assigned to them. The grant referred to in this view and the related view is the grant of the SWITCH_CONSUMER_GROUP object privilege, which is granted using the DBMS_RESOURCE_MANAGER_PRIVS package. (This privilege is not granted through the GRANT SQL statement.)

Related View

USER_RSRC_CONSUMER_GROUP_PRIVS lists all resource consumer groups to which the current user is assigned. This view does not display the GRANTEE column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | User or role receiving the grant
GRANTED_GROUP | VARCHAR2(30) |  | Granted consumer group name
GRANT_OPTION | VARCHAR2(3) |  | (YES/NO) Indicates whether grant was with the GRANT option
INITIAL_GROUP | VARCHAR2(3) |  | (YES/NO) Indicates whether consumer group is designated as the default for this user or role
See Also:
  • "USER_RSRC_CONSUMER_GROUP_PRIVS"
  • Oracle9i Supplied PL/SQL Packages and Types Reference for more information on consumer group privileges
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 360 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RSRC_CONSUMER_GROUPS

DBA_RSRC_CONSUMER_GROUPS lists all resource consumer groups in the database.

Column | Datatype | NULL | Description
CONSUMER_GROUP | VARCHAR2(30) |  | Name of the consumer group
CPU_METHOD | VARCHAR2(30) |  | CPU resource allocation method for the consumer group
COMMENTS | VARCHAR2(2000) |  | Text comment on the consumer group
STATUS | VARCHAR2(30) |  | Status of the consumer group: PENDING if the group is part of the pending area, ACTIVE otherwise.
MANDATORY | VARCHAR2(3) |  | Whether the consumer group is mandatory (YES | NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 361 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RSRC_MANAGER_SYSTEM_PRIVS

DBA_RSRC_MANAGER_SYSTEM_PRIVS lists all the users and roles that have been granted the ADMINISTER_RESOURCE_MANAGER system privilege, which is granted using the DBMS_RESOURCE_MANAGER_PRIVS package. (This privilege is not granted through the SQL GRANT statement.)

Related View

USER_RSRC_MANAGER_SYSTEM_PRIVS lists users who are granted system privilege for the DBMS_RESOURCE_MANAGER package. This view does not display the GRANTEE column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | User or role receiving the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Name of the system privilege
ADMIN_OPTION | VARCHAR2(3) |  | Whether the grant was with the ADMIN option
See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for more information on consumer group privileges
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 362 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RSRC_PLAN_DIRECTIVES

DBA_RSRC_PLAN_DIRECTIVES lists all resource plan directives in the database.

See Also:
  • Oracle9i Database Administrator's Guide for information on resource plans in general
  • Oracle9i Supplied PL/SQL Packages and Types Reference for more information on creating resource plans with the DBMS_RESOURCE_MANAGER package

Column | Datatype | Description
PLAN | VARCHAR2(30) | Name of the plan to which this directive belongs
GROUP_OR_SUBPLAN | VARCHAR2(30) | Name of the consumer group or subplan referred to
TYPE | VARCHAR2(14) | Whether GROUP_OR_SUBPLAN refers to a consumer group or plan
CPU_P1 | NUMBER | First parameter for the CPU resource allocation method
CPU_P2 | NUMBER | Second parameter for the CPU resource allocation method
CPU_P3 | NUMBER | Third parameter for the CPU resource allocation method
CPU_P4 | NUMBER | Fourth parameter for the CPU resource allocation method
CPU_P5 | NUMBER | Fifth parameter for the CPU resource allocation method
CPU_P6 | NUMBER | Sixth parameter for the CPU resource allocation method
CPU_P7 | NUMBER | Seventh parameter for the CPU resource allocation method
CPU_P8 | NUMBER | Eighth parameter for the CPU resource allocation method
ACTIVE_SESS_POOL_P1 | NUMBER | First parameter for the active session pool resource allocation method
QUEUING_P1 | NUMBER | First parameter for the queuing resource allocation method
PARALLEL_DEGREE_LIMIT_P1 | NUMBER | First parameter for the parallel degree limit resource allocation method
SWITCH_GROUP | VARCHAR2(30) | Group to switch into
SWITCH_TIME | NUMBER | Amount of run time before session is automatically switched
SWITCH_ESTIMATE | VARCHAR2(5) | (TRUE/FALSE) TRUE indicates estimated execution time should be used for switch criteria
MAX_EST_EXEC_TIME | NUMBER | First parameter for the maximum estimated execution time
UNDO_POOL | NUMBER | Undo pool size for the consumer group
COMMENTS | VARCHAR2(2000) | Text comment on the plan directive
STATUS | VARCHAR2(30) | Status of the directive: PENDING if it is part of the pending area, ACTIVE otherwise
MANDATORY | VARCHAR2(3) | Whether the plan is mandatory (YES | NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 363 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RSRC_PLANS

DBA_RSRC_PLANS lists all resource plans in the database. For a list of currently active plans, see "V$RSRC_PLAN" .

See Also:
  • Oracle9i Database Administrator's Guide for information on resource plans in general
  • Oracle9i Supplied PL/SQL Packages and Types Reference for more information on creating resource plans with the DBMS_RESOURCE_MANAGER package

Column | Datatype | NULL | Description
PLAN | VARCHAR2(30) |  | Name of the resource plan
NUM_PLAN_DIRECTIVES | NUMBER |  | Number of plan directives for the plan
CPU_METHOD | VARCHAR2(30) |  | CPU resource allocation method for the plan
ACTIVE_SESS_POOL_MTH | VARCHAR2(30) |  | Active session pool resource allocation method for the plan
PARALLEL_DEGREE_LIMIT_MTH | VARCHAR2(30) |  | Parallel degree limit resource allocation method for the plan
QUEUING_MTH | VARCHAR2(30) |  | Queuing resource allocation method for the plan
COMMENTS | VARCHAR2(2000) |  | Text comment on the plan
STATUS | VARCHAR2(30) |  | Status of the plan: PENDING if it is part of the pending area, ACTIVE otherwise
MANDATORY | VARCHAR2(3) |  | (YES/NO) Indicates whether the plan is mandatory
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 364 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RULE_SET_RULES

DBA_RULE_SET_RULES describes the rules in all rule sets in the database. Its columns are the same as those in ALL_RULE_SET_RULES.

See Also:

"ALL_RULE_SET_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 365 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RULE_SETS

DBA_RULE_SETS describes all rule sets in the database. Its columns are the same as those in ALL_RULE_SETS.

See Also:

"ALL_RULE_SETS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 366 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_RULES

DBA_RULES describes all rules in the database. Its columns are the same as those in ALL_RULES.

See Also:

"ALL_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 367 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SEGMENTS

DBA_SEGMENTS describes the storage allocated for all segments in the database.

Related View

USER_SEGMENTS describes the storage allocated for the segments owned by the current user's objects. This view does not display the OWNER, HEADER_FILE, HEADER_BLOCK, or RELATIVE_FNO columns.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) |  | Username of the segment owner
SEGMENT_NAME | VARCHAR2(81) |  | Name, if any, of the segment
PARTITION_NAME | VARCHAR2(30) |  | Object Partition Name (Set to NULL for non-partitioned objects)
SEGMENT_TYPE | VARCHAR2(17) |  | Type of segment: INDEX PARTITION, TABLE PARTITION, TABLE, CLUSTER, INDEX, ROLLBACK, DEFERRED ROLLBACK, TEMPORARY, CACHE, LOBSEGMENT and LOBINDEX
TABLESPACE_NAME | VARCHAR2(30) |  | Name of the tablespace containing the segment
HEADER_FILE | NUMBER |  | ID of the file containing the segment header
HEADER_BLOCK | NUMBER |  | ID of the block containing the segment header
BYTES | NUMBER |  | Size in bytes, of the segment
BLOCKS | NUMBER |  | Size, in Oracle blocks, of the segment
EXTENTS | NUMBER |  | Number of extents allocated to the segment
INITIAL_EXTENT | NUMBER |  | Size in bytes requested for the initial extent of the segment at create time. (Oracle rounds the extent size to multiples of 5 blocks if the requested size is greater than 5 blocks.)
NEXT_EXTENT | NUMBER |  | Size in bytes of the next extent to be allocated to the segment
MIN_EXTENTS | NUMBER |  | Minimum number of extents allowed in the segment
MAX_EXTENTS | NUMBER |  | Maximum number of extents allowed in the segment
PCT_INCREASE | NUMBER |  | Percent by which to increase the size of the next extent to be allocated
FREELISTS | NUMBER |  | Number of process freelists allocated to this segment
FREELIST_GROUPS | NUMBER |  | Number of freelist groups allocated to this segment
RELATIVE_FNO | NUMBER |  | Relative file number of the segment header
BUFFER_POOL | VARCHAR2(7) |  | Default buffer pool for the object
See Also:

"USER_SEGMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 368 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SEQUENCES

DBA_SEQUENCES describes all sequences in the database. Its columns are the same as those in "ALL_SEQUENCES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 369 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SOURCE

DBA_SOURCE describes the text source of all stored objects in the database. Its columns are the same as those in "ALL_SOURCE" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 370 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SOURCE_TABLES

DBA_SOURCE_TABLES enables publishers to see all existing (published) source tables. Its columns are the same as those in ALL_SOURCE_TABLES.

See Also:

"ALL_SOURCE_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 371 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SQLJ_TYPE_ATTRS

DBA_SQLJ_TYPE_ATTRS describes the attributes of all SQLJ object types in the database. Its columns are the same as those in ALL_SQLJ_TYPE_ATTRS.

See Also:

"ALL_SQLJ_TYPE_ATTRS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 372 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SQLJ_TYPE_METHODS

DBA_SQLJ_TYPE_METHODS describes the methods of all SQLJ object types in the database. Its columns are the same as those in ALL_SQLJ_TYPE_METHODS.

See Also:

"ALL_SQLJ_TYPE_METHODS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 373 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SQLJ_TYPES

DBA_SQLJ_TYPES describes all SQLJ object types in the database. Its columns are the same as those in ALL_SQLJ_TYPES.

See Also:

"ALL_SQLJ_TYPES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 374 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_STMT_AUDIT_OPTS

DBA_STMT_AUDIT_OPTS describes current system auditing options across the system and by user.

Column | Datatype | NULL | Description
USER_NAME | VARCHAR2(30) |  | User name if by user auditing. ANY CLIENT if access by a proxy on behalf of a client is being audited. NULL for system-wide auditing
PROXY_NAME | VARCHAR2(30) |  | The name of the proxy user which is performing an operation for the client. NULL if the client is performing the operation directly.
AUDIT_OPTION | VARCHAR2(40) | NOT NULL | Name of the system auditing option
SUCCESS | VARCHAR2(10) |  | Mode for WHENEVER SUCCESSFUL system auditing
FAILURE | VARCHAR2(10) |  | Mode for WHENEVER NOT SUCCESSFUL system auditing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 375 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_STORED_SETTINGS

DBA_STORED_SETTINGS lists information about the persistent parameter settings for stored PL/SQL units for which the current user has execute privileges. It also returns parameter information for all objects in the database and is accessible only to users with the SELECT_CATALOG_ROLE privilege. Its columns are the same as those in "ALL_STORED_SETTINGS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 376 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_STREAMS_GLOBAL_RULES

DBA_STREAMS_GLOBAL_RULES displays information about the global rules created for all Streams capture processes, propagations, and apply processes in the database. Its columns are the same as those in ALL_STREAMS_GLOBAL_RULES.

See Also:

"ALL_STREAMS_GLOBAL_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 377 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_STREAMS_SCHEMA_RULES

DBA_STREAMS_SCHEMA_RULES displays information about the schema rules created for all Streams capture processes, propagations, and apply processes in the database. Its columns are the same as those in ALL_STREAMS_SCHEMA_RULES.

See Also:

"ALL_STREAMS_SCHEMA_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 378 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_STREAMS_TABLE_RULES

DBA_STREAMS_TABLE_RULES displays information about the table rules created for all Streams capture processes, propagations, and apply processes in the database. Its columns are the same as those in ALL_STREAMS_TABLE_RULES.

See Also:

"ALL_STREAMS_TABLE_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 379 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBPART_COL_STATISTICS

DBA_SUBPART_COL_STATISTICS provides column statistics and histogram information for all subpartitions in the database. Its columns are the same as those in "ALL_STORED_SETTINGS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 380 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBPART_HISTOGRAMS

DBA_SUBPART_HISTOGRAMS lists actual histogram data (end-points per histogram) for histograms on all table subpartitions in the database. Its columns are the same as those in "ALL_SUBPART_HISTOGRAMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 381 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBPART_KEY_COLUMNS

DBA_SUBPART_KEY_COLUMNS lists subpartitioning key columns for all composite-partitioned tables (and local indexes on composite-partitioned tables) in the database. Its columns are the same as those in ALL_SUBPART_KEY_COLUMNS.

See Also:

"ALL_SUBPART_KEY_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 382 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBPARTITION_TEMPLATES

DBA_SUBPARTITION_TEMPLATES describes all subpartition templates in the database. Its columns are the same as those in ALL_SUBPARTITION_TEMPLATES.

See Also:

"ALL_SUBPARTITION_TEMPLATES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 383 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBSCRIBED_COLUMNS

DBA_SUBSCRIBED_COLUMNS enables publishers to view the columns of published tables to which they have subscribed. You must have the SELECT_CATALOG_ROLE privilege to access this view. The columns in DBA_SUBSCRIBED_COLUMNS are the same as those in "ALL_SUBSCRIBED_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 384 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBSCRIBED_TABLES

DBA_SUBSCRIBED_TABLES enables publishers to view all of the published tables to which they have subscribed. Its columns are the same as those in "ALL_SUBSCRIBED_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 385 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SUBSCRIPTIONS

DBA_SUBSCRIPTIONS enables publishers to see all subscriptions. You must have the SELECT_CATALOG_ROLE privilege to access this view. Except for the USERNAME column, which identifies the user name of the subscriber, DBA_SUBSCRIPTIONS has the same columns as those in "ALL_SUBSCRIPTIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 386 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SYNONYMS

DBA_SYNONYMS describes all synonyms in the database. Its columns are the same as those in "ALL_SYNONYMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 387 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_SYS_PRIVS

DBA_SYS_PRIVS describes system privileges granted to users and roles. This view does not display the USERNAME column.

Related View

USER_SYS_PRIVS describes system privileges granted to the current user. This view does not display the GRANTEE column, but instead displays the USERNAME column.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Grantee name, user, or role receiving the grant
USERNAME | VARCHAR2(30) |  | Name of the current user
PRIVILEGE | VARCHAR2(40) | NOT NULL | System privilege
ADMIN_OPTION | VARCHAR2(3) |  | Grant was with the ADMIN option
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 388 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_COL_STATISTICS

DBA_TAB_COL_STATISTICS contains column statistics and histogram information extracted from "DBA_TAB_COLUMNS" . Its columns are the same as those in "ALL_TAB_COL_STATISTICS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 389 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_COLUMNS

DBA_TAB_COLUMNS describes columns of all tables, views, and clusters in the database. Its columns are the same as those in "ALL_TAB_COLUMNS" . To gather statistics for this view, use the SQL ANALYZE statement.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 390 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_COMMENTS

DBA_TAB_COMMENTS describes comments on all tables and views in the database. Its columns are the same as those in "ALL_TAB_COMMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 391 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_HISTOGRAMS

DBA_TAB_HISTOGRAMS describes histograms on columns of all tables in the database. Its columns are the same as those in "ALL_TAB_HISTOGRAMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 392 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_MODIFICATIONS

DBA_TAB_MODIFICATIONS describes modifications to all tables in the database that have been modified since the last time statistics were gathered on the tables. Its columns are the same as those in "ALL_TAB_MODIFICATIONS" .

Note:

This view is populated only for tables with the MONITORING attribute. It is intended for statistics collection over a long period of time and may not be populated until a few hours after the actual modifications occurred.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 393 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_PARTITIONS

DBA_TAB_PARTITIONS provides the partition-level partitioning information, partition storage parameters, and partition statistics determined by ANALYZE statements for all partitions in the database. Its columns are the same as those in "ALL_TAB_PARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 394 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_PRIVS

DBA_TAB_PRIVS describes all object grants in the database.

Related View

USER_TAB_PRIVS describes the object grants for which the current user is the object owner, grantor, or grantee.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
PRIVILEGE | VARCHAR2(40) | NOT NULL | Privilege on the object
GRANTABLE | VARCHAR2(3) |  | Indicates whether the privilege was granted with the GRANT OPTION (YES) or not (NO)
HIERARCHY | VARCHAR2(3) |  | Indicates whether the privilege was granted with the HIERARCHY OPTION (YES) or not (NO)
See Also:

"USER_TAB_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 395 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TAB_SUBPARTITIONS

DBA_TAB_SUBPARTITIONS describes, for each table subpartition, the subpartition name, name of the table and partition to which it belongs, and its storage attributes. Its columns are the same as those in "ALL_TAB_SUBPARTITIONS" .

Note:

Statistics are not collected on a per-subpartition basis.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 396 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TABLES

DBA_TABLES describes all relational tables in the database. Its columns are the same as those in ALL_TABLES. To gather statistics for this view, use the SQL ANALYZE statement.

See Also:

"ALL_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 397 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TABLESPACES

DBA_TABLESPACES describes all tablespaces in the database.

Related View

USER_TABLESPACES describes the tablespaces accessible to the current user. This view does not display the PLUGGED_IN column.

Column Datatype NULL Description

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Tablespace name

BLOCK_SIZE

NUMBER

NOT NULL

Tablespace block size

INITIAL_EXTENT

NUMBER

Default initial extent size

NEXT_EXTENT

NUMBER

Default incremental extent size

MIN_EXTENTS

NUMBER

NOT NULL

Default minimum number of extents

MAX_EXTENTS

NUMBER

Default maximum number of extents

PCT_INCREASE

NUMBER

Default percent increase for extent size

MIN_EXTLEN

NUMBER

Minimum extent size for this tablespace

STATUS

VARCHAR2(9)

Tablespace status:

  • ONLINE
  • OFFLINE
  • READ ONLY

CONTENTS

VARCHAR2(9)

Tablespace contents:

  • UNDO
  • PERMANENT
  • TEMPORARY

LOGGING

VARCHAR2(9)

Default logging attribute:

  • LOGGING
  • NOLOGGING

FORCE_LOGGING

VARCHAR2(3)

Indicates whether this tablespace is under force logging mode (YES) or not (NO)

EXTENT_MANAGEMENT

VARCHAR2(10)

Indicates how the extents of this tablespace are managed:

  • DICTIONARY - Tablespace is dictionary managed
  • LOCAL - Tablespace is locally managed

ALLOCATION_TYPE

VARCHAR2(9)

Type of extent allocation in effect for this tablespace:

  • SYSTEM
  • UNIFORM
  • USER

PLUGGED_IN

VARCHAR2(3)

Indicates whether this tablespace is plugged in (YES) or not (NO)

SEGMENT_SPACE_MANAGEMENT

VARCHAR2(6)

Indicates how the used and free space in the segments in this tablespace are managed:

  • MANUAL - Segment space in this tablespace is managed using free lists
  • AUTO - Segment space in this tablespace is managed using bitmaps
See Also:

"USER_TABLESPACES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 398 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TEMP_FILES

DBA_TEMP_FILES describes all temporary files (tempfiles) in the database.

Column Datatype NULL Description

FILE_NAME

VARCHAR2(513)

Name of the database temp file

FILE_ID

NUMBER

File identifier number of the database temp file

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the tablespace to which the file belongs

BYTES

NUMBER

Size of the file (in bytes)

BLOCKS

NUMBER

Size of the file (in Oracle blocks)

STATUS

CHAR(9)

File status:

  • AVAILABLE

RELATIVE_FNO

NUMBER

Tablespace-relative file number

AUTOEXTENSIBLE

VARCHAR2(3)

Indicates whether the file is autoextensible (YES) or not (NO)

MAXBYTES

NUMBER

maximum size of the file (in bytes)

MAXBLOCKS

NUMBER

Maximum size of the file (in Oracle blocks)

INCREMENT_BY

NUMBER

Default increment for autoextension

USER_BYTES

NUMBER

Size of the useful portion of the file (in bytes)

USER_BLOCKS

NUMBER

Size of the useful portion of the file (in Oracle blocks)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 399 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TRANSFORMATIONS

DBA_TRANSFORMATIONS displays information about all transformations in the database. These transformations can be specified with Advanced Queuing operations such as enqueue, dequeue, and subscribe to automatically integrate transformations in AQ messaging.

Related View

USER_TRANSFORMATIONS displays information about transformations owned by the current user. This view does not display the OWNER column.

Column | Datatype | NULL | Description
TRANSFORMATION_ID | NUMBER | NOT NULL | Unique identifier for the transformation
OWNER | VARCHAR2(30) | NOT NULL | Owning user of the transformation
NAME | VARCHAR2(30) | NOT NULL | Transformation name
FROM_TYPE | VARCHAR2(61) |  | Source type name
TO_TYPE | VARCHAR2(91) |  | Target type name
See Also:

"USER_TRANSFORMATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 400 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TRIGGER_COLS

DBA_TRIGGER_COLS lists the use of columns in all triggers in the database. Its columns are the same as those in "ALL_TRIGGER_COLS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 401 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TRIGGERS

DBA_TRIGGERS describes all triggers in the database. Its columns are the same as those in "ALL_TRIGGERS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 402 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TS_QUOTAS

DBA_TS_QUOTAS describes tablespace quotas for all users.

Related View

USER_TS_QUOTAS describes tablespace quotas for the current user. This view does not display the USERNAME column.

Column | Datatype | NULL | Description
TABLESPACE_NAME | VARCHAR2(30) | NOT NULL | Tablespace name
USERNAME | VARCHAR2(30) | NOT NULL | User with resource rights on the tablespace
BYTES | NUMBER |  | Number of bytes charged to the user
MAX_BYTES | NUMBER |  | User's quota in bytes, or -1 if no limit
BLOCKS | NUMBER | NOT NULL | Number of Oracle blocks charged to the user
MAX_BLOCKS | NUMBER |  | User's quota in Oracle blocks, or -1 if no limit
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 403 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TYPE_ATTRS

DBA_TYPE_ATTRS describes the attributes of all object types in the database. Its columns are the same as those in ALL_TYPE_ATTRS.

See Also:

"ALL_TYPE_ATTRS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 404 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TYPE_METHODS

DBA_TYPE_METHODS describes the methods of all object types in the database. Its columns are the same as those in ALL_TYPE_METHODS.

See Also:

"ALL_TYPE_METHODS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 405 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TYPE_VERSIONS

DBA_TYPE_VERSIONS describes the versions of all object types in the database. Its columns are the same as those in ALL_TYPE_VERSIONS.

See Also:

"ALL_TYPE_VERSIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 406 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_TYPES

DBA_TYPES describes all object types in the database. Its columns are the same as those in ALL_TYPES.

See Also:

"ALL_TYPES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 407 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_UNDO_EXTENTS

DBA_UNDO_EXTENTS describes the extents comprising the segments in all undo tablespaces in the database.

Column Datatype NULL Description

OWNER

CHAR(3)

Owner of the undo tablespace

SEGMENT_NAME

VARCHAR2(30)

NOT NULL

Name of the undo segment

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the undo tablespace

EXTENT_ID

NUMBER

ID of the extent

FILE_ID

NUMBER

NOT NULL

File identifier number of the file containing the extent

BLOCK_ID

NUMBER

Start block number of the extent

BYTES

NUMBER

Size of the extent (in bytes)

BLOCKS

NUMBER

Size of the extent (in blocks)

RELATIVE_FNO

NUMBER

Relative number of the file containing the segment header

COMMIT_JTIME

NUMBER

Commit time of the undo in the extent expressed as Julian time

COMMIT_WTIME

VARCHAR2(20)

Commit time of the undo in the extent expressed as Wallclock time

STATUS

VARCHAR2(9)

Transaction Status of the undo in the extent:

  • ACTIVE
  • EXPIRED
  • UNEXPIRED
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 408 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_UNUSED_COL_TABS

DBA_UNUSED_COL_TABS describes all tables in the database containing unused columns. Its columns are the same as those in "ALL_UNUSED_COL_TABS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 409 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_UPDATABLE_COLUMNS

DBA_UPDATABLE_COLUMNS describes all columns in a join view that can be updated by the database administrator. Its columns are the same as those in "ALL_UPDATABLE_COLUMNS" .

See Also:

Oracle9i Database Concepts for information on updatable join views
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 410 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_USERS

DBA_USERS describes all users of the database.

Related View

USER_USERS describes the current user. This view does not display the PASSWORD or PROFILE columns.

Column Datatype NULL Description

USERNAME

VARCHAR2(30)

NOT NULL

Name of the user

USER_ID

NUMBER

NOT NULL

ID number of the user

PASSWORD

VARCHAR2(30)

Encrypted password

ACCOUNT_STATUS

VARCHAR2(32)

NOT NULL

Account status:

  • OPEN
  • EXPIRED
  • EXPIRED(GRACE)
  • LOCKED(TIMED)
  • LOCKED
  • EXPIRED & LOCKED(TIMED)
  • EXPIRED(GRACE) & LOCKED(TIMED)
  • EXPIRED & LOCKED
  • EXPIRED(GRACE) & LOCKED

LOCK_DATE

DATE

Date the account was locked if account status was LOCKED

EXPIRY_DATE

DATE

Date of expiration of the account

DEFAULT_TABLESPACE

VARCHAR2(30)

NOT NULL

Default tablespace for data

TEMPORARY_TABLESPACE

VARCHAR2(30)

NOT NULL

Default tablespace for temporary table

CREATED

DATE

NOT NULL

User creation date

PROFILE

VARCHAR2(30)

NOT NULL

User resource profile name

INITIAL_RSRC_CONSUMER_GROUP

VARCHAR2(30)

Initial resource consumer group for the user

EXTERNAL_NAME

VARCHAR2(4000)

User external name
See Also:

"USER_USERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 411 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_USTATS

DBA_USTATS describes all user-defined statistics collected on all objects in the database. Its columns are the same as those in "ALL_USTATS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 412 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_VARRAYS

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

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 413 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_VIEWS

DBA_VIEWS describes all views in the database. Its columns are the same as those in ALL_VIEWS.

See Also:

"ALL_VIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 414 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_WAITERS

DBA_WAITERS shows all the sessions that are waiting for a lock, but do not hold locks for which another session is waiting.

Column | Datatype | NULL | Description
WAITING_SESSION | NUMBER |  | The waiting session
HOLDING_SESSION | NUMBER |  | The holding session
LOCK_TYPE | VARCHAR2(26) |  | The lock type
MODE_HELD | VARCHAR2(40) |  | The mode held
MODE_REQUESTED | VARCHAR2(40) |  | The mode requested
LOCK_ID1 | VARCHAR2(40) |  | Lock ID 1
LOCK_ID2 | VARCHAR2(40) |  | Lock ID 2
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 415 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_XML_SCHEMAS

DBA_XML_SCHEMAS describes all registered XML schemas in the database. Its columns are the same as those in ALL_XML_SCHEMAS.

See Also:

"ALL_XML_SCHEMAS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 416 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_XML_TAB_COLS

DBA_XML_TAB_COLS describes the columns of all XML tables in the database. Its columns are the same as those in ALL_XML_TAB_COLS.

See Also:

"ALL_XML_TAB_COLS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 417 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_XML_TABLES

DBA_XML_TABLES describes all XML tables in the database. Its columns are the same as those in ALL_XML_TABLES.

See Also:

"ALL_XML_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 418 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_XML_VIEW_COLS

DBA_XML_VIEW_COLS describes the columns of all XML views in the database. Its columns are the same as those in ALL_XML_VIEW_COLS.

See Also:

"ALL_XML_VIEW_COLS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 419 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBA_XML_VIEWS

DBA_XML_VIEWS describes all XML views in the database. Its columns are the same as those in ALL_XML_VIEWS.

See Also:

"ALL_XML_VIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 420 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBMS_ALERT_INFO

DBMS_ALERT_INFO describes registered alerts.

Column | Datatype | NULL | Description
NAME | VARCHAR2(30) | NOT NULL | Name of the alert
SID | VARCHAR2(30) | NOT NULL | Session ID of a session waiting for this alert
CHANGED | VARCHAR2(1) |  | Boolean flag to indicate that an alert has been signaled. Y: alert signaled, N: no alert.
MESSAGE | VARCHAR2(1800) |  | Optional message passed by signaler
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 421 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DBMS_LOCK_ALLOCATED

DBMS_LOCK_ALLOCATED describes user-allocated locks.

Column | Datatype | NULL | Description
NAME | VARCHAR2(128) | NOT NULL | Name of the lock
LOCKID | NUMBER(38) |  | Lock identifier number
EXPIRATION | DATE |  | Planned lock expiration date (updates whenever the allocation procedure is run)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 422 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DEPTREE

This view, created by utldtree.sql, contains information on the object dependency tree. For user SYS, this view displays shared cursors (and only shared cursors) that depend on the object. For all other users, it displays objects other than shared cursors. Other users can access SYS.DEPTREE for information on shared cursors.

Column | Datatype | NULL | Description
NESTED_LEVEL | NUMBER |  | Nesting level in the dependency tree
TYPE | VARCHAR2(15) |  | Object type
OWNER | VARCHAR2(30) |  | Object owner
NAME | VARCHAR2(1002) |  | Object name
SEQ# | NUMBER |  | Sequence number in the dependency tree. Used for ordering queries. See Also: "IDEPTREE"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 423 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DICT

DICT is a synonym for DICTIONARY.

See Also:

"DICTIONARY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 424 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DICT_COLUMNS

DICT_COLUMNS contains descriptions of columns in data dictionary tables and views.

Column | Datatype | NULL | Description
TABLE_NAME | VARCHAR2(30) |  | Name of the object that contains the column
COLUMN_NAME | VARCHAR2(30) |  | Name of the column
COMMENTS | VARCHAR2(4000) |  | Text comment on the column
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 425 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

DICTIONARY

DICTIONARY contains descriptions of data dictionary tables and views.

Column | Datatype | NULL | Description
TABLE_NAME | VARCHAR2(30) |  | Name of the object
COMMENTS | VARCHAR2(4000) |  | Text comment on the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 426 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ERROR_SIZE

ERROR_SIZE is accessed to create "DBA_OBJECT_SIZE" and "USER_OBJECT_SIZE" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 427 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

EXCEPTIONS

EXCEPTIONS contains information on violations of integrity constraints. This view is created by the utlexcpt.sql script.

Column | Datatype | NULL | Description
ROW_ID | ROWID |  | Row that caused the violation
OWNER | VARCHAR2(30) |  | Owner of the table
TABLE_NAME | VARCHAR2(30) |  | Name of the table
CONSTRAINT | VARCHAR2(30) |  | Integrity constraint that was violated
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 428 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FILE_LOCK

This Oracle Real Application Cluster view displays the mapping of PCM locks to datafiles as specified in initialization parameter GC_FILES_TO_LOCKS.

See Also:

"GC_FILES_TO_LOCKS" and Oracle9i Real Application Clusters Concepts

Column | Datatype | NULL | Description
FILE_ID | NUMBER | NOT NULL | Datafile identifier number (to find the file name, query DBA_DATA_FILES or V$DBFILES)
FILE_NAME | VARCHAR2(513) |  | The datafile name
TS_NAME | VARCHAR2(30) | NOT NULL | The tablespace name for the datafile
START_LK | NUMBER |  | The first lock corresponding to the datafile
NLOCKS | NUMBER |  | The number of PCM locks allocated to the datafile
BLOCKING | NUMBER |  | The number of contiguous blocks protected by each PCM lock on the datafile
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 429 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FILE_PING

This Oracle Real Application Cluster view displays the number of blocks pinged per datafile. You can use this information to determine access usage of existing datafiles for better settings of GC_FILES_TO_LOCKS.

See Also:

"GC_FILES_TO_LOCKS" and Oracle9i Real Application Clusters Concepts

Column | Datatype | NULL | Description
FILE_ID | NUMBER | NOT NULL | Datafile identifier number (to find the file name, query DBA_DATA_FILES or V$DBFILES)
FILE_NAME | NUMBER |  | The file name
TS_NAME | VARCHAR2(30) | NOT NULL | Datafile identifier number (to find file name, query DBA_DATA_FILES or V$DBFILES)
FREQUENCY | NUMBER |  | The ping count
X_2_NULL | NUMBER |  | Number of lock conversions from Exclusive-to-NULL for all blocks in the file
X_2_NULL_FORCED_WRITE | NUMBER |  | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-NULL conversions
X_2_NULL_FORCED_STALE | NUMBER |  | Number of times a block in the file was made STALE due to Exclusive-to-NULL conversions
X_2_S | NUMBER |  | Number of lock conversions from Exclusive-to-Shared for all blocks in the file
X_2_S_FORCED_WRITES | NUMBER |  | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-Shared conversions
X_2_SSX | NUMBER |  | Number of lock conversions from Exclusive-to-Sub Shared Exclusive for all blocks in the file
X_2_SSX_FORCED_WRITES | NUMBER |  | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-Sub Shared Exclusive conversions
S_2_NULL | NUMBER |  | Number of lock conversions from Shared-to-NULL for all blocks in the file
S_2_NULL_FORCED_STALE | NUMBER |  | Number of times a block in the file was made STALE due to Shared-to-NULL conversions
SS_2_NULL | NUMBER |  | Number of lock conversions from Sub Shared-to-NULL for all blocks in the file
WRB | NUMBER |  | Number of times the instance received a write single buffer cross instance call for this file
WRB_FORCED_WRITE | NUMBER |  | Number of blocks written due to write single buffer cross instance calls for this file
RBR | NUMBER |  | Number of times the instance received a reuse block range cross instance call for this file
RBR_FORCED_WRITE | NUMBER |  | Number of blocks written due to resuse block range cross instance calls for this file
RBR_FORCED_STALE | NUMBER |  | Number of times a block in this file was made STALE due to resuse block range cross instance calls
CBR | NUMBER |  | Number of times the instance received a checkpoint block range cross instance call for this file
CBR_FORCED_WRITE | NUMBER |  | Number of blocks in this file which were written due to checkpoint cross range cross instance calls
NULL_2_X | NUMBER |  | Number of lock conversions from NULL-to-Exclusive for all blocks of the specified file
S_2_X | NUMBER |  | Number of lock conversions from Shared-to-Exclusive for all blocks of the specified file
SSX_2_X | NUMBER |  | Number of lock conversions from Sub Shared Exclusive-to-Exclusive for all blocks of the specified file
N_2_S | NUMBER |  | Number of lock conversions from NULL-to-Shared for all blocks of the specified file
N_2_SS | NUMBER |  | Number of lock conversions from NULL-to-Sub Shared for all blocks of the specified file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 430 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

FILEXT$

FILEXT$ is the equivalent of DBA_DATA_FILES. Oracle Corporation recommends you use DBA_DATA_FILES instead of FILEXT$.

See Also:

"DBA_DATA_FILES"

Column | Datatype | NULL | Description
FILE# | NUMBER | NOT NULL | Absolute file number
MAXEXTEND | NUMBER |  | Maximum file size
INC | NUMBER |  | Increment amount
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 431 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

GLOBAL_NAME

GLOBAL_NAME contains one row that displays the global name of the current database.

Column | Datatype | NULL | Description
GLOBAL_NAME | VARCHAR2(4000) |  | Global name of the database
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 432 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_ALL_CAPS

HS_ALL_CAPS contains information about all of the capabilities (that is, features) associated with non-Oracle (FDS) data stores.

Column | Datatype | NULL | Description
CAP_NUMBER | NUMBER |  | Capability number
CONTEXT | NUMBER |  | Context in which this capability is applicable
TRANSLATION | VARCHAR2(255) |  | Valid for functions; contains translation to FDS dialect
ADDITIONAL_INFO | NUMBER |  | Flag for internal use
FDS_CLASS_NAME | VARCHAR2(30) |  | Name of the FDS Class
FDS_INST_NAME | VARCHAR2(30) |  | Name of the FDS instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 433 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_ALL_DD

HS_ALL_DD contains data dictionary information about non-Oracle (FDS) data stores.

Column | Datatype | NULL | Description
DD_TABLE_NAME | VARCHAR2(30) |  | Data dictionary table name
TRANSLATION_TYPE | CHAR(1) |  | T = Translation, M = Mimic
TRANSLATION_TEXT | VARCHAR2(4000) |  | SQL statement containing the mapping
FDS_CLASS_NAME | VARCHAR2(30) |  | Name of the FDS Class
FDS_INST_NAME | VARCHAR2(30) |  | Name of the FDS instance
DD_TABLE_DESC | VARCHAR2(255) |  | Description of the Oracle data dictionary table
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 434 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_ALL_INITS

HS_ALL_INITS contains initialization parameter information about non-Oracle (FDS) data stores.

Column | Datatype | NULL | Description
INIT_VALUE_NAME | VARCHAR2(64) |  | Name of the initialization parameter
INIT_VALUE | VARCHAR2(255) |  | Value of the initialization parameter
INIT_VALUE_TYPE | VARCHAR2(1) |  | Environment variable (T or F). T means this is an environment variable; F means do not set as an environment variable
FDS_CLASS_NAME | VARCHAR2(30) |  | Name of the FDS Class
FDS_INST_NAME | VARCHAR2(30) |  | Name of the FDS instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 435 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_BASE_CAPS

HS_BASE_CAPS contains information about base capability (that is, base features) of the non-Oracle (FDS) data store.

Column | Datatype | NULL | Description
CAP_NUMBER | NUMBER | NOT NULL | Capability number
CAP_DESCRIPTION | VARCHAR2(255) |  | Description of the capability
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 436 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_BASE_DD

HS_BASE_DD displays information from the base data dictionary translation table.

Column | Datatype | NULL | Description
DD_TABLE_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
DD_TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the Oracle data dictionary table
DD_TABLE_DESC | VARCHAR2(255) |  | Description of the Oracle data dictionary table
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 437 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_CLASS_CAPS

HS_CLASS_CAPS contains information about the class-specific (driver) capabilities belonging to the non-Oracle (FDS) data store.

Column | Datatype | NULL | Description
CAP_NUMBER | NUMBER | NOT NULL | Capability number
CAP_DESCRIPTION | VARCHAR2(255) |  | Capability description
CONTEXT | NUMBER |  | Flag indicating the context in which the capability is enabled
TRANSLATION | VARCHAR2(255) |  | Valid for functions; contains translation to FDS dialect
ADDITIONAL_INFO | NUMBER |  | Additional flags for internal use
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS Class
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 438 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_CLASS_DD

HS_CLASS_DD displays information from the non-Oracle data store (FDS) class-specific data dictionary translations.

Column | Datatype | NULL | Description
DD_TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the Oracle data dictionary table
DD_TABLE_DESC | VARCHAR2(255) |  | Description of the Oracle data dictionary table
TRANSLATION_TYPE | CHAR(1) | NOT NULL | T = Translation, M = Mimic
TRANSLATION_TEXT | VARCHAR2(4000) |  | SQL statement containing the mapping
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS Class
DD_TABLE_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 439 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_CLASS_INIT

HS_CLASS_INIT displays information about the non-Oracle (FDS) class-specific initialization parameters.

Column | Datatype | NULL | Description
INIT_VALUE_NAME | VARCHAR2(64) | NOT NULL | Name of the initialization parameter
INIT_VALUE | VARCHAR2(255) | NOT NULL | Value of the initialization parameter
INIT_VALUE_TYPE | VARCHAR2(1) | NOT NULL | Environment variable (T or F). T means this is an environment variable; F means do not set as an environment variable
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS Class
FDS_CLASS_INIT_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 440 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_EXTERNAL_OBJECT_PRIVILEGES

HS_EXTERNAL_OBJECT_PRIVILEGES contains information about the privileges on objects that are granted to users.

Column | Datatype | NULL | Description
OBJECT_NAME | VARCHAR2(30) | NOT NULL | Name of the object; unique for each instance
PRIVILEGE_NAME | VARCHAR2(30) | NOT NULL | Name of the privilege that was granted
GRANTEE | VARCHAR2(30) | NOT NULL | ID of the user that was granted the privilege
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS Class
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 441 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_EXTERNAL_OBJECTS

HS_EXTERNAL_OBJECTS contains information about all of the distributed external objects accessible from the Oracle server.

Column | Datatype | NULL | Description
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS Class
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
OWNER | VARCHAR(30) | NOT NULL | Name of the user who created the object
OBJECT_NAME | VARCHAR2(30) | NOT NULL | Name of the object; unique for each instance
OBJECT_TYPE | VARCHAR2(13) | NOT NULL | Type of object: FUNCTION, PROCEDURE, PACKAGE, or LIBRARY
OBJECT_TEXT | LONG | NOT NULL | SQL text used to create the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 442 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_EXTERNAL_USER_PRIVILEGES

HS_EXTERNAL_USER_PRIVILEGES contains information about all of the granted privileges that are not tied to any particular object.

Column | Datatype | NULL | Description
PRIVILEGE_NAME | VARCHAR2(30) | NOT NULL | Name of the privilege that was granted
GRANTEE | VARCHAR2(30) | NOT NULL | ID of the user that was granted the privilege
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS Class
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 443 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_FDS_CLASS

HS_FDS_CLASS contains information about legal non-Oracle (FDS) classes.

Column Datatype NULL Description

FDS_CLASS_NAME

VARCHAR2(30)

NOT NULL

Name of the FDS class (for example, ODBC, DB2)

FDS_CLASS
_COMMENTS

VARCHAR2(255)

Text description of the non-Oracle class

FDS_CLASS_ID

NUMBER

 NOT NULL

Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 444 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_FDS_INST

HS_FDS_INST contains information about non-Oracle (FDS) instances.

Column | Datatype | NULL | Description
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
FDS_INST_COMMENTS | VARCHAR2(255) |  | Text description of the non-Oracle instance
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS class
FDS_INST_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 445 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_INST_CAPS

HS_INST_CAPS contains information about instance-specific capabilities (that is, features).

Column | Datatype | NULL | Description
CAP_NUMBER | NUMBER | NOT NULL | Capability number
CAP_DESCRIPTION | VARCHAR2(255) |  | Capability description
CONTEXT | NUMBER |  | Context in which this capability is applicable
TRANSLATION | VARCHAR2(255) |  | Valid for functions; contains translation to FDS dialect
ADDITIONAL_INFO | NUMBER |  | Additional flags for internal use
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS class (for example, ODBC, DB2)
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_INST_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 446 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_INST_DD

HS_INST_DD displays information from the non-Oracle (FDS) instance-specific data dictionary translations.

Column | Datatype | NULL | Description
DD_TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the Oracle data dictionary table
DD_TABLE_DESC | VARCHAR2(255) |  | Description of the Oracle data dictionary table
TRANSLATION_TYPE | CHAR(1) | NOT NULL | T = Translation, M = Mimic
TRANSLATION_TEXT | VARCHAR2(4000) |  | SQL statement containing the mapping
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS class (for example, ODBC, DB2)
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
DD_TABLE_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_INST_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 447 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

HS_INST_INIT

HS_INST_INIT contains information about the non-Oracle (FDS) instance-specific initialization parameters.

Column | Datatype | NULL | Description
INIT_VALUE_NAME | VARCHAR2(64) | NOT NULL | Name of the initialization parameter
INIT_VALUE | VARCHAR2(255) | NOT NULL | Value of the initialization parameter
INIT_VALUE_TYPE | VARCHAR2(1) | NOT NULL | Environment variable (T or F). T means this is an environment variable; F means do not set as an environment variable
FDS_CLASS_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS class (for example: ODBC, DB2)
FDS_INST_NAME | VARCHAR2(30) | NOT NULL | Name of the FDS instance
FDS_INST_INIT_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_CLASS_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
FDS_INST_ID | NUMBER | NOT NULL | Sequence: a counter that is incremented for every row inserted (used internally)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 448 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

IDEPTREE

This view, created by UTLDTREE.SQL, lists the indented dependency tree. It is a pre-sorted, pretty-print version of DEPTREE.

Column | Datatype | NULL | Description
NESTED_LEVEL | NUMBER |  | Nesting level in the dependency tree
TYPE | VARCHAR2(15) |  | Object type
OWNER | VARCHAR2(30) |  | Object owner
NAME | VARCHAR2(1002) |  | Object name
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 449 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

IND

IND is a synonym for USER_INDEXES.

See Also:

"USER_INDEXES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 450 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INDEX_HISTOGRAM

INDEX_HISTOGRAM contains information from the ANALYZE INDEX ... VALIDATE STRUCTURE statement.

Column | Datatype | NULL | Description
REPEAT_COUNT | NUMBER |  | Number of times that one or more index keys is repeated in the table
KEYS_WITH_REPEAT_COUNT | NUMBER |  | Number of index keys that are repeated that many times
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 451 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

INDEX_STATS

INDEX_STATS stores information from the last ANALYZE INDEX ... VALIDATE STRUCTURE statement.

Column | Datatype | NULL | Description
HEIGHT | NUMBER |  | Height of the B-Tree
BLOCKS | NUMBER | NOT NULL | Blocks allocated to the segment
NAME | VARCHAR2(30) | NOT NULL | Name of the index
PARTITION_NAME | VARCHAR2(30) |  | Name of the partition of the index which was analyzed. If the index is not partitioned, a NULL is returned.
LF_ROWS | NUMBER |  | Number of leaf rows (values in the index)
LF_BLKS | NUMBER |  | Number of leaf blocks in the B-Tree
LF_ROWS_LEN | NUMBER |  | Sum of the lengths of all the leaf rows
LF_BLK_LEN | NUMBER |  | Usable space in a leaf block
BR_ROWS | NUMBER |  | Number of branch rows in the B-Tree
BR_BLKS | NUMBER |  | Number of branch blocks in the B-Tree
BR_ROWS_LEN | NUMBER |  | Sum of the lengths of all the branch blocks in the B-Tree
BR_BLK_LEN | NUMBER |  | Usable space in a branch block
DEL_LF_ROWS | NUMBER |  | Number of deleted leaf rows in the index
DEL_LF_ROWS_LEN | NUMBER |  | Total length of all deleted rows in the index
DISTINCT_KEYS | NUMBER |  | Number of distinct keys in the index (may include rows that have been deleted)
MOST_REPEATED_KEY | NUMBER |  | How many times the most repeated key is repeated (may include rows that have been deleted)
BTREE_SPACE | NUMBER |  | Total space currently allocated in the B-Tree
USED_SPACE | NUMBER |  | Total space that is currently being used in the B-Tree
PCT_USED | NUMBER |  | Percent of space allocated in the B-Tree that is being used
ROWS_PER_KEY | NUMBER |  | Average number of rows per distinct key (this figure is calculated without consideration of deleted rows)
BLKS_GETS_PER_ACCESS | NUMBER |  | Expected number of consistent mode block reads per row, assuming that a randomly chosen row is accessed using the index. Used to calculate the number of consistent reads that will occur during an index scan.
PRE_ROWS | NUMBER |  | Number of prefix rows (values in the index)
PRE_ROWS_LEN | NUMBER |  | Sum of lengths of all prefix rows
OPT_CMPR_COUNT | NUMBER |  | Optimal key compression length
OPT_CMPR_PCTSAVE | NUMBER |  | Corresponding space savings after an ANALYZE
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 452 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

MAP_OBJECT

MAP_OBJECT displays the hierarchical arrangement of storage containers for objects. Each row in the table represents a level in the hierarchy.

Column | Datatype | NULL | Description
OBJECT_NAME | VARCHAR2(2000) |  | Name of the object
OBJECT_OWNER | VARCHAR2(2000) |  | Owner of the object
OBJECT_TYPE | VARCHAR2(2000) |  | Object type
FILE_MAP_IDX | NUMBER |  | File index (corresponds to FILE_MAP_IDX in V$MAP_FILE)
DEPTH | NUMBER |  | Element depth within the I/O stack
ELEM_IDX | NUMBER |  | Index corresponding to the element
CU_SIZE | NUMBER |  | Contiguous set of logical blocks of the file (in HKB units) that is resident contiguously on the element
STRIDE | NUMBER |  | Number of HKB between contiguous units (CU) in the file that are contiguous on this element. Used in RAID5 and striped files.
NUM_CU | NUMBER |  | Number of contiguous units that are adjacent to each other on this element that are separated by STRIDE HKB in the file. In RAID5, the number of contiguous units also include the parity stripes.
ELEM_OFFSET | NUMBER |  | Element offset (in HKB units)
FILE_OFFSET | NUMBER |  | Offset (in HKB units) from the start of the file to the first byte of the contiguous units
DATA_TYPE | VARCHAR2(2000) |  | Datatype (DATA, PARITY, or DATA AND PARITY)
PARITY_POS | NUMBER |  | Position of the parity. Only for RAID5. This field is needed to distinguish the parity from the data part.
PARITY_PERIOD | NUMBER |  | Parity period. Only for RAID5.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 453 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_DATABASE_PARAMETERS

NLS_DATABASE_PARAMETERS lists permanent NLS parameters of the database.

Column | Datatype | NULL | Description
PARAMETER | VARCHAR2(30) | NOT NULL | Parameter name
VALUE | VARCHAR2(40) |  | Parameter value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 454 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_INSTANCE_PARAMETERS

NLS_INSTANCE_PARAMETERS lists NLS parameters of the instance.

Column | Datatype | NULL | Description
PARAMETER | VARCHAR2(30) |  | Parameter name
VALUE | VARCHAR2(40) |  | Parameter value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 455 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

NLS_SESSION_PARAMETERS

NLS_SESSION_PARAMETERS lists NLS parameters of the user session.

Column | Datatype | NULL | Description
PARAMETER | VARCHAR2(30) |  | Parameter name
VALUE | VARCHAR2(40) |  | Parameter value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 456 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

OBJ

OBJ is a synonym for USER_OBJECTS.

See Also:

"USER_OBJECTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 457 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARSED_PIECES

Oracle accesses this view to create views about object size.

See Also:

"DBA_OBJECT_SIZE" and "USER_OBJECT_SIZE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 458 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PARSED_SIZE

Oracle accesses this view to create views about object size.

See Also:

"DBA_OBJECT_SIZE" and "USER_OBJECT_SIZE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 459 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLAN_TABLE

PLAN_TABLE is the default table for results of the EXPLAIN PLAN statement. It is created by utlxplan.sql, and it contains one row for each step in the execution plan.

Column Datatype NULL Description

STATEMENT_ID

VARCHAR2(30)

Optional statement identifier specified in the EXPLAIN PLAN statement

TIMESTAMP

DATE

Date and time that the EXPLAIN PLAN statement was issued

REMARKS

VARCHAR2(80)

Place for comments that can be added to the steps of the execution plan

OPERATION

VARCHAR2(30)

Name of the operation performed at this step

OPTIONS

VARCHAR2(255)

Options used for the operation performed at this step; the string returned by the index cost function

OBJECT_NODE

VARCHAR2(128)

Name of the database link used to reference the object

OBJECT_OWNER

VARCHAR2(30)

Owner of the object

OBJECT_NAME

VARCHAR2(30)

Name of the object

OBJECT_INSTANCE

NUMBER(38)

Numbered position of the object name in the original SQL statement

OBJECT_TYPE

VARCHAR2(30)

Descriptive modifier that further describes the type of object

OPTIMIZER

VARCHAR2(255)

The current mode of the optimizer

SEARCH_COLUMNS

NUMBER

Number of index columns with start and stop keys (that is, the number of columns with matching predicates)

ID

NUMBER(38)

Identification number for this step in the execution plan

PARENT_ID

NUMBER(38)

ID of the next step that operates on the results of this step

POSITION

NUMBER(38)

Order of processing for steps with the same parent ID. For cost-based optimization, the value in the first row of the plan is the statement's execution cost. For rule-based optimization, the value is null in the first row.

COST

NUMBER(38)

The cost of the current operation estimated by the cost-based optimizer (CBO)

CARDINALITY

NUMBER(38)

The number of rows returned by the current operation (estimated by the CBO)

BYTES

NUMBER(38)

The number of bytes returned by the current operation

OTHER_TAG

VARCHAR2(255)

OTHER_TAG describes the function of the SQL text in the OTHER column. Values for OTHER_TAG are:

  • SERIAL - the SQL is the text of a locally-executed, serial query plan. Currently, SQL is not loaded in OTHER for this case.
  • SERIAL_FROM_REMOTE - the SQL text shown in the OTHER column will be executed at a remote site.
  • PARALLEL_COMBINED_WITH_PARENT - the parent of this operation is a DFO that performs both operations in the parallel execution plan.
  • PARALLEL_COMBINED_WITH_CHILD - the child of this operation is a DFO that performs both operations in the parallel execution plan.
  • PARALLEL_TO_SERIAL - the SQL text shown in the OTHER column is the top-level of the parallel plan.
  • PARALLEL_TO_PARALLEL - the SQL text shown in the OTHER column is executed and output in parallel.
  • PARALLEL_FROM_SERIAL - this operation consumes data from a serial operation and outputs it in parallel.

PARTITION_START

VARCHAR2(255)

The start partition of a range of accessed partitions

PARTITION_STOP

VARCHAR2(255)

The stop partition of a range of accessed partitions

PARTITION_ID

NUMBER(38)

The step that has computed the pair of values of the PARTITION_START and PARTITION_STOP columns

OTHER

LONG

Information about parallel execution slaves and parallel queries

DISTRIBUTION

VARCHAR2(30)

The distribution method

CPU_COST

NUMBER

User-defined CPU cost

IO_COST

NUMBER

User-defined I/O cost
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 460 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PLUGGABLE_SET_CHECK

PLUGGABLE_SET_CHECK contains pluggable set checks.

Column | Datatype | NULL | Description
OBJ1_OWNER | VARCHAR2(30) |  | Owner of the object
OBJ1_NAME | VARCHAR2(30) |  | Object 1
OBJ1_SUBNAME | VARCHAR2(30) |  | SubObject1Name
OBJ1_TYPE | VARCHAR2(15) |  | Object Type
TS1_NAME | VARCHAR2(30) |  | Tablespace containing Object 1
OBJ2_NAME | VARCHAR2(30) |  | Object Name
OBJ2_SUBNAME | VARCHAR2(30) |  | SubObject2Name
OBJ2_TYPE | VARCHAR2(15) |  | Object Type
OBJ2_OWNER | VARCHAR2(30) |  | Object owner of second object
TS2_NAME | VARCHAR2(30) |  | Tablespace containing Object 1
CONSTRAINT_NAME | VARCHAR2(30) |  | Name of dependent constraint
REASON | VARCHAR2(79) |  | Reason for Pluggable check violation
MESG_ID | NUMBER |  | The message ID
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 461 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PRODUCT_COMPONENT_VERSION

PRODUCT_COMPONENT_VERSION contains version and status information for component products.

Column | Datatype | NULL | Description
PRODUCT | VARCHAR2(64) |  | Product name
VERSION | VARCHAR2(64) |  | Version number
STATUS | VARCHAR2(64) |  | Status of release
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 462 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PROXY_USERS

PROXY_USERS describes users who can assume the identity of other users.

Column | Datatype | NULL | Description
PROXY | VARCHAR2(30) | NOT NULL | Name of the client whose identity a proxy may assume
CLIENT | VARCHAR2(30) | NOT NULL | Name of a user which assume the identity of a client
ROLE | VARCHAR2(30) |  | Name of a role that a proxy user may or may not activate while acting as a client
FLAGS | VARCHAR2(35) |  | Indicates whether or not a proxy can activate all client roles, no client roles, or a specific client role
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 463 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PSTUBTBL

This table contains information on stubs generated by the PSTUB utility so that an Oracle Forms 3.0 client can call stored procedures in an Oracle database.

Note:

The contents of this table are intended only for use by the PSTUB utility.

Column | Datatype | NULL | Description
USERNAME | VARCHAR2(30) |  | Schema part of the identifier of a stored procedure
DBNAME | VARCHAR2(128) |  | Database link part of the identifier of a stored procedure
LUN | VARCHAR2(30) |  | Library unit name part of the identifier of a stored procedure
LUTYPE | VARCHAR2(3) |  | Type of the stored procedure
LINENO | NUMBER |  | Line number of the stub
LINE | VARCHAR2(1800) |  | Text of the stub
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 464 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PUBLIC_DEPENDENCY

PUBLIC_DEPENDENCY lists dependencies to and from objects, by object number.

Column | Datatype | NULL | Description
OBJECT_ID | NUMBER | NOT NULL | Object number
REFERENCED_OBJECT_ID | NUMBER | NOT NULL | Referenced object (the parent object)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 465 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

PUBLICSYN

PUBLICSYN contains information on public synonyms.

Column | Datatype | NULL | Description
SNAME | VARCHAR2(30) |  | Name of the synonym
CREATOR | VARCHAR2(30) |  | Owner of the synonym
TNAME | VARCHAR2(30) |  | Table of which this is a synonym
DATABASE | VARCHAR2(128) |  | Database in which the table resides
TABTYPE | VARCHAR2(9) |  | Type of table
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 466 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

QUEUE_PRIVILEGES

QUEUE_PRIVILEGES shows all Advanced Queuing object privileges granted to the session.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
NAME | VARCHAR2(30) | NOT NULL | Name of the object
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
ENQUEUE_PRIVILEGE | NUMBER |  | Permission to ENQUEUE to the queue
DEQUEUE_PRIVILEGE | NUMBER |  | Permission to DEQUEUE from the queue
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 467 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RESOURCE_COST

RESOURCE_COST lists the cost for each resource.

Column | Datatype | NULL | Description
RESOURCE_NAME | VARCHAR2(32) | NOT NULL | Name of the resource
UNIT_COST | NUMBER | NOT NULL | Cost of the resource
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 468 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

RESOURCE_MAP

RESOURCE_MAP describes resources. This table can be used to map resource names to resource numbers.

Column | Datatype | NULL | Description
RESOURCE# | NUMBER | NOT NULL | Numeric resource code
TYPE# | NUMBER | NOT NULL | Numeric type code
NAME | VARCHAR2(32) | NOT NULL | Name of the resource
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 469 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROLE_ROLE_PRIVS

ROLE_ROLE_PRIVS describes the roles granted to other roles. Information is provided only about roles to which the user has access.

Column | Datatype | NULL | Description
ROLE | VARCHAR2(30) | NOT NULL | Name of the role
GRANTED_ROLE | VARCHAR2(30) | NOT NULL | Role that was granted
ADMIN_OPTION | VARCHAR2(3) |  | Signifies that the role was granted with ADMIN option
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 470 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROLE_SYS_PRIVS

ROLE_SYS_PRIVS describes system privileges granted to roles. Information is provided only about roles to which the user has access.

Column | Datatype | NULL | Description
ROLE | VARCHAR2(30) | NOT NULL | Name of the role
PRIVILEGE | VARCHAR2(40) | NOT NULL | System privilege granted to the role
ADMIN_OPTION | VARCHAR2(3) |  | Signifies the grant was with the ADMIN option
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 471 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

ROLE_TAB_PRIVS

ROLE_TAB_PRIVS describes table privileges granted to roles. Information is provided only about roles to which the user has access.

Column | Datatype | NULL | Description
ROLE | VARCHAR2(30) | NOT NULL | Name of the role
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
COLUMN_NAME | VARCHAR2(30) |  | Name of the column, if applicable
PRIVILEGE | VARCHAR2(40) | NOT NULL | Object privilege granted to the role
GRANTABLE | VARCHAR2(3) |  | YES if the role was granted with ADMIN OPTION; otherwise NO
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 472 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SEQ

SEQ is a synonym for USER_SEQUENCES.

See Also:

"USER_SEQUENCES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 473 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSION_CONTEXT

SESSION_CONTEXT lists attributes and the values set for the current session.

See Also:

Oracle9i SQL Reference for information on the predefined attributes of the current session

Column | Datatype | NULL | Description
NAMESPACE | VARCHAR2(30) | NOT NULL | The namespace that the active attribute is in
ATTRIBUTE | VARCHAR2(30) | NOT NULL | The name of the active attribute
VALUE | VARCHAR2(4000) | NOT NULL | The value of the active attribute
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 474 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSION_PRIVS

SESSION_PRIVS lists the privileges that are currently available to the user.

Column | Datatype | NULL | Description
PRIVILEGE | VARCHAR2(40) | NOT NULL | Name of the privilege
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 475 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SESSION_ROLES

SESSION_ROLES lists the roles that are currently enabled to the user.

Column | Datatype | NULL | Description
ROLE | VARCHAR2(30) | NOT NULL | Name of the role
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 476 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SOURCE_SIZE

Oracle accesses this view to create views about object size.

See Also:

"DBA_OBJECT_SIZE" and "USER_OBJECT_SIZE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 477 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

STMT_AUDIT_OPTION_MAP

STMT_AUDIT_OPTION_MAP describes auditing option type codes. This table can be used to map auditing option type numbers to type names.

Column | Datatype | NULL | Description
OPTION# | NUMBER | NOT NULL | Numeric auditing option type code
NAME | VARCHAR2(40) | NOT NULL | Name of the type of auditing option
PROPERTY | NUMBER | NOT NULL | Property flag of the auditing option
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 478 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYN

SYN is a synonym for USER_SYNONYMS.

SYNONYMS

SYNONYMS is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 479 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYSCATALOG

SYSCATALOG is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 480 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYSFILES

SYSFILES is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 481 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYSSEGOBJ

SYSSEGOBJ is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 482 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYSTEM_PRIVILEGE_MAP

SYSTEM_PRIVILEGE_MAP describes privilege type codes. This table can be used to map privilege type numbers to type names.

Column | Datatype | NULL | Description
PRIVILEGE | NUMBER | NOT NULL | Numeric privilege type code
NAME | VARCHAR2(40) | NOT NULL | Name of the type of privilege
PROPERTY | NUMBER | NOT NULL | Property flag of the privilege
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 483 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

SYS_OBJECTS

SYS_OBJECTS maps object IDs to object types and segment data block addresses.

Column | Datatype | NULL | Description
OBJECT_TYPE | VARCHAR2(15) |  | Type of the object
OBJECT_TYPE_ID | NUMBER |  | Type ID of the object
SEGMENT_TYPE_ID | NUMBER |  | Type of segment: TABLE, CLUSTER, INDEX, ROLLBACK, DEFERRED ROLLBACK, TEMPORARY, CACHE
OBJECT_ID | NUMBER |  | Object identifier
HEADER_FILE | NUMBER |  | ID of the file containing the segment header
HEADER_BLOCK | NUMBER |  | ID of the block containing the segment header
TS_NUMBER | NUMBER |  | The tablespace number
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 484 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TAB

TAB is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 485 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TABLE_PRIVILEGE_MAP

TABLE_PRIVILEGE_MAP describes privilege (auditing option) type codes. This table can be used to map privilege (auditing option) type numbers to type names.

Column | Datatype | NULL | Description
PRIVILEGE | NUMBER | NOT NULL | Numeric privilege (auditing option) type code
NAME | VARCHAR2(40) | NOT NULL | Name of the type of privilege (auditing option)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 486 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TABLE_PRIVILEGES

TABLE_PRIVILEGES contains information on grants on objects for which the user is the grantor, grantee, or owner, or PUBLIC is the grantee. This view is included for compatibility with Oracle version 6. Oracle Corporation recommends that you do not use this view.

Column | Datatype | NULL | Description
GRANTEE | VARCHAR2(30) | NOT NULL | Name of the user to whom access was granted
OWNER | VARCHAR2(30) | NOT NULL | Owner of the object
TABLE_NAME | VARCHAR2(30) | NOT NULL | Name of the object
GRANTOR | VARCHAR2(30) | NOT NULL | Name of the user who performed the grant
SELECT_PRIV | VARCHAR2(1) |  | Permission to select from the object
INSERT_PRIV | VARCHAR2(1) |  | Permission to insert into the object
DELETE_PRIV | VARCHAR2(1) |  | Permission to delete from the object
UPDATE_PRIV | VARCHAR2(1) |  | Permission to update the object
REFERENCES_PRIV | VARCHAR2(1) |  | Permission to reference the object
ALTER_PRIV | VARCHAR2(1) |  | Permission to alter the object
INDEX_PRIV | VARCHAR2(1) |  | Permission to create or drop an index on the object
CREATED | VARCHAR2(0) |  | Timestamp for the grant
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 487 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TABS

TABS is a synonym for USER_TABLES.

See Also:

"USER_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 488 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TABQUOTAS

TABQUOTAS is included for compatibility with Oracle version 5. Oracle Corporation recommends that you do not use this view.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 489 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TRUSTED_SERVERS

TRUSTED_SERVERS displays whether a server is trusted or untrusted.

Column | Datatype | NULL | Description
TRUST | VARCHAR2(9) |  | Trustedness of the server listed. Values can be TRUSTED or UNTRUSTED servers which are not listed in the NAME column have opposite trustedness.
NAME | VARCHAR2(128) |  | Server name. Can be a specific server name or ALL for all servers.

Table 2-3 shows examples of the values returned depending on the status of the servers.

Table 2-3 TRUSTED_SERVERS Values
Condition (If . . . ) | TRUSTED column | NAME column
... all servers are trusted | Trusted | ALL
... no servers are trusted | Untrusted | ALL
... all servers except DB1 are trusted | Untrusted | DB1
... all servers except DB1 are untrusted | Trusted | DB1
See Also:

Oracle9i Heterogeneous Connectivity Administrator's Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 490 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TS_PITR_CHECK

This view, created by catpitr.sql provides information on any dependencies or restrictions that might prevent tablespace point-in-time recovery from proceeding. This view applies only to the tablespace point-in-time recovery feature.

See Also:

Oracle9i User-Managed Backup and Recovery Guide

Column | Datatype | NULL | Description
OBJ1_OWNER | VARCHAR2(30) | NOT NULL | The owner of the object preventing tablespace point-in-time recovery. See the REASON column for details.
OBJ1_NAME | VARCHAR2(30) | NOT NULL | The name of the object preventing tablespace point-in-time recovery
OBJ1_TYPE | VARCHAR2(15) |  | The object type for the object preventing tablespace point-in-time recovery
OBJ1_SUBNAME | VARCHAR2(30) |  | Subordinate to OBJ1_NAME
TS1_NAME | VARCHAR2(30) | NOT NULL | Name of the tablespace containing the object preventing tablespace point-in-time recovery
OBJ2_NAME | VARCHAR2(30) |  | The name of a second object which may be preventing tablespace point-in-time recovery. If NULL, object 1 is the only object preventing recovery.
OBJ2_TYPE | VARCHAR2(15) |  | The object type for the second object (will be NULL if OBJ2_NAME is NULL)
OBJ2_OWNER | VARCHAR2(30) |  | The owner of the second object (will be NULL if OBJ2_NAME is NULL)
OBJ2_SUBNAME | VARCHAR2(30) |  | Subordinate to OBJ2_NAME
TS2_NAME | VARCHAR2(30) |  | Name of the tablespace containing second object which may be preventing tablespace point-in-time recovery (-1 indicates not applicable)
CONSTRAINT_NAME | VARCHAR2(30) |  | Name of the constraint
REASON | VARCHAR2(78) |  | Reason why tablespace point-in-time recovery cannot proceed
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 491 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

TS_PITR_OBJECTS_TO_BE_DROPPED

TS_PITR_OBJECTS_TO_BE_DROPPED lists all objects lost as a result of performing tablespace point-in-time recovery. This view applies only to the tablespace point-in-time recovery feature.

Column | Datatype | NULL | Description
OWNER | VARCHAR2(30) | NOT NULL | The owner of the object
NAME | VARCHAR2(30) | NOT NULL | The name of the object that will be lost as a result of undergoing tablespace point-in-time recovery
CREATION_TIME | DATE | NOT NULL | Creation timestamp of the object
TABLESPACE_NAME | VARCHAR2(30) |  | Name of the tablespace containing the object
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 492 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

UNI_PLUGGABLE_SET_CHECK

UNI_PLUGGABLE_SET_CHECK contains pluggable check information.

Column | Datatype | NULL | Description
OBJ1_OWNER | VARCHAR2(30) |  | Owner of object
OBJ1_NAME | VARCHAR2(30) |  | Object 1
OBJ1_SUBNAME | VARCHAR2(30) |  | SubObject1Name
OBJ1_TYPE | VARCHAR2(15) |  | Object Type
TS1_NAME | VARCHAR2(30) |  | Tablespace containing Object 1
OBJ2_NAME | VARCHAR2(30) |  | Object Name
OBJ2_SUBNAME | VARCHAR2(30) |  | SubObject2Name
OBJ2_TYPE | VARCHAR2(15) |  | Object Type
OBJ2_OWNER | VARCHAR2(30) |  | Object owner of second object
TS2_NAME | VARCHAR2(30) |  | Tablespace containing Object 1
CONSTRAINT_NAME | VARCHAR2(30) |  | Name of dependent constraint
REASON | VARCHAR2(79) |  | Reason for Pluggable check violation
MESG_ID | NUMBER |  | The message ID
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 493 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_ALL_TABLES

USER_ALL_TABLES contains descriptions of the object tables and relational tables owned by the current user. Its columns are the same as those in "ALL_ALL_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 494 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AQ_AGENT_PRIVS

USER_AQ_AGENT_PRIVS displays information about the registered AQ agents that are mapped to the current user. Its columns (except for DB_USERNAME) are the same as those in DBA_AQ_AGENT_PRIVS.

See Also:

"DBA_AQ_AGENT_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 495 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_ARGUMENTS

USER_ARGUMENTS lists the arguments in all procedures and functions that are owned by the current user. Its columns are the same as those in "ALL_ARGUMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 496 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_ASSOCIATIONS

USER_ASSOCIATIONS describes user-defined statistics associated with objects owned by the current user. Its columns are the same as those in "ALL_ASSOCIATIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 497 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_ATTRIBUTE_TRANSFORMATIONS

USER_ATTRIBUTE_TRANSFORMATIONS displays information about the transformation functions for the transformations owned by the current user. Its columns (except for OWNER) are the same as those in DBA_ATTRIBUTE_TRANSFORMATIONS.

See Also:

"DBA_ATTRIBUTE_TRANSFORMATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 498 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AUDIT_OBJECT

This view, created by cataudit.sql, lists audit trail records for statements concerning objects that are accessible to the current user. Its columns are the same as those in "DBA_AUDIT_OBJECT" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 499 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AUDIT_POLICIES

USER_AUDIT_POLICIES describes the fine-grained auditing policies on the tables and views owned by the current user. Its columns (except for OBJECT_SCHEMA) are the same as those in ALL_AUDIT_POLICIES.

See Also:

"ALL_AUDIT_POLICIES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 500 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AUDIT_SESSION

This view, created by cataudit.sql, lists all audit trail records concerning connections and disconnections for the user. Its columns are the same as those in "DBA_AUDIT_SESSION" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 501 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AUDIT_STATEMENT

This view, created by cataudit.sql, lists audit trail entries for the following statements issued by the user: GRANT, REVOKE, AUDIT, NOAUDIT, and ALTER SYSTEM. Its columns are the same as those in "DBA_AUDIT_STATEMENT" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 502 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AUDIT_TRAIL

This view, created by cataudit.sql, lists audit trail entries relevant to the user. Its columns are the same as those in "DBA_AUDIT_TRAIL" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 503 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AW_PS

USER_AW_PS describes the pagespaces in the analytic workspaces owned by the current user. Its columns (except for OWNER) are the same as those in DBA_AW_PS.

See Also:
  • "DBA_AW_PS"
  • Oracle9i OLAP User's Guide for more information about this view
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 504 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_AWS

USER_AWS describes the analytic workspaces owned by the current user. Its columns (except for OWNER) are the same as those in DBA_AWS.

See Also:
  • "DBA_AWS"
  • Oracle9i OLAP User's Guide for more information about this view
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 505 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_BASE_TABLE_MVIEWS

USER_BASE_TABLE_MVIEWS describes all materialized views using materialized view logs owned by the current user. Its columns are the same as those in ALL_BASE_TABLE_MVIEWS.

See Also:

"ALL_BASE_TABLE_MVIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 506 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CATALOG

USER_CATALOG lists indexes, tables, views, clusters, synonyms, and sequences owned by the current user. Its columns are the same as those in "ALL_CATALOG" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 507 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CLU_COLUMNS

USER_CLU_COLUMNS maps columns in the current user's tables to cluster columns. Its columns are the same as those in "DBA_CLU_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 508 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CLUSTER_HASH_EXPRESSIONS

USER_CLUSTER_HASH_EXPRESSIONS lists hash functions for the hash clusters owned by the current user. Its columns are the same as those in "ALL_CLUSTER_HASH_EXPRESSIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 509 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CLUSTERS

USER_CLUSTERS describes all the clusters owned by the current user. Its columns are the same as those in "ALL_CLUSTERS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 510 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_COL_COMMENTS

USER_COL_COMMENTS describes comments on columns of tables and views in the current user's schema. Its columns are the same as those in "ALL_COL_COMMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 511 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_COL_PRIVS

USER_COL_PRIVS describes the column object grants for which the current user is the object owner, grantor, or grantee. Its columns are the same as those in DBA_COL_PRIVS.

See Also:

"DBA_COL_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 512 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_COL_PRIVS_MADE

USER_COL_PRIVS_MADE describes the column object grants for which the current user is the object owner. Its columns (except for OWNER) are the same as those in ALL_COL_PRIVS_MADE.

See Also:

"ALL_COL_PRIVS_MADE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 513 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_COL_PRIVS_RECD

USER_COL_PRIVS_RECD describes the column object grants for which the current user is the grantee. Its columns (except for GRANTEE) are the same as those in ALL_COL_PRIVS_RECD.

See Also:

"ALL_COL_PRIVS_RECD"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 514 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_COLL_TYPES

USER_COLL_TYPES describes named collection types (VARRAYs, nested tables, object tables, and so on) in the current user's schema. Its columns are the same as those in "ALL_COLL_TYPES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 515 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CONS_COLUMNS

USER_CONS_COLUMNS describes columns that are owned by the current user and that are specified in constraint definitions. Its columns are the same as those in "ALL_CONS_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 516 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CONS_OBJ_COLUMNS

USER_CONS_OBJ_COLUMNS displays information about the types that object columns (or attributes) or collection elements have been constrained to, in the tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_CONS_OBJ_COLUMNS.

See Also:

"ALL_CONS_OBJ_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 517 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_CONSTRAINTS

USER_CONSTRAINTS describes all constraint definitions on tables owned by the current user. Its columns are the same as those in "ALL_CONSTRAINTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 518 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DB_LINKS

USER_DB_LINKS describes database links owned by the current user. Its columns are the same as those in "ALL_DB_LINKS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 519 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DEPENDENCIES

USER_DEPENDENCIES describes dependencies between procedures, packages, functions, package bodies, and triggers owned by the current user, including dependencies on views created without any database links. Its columns are the same as those in "ALL_DEPENDENCIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 520 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIM_ATTRIBUTES

USER_DIM_ATTRIBUTES describes the relationship between dimension levels and functionally dependent columns in the current user's schema. The level columns and the dependent column must be in the same table. This view's columns are the same as those in "ALL_DIM_ATTRIBUTES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 521 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIM_CHILD_OF

USER_DIM_CHILD_OF describes a hierarchical relationship of 1 to n between pairs of levels in dimensions owned by the current user. Its columns are the same as those in "ALL_DIM_CHILD_OF" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 522 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIM_HIERARCHIES

USER_DIM_HIERARCHIES describes the dimension hierarchies owned by the current user. Its columns are the same as those in "ALL_DIM_HIERARCHIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 523 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIM_JOIN_KEY

USER_DIM_JOIN_KEY describes the join between two dimension tables owned by the current user. The join is always specified between a parent dimension level column and a child column. This view's columns are the same as those in "ALL_DIM_JOIN_KEY" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 524 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIM_LEVEL_KEY

USER_DIM_LEVEL_KEY describes columns of dimension levels owned by the current user. This view's columns are the same as those in "ALL_DIM_LEVEL_KEY" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 525 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIM_LEVELS

USER_DIM_LEVELS describes the levels of dimensions owned by the current user. All columns of a dimension level must come from the same relation. This view's columns are the same as those in "ALL_DIM_LEVELS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 526 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_DIMENSIONS

USER_DIMENSIONS describes dimension objects in the user's schema. Its columns are the same as those in "ALL_DIMENSIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 527 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_ERRORS

USER_ERRORS describes current errors on all stored objects (views, procedures, functions, packages, and package bodies) owned by the current user. Its columns are the same as those in "ALL_ERRORS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 528 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_EVALUATION_CONTEXT_TABLES

USER_EVALUATION_CONTEXT_TABLES describes the tables in the rule evaluation contexts owned by the current user. Its columns (except for EVALUATION_CONTEXT_OWNER) are the same as those in ALL_EVALUATION_CONTEXT_TABLES.

See Also:

"ALL_EVALUATION_CONTEXT_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 529 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_EVALUATION_CONTEXT_VARS

USER_EVALUATION_CONTEXT_VARS describes the variables in the rule evaluation contexts owned by the current user. Its columns (except for EVALUATION_CONTEXT_OWNER) are the same as those in ALL_EVALUATION_CONTEXT_VARS.

See Also:

"ALL_EVALUATION_CONTEXT_VARS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 530 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_EVALUATION_CONTEXTS

USER_EVALUATION_CONTEXTS describes the rule evaluation contexts owned by the current user. Its columns (except for EVALUATION_CONTEXT_OWNER) are the same as those in ALL_EVALUATION_CONTEXTS.

See Also:

"ALL_EVALUATION_CONTEXTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 531 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_EXTENTS

USER_EXTENTS describes the extents comprising the segments owned by the current user's objects. Its columns (except for OWNER, FILE_ID, BLOCK_ID, and RELATIVE_FNO) are the same as those in DBA_EXTENTS.

See Also:

"DBA_EXTENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 532 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_EXTERNAL_LOCATIONS

USER_EXTERNAL_TABLES describes the locations (data sources) of the external tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_EXTERNAL_LOCATIONS.

See Also:

"ALL_EXTERNAL_LOCATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 533 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_EXTERNAL_TABLES

USER_EXTERNAL_TABLES describes the external tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_EXTERNAL_TABLES.

See Also:

"ALL_EXTERNAL_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 534 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_FREE_SPACE

USER_FREE_SPACE describes the free extents in the tablespaces accessible to the current user. Its columns are the same as those in DBA_FREE_SPACE.

See Also:

"DBA_FREE_SPACE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 535 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_IND_COLUMNS

USER_IND_COLUMNS describes the columns of the indexes owned by the current user and columns of indexes on tables owned by the current user. Its columns are the same as those in "ALL_IND_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 536 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_IND_EXPRESSIONS

USER_IND_EXPRESSIONS describes expressions of function-based indexes on tables owned by the current user. Its columns are the same as those in "ALL_IND_EXPRESSIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 537 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_IND_PARTITIONS

USER_IND_PARTITIONS describes, for each index partition owned by the current user, the partition-level partitioning information, the storage parameters for the partition, and various partition statistics analyzed by ANALYZE statements. Its columns are the same as those in "ALL_IND_PARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 538 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_IND_SUBPARTITIONS

USER_IND_SUBPARTITIONS describes, for each index subpartition owned by the current user, the partition-level partitioning information, the storage parameters for the subpartition, and various partition statistics collected by ANALYZE statements. Its columns are the same as those in "ALL_IND_SUBPARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 539 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_INDEXES

USER_INDEXES describes indexes owned by the current user. To gather statistics for this view, use the SQL ANALYZE statement. This view supports parallel partitioned index scans. Its columns (except for OWNER) are the same as those in "ALL_INDEXES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 540 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_INDEXTYPE_COMMENTS

USER_INDEXTYPE_COMMENTS lists all comments for user-defined indextypes owned by the current user. Its columns are the same as those in ALL_INDEXTYPE_COMMENTS.

See Also:

"ALL_INDEXTYPE_COMMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 541 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_INDEXTYPE_OPERATORS

USER_INDEXTYPE_OPERATORS lists all the operators supported by indextypes owned by the current user. Its columns are the same as those in ALL_INDEXTYPE_OPERATORS.

See Also:

"ALL_INDEXTYPE_OPERATORS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 542 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_INDEXTYPES

USER_INDEXTYPES describes all indextypes owned by the current user. Its columns are the same as those in ALL_INDEXTYPES.

See Also:

"ALL_INDEXTYPES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 543 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_INTERNAL_TRIGGERS

USER_INTERNAL_TRIGGERS describes the internal triggers on all tables owned by the current user. Its columns are the same as those in "ALL_INTERNAL_TRIGGERS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 544 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_ARGUMENTS

USER_JAVA_ARGUMENTS displays argument information about the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_ARGUMENTS.

See Also:

"ALL_JAVA_ARGUMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 545 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_CLASSES

USER_JAVA_CLASSES displays class level information about the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_CLASSES.

See Also:

"ALL_JAVA_CLASSES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 546 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_DERIVATIONS

USER_JAVA_DERIVATIONS displays mapping information about Java source objects and their derived Java class objects and Java resource objects for the Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_DERIVATIONS.

See Also:

"ALL_JAVA_DERIVATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 547 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_FIELDS

USER_JAVA_FIELDS displays field information about the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_FIELDS.

See Also:

"ALL_JAVA_FIELDS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 548 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_IMPLEMENTS

USER_JAVA_IMPLEMENTS describes interfaces implemented by the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_IMPLEMENTS.

See Also:

"ALL_JAVA_IMPLEMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 549 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_INNERS

USER_JAVA_INNERS displays information about inner classes referred to by the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_INNERS.

See Also:

"ALL_JAVA_INNERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 550 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_LAYOUTS

USER_JAVA_LAYOUTS displays class layout information about the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_LAYOUTS.

See Also:

"ALL_JAVA_LAYOUTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 551 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_METHODS

USER_JAVA_METHODS displays method information about the stored Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_METHODS.

See Also:

"ALL_JAVA_METHODS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 552 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_NCOMPS

USER_JAVA_NCOMPS displays ncomp-related information about the Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_NCOMPS.

See Also:

"ALL_JAVA_NCOMPS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 553 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_POLICY

USER_JAVA_POLICY describes Java security permissions for the current user. Its columns are the same as those in DBA_JAVA_POLICY.

See Also:

"DBA_JAVA_POLICY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 554 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_RESOLVERS

USER_JAVA_RESOLVERS displays information about resolvers of the Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_RESOLVERS.

See Also:

"ALL_JAVA_RESOLVERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 555 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JAVA_THROWS

USER_JAVA_THROWS displays information about exceptions thrown from methods of the Java classes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_JAVA_THROWS.

See Also:

"ALL_JAVA_THROWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 556 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JOBS

USER_JOBS describes all jobs owned by the user. Its columns are the same as those in "ALL_JOBS" .

See Also:

Oracle9i Database Administrator's Guide for more information on jobs
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 557 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_JOIN_IND_COLUMNS

USER_JOIN_IND_COLUMNS describes all join conditions owned by the current user. Its columns are the same as those in "ALL_JOIN_IND_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 558 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LIBRARIES

USER_LIBRARIES describes all libraries owned by the current user. Its columns are the same as those in "ALL_LIBRARIES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 559 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LOB_PARTITIONS

USER_LOB_PARTITIONS displays the LOB partitions contained in tables owned by the current user. Its columns are the same as those in "ALL_LOB_PARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 560 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LOB_SUBPARTITIONS

USER_LOB_SUBPARTITIONS describes partition-level attributes of LOB data subpartitions owned by the current user. Its columns are the same as those in "ALL_LOB_SUBPARTITIONS" .

  • DBA_LOB_TEMPLATES describes all LOB subpartition templates in the database.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 561 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LOB_TEMPLATES

USER_LOB_TEMPLATES describes the LOB subpartition templates owned by the current user. Its columns (except for USER_NAME) are the same as those in ALL_LOB_TEMPLATES.

See Also:

"ALL_LOB_TEMPLATES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 562 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LOBS

USER_LOBS displays the user's CLOBs and BLOBs contained in the user's tables. BFILEs are stored outside the database, so they are not described by this view. This view's columns are the same as those in "ALL_LOBS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 563 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LOG_GROUP_COLUMNS

USER_LOG_GROUP_COLUMNS describes columns that are owned by the current user and that are specified in log groups. Its columns are the same as those in "ALL_LOG_GROUP_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 564 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_LOG_GROUPS

USER_LOG_GROUPS describes log group definitions on tables owned by the current user. Its columns are the same as those in "ALL_LOG_GROUPS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 565 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_METHOD_PARAMS

USER_METHOD_PARAMS describes the method parameters of the object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_METHOD_PARAMS.

See Also:

"ALL_METHOD_PARAMS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 566 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_METHOD_RESULTS

USER_METHOD_RESULTS describes the method results of the object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_METHOD_RESULTS.

See Also:

"ALL_METHOD_RESULTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 567 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_AGGREGATES

USER_MVIEW_AGGREGATES describes the grouping functions (aggregated measures) that appear in the SELECT list of aggregated materialized views owned by the current user. Its columns are the same as those in "ALL_MVIEW_AGGREGATES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 568 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_ANALYSIS

USER_MVIEW_ANALYSIS describes all materialized views owned by the current user that potentially support query rewrite and that provide additional information for analysis by applications. Its columns are the same as those in "ALL_MVIEW_ANALYSIS" .

Note:

This view excludes materialized views that reference remote tables or that include references to non-static values such as SYSDATE or USER. This view also excludes materialized views that were created as snapshots prior to Oracle8i and that were never altered to enable query rewrite.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 569 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_DETAIL_RELATIONS

USER_MVIEW_DETAIL_RELATIONS represents the named detail relations that are either in the FROM list of a materialized view, or that are indirectly referenced through views in the FROM list. Its columns are the same as those in "ALL_MVIEW_DETAIL_RELATIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 570 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_JOINS

USER_MVIEW_JOINS describes a join between two columns in the WHERE clause of a subquery that defines a materialized view. Its columns are the same as those in "ALL_MVIEW_JOINS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 571 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_KEYS

USER_MVIEW_KEYS describes the columns or expressions in the SELECT list upon which materialized views in the current user's schema are based. Its columns are the same as those in "ALL_MVIEW_KEYS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 572 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_LOGS

USER_MVIEW_LOGS describes all materialized view logs owned by the current user. Its columns are the same as those in ALL_MVIEW_LOGS.

See Also:

"ALL_MVIEW_LOGS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 573 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEW_REFRESH_TIMES

USER_MVIEW_REFRESH_TIMES describes refresh times of the materialized views owned by the current user. Its columns are the same as those in ALL_MVIEW_REFRESH_TIMES.

See Also:

"ALL_MVIEW_REFRESH_TIMES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 574 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_MVIEWS

USER_MVIEWS describes all materialized views owned by the current user. Its columns are the same as those in ALL_MVIEWS.

See Also:

"ALL_MVIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 575 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_NESTED_TABLES

USER_NESTED_TABLES describes the nested tables in tables owned by the current user. Its columns are the same as those in "ALL_NESTED_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 576 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OBJ_AUDIT_OPTS

This view, created by cataudit.sql, lists auditing characteristics for all objects owned by the current user. Its columns are the same as those in "DBA_OBJ_AUDIT_OPTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 577 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OBJ_COLATTRS

USER_OBJ_COLATTRS describes object columns and attributes contained in the tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_OBJ_COLATTRS.

See Also:

"ALL_OBJ_COLATTRS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 578 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OBJECT_SIZE

USER_OBJECT_SIZE lists the sizes, in bytes, of various PL/SQL objects. Its columns are the same as those in "DBA_OBJECT_SIZE" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 579 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OBJECT_TABLES

USER_OBJECT_TABLES describes the object tables owned by the current user. Its columns are the same as those in "ALL_OBJECT_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 580 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OBJECTS

USER_OBJECTS describes all objects owned by the current user. Its columns are the same as those in "ALL_OBJECTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 581 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OPANCILLARY

USER_OPANCILLARY provides ancillary information for operators owned by the current user. Its columns are the same as those in "ALL_OPANCILLARY" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 582 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OPARGUMENTS

USER_OPARGUMENTS provides argument information for operator bindings owned by the current user. Its columns are the same as those in "ALL_OPARGUMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 583 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OPBINDINGS

USER_OPBINDINGS describes bindings of operators owned by the current user. Its columns are the same as those in "ALL_OPBINDINGS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 584 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OPERATOR_COMMENTS

USER_OPERATOR_COMMENTS lists all comments for user-defined operators owned by the current user. Its columns are the same as those in ALL_INDEXTYPE_COMMENTS.

See Also:

"ALL_OPERATOR_COMMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 585 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OPERATORS

USER_OPERATORS describes all operators owned by the current user. Its columns are the same as those in ALL_OPERATORS.

See Also:

"ALL_OPERATORS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 586 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OUTLINE_HINTS

USER_OUTLINE_HINTS describes the set of hints that make up the outlines owned by the current user. Its columns are the same as those in "ALL_OUTLINE_HINTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 587 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_OUTLINES

USER_OUTLINES describes all outlines owned by the current user. Its columns are the same as those in "ALL_OUTLINES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 588 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PART_COL_STATISTICS

USER_PART_COL_STATISTICS provides column statistics and histogram information for table partitions owned by the current user. Its columns are the same as those in "ALL_PART_COL_STATISTICS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 589 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PART_HISTOGRAMS

USER_PART_HISTOGRAMS contains the histogram data (end-points per histogram) for histograms on table partitions that the current user can access. Its columns are the same as those in "ALL_PART_HISTOGRAMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 590 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PART_INDEXES

USER_PART_INDEXES describes the object-level partitioning information for the partitioned indexes owned by the current user. Its columns (except for OWNER) are the same as those in ALL_PART_INDEXES.

See Also:

"ALL_PART_INDEXES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 591 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PART_KEY_COLUMNS

USER_PART_KEY_COLUMNS describes the partitioning key columns for the partitioned objects owned by the current user. Its columns (except for OWNER) are the same as those in ALL_PART_KEY_COLUMNS.

See Also:

"ALL_PART_KEY_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 592 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PART_LOBS

USER_PART_LOBS provides table-level information for partitioned LOBs owned by the current user, including default attributes for LOB data partitions. Its columns are the same as those in "ALL_PART_LOBS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 593 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PART_TABLES

USER_PART_TABLES describes the object-level partitioning information for the partitioned tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_PART_TABLES.

See Also:

"ALL_PART_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 594 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PARTIAL_DROP_TABS

USER_PARTIAL_DROP_TABS describes all tables in the schema of the current user that have partially completed DROP COLUMN operations. Its columns are the same as those in "ALL_PARTIAL_DROP_TABS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 595 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PASSWORD_LIMITS

USER_PASSWORD_LIMITS describes the password profile parameters that are assigned to the user.

Column | Datatype | NULL | Description
RESOURCE_NAME | VARCHAR2(32) | NOT NULL | Name of the password resource
LIMIT | VARCHAR2(40) |  | Value of the resource limit
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 596 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PENDING_CONV_TABLES

USER_PENDING_CONV_TABLES describes the pending conversion tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_PENDING_CONV_TABLES.

See Also:

"ALL_PENDING_CONV_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 597 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_POLICIES

USER_POLICIES describes the security policies on the synonyms, tables, and views owned by the current user. Its columns (except for OBJECT_OWNER) are the same as those in ALL_POLICIES.

See Also:

"ALL_POLICIES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 598 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_POLICY_CONTEXTS

USER_POLICY_CONTEXTS describes the driving contexts defined for the synonyms, tables, and views owned by the current user. Its columns (except for OBJECT_OWNER) are the same as those in ALL_POLICY_CONTEXTS.

See Also:

"ALL_POLICY_CONTEXTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 599 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_POLICY_GROUPS

USER_POLICY_GROUPS describes the policy groups defined for the synonyms, tables, and views owned by the current user. Its columns (except for OBJECT_OWNER) are the same as those in ALL_POLICY_GROUPS.

See Also:

"ALL_POLICY_GROUPS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 600 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PROCEDURES

USER_PROCEDURES lists all functions and procedures, along with their associated properties. Its columns (except OWNER) are the same as those in "ALL_PROCEDURES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 601 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PROXIES

USER_PROXIES displays information about connections the current user is allowed to proxy. Its columns are the same as those in DBA_PROXIES.

See Also:

"DBA_PROXIES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 602 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_PUBLISHED_COLUMNS

USER_PUBLISHED_COLUMNS describes all existing source table columns for which the user has privileges.

Column | Datatype | Description
SOURCE_SCHEMA_NAME | VARCHAR2(30) | Table owner in the source system
SOURCE_TABLE_NAME | VARCHAR2(31) | Table name in the source system
COLUMN_NAME | VARCHAR2(30) | Column name
DATA_TYPE | VARCHAR2(30) | Column datatype
DATA_LENGTH | NUMBER | Column length in bytes
DATA_PRECISION | NUMBER | Decimal precision for NUMBER datatype; binary precision for FLOAT datatype; NULL for all other datatypes
DATA_SCALE | NUMBER | Digits to the right of a decimal point in a number
NULLABLE | CHAR(1) | Nulls allowed (Y |N)?
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 603 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_QUEUE_SCHEDULES

USER_QUEUE_SCHEDULES lists information about queue schedules. Its columns are the same as those in "DBA_QUEUE_SCHEDULES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 604 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_QUEUE_TABLES

USER_QUEUE_TABLES describes the queues in the queue tables created in the current user's schema. Its columns (except for OWNER) are the same as those in ALL_QUEUE_TABLES.

See Also:

"ALL_QUEUE_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 605 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_QUEUES

USER_QUEUES describes the operational characteristics of every queue in the user's schema. Its columns are the same as those in "ALL_QUEUES" .

See Also:

Oracle9i Application Developer's Guide - Advanced Queuing for more information about these views and Advanced Queuing
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 606 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_REFRESH

USER_REFRESH describes all refresh groups owned by the current user. Its columns are the same as those in "ALL_REFRESH" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 607 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_REFRESH_CHILDREN

USER_REFRESH_CHILDREN lists all the objects in refresh groups owned by the current user. Its columns are the same as those in "ALL_REFRESH_CHILDREN" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 608 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_REFS

USER_REFS describes the REF columns and REF attributes in the object type columns of tables owned by the current user. Its columns are the same as those in "ALL_REFS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 609 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_REGISTERED_MVIEWS

USER_REGISTERED_MVIEWS describes all registered materialized views (registered at a master site or a master materialized view site) owned by the current user. Its columns are the same as those in ALL_REGISTERED_MVIEWS.

See Also:

"ALL_REGISTERED_MVIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 610 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_REGISTRY

USER_REGISTRY displays information about the components loaded into the database that are owned by the current user. Its columns are the same as those in DBA_REGISTRY.

See Also:

"DBA_REGISTRY"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 611 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RESOURCE_LIMITS

USER_RESOURCE_LIMITS displays the resource limits for the current user.

Column | Datatype | NULL | Description
RESOURCE_NAME | VARCHAR2(32) | NOT NULL | Name of the resource
LIMIT | VARCHAR2(40) |  | Limit placed on this resource
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 612 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RESUMABLE

USER_RESUMABLE lists resumable statements executed by the current user. Its columns are the same as those in DBA_RESUMABLE.

See Also:

"DBA_RESUMABLE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 613 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_ROLE_PRIVS

USER_ROLE_PRIVS describes the roles granted to the current user.

Column | Datatype | NULL | Description
USERNAME | VARCHAR2(30) |  | Name of the user, or PUBLIC
GRANTED_ROLE | VARCHAR2(30) |  | Name of the role granted to the user
ADMIN_OPTION | VARCHAR2(3) |  | Indicates whether the grant was with the ADMIN OPTION (YES) or not (NO)
DEFAULT_ROLE | VARCHAR2(3) |  | Indicates whether the role is designated as a DEFAULT ROLE for the user (YES) or not (NO)
OS_GRANTED | VARCHAR2(3) |  | Granted by the operating system (YES) or not (NO); occurs if configuration parameter OS_ROLES = true.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 614 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RSRC_CONSUMER_GROUP_PRIVS

USER_RSRC_CONSUMER_GROUP_PRIVS lists all resource consumer groups granted to the user. Its columns are the same as those in DBA_RSRC_CONSUMER_GROUP_PRIVS.

See Also:

"DBA_RSRC_CONSUMER_GROUP_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 615 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RSRC_MANAGER_SYSTEM_PRIVS

USER_RSRC_MANAGER_SYSTEM_PRIVS lists all the users who are granted system privileges for the DBMS_RESOURCE_MANAGER package. Its columns are the same as those in "DBA_RSRC_MANAGER_SYSTEM_PRIVS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 616 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RULE_SET_RULES

USER_RULE_SET_RULES describes the rules in the rule sets owned by the current user. Its columns (except for RULE_SET_OWNER) are the same as those in ALL_RULE_SET_RULES.

See Also:

"ALL_RULE_SET_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 617 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RULE_SETS

USER_RULE_SETS describes the rule sets owned by the current user. Its columns (except for RULE_SET_OWNER) are the same as those in ALL_RULE_SETS.

See Also:

"ALL_RULE_SETS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 618 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_RULES

USER_RULES describes the rules owned by the current user. Its columns (except for RULE_OWNER) are the same as those in ALL_RULES.

See Also:

"ALL_RULES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 619 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SEGMENTS

USER_SEGMENTS describes the storage allocated for the segments owned by the current user's objects. Its columns (except for OWNER, HEADER_FILE, HEADER_BLOCK, and RELATIVE_FNO) are the same as those in DBA_SEGMENTS.

See Also:

"DBA_SEGMENTS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 620 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SEQUENCES

USER_SEQUENCES describes all sequences owned by the current user. Its columns are the same as those in "ALL_SEQUENCES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 621 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SOURCE

USER_SOURCE describes the text source of the stored objects owned by the current user. Its columns (except for OWNER) are the same as those in "ALL_SOURCE" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 622 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SOURCE_TABLES

USER_SOURCE_TABLES enables you to see all of the existing source tables to which you have subscribe privileges. Its columns are the same as those in ALL_SOURCE_TABLES.

See Also:

"ALL_SOURCE_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 623 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SQLJ_TYPE_ATTRS

USER_SQLJ_TYPE_ATTRS describes the attributes of the SQLJ object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_SQLJ_TYPE_ATTRS.

See Also:

"ALL_SQLJ_TYPE_ATTRS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 624 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SQLJ_TYPE_METHODS

USER_SQLJ_TYPE_METHODS describes the methods of the SQLJ object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_SQLJ_TYPE_METHODS.

See Also:

"ALL_SQLJ_TYPE_METHODS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 625 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SQLJ_TYPES

USER_SQLJ_TYPES describes the SQLJ object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_SQLJ_TYPES.

See Also:

"ALL_SQLJ_TYPES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 626 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_STORED_SETTINGS

USER_STORED_SETTINGS lists information about the persistent parameter settings for stored PL/SQL units, but only shows information about PL/SQL units owned by the current user. USER_STORED_SETTINGS does not display the OWNER column. The rest of its columns are the same as those in "ALL_STORED_SETTINGS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 627 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBPART_COL_STATISTICS

USER_SUBPART_COL_STATISTICS provides column statistics and histogram information for subpartitions of subpartitioned objects owned by the current user. Its columns are the same as those in "ALL_STORED_SETTINGS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 628 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBPART_HISTOGRAMS

USER_SUBPART_HISTOGRAMS lists actual histogram data (end-points per histogram) for histograms on table subpartitions owned by the current user. Its columns are the same as those in "ALL_SUBPART_HISTOGRAMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 629 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBPART_KEY_COLUMNS

USER_SUBPART_KEY_COLUMNS lists subpartitioning key columns for composite-partitioned tables (and local indexes on composite-partitioned tables) owned by the current user. Its columns are the same as those in ALL_SUBPART_KEY_COLUMNS.

See Also:

"ALL_SUBPART_KEY_COLUMNS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 630 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBPARTITION_TEMPLATES

USER_SUBPARTITION_TEMPLATES describes the subpartition templates owned by the current user. Its columns (except for USER_NAME) are the same as those in ALL_SUBPARTITION_TEMPLATES.

See Also:

"ALL_SUBPARTITION_TEMPLATES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 631 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBSCRIBED_COLUMNS

USER_SUBSCRIBED_COLUMNS enables publishers to view the columns of published tables to which they have subscribed. Its columns are the same as those in "ALL_SUBSCRIBED_COLUMNS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 632 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBSCRIBED_TABLES

USER_SUBSCRIBED_TABLES enables subscribers to view all published tables to which they have subscribed. Its columns are the same as those in "ALL_SUBSCRIBED_TABLES" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Static Data Dictionary Views, 633 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SUBSCRIPTIONS

USER_SUBSCRIPTIONS enables subscribers to view all of their subscriptions. Its columns are the same as those in "ALL_SUBSCRIPTIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 634 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SYNONYMS

USER_SYNONYMS describes private synonyms (synonyms owned by the current user). Its columns are the same as those in "ALL_SYNONYMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 635 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_SYS_PRIVS

USER_SYS_PRIVS lists system privileges granted to the current user. Its columns are the same as those in "DBA_SYS_PRIVS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 636 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_COL_STATISTICS

USER_TAB_COL_STATISTICS contains column statistics and histogram information extracted from "USER_TAB_COLUMNS" . Its columns are the same as those in "ALL_TAB_COL_STATISTICS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 637 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_COLUMNS

USER_TAB_COLUMNS describes the columns of tables, views, and clusters owned by the current user. Its columns are the same as those in "ALL_TAB_COLUMNS" . To gather statistics for this view, use the SQL ANALYZE statement.

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 638 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_COMMENTS

USER_TAB_COMMENTS describes comments on the tables and views owned by the current user. Its columns are the same as those in "ALL_TAB_COMMENTS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 639 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_HISTOGRAMS

USER_TAB_HISTOGRAMS describes histograms on columns of tables owned by the current user. Its columns are the same as those in "ALL_TAB_HISTOGRAMS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 640 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_MODIFICATIONS

USER_TAB_MODIFICATIONS describes modifications to all tables owned by the current user that have been modified since the last time statistics were gathered on the tables. Its columns are the same as those in "ALL_TAB_MODIFICATIONS" .

Note:

This view is populated only for tables with the MONITORING attribute. It is intended for statistics collection over a long period of time and may not be populated until a few hours after the actual modifications occurred.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 641 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_PARTITIONS

USER_TAB_PARTITIONS describes partition-level partitioning information, partition storage parameters, and partition statistics determined by ANALYZE statements for all partitions owned by the current user. Its columns are the same as those in "ALL_TAB_PARTITIONS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 642 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_PRIVS

USER_TAB_PRIVS describes the object grants for which the current user is the object owner, grantor, or grantee. Its columns are the same as those in DBA_TAB_PRIVS.

See Also:

"DBA_TAB_PRIVS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 643 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_PRIVS_MADE

USER_TAB_PRIVS_MADE describes the object grants for which the current user is the object owner. Its columns (except for OWNER) are the same as those in ALL_TAB_PRIVS_MADE.

See Also:

"ALL_TAB_PRIVS_MADE"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 644 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_PRIVS_RECD

USER_TAB_PRIVS_RECD describes the object grants for which the current user is the grantee. Its columns (except for GRANTEE) are the same as those in ALL_TAB_PRIVS_RECD.

See Also:

"ALL_TAB_PRIVS_RECD"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 645 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TAB_SUBPARTITIONS

USER_TAB_SUBPARTITIONS describes, for each table subpartition, the subpartition name, name of the table and partition to which it belongs, and its storage attributes. Its columns are the same as those in "ALL_TAB_SUBPARTITIONS" .

Note:

Statistics are not collected on a per-subpartition basis.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 646 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TABLES

USER_TABLES describes all relational tables owned by the current user. Its columns are the same as those in ALL_TABLES. To gather statistics for this view, use the SQL ANALYZE statement.

See Also:

"ALL_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Static Data Dictionary Views, 647 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TABLESPACES

USER_TABLESPACES describes the tablespaces accessible to the current user. Its columns (except for PLUGGED_IN) are the same as those in DBA_TABLESPACES.

See Also:

"DBA_TABLESPACES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Static Data Dictionary Views, 648 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TRANSFORMATIONS

USER_TRANSFORMATIONS displays information about the transformations owned by the current user. Its columns (except for OWNER) are the same as those in DBA_TRANSFORMATIONS.

See Also:

"DBA_TRANSFORMATIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 649 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TRIGGER_COLS

USER_TRIGGER_COLS describes the use of columns in triggers owned by the current user and triggers on tables owned by the current user. Its columns are the same as those in "ALL_TRIGGER_COLS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Static Data Dictionary Views, 650 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TRIGGERS

USER_TRIGGERS describes all triggers owned by the current. Its columns are the same as those in "ALL_TRIGGERS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 651 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TS_QUOTAS

USER_TS_QUOTAS contains information about tablespace quotas for the current user. Its columns are the same as those in "DBA_TS_QUOTAS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 652 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TYPE_ATTRS

USER_TYPE_ATTRS describes the attributes of the object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_TYPE_ATTRS.

See Also:

"ALL_TYPE_ATTRS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Static Data Dictionary Views, 653 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TYPE_METHODS

USER_TYPE_METHODS describes the methods of the object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_TYPE_METHODS.

See Also:

"ALL_TYPE_METHODS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 654 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TYPE_VERSIONS

USER_TYPE_VERSIONS describes the versions of the object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_TYPE_VERSIONS.

See Also:

"ALL_TYPE_VERSIONS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 655 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_TYPES

USER_TYPES describes the object types owned by the current user. Its columns (except for OWNER) are the same as those in ALL_TYPES.

See Also:

"ALL_TYPES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 656 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_UNUSED_COL_TABS

USER_UNUSED_COL_TABS contains a description of all tables containing unused columns. Its columns are the same as those in "ALL_UNUSED_COL_TABS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Static Data Dictionary Views, 657 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_UPDATABLE_COLUMNS

USER_UPDATABLE_COLUMNS describes columns in a join view that can be updated by the current user. Its columns are the same as those in "ALL_UPDATABLE_COLUMNS" .

See Also:

Oracle9i Database Concepts for information on updatable join views
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Static Data Dictionary Views, 658 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_USERS

USER_USERS describes the current user. Its columns (except for PASSWORD and PROFILE) are the same as those in DBA_USERS.

See Also:

"DBA_USERS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 659 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_USTATS

USER_USTATS describes all user-defined statistics owned by the current user. Its columns are the same as those in "ALL_USTATS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Static Data Dictionary Views, 660 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_VARRAYS

USER_VARRAYS describes the varrays owned by the current user. Its columns are the same as those in "ALL_VARRAYS" .

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Static Data Dictionary Views, 661 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_VIEWS

USER_VIEWS describes the views owned by the current user. Its columns (except for OWNER) are the same as those in ALL_VIEWS.

See Also:

"ALL_VIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 662 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_XML_SCHEMAS

USER_XML_SCHEMAS describes the registered XML schemas owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_SCHEMAS.

See Also:

"ALL_XML_SCHEMAS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 663 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_XML_TAB_COLS

USER_XML_TAB_COLS describes the columns of the XML tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_TAB_COLS.

See Also:

"ALL_XML_TAB_COLS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Static Data Dictionary Views, 664 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_XML_TABLES

USER_XML_TABLES describes the XML tables owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_TABLES.

See Also:

"ALL_XML_TABLES"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Static Data Dictionary Views, 665 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_XML_VIEW_COLS

USER_XML_VIEW_COLS describes the columns of the XML views owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_VIEW_COLS.

See Also:

"ALL_XML_VIEW_COLS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Static Data Dictionary Views, 666 of 666

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

USER_XML_VIEWS

USER_XML_VIEWS describes the XML views owned by the current user. Its columns (except for OWNER) are the same as those in ALL_XML_VIEWS.

See Also:

"ALL_XML_VIEWS"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 100 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOG_HISTORY

This view contains log history information from the control file.

Column | Datatype | Description
THREAD# | NUMBER | Thread number of the archived log
SEQUENCE# | NUMBER | Sequence number of the archived log
FIRST_TIME | DATE | Time of first entry (lowest SCN) in the log. This column was previously named TIME.
FIRST_CHANGE# | NUMBER | Lowest SCN in the log. This column was previously named LOW_CHANGE#.
NEXT_CHANGE# | NUMBER | Highest SCN in the log. This column was previously named HIGH_CHANGE#.
RECID | NUMBER | Control file record ID
STAMP | NUMBER | Control file record stamp
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 101 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGFILE

This view contains information about redo log files.

Column Datatype Description

GROUP#

NUMBER

Redo log group identifier number

STATUS

VARCHAR2(7)

Status of the log member:

  • INVALID - File is inaccessible
  • STALE - File's contents are incomplete
  • DELETED - File is no longer used
  • blank - File is in use

TYPE

VARCHAR2(7)

MEMBER

VARCHAR2(513)

Redo log member name
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 102 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGHIST

This view contains log history information from the control file. This view is retained for historical compatibility. Oracle recommends that you use V$LOG_HISTORY instead.

See Also:

"V$LOG_HISTORY"

Column | Datatype | Description
THREAD# | NUMBER | Log thread number
SEQUENCE# | NUMBER | Log sequence number
FIRST_CHANGE# | NUMBER | Lowest SCN in the log
FIRST_TIME | DATE | Time of first SCN in the log
SWITCH_CHANGE# | NUMBER | SCN at which the log switch occurred; one more than highest SCN in the log
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 103 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGMNR_CONTENTS

This view contains log history information.

When a SELECT statement is executed against the V$LOGMNR_CONTENTS view, the archive redo log files are read sequentially. Translated records from the redo log files are returned as rows in the V$LOGMNR_CONTENTS view. This continues until either the filter criteria specified at startup (EndTime or endScn) are met or the end of the archive log file is reached.

Column | Datatype | Description
SCN | NUMBER | System change number (SCN) when the redo record was generated
CSCN | NUMBER |
TIMESTAMP | DATE | Timestamp
COMMIT_TIMESTAMP | DATE |
THREAD# | NUMBER | Number of the thread which generated the redo record
LOG_ID | NUMBER | Number of the log file which contains the redo record. This number is generated by LogMiner to uniquely identify a log, and corresponds to the LOG_ID column in V$LOGMNR_FILES.
XIDUSN | NUMBER | Transaction ID undo segment number of the transaction which generated the change
XIDSLT | NUMBER | Transaction ID slot number of the transaction which generated the change
XIDSQN | NUMBER | Transaction ID sequence number of the transaction which generated the change
RBASQN | NUMBER | RBA sequence number of the log that contained this redo record
RBABLK | NUMBER | RBA block number within the log file
RBABYTE | NUMBER | RBA byte offset within the block
UBAFIL | NUMBER | UBA file number identifying the file containing the undo block
UBABLK | NUMBER | UBA block number for the undo block
UBAREC | NUMBER | UBA record index within the undo block
UBASQN | NUMBER | UBA undo block sequence number
ABS_FILE# | NUMBER | Data block absolute file number of the block changed by the transaction
REL_FILE# | NUMBER | Data block relative file number. The file number is relative to the tablespace of the object.
DATA_BLK# | NUMBER | Data block number within the file
DATA_OBJ# | NUMBER | Data block object number identifying the object
DATA_DOBJ# | NUMBER | Data block data object number identifying the object within the tablespace
SEG_OWNER | VARCHAR2(32) | Owner of the segment
SEG_NAME | VARCHAR2(256) | Name of the segment
SEG_TYPE | NUMBER | Segment type
SEG_TYPE_NAME | VARCHAR2(32) | Segment type name
TABLE_SPACE | VARCHAR2(32) | Tablespace name
ROW_ID | VARCHAR2(19) | Row ID
SESSION# | NUMBER | Session number of the session which generated the redo. A null value is reported if the session number is not available from the redo log.
SERIAL# | NUMBER | Serial number of the session which generated the redo. The session number and serial # can be used to uniquely identify the Oracle session. A null value is reported if the session number is not available from the redo log.
USERNAME | VARCHAR2(30) | User name
SESSION_INFO | VARCHAR2(4000) | Session information
ROLLBACK | NUMBER | Rollback request
OPERATION | VARCHAR2(30) | Operation
OPERATION_CODE | NUMBER | Operation code
SQL_REDO | VARCHAR2(4000) | SQL redo
SQL_UNDO | VARCHAR2(4000) | SQL undo
RS_ID | VARCHAR2(32) | Record set ID
SSN | NUMBER | SQL sequence number
CSF | NUMBER | Continuation SQL flag
INFO | VARCHAR2(32) | Informational message
STATUS | NUMBER | Status
REDO_VALUE | RAW(4) |
UNDO_VALUE | RAW(4) |
SQL_COLUMN_TYPE | VARCHAR2(32) | Type of data in the SQL_REDO and SQL_UNDO columns
SQL_COLUMN_NAME | VARCHAR2(32) | Name of the LOB or LONG columns
REDO_LENGTH | NUMBER | Length of the data value in the SQL_REDO column
REDO_OFFSET | NUMBER | Length of the data value in the SQL_REDO column
UNDO_LENGTH | NUMBER | Length of the data value in the SQL_UNDO column
UNDO_OFFSET | NUMBER | If SQL_COLUMN_TYPE is LOB_COLUMN or LONG_COLUMN, then this column contains the byte offset of the SQL_UNDO column data in the column indicated by SQL_COLUMN_NAME. Zero by default.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 104 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGMNR_DICTIONARY

This view contains log history information.

Column | Datatype | Description
TIMESTAMP | DATE | Date the dictionary was created
DB_ID | NUMBER | Database ID
DB_NAME | VARCHAR2(8) | Name of the database
FILENAME | VARCHAR2(513) | Dictionary filename
DICTIONARY_SCN | NUMBER | System change number when the dictionary was created
RESET_SCN | NUMBER | Reset log SCN when the dictionary was created
RESET_SCN_TIME | DATE | Time when the reset log SCN was obtained to create the dictionary
ENABLED_THREAD_MAP | RAW(16) | Bit map of currently enabled threads when the dictionary was created
INFO | VARCHAR2(32) | Informational/Status message BAD_DATE indicates that the SCN of the dictionary file does not match the SCN range of the log files
STATUS | NUMBER | A NULL indicates a valid dictionary file for the list of log files. A non-NULL value indicates further information is contained in the INFO column as a text string.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 105 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGMNR_LOGS

This view contains log information.

Column | Datatype | Description
LOG_ID | NUMBER | Log file identifier
FILENAME | VARCHAR2(513) | Name of the log file
LOW_TIME | DATE | Oldest date of any records in the file
HIGH_TIME | DATE | Most recent date of any records in the file
DB_ID | NUMBER | Database ID
DB_NAME | VARCHAR2(8) | Name of the database
RESET_SCN | NUMBER | Reset log SCN when the log was created
RESET_SCN_TIME | DATE | Time when the reset log SCN was obtained to create the log
THREAD_ID | NUMBER | Thread number
THREAD_SQN | NUMBER | Thread sequence number
LOW_SCN | NUMBER | SCN allocated when log switched into
NEXT_SCN | NUMBER | SCN after this log. Low SCN of the next log.
INFO | VARCHAR2(32) | Informational message. A value of MISSING_LOGFILE will be assigned to a row entry where a needed logfile is missing from the list of log files.
STATUS | NUMBER | Indicates the status of a logfile. A NULL value indicates a valid logfile; a non-NULL value indicates further information is contained in the INFO column as a text string. All logfiles successfully added to the file list will have a status value of NULL.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 106 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGMNR_PARAMETERS

This view contains log information.

Column | Datatype | Description
START_DATE | DATE | The date to start search at
END_DATE | DATE | The date to end search at
START_SCN | NUMBER | The system change number to start search
END_SCN | NUMBER | The system change number to end search
INFO | VARCHAR2(32) | An informational message
STATUS | NUMBER | The status. A NULL value indicates parameters are valid. A non-NULL value indicates further information is contained in the INFO column as a text string.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 107 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGSTDBY

V$LOGSTDBY displays dynamic information about what is happening to the log apply services. This view is very helpful when diagnosing performance problems during the logical application of archived redo logs to the standby database, and it can be helpful for other problems.

Column | Datatype | Description
SERIAL# | NUMBER | SQL Session serial number. This data is used when joining this view with the V$SESSION and V$PX_SESSION views.
LOGSTDBY_ID | NUMBER | Parallel query slave ID
PID | VARCHAR2(12) | Process ID
TYPE | VARCHAR2(30) | Indicates the task being performed by the process (COORDINATOR, APPLIER, ANALYZER, READER, PREPARER, or BUILDER)
STATUS_CODE | NUMBER | Status number (or Oracle error code) belonging to the STATUS message
STATUS | VARCHAR2(256) | Description of the current activity of the process
HIGH_SCN | NUMBER | Highest SCN seen by the process. This column is used to confirm the progress of the individual process.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 108 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$LOGSTDBY_STATS

V$LOGSTDBY_STATS displays LogMiner statistics, current state, and status information for the logical standby database while log apply services are running. If log apply services are not running, then the values for the statistics are cleared.

Column Datatype Description

NAME

VARCHAR2(64)

Name of the statistic, state, or status:

Note: Many of the following statistics are subject to change or deletion; programmers should write application code to tolerate missing or extra statistics.

  • number of preparers
  • number of appliers
  • maximum SGA for LCR cache
  • parallel servers in use
  • transaction consistency
  • coodinator state
  • transactions scheduled
  • transactions applied
  • preparer memory alloc failures
  • builder memory alloc failures
  • attempts to handle low memory
  • successful low memory recovery
  • memory spills avoided
  • rollback attempts
  • successful rollbacks
  • memory spill attempts
  • successful memory spills
  • preparer ignored memory LWM
  • builder ignored memory LWM
  • mining resumed

VALUE

VARCHAR2(64)

Value of the statistic or state information
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 109 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MANAGED_STANDBY

V$MANAGED_STANDBY displays current and status information for some Oracle database server processes related to the Data Guard environment for physical standby database only.

Column Datatype Description

PROCESS

VARCHAR2(7)

Type of process whose information is being reported. Possible values are:

  • RFS - remote file server
  • MRP0 - detached recovery server process
  • MR(fg) - foreground recovery session

PID

NUMBER

Operating system process identifier of process

STATUS

VARCHAR2(12)

Current process status. Possible values are:

  • UNUSED - no active process
  • ALLOCATED - process is active but not currently connected to a primary database client
  • CONNECTED - network connection established to a primary database client
  • ATTACHED - process is actively attached and communicating to a primary database client
  • IDLE - process is not performing any activities
  • ERROR - process has failed
  • OPENING - process is opening the archived redo log
  • CLOSING - process has completed archival and is closing the archived redo log
  • WRITING - process is actively writing archived redo log data
  • RECEIVING - process is receiving network communication
  • ANNOUNCING - process is announcing the existence of a potential dependent archived redo log
  • REGISTERING - process is registering the existence of a completed dependent archived redo log
  • WAIT_FOR_LOG - process is waiting for the archived redo log to be completed
  • WAIT_FOR_GAP - process is waiting for the archive gap to be resolved
  • APPLYING_LOG - process is actively applying the archived redo log to the standby database

CLIENT_PROCESS

VARCHAR2(8)

Identifies the corresponding primary database process. Possible values are:

  • ARCHIVAL - foreground (manual) archival process (SQL)
  • ARCH - background ARC n process
  • LGWR - background LGWR process

CLIENT_PID

VARCHAR2(40)

Operating system process identifier of the client process

CLIENT_DBID

VARCHAR2(40)

Database identifier of the primary database

GROUP#

VARCHAR2(40)

Standby redo log group

THREAD#

NUMBER

Archived redo log thread number

SEQUENCE#

NUMBER

Archived redo log sequence number

BLOCK#

NUMBER

Last processed archived redo log block number

BLOCKS

NUMBER

Size of the archived redo log in 512-byte blocks

DELAY_MINS

NUMBER

Archived redo log delay interval in minutes

KNOWN_AGENTS

NUMBER

Total number of standby database agents processing an archived redo log

ACTIVE_AGENTS

NUMBER

Number of standby database agents actively processing an archived redo log
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 110 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_COMP_LIST

V$MAP_COMP_LIST contains supplementary information for all element mapping structures.

Column | Datatype | Description
ELEM_IDX | NUMBER | Index corresponding to element
NUM_COMP | NUMBER | Number of components (maximum is 5)
COMP1_NAME | VARCHAR2(256) | Name of the first component
COMP1_VAL | VARCHAR2(256) | Value of the first component
COMP2_NAME | VARCHAR2(256) | Name of the second component
COMP2_VAL | VARCHAR2(256) | Value of the second component
COMP3_NAME | VARCHAR2(256) | Name of the third component
COMP3_VAL | VARCHAR2(256) | Value of the third component
COMP4_NAME | VARCHAR2(256) | Name of the fourth component
COMP4_VAL | VARCHAR2(256) | Value of the fourth component
COMP5_NAME | VARCHAR2(256) | Name of the fifth component
COMP5_VAL | VARCHAR2(256) | Value of the fifth component
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 111 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_ELEMENT

V$MAP_ELEMENT contains a list of all element mapping structures in the SGA of the instance.

Column | Datatype | Description
ELEM_NAME | VARCHAR2(256) | Element name
ELEM_IDX | NUMBER | Index corresponding to element
ELEM_CFGID | VARCHAR2(256) | Configuration ID: N/A if configuration ID is not supported
ELEM_TYPE | VARCHAR2(12) | Element type (MIRROR, STRIPE, RAID5, CONCATENATED, PARTITION, DISK, or NONE)
ELEM_SIZE | NUMBER | Element Size in HKB
ELEM_NSUBELEM | NUMBER | Number of Subelements
ELEM_DESCR | VARCHAR2(256) | Element Description
STRIPE_SIZE | NUMBER | Stripe Size in HKB for RAID-5 and STRIPE elements, 0 for the remaining types
LIB_IDX | NUMBER | Index of the library which claims ownership of the element
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 112 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_EXT_ELEMENT

V$MAP_EXT_ELEMENT contains supplementary information for all element mapping structures.

Column | Datatype | Description
ELEM_IDX | NUMBER | Index corresponding to element
NUM_ATTRB | NUMBER | Number of Attributes (maximum is 5)
ATTRB1_NAME | VARCHAR2(256) | Name of the first Attribute
ATTRB1_VAL | VARCHAR2(256) | Value of the first attribute
ATTRB2_NAME | VARCHAR2(256) | Name of the second attribute
ATTRB2_VAL | VARCHAR2(256) | Value of the second attribute
ATTRB3_NAME | VARCHAR2(256) | Name of the third attribute
ATTRB3_VAL | VARCHAR2(256) | Value of the third attribute
ATTRB4_NAME | VARCHAR2(256) | Name of the fourth attribute
ATTRB4_VAL | VARCHAR2(256) | Value of the fourth attribute
ATTRB5_NAME | VARCHAR2(256) | Name of the fifth attribute
ATTRB5_VAL | VARCHAR2(256) | Value of the fifth attribute
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 113 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_FILE

V$MAP_FILE contains a list of all file mapping structures in the shared memory of the instance.

Column Datatype Description

FILE_MAP_IDX

NUMBER

Index corresponding to file

FILE_CFGID

VARCHAR2(256)

Configuration ID: N/A if configuration ID is not supported

FILE_STATUS

VARCHAR2(7)

Status of the mapping information:

  • VALID - file mapping information is latest
  • INVALID - mapping needs to be refreshed

FILE_NAME

VARCHAR2(256)

Absolute file name

FILE_TYPE

VARCHAR2(11)

File type (DATAFILE, SPFILE, TEMPFILE, CONTROLFILE, LOGFILE, or ARCHIVEFILE)

FILE_STRUCTURE

VARCHAR2(9)

File structure (FILE, RAWVOLUME, RAWDEVICE, or NONE)

FILE_SIZE

NUMBER

File size in HKB (Half KB)

FILE_NEXTS

NUMBER

Number of file extents in the file (not necessarily the same as the number of file extents mapped)

LIB_IDX

NUMBER

Index of mapping library claiming ownership of the file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 114 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_FILE_EXTENT

V$MAP_FILE_EXTENT contains a list of all file extent mapping structures in the shared memory of the instance.

Column | Datatype | Description
FILE_MAP_IDX | NUMBER | File index (corresponds to FILE_MAP_IDX in V$MAP_FILE)
EXT_NUM | NUMBER | File extent number
EXT_ELEM_OFF | NUMBER | Element offset in HKB
EXT_SIZE | NUMBER | File extent size in HKB
EXT_FILE_OFF | NUMBER | File Offset in HKB
EXT_TYPE | VARCHAR2(6) | File Extent Type (DATA, PARITY, or NONE)
ELEM_IDX | NUMBER | Index in V$MAP_ELEMENT corresponding to the element where the file extent resides
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 115 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_FILE_IO_STACK

V$MAP_FILE_IO_STACK displays the hierarchical arrangement of storage containers for files. Each row in the view represents a level in the hierarchy.

Column | Datatype | Description
FILE_MAP_IDX | NUMBER | File index (corresponds to FILE_MAP_IDX in V$MAP_FILE)
DEPTH | NUMBER | Element depth within the I/O stack
ELEM_IDX | NUMBER | Index corresponding to element
CU_SIZE | NUMBER | Contiguous set of logical blocks of the file, in HKB units, that is resident contiguously on the element
STRIDE | NUMBER | Number of HKB between contiguous units (CU) in the file that are contiguous on this element. Used in RAID5 and striped files.
NUM_CU | NUMBER | Number of contiguous units that are adjacent to each other on this element that are separated by STRIDE HKB in the file. In RAID5, the number of contiguous units also include the parity stripes.
ELEM_OFFSET | NUMBER | Element offset in HKB units
FILE_OFFSET | NUMBER | Offset in HKB units from the start of the file to the first byte of the contiguous units
DATA_TYPE | VARCHAR2(15) | Datatype (DATA, PARITY, or DATA AND PARITY)
PARITY_POS | NUMBER | Position of the parity. Only for RAID5. This field is needed to distinguish the parity from the data part.
PARITY_PERIOD | NUMBER | Parity period. Only for RAID5.
ID | NUMBER | Unique identifier
PARENT_ID | NUMBER | Parent identifier
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 116 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_LIBRARY

V$MAP_LIBRARY contains a list of all mapping libraries dynamically loaded by the external process.

Column Datatype Description

LIB_IDX

NUMBER

Index corresponding to library

LIB_NAME

VARCHAR2(256)

Absolute library name

VENDOR_NAME

VARCHAR2(64)

Name of the vendor implementing the library

PROTOCOL_NUM

NUMBER

Mapping protocol that the library supports

VERSION_NUM

VARCHAR2(32)

Version number

PATH_NAME

VARCHAR2(1024)

Path name

MAP_FILE

VARCHAR2(1)

Indicates whether this library supports mapping files (Y) or not (N)

FILE_CFGID

VARCHAR2(13)

Type of configuration ID supported for files:

  • NONE - not supported
  • PERSISTENT
  • NONPERSISTENT

MAP_ELEM

VARCHAR2(1)

Indicates whether this library supports mapping elements (Y) or not (N)

ELEM_CFGID

VARCHAR2(13)

Type of configuration id supported for elements:

  • NONE - not supported
  • PERSISTENT
  • NONPERSISTENT

MAP_SYNC

VARCHAR2(1)

Indicates whether this library needs to be explicitly synced so that future mappings reflect the most recent changes (Y) or not (N). Note that configuration IDs cannot be supported if the library needs to be explicitly synced.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 117 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MAP_SUBELEMENT

V$MAP_SUBELEMENT contains a list of all subelement mappping structures in the shared memory of the instance.

Column | Datatype | Description
CHILD_IDX | NUMBER | Index in V$MAP_ELEMENT corresponding to child element
PARENT_IDX | NUMBER | Index in V$MAP_ELEMENT corresponding to parent element
SUB_NUM | NUMBER | Subelement number
SUB_SIZE | NUMBER | Subelement size in HKB
ELEM_OFFSET | NUMBER | Offset in HKB on child element
SUB_FLAGS | NUMBER | Subelement flags (currently unused)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 118 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MTTR_TARGET_ADVICE

V$MTTR_TARGET_ADVICE contains rows that predict the number of physical I/Os for the MTTR corresponding to each row. The rows also compute a physical I/O factor, which is the ratio of the number of estimated I/Os to the number of I/Os actually performed by the current MTTR setting during the measurement interval.

The content of the view is empty if MTTR advisory has not been turned on since database startup. Otherwise, it returns the advisory information collected. If advisory is currently off, then this information comes from the last time MTTR advisory was on. FAST_START_MTTR_TARGET must be set to a nonzero value if the STATISTICS_LEVEL parameter is dynamically modified to turn MTTR advisory on.

If the FAST_START_MTTR_TARGET parameter is changed while MTTR advisory is on, then MTTR advisory is temporarily turned off until the new FAST_START_MTTR_TARGET setting takes effect. During this transition period, the contents of V$MTTR_TARGET_ADVICE reflect the simulation result for the old MTTR setting.

Column | Datatype | Description
MTTR_TARGET_FOR_ESTIMATE | NUMBER | MTTR setting being simulated. Equal to the current MTTR setting if this is the first row of the view.
ADVICE_STATUS | VARCHAR2(5) | Current status of MTTR simulation (ON, READY, or OFF)
DIRTY_LIMIT | NUMBER | Dirty buffer limit derived from the MTTR being simulated
ESTD_CACHE_WRITES | NUMBER | Estimated number of cache physical writes under this MTTR
ESTD_CACHE_WRITE_FACTOR | NUMBER | Estimated cache physical write ratio under this MTTR. It is the ratio of the estimated number of cache writes to the number of cache writes under the current MTTR setting.
ESTD_TOTAL_WRITES | NUMBER | Estimated total number of physical writes under this MTTR
ESTD_TOTAL_WRITE_FACTOR | NUMBER | Estimated total physical write ratio under this MTTR. It is the ratio of the estimated total number of physical writes to the total number of physical writes under the current MTTR setting.
ESTD_TOTAL_IOS | NUMBER | Estimated total number of I/Os under this MTTR
ESTD_TOTAL_IO_FACTOR | NUMBER | Estimated total I/O ratio under this MTTR. It is the ratio of the estimated total number of I/Os to the total number of I/Os under the current MTTR setting.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 119 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$MYSTAT

This view contains statistics on the current session.

Column | Datatype | Description
SID | NUMBER | ID of the current session
STATISTIC# | NUMBER | Number of the statistic
VALUE | NUMBER | Value of the statistic
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 120 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$NLS_PARAMETERS

This view contains current values of NLS parameters.

Column | Datatype | Description
PARAMETER | VARCHAR2(64) | Parameter name: NLS_CALENDAR, NLS_CHARACTERSET, NLS_CURRENCY, NLS_DATE_FORMAT, NLS_DATE_LANGUAGE, NLS_ISO_CURRENCY, NLS_LANGUAGE, NLS_NUMERIC_CHARACTERS, NLS_SORT, NLS_TERRITORY, NLS_UNION_CURRENCY, NLS_NCHAR_CHARACTERSET, NLS_COMP
VALUE | VARCHAR2(64) | NLS parameter value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 121 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$NLS_VALID_VALUES

This view lists all valid values for NLS parameters.

Column | Datatype | Description
PARAMETER | VARCHAR2(64) | Parameter name (LANGUAGE | SORT | TERRITORY | CHARACTERSET)
VALUE | VARCHAR2(64) | NLS parameter value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 122 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$OBJECT_DEPENDENCY

This view can be used to determine what objects are 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, it 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
FROM_ADDRESS | RAW(4 | 8) | Address of a procedure, package, or cursor that is currently loaded in the shared pool
FROM_HASH | NUMBER | The hash value of a procedure, package, or cursor that is currently loaded in the shared pool
TO_OWNER | VARCHAR2(64) | The owner of the object that is depended on
TO_NAME | VARCHAR2(1000) | The name of the object that is depended on
TO_ADDRESS | RAW(4 | 8) | Address of the object that is depended on. These can be used to look up more information on the object in V$DB_OBJECT_CACHE.
TO_HASH | NUMBER | The hash value of the object that is depended on. These can be used to look up more information on the object in V$DB_OBJECT_CACHE.
TO_TYPE | NUMBER | The type of the object that is depended on
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 123 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$OBJECT_USAGE

You can use this view to monitor index usage. The view displays statistics about index usage gathered from the database. All indexes that have been used at least once can be monitored and displayed in this view.

Column | Datatype | Description
INDEX_NAME | VARCHAR2(30) | Index name in sys.obj$.name
TABLE_NAME | VARCHAR2(30) | Table name in sys.obj$.name
MONITORING | VARCHAR2(3) | YES| NO
USED | VARCHAR2(3) | YES| NO
START_MONITORING | VARCHAR2(19) | Start monitoring time in sys.object_stats.start_monitoring
END_MONITORING | VARCHAR2(19) | End monitoring time in sys.object_stats.end_monitoring
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 124 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$OBSOLETE_PARAMETER

V$OBSOLETE_PARAMETER displays information about obsolete initialization parameters. If any row of the view contains TRUE in the ISSPECIFIED column, then you should examine why.

Column | Datatype | Description
NAME | VARCHAR2(64) | Name of the parameter
ISSPECIFIED | VARCHAR2(5) | Indicates whether the parameter was specified in the parameter file (TRUE) or not (FALSE)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 125 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$OFFLINE_RANGE

This view displays datafile offline information from the control file. Note that the last offline range of each datafile is kept in the DATAFILE record.

An offline range is created for a datafile when its tablespace is first altered to be OFFLINE NORMAL or READ ONLY, and then subsequently altered to be ONLINE or read-write. Note that no offline range is created if the datafile itself is altered to be OFFLINE or if the tablespace is altered to be OFFLINE IMMEDIATE.

See Also:

"V$DATAFILE"

Column | Datatype | Description
RECID | NUMBER | Record ID
STAMP | NUMBER | Record stamp
FILE# | NUMBER | Datafile number
OFFLINE_CHANGE# | NUMBER | SCN at which offlined
ONLINE_CHANGE# | NUMBER | SCN at which onlined
ONLINE_TIME | DATE | Time of offline SCN
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 126 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$OPEN_CURSOR

This view lists cursors that each user session currently has opened and parsed.

Column | Datatype | Description
SADDR | RAW(4 | 8) | Session address
SID | NUMBER | Session identifier
USER_NAME | VARCHAR2(30) | User that is logged in to the session
ADDRESS | RAW(4 | 8) | Used with HASH_VALUE to uniquely identify the SQL statement being executed in the session
HASH_VALUE | NUMBER | Used with ADDRESS to uniquely identify the SQL statement being executed in the session
SQL_TEXT | VARCHAR2(60) | First 60 characters of the SQL statement that is parsed into the open cursor
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 127 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$OPTION

This view lists options that are installed with the Oracle server.

Column | Datatype | Description
PARAMETER | VARCHAR2(64) | The name of the option
VALUE | VARCHAR2(64) | TRUE if the option is installed
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 128 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PARALLEL_DEGREE_LIMIT_MTH

This view displays all available parallel degree limit resource allocation methods.

Column | Datatype | Description
NAME | VARCHAR2(40) | The name of the parallel degree limit resource allocation method
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 129 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PARAMETER

V$PARAMETER displays information about the initialization parameters that are currently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER view.

Column Datatype Description

NUM

NUMBER

Parameter number

NAME

VARCHAR2(64)

Name of the parameter

TYPE

NUMBER

Parameter type:

  • 1 - Boolean
  • 2 - String
  • 3 - Integer
  • 4 - Parameter file
  • 5 - Reserved
  • 6 - Big integer

VALUE

VARCHAR2(512)

Parameter value for the session (if modified within the session); otherwise, the instance-wide parameter value

ISDEFAULT

VARCHAR2(9)

Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE)

ISSES_MODIFIABLE

VARCHAR2(5)

Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)

ISSYS_MODIFIABLE

VARCHAR2(9)

Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:

  • IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.
  • DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.
  • FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances.

ISMODIFIED

VARCHAR2(10)

Indicates whether the parameter has been modified after instance startup:

  • MODIFIED - Parameter has been modified with ALTER SESSION
  • SYSTEM_MOD - Parameter has been modified with ALTER SYSTEM (which causes all the currently logged in sessions' values to be modified)
  • FALSE - Parameter has not been modified after instance startup

ISADJUSTED

VARCHAR2(5)

Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)

DESCRIPTION

VARCHAR2(64)

Description of the parameter

UPDATE_COMMENT

VARCHAR2(255)

Comments associated with the most recent update
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 130 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PARAMETER2

V$PARAMETER2 displays information about the initialization parameters that are currently in effect for the session, with each list parameter value appearing as a row in the view. A new session inherits parameter values from the instance-wide values displayed in the V$SYSTEM_PARAMETER2 view.

Presenting the list parameter values in this format enables you to quickly determine the values for a list parameter. For example, if a parameter value is a, b, then the V$PARAMETER view does not tell you if the parameter has two values (both a and b) or one value (a, b). V$PARAMETER2 makes the distinction between the list parameter values clear.

Column Datatype Description

NUM

NUMBER

Parameter number

NAME

VARCHAR2(64)

Name of the parameter

TYPE

NUMBER

Parameter type:

  • 1 - Boolean
  • 2 - String
  • 3 - Integer
  • 4 - Parameter file
  • 5 - Reserved
  • 6 - Big integer

VALUE

VARCHAR2(512)

Parameter value for the session (if modified within the session); otherwise, the instance-wide parameter value

ISDEFAULT

VARCHAR2(6)

Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE)

ISSES_MODIFIABLE

VARCHAR2(5)

Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)

ISSYS_MODIFIABLE

VARCHAR2(9)

Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:

  • IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.
  • DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.
  • FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances.

ISMODIFIED

VARCHAR2(10)

Indicates whether the parameter has been modified after instance startup:

  • MODIFIED - Parameter has been modified with ALTER SESSION
  • SYSTEM_MOD - Parameter has been modified with ALTER SYSTEM (which causes all the currently logged in sessions' values to be modified)
  • FALSE - Parameter has not been modified after instance startup

ISADJUSTED

VARCHAR2(5)

Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)

DESCRIPTION

VARCHAR2(64)

Description of the parameter

ORDINAL

NUMBER

Position (ordinal number) of the parameter value. Useful only for parameters whose values are lists of strings.

UPDATE_COMMENT

VARCHAR2(255)

Comments associated with the most recent update
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 131 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PGA_TARGET_ADVICE

V$PGA_TARGET_ADVICE predicts how the cache hit percentage and over allocation count statistics displayed by the V$PGASTAT performance view would be impacted if the value of the PGA_AGGREGATE_TARGET parameter is changed. The prediction is performed for various values of the PGA_AGGREGATE_TARGET parameter, selected around its current value. The advice statistic is generated by simulating the past workload run by the instance.

The content of the view is empty if PGA_AGGREGATE_TARGET is not set. In addition, the content of this view is not updated if the STATISTICS_LEVEL parameter is set to BASIC . Base statistics for this view are reset at instance startup and when the value of the PGA_AGGREGATE_TARGET initialization parameter is dynamically modified.

Column | Datatype | Description
PGA_TARGET_FOR_ESTIMATE | NUMBER | Value of PGA_AGGREGATE_TARGET for this prediction (in bytes)
PGA_TARGET_FACTOR | NUMBER | PGA_TARGET_FOR_ESTIMATE / the current value of the PGA_AGGREGATE_TARGET parameter
ADVICE_STATUS | VARCHAR2(3) | Indicates whether the advice is enabled (ON) or disabled (OFF) depending on the value of the STATISTICS_LEVEL parameter
BYTES_PROCESSED | NUMBER | Total bytes processed by all the work areas considered by this advice (in bytes)
ESTD_EXTRA_BYTES_RW | NUMBER | Estimated number of extra bytes which would be read or written if PGA_AGGREGATE_TARGET was set to the value of the PGA_TARGET_FOR_ESTIMATE column. This number is derived from the estimated number and size of work areas which would run in one-pass (or multi-pass) for that value of PGA_AGGREGATE_TARGET.
ESTD_PGA_CACHE_HIT_PERCENTAGE | NUMBER | Estimated value of the cache hit percentage statistic when PGA_AGGREGATE_TARGET equals PGA_TARGET_FOR_ESTIMATE. This column is derived from the above two columns and is equal to BYTES_PROCESSED / (BYTES_PROCESSED + ESTD_EXTRA_BYTES_RW)
ESTD_OVERALLOC_COUNT | NUMBER | Estimated number of PGA memory over-allocations if the value of PGA_AGGREGATE_TARGET is set to PGA_TARGET_FOR_ESTIMATE. A nonzero value means that PGA_TARGET_FOR_ESTIMATE is not large enough to run the work area workload. Hence, the DBA should not set PGA_AGGREGATE_TARGET to PGA_TARGET_FOR_ESTIMATE since Oracle will not be able to honor that target.
See Also:

Oracle9i Database Performance Tuning Guide and Reference for information on tuning the PGA_AGGREGATE_TARGET initialization parameter using the PGA advice views
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 132 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PGA_TARGET_ADVICE_HISTOGRAM

V$PGA_TARGET_ADVICE_HISTOGRAM predicts how statistics displayed by the V$SQL_WORKAREA_HISTOGRAM dynamic view would be impacted if the value of the PGA_AGGREGATE_TARGET parameter is changed. This prediction is performed for various values of the PGA_AGGREGATE_TARGET parameter, selected around its current value. The advice statistic is generated by simulating the past workload run by the instance.

The content of the view is empty if PGA_AGGREGATE_TARGET is not set. In addition, the content of this view is not updated when the STATISTICS_LEVEL initialization parameter is set to BASIC. Base statistics for this view are reset at instance startup or when the value of the PGA_AGGREGATE_TARGET initialization parameter is dynamically modified.

Column | Datatype | Description
PGA_TARGET_FOR_ESTIMATE | NUMBER | Value of PGA_AGGREGATE_TARGET for this prediction (in bytes)
PGA_TARGET_FACTOR | NUMBER | PGA_TARGET_FOR_ESTIMATE / the current value of the PGA_AGGREGATE_TARGET parameter
ADVICE_STATUS | VARCHAR2(3) | Indicates whether the advice is enabled (ON) or disabled (OFF) depending on the value of the STATISTICS_LEVEL parameter
LOW_OPTIMAL_SIZE | NUMBER | Lower bound for the optimal memory requirement of work areas included in this row (in bytes)
HIGH_OPTIMAL_SIZE | NUMBER | Upper bound for the optimal memory requirement of work areas included in this row (in bytes)
ESTD_OPTIMAL_EXECUTIONS | NUMBER | Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which are predicted to run optimal given a value of PGA_AGGREGATE_TARGET equal to PGA_TARGET_FOR_ESTIMATE
ESTD_ONEPASS_EXECUTIONS | NUMBER | Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which are predicted to run one-pass given a value of PGA_AGGREGATE_TARGET equal to PGA_TARGET_FOR_ESTIMATE
ESTD_MULTIPASSES_EXECUTIONS | NUMBER | Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which are predicted to run multi-pass given a value of PGA_AGGREGATE_TARGET equal to PGA_TARGET_FOR_ESTIMATE
ESTD_TOTAL_EXECUTIONS | NUMBER | Sum of ESTD_OPTIMAL_EXECUTIONS, ESTD_ONEPASS_EXECUTIONS, and ESTD_MULTIPASSES_EXECUTIONS
IGNORED_WORKAREAS_COUNT | NUMBER | Number of work areas with optimal memory requirement between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE ignored in the advice generation due to memory and CPU constraints
See Also:

Oracle9i Database Performance Tuning Guide and Reference for information on tuning the PGA_AGGREGATE_TARGET initialization parameter using the PGA advice views
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 133 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PGASTAT

V$PGASTAT provides PGA memory usage statistics as well as statistics about the automatic PGA memory manager when it is enabled (that is, when PGA_AGGREGATE_TARGET is set). Cumulative values in V$PGASTAT are accumulated since instance startup.

Column Datatype Description

NAME

VARCHAR2(64)

Name of the statistic:

  • aggregate PGA target parameter - Current value of the PGA_AGGREGATE_TARGET initialization parameter. If this parameter is not set, then its value is 0 and automatic management of PGA memory is disabled.
  • aggregate PGA auto target - Amount of PGA memory Oracle can use for work areas running in automatic mode. This amount is dynamically derived from the value of the PGA_AGGREGATE_TARGET initialization parameter and the current work area workload, and continuously adjusted by Oracle.

    If this value is small compared to the value of PGA_AGGREGATE_TARGET, then a large amount of PGA memory is used by other components of the system (for example, PL/SQL or Java memory) and little is left for work areas. The DBA must ensure that enough PGA memory is left for work areas running in automatic mode.

  • global memory bound - Maximum size of a work area executed in automatic mode. This value is continuously adjusted by Oracle to reflect the current state of the work area workload. The global memory bound generally decreases when the number of active work areas is increasing in the system.

    If the value of the global bound decreases below 1 MB, then the value of PGA_AGGREGATE_TARGET should be increased.

  • total PGA allocated - Current amount of PGA memory allocated by the instance. Oracle attempts to keep this number below the value of the PGA_AGGREGATE_TARGET initialization parameter. However, it is possible for the PGA allocated to exceed that value by a small percentage and for a short period of time when the work area workload is increasing very rapidly or when PGA_AGGREGATE_TARGET is set to a small value.
  • total PGA used - Indicates how much PGA memory is currently consumed by work areas. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java).
  • total PGA used for auto workareas - Indicates how much PGA memory is currently consumed by work areas running under the automatic memory management mode. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java).
  • total PGA used for manual workareas - Indicates how much PGA memory is currently consumed by work areas running under the manual memory management mode. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java).
  • over allocation count - This statistic is cumulative since instance startup. Over allocating PGA memory can happen if the value of PGA_AGGREGATE_TARGET is too small. When this happens, Oracle cannot honor the value of PGA_AGGREGATE_TARGET and extra PGA memory needs to be allocated.

    If over allocation occurs, then increase the value of PGA_AGGREGATE_TARGET using the information provided by the V$PGA_TARGET_ADVICE view.

  • bytes processed - Number of bytes processed by memory intensive SQL operators, cumulated since instance startup.
  • extra bytes read/written - Number of bytes processed during extra passes of the input data, cumulated since instance startup. When a work area cannot run optimal, one or more of these extra passes is performed.
  • cache hit percentage - A metric computed by Oracle to reflect the performance of the PGA memory component, cumulative since instance startup. A value of 100% means that all work areas executed by the system since instance startup have used an optimal amount of PGA memory.

    When a work area cannot run optimal, one or more extra passes is performed over the input data. This will reduce the cache hit percentage in proportion to the size of the input data and the number of extra passes performed.

VALUE

NUMBER

Statistic value

UNITS

VARCHAR2(12)

Unit for the value (microseconds, bytes, or percent)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 134 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PQ_SESSTAT

This view lists session statistics for parallel queries. After you have run a query or DML operation, you can use the information derived from V$PQ_SESSTAT to view the number of slave processes used, and other information for the session and system.

Column Datatype Description

STATISTIC

VARCHAR2(30)

Name of the statistic:

  • Queries Parallelized - Number of queries run in parallel
  • DDL Parallelized - Number of DDL operations run in parallel
  • DML Parallelized - Number of DML operations run in parallel
  • DFO Trees - Number of executed DFO trees
  • Server Threads - Total number of cluster databases used
  • Allocation Height - Requested number of servers per instance
  • Allocation Width - Requested number of instances
  • Local Msgs Sent - Number of local (intra-instance) messages sent
  • Distr Msgs Sent - Number of remote (inter-instance) messages sent
  • Local Msgs Recv'd - Number of local (intra-instance) messages received
  • Distr Msgs Recv'd - Number of remote (inter-instance) messages received

LAST_QUERY

NUMBER

Value of the statistic for the last operation

SESSION_TOTAL

NUMBER

Value of the statistic for the entire session to this point in time
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 135 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PQ_SLAVE

This view lists statistics for each of the active parallel execution servers on an instance.

Column | Datatype | Description
SLAVE_NAME | VARCHAR2(4) | Name of the parallel execution server
STATUS | VARCHAR2(4) | The current status of the parallel execution server (BUSY | IDLE)
SESSIONS | NUMBER | The number of sessions that have used this parallel execution server
IDLE_TIME_CUR | NUMBER | The amount of time spent idle while processing statements in the current session
BUSY_TIME_CUR | NUMBER | The amount of time spent busy while processing statements in the current session
CPU_SECS_CUR | NUMBER | The amount of CPU time spent on the current session
MSGS_SENT_CUR | NUMBER | The number of messages sent while processing statements for the current session
MSGS_RCVD_CUR | NUMBER | The number of messages received while processing statements for the current session
IDLE_TIME_TOTAL | NUMBER | The total amount of time this query server has been idle
BUSY_TIME_TOTAL | NUMBER | The total amount of time this query server has been active
CPU_SECS_TOTAL | NUMBER | The total amount of CPU time this query server has used to process statements
MSGS_SENT_TOTAL | NUMBER | The total number of messages this query server has sent
MSGS_RCVD_TOTAL | NUMBER | The total number of messages this query server has received
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 136 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PQ_SYSSTAT

This view lists system statistics for parallel queries. After you have run a query or DML operation, you can use the information derived from V$PQ_SYSSTAT to view the number of slave processes used, and other information for the system.

Column Datatype Description

STATISTIC

VARCHAR2(30)

Name of the statistic:

  • Servers Busy - Number of currently busy servers on this instance
  • Servers Idle - Number of currently idle servers on this instance
  • Servers Highwater - Number of active servers on this instance that have partaken in >= 1 operation so far
  • Server Sessions - Total number of operations executed in all servers on this instance
  • Servers Started - Total number of servers started on this instance
  • Servers Shutdown - Total number of servers shutdown on this instance
  • Servers Cleaned Up - Total number of servers on this instance cleaned up due to process death
  • Queries Initiated - Total number of parallel queries initiated on this instance
  • DDL Initiated - Total number of parallel DDL operations that were initiated
  • DML Initiated - Total number of parallel DML operations that were initiated
  • DFO Trees - Total number of DFO trees executed on this instance
  • Local Msgs Sent - Total number of local (intra-instance) messages sent on this instance
  • Distr Msgs Sent - Total number of remote (inter-instance) messages sent on this instance
  • Local Msgs Recv'd - Total number of remote (inter-instance) messages received on this instance
  • Distr Msgs Recv'd - Total number of remote (inter-instance) messages received on this instance

VALUE

NUMBER

The value of the statistic
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 137 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PQ_TQSTAT

This view contains statistics on parallel execution operations. The statistics are compiled after the query completes and only remain for the duration of the session. It displays the number of rows processed through each parallel execution server at each stage of the execution tree. This view can help determine skew problems in a query's execution.

Column | Datatype | Description
DFO_NUMBER | NUMBER | The data flow operator (DFO) tree number to differentiate queries
TQ_ID | NUMBER | The table queue ID within the query, which represents the connection between two DFO nodes in the query execution tree
SERVER_TYPE | VARCHAR2(10) | The role in table queue - producer/consumer/ranger
NUM_ROWS | NUMBER | The number of rows produced/consumed
BYTES | NUMBER | The number of bytes produced/consumed
OPEN_TIME | NUMBER | Time (seconds) the table queue remained open
AVG_LATENCY | NUMBER | Time (minutes) for a message to be dequeued after it enters the queue
WAITS | NUMBER | The number of waits encountered during dequeue
TIMEOUTS | NUMBER | The number of timeouts when waiting for a message
PROCESS | VARCHAR2(10) | Process ID
INSTANCE | NUMBER | Instance ID
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 138 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PROCESS

This view contains information about the currently active processes. While the LATCHWAIT column indicates what latch a process is waiting for, the LATCHSPIN column indicates what latch a process is spinning on. On multi-processor machines, Oracle processes will spin on a latch before waiting on it.

Column | Datatype | Description
ADDR | RAW(4 | 8) | Address of process state object
PID | NUMBER | Oracle process identifier
SPID | VARCHAR2(12) | Operating system process identifier
USERNAME | VARCHAR2(15) | Operating system process username. Any two-task user coming across the network has "-T" appended to the username.
SERIAL# | NUMBER | Process serial number
TERMINAL | VARCHAR2(30) | Operating system terminal identifier
PROGRAM | VARCHAR2(48) | Program in progress
TRACEID | VARCHAR2(255) | Trace file identifier
BACKGROUND | VARCHAR2(1) | 1 for a background process; NULL for a normal process
LATCHWAIT | VARCHAR2(8) | Address of latch the process is waiting for; NULL if none
LATCHSPIN | VARCHAR2(8) | Address of the latch the process is spinning on; NULL if none
PGA_USED_MEM | NUMBER | PGA memory currently used by the process
PGA_ALLOC_MEM | NUMBER | PGA memory currently allocated by the process (including free PGA memory not yet released to the operating system by the server process)
PGA_FREEABLE_MEM | NUMBER | Allocated PGA memory which can be freed
PGA_MAX_MEM | NUMBER | Maximum PGA memory ever allocated by the process
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 139 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PROXY_ARCHIVEDLOG

This view contains descriptions of archived log backups which are taken with Proxy Copy. Each row represents a backup of one archived log.

Column Datatype Description

RECID

NUMBER

Proxy copy record ID

STAMP

NUMBER

Proxy copy record stamp

DEVICE_TYPE

VARCHAR2(17)

Type of the device on which the copy resides

HANDLE

VARCHAR2(513)

Proxy copy handle identifies the copy for restore

COMMENTS

VARCHAR2(81)

Comment returned by the operating system or storage subsystem. This value is informational only. It is not needed for restore.

MEDIA

VARCHAR2(65)

Name of the media on which the copy resides. This value is informational only. It is not needed for restore.

MEDIA_POOL

NUMBER

Media pool in which the copy resides. This is the same value that was entered in the POOL operand of the Recovery Manager BACKUP command.

STATUS

VARCHAR2(1)

Indicates the status of the copy:

  • A - Object is available
  • D - Object is deleted
  • X - Object has been "cross-checked" and found not to exist. A subsequent "delete expired" command will change the status to D. If, for some reason, the object really does still exist, then a subsequent "cross-check" command will change the status back to A.

THREAD#

NUMBER

Redo thread number

SEQUENCE#

NUMBER

Redo log sequence number

RESETLOGS_CHANGE#

NUMBER

Resetlogs change number of the database when this log was written

RESETLOGS_TIME

DATE

Resetlogs time of the database when this log was written

FIRST_CHANGE#

NUMBER

First change number in the archived log

FIRST_TIME

DATE

Timestamp of the first change

NEXT_CHANGE#

NUMBER

First change number in the next log

NEXT_TIME

DATE

Timestamp of the next change

BLOCKS

NUMBER

Size of the archived log (in blocks)

BLOCK_SIZE

NUMBER

Redo log block size

START_TIME

DATE

Starting time

COMPLETION_TIME

DATE

Completion time

ELAPSED_SECONDS

NUMBER

Number of elapsed seconds
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 140 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PROXY_DATAFILE

This view contains descriptions of datafile and control file backups that are taken with Proxy Copy. Each row represents a backup of one database file.

Column Datatype Description

RECID

NUMBER

Proxy copy record ID

STAMP

NUMBER

Proxy copy record stamp

DEVICE_TYPE

VARCHAR2(17)

Type of the device on which the copy resides

HANDLE

VARCHAR2(513)

Proxy copy handle identifies the copy for restore

COMMENTS

VARCHAR2(81)

Comment returned by the operating system or storage subsystem. This value is informational only. It is not needed for restore.

MEDIA

VARCHAR2(65)

Name of the media on which the copy resides. This value is informational only. It is not needed for restore.

MEDIA_POOL

NUMBER

Media pool in which the copy resides. This is the same value that was entered in the POOL operand of the Recovery Manager BACKUP command

TAG

VARCHAR2(32)

Proxy copy tag

STATUS

VARCHAR2(1)

Indicates the status of the copy:

  • A - Object is available
  • D - Object is deleted
  • X - Object has been "cross-checked" and found not to exist. A subsequent "delete expired" command will change the status to D. If, for some reason, the object really does still exist, then a subsequent "cross-check" command will change the status back to A.

FILE#

NUMBER

Absolute datafile number, or 0 if this is a control file backup

CREATION_CHANGE#

NUMBER

Datafile creation change number

CREATION_TIME

DATE

Datafile creation Timestamp

RESETLOGS_CHANGE#

NUMBER

Resetlogs change number of the datafile when the copy was made

RESETLOGS_TIME

DATE

Resetlogs timestamp of the datafile when the copy was made

CHECKPOINT_CHANGE#

NUMBER

Checkpoint change number of the datafile when the copy was made

CHECKPOINT_TIME

DATE

Checkpoint timestamp of the datafile when the copy was made

ABSOLUTE_FUZZY_CHANGE#

NUMBER

Highest change in any block of the file, if known

RECOVERY_FUZZY_CHANGE#

NUMBER

Highest change written to the file by media recovery

RECOVERY_FUZZY_TIME

DATE

Timestamp of the highest change written to the file by media recovery

INCREMENTAL_LEVEL

NUMBER

If this backup is part of an incremental backup strategy, then 0. Otherwise null.

ONLINE_FUZZY

VARCHAR2(3)

(YES|NO) If set to YES, this copy was made after a crash or offline immediate (or is a copy of a copy which was taken improperly while the database was open). Recovery will need to apply all redo up to the next crash recovery marker to make the file consistent.

BACKUP_FUZZY

VARCHAR2(3)

(YES|NO) If set to YES, this is a copy taken using the BEGIN BACKUP | END BACKUP technique. Note that the BEGIN BACKUP | END BACKUP technique is used internally when proxy copies of open files are created. Recovery will need to apply all redo up to the end backup marker to make this copy consistent.

BLOCKS

NUMBER

Size of the copy (in blocks). Also the size of the datafile when the copy was made.

BLOCK_SIZE

NUMBER

Block size of the datafile

OLDEST_OFFLINE_RANGE

NUMBER

If file# is 0 (that is, this is a control file backup), the RECID of the oldest offline range record in this control file copy. 0 for datafile copies.

START_TIME

DATE

Starting time

COMPLETION_TIME

DATE

Completion time

ELAPSED_SECONDS

NUMBER

Number of elapsed seconds

CONTROLFILE_TYPE

VARCHAR2(1)

B indicates normal copies

S indicates standby copies

KEEP

VARCHAR2(3)

(YES|NO) Indicates whether or not this backup set has a retention policy that is different than the value for the configure retention policy

KEEP_UNTIL

DATE

If KEEP_UNTIL_TIME is specified, this is the date after which the backup becomes obsolete. If this column is null, then the backup never expires.

KEEP_OPTIONS

VARCHAR2(10)

Additional retention options for this backup set:

  • LOGS - Logs need to recover this backup are kept
  • NOLOGS - Logs needed to recover this backup will not be kept
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 141 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PWFILE_USERS

This view lists users who have been granted SYSDBA and SYSOPER privileges as derived from the password file.

Column | Datatype | Description
USERNAME | VARCHAR2(30) | The name of the user that is contained in the password file
SYSDBA | VARCHAR2(5) | If TRUE, the user can connect with SYSDBA privileges
SYSOPER | VARCHAR2(5) | If TRUE, the user can connect with SYSOPER privileges
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 142 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PX_PROCESS

This view contains information about the sessions running parallel execution.

Column | Datatype | Description
SERVER_NAME | VARCHAR2(4) | The name of the cluster database (P000, P001, etc)
STATUS | VARCHAR2(9) | The state of the cluster database (IN USE|AVAILABLE)
PID | NUMBER | The process identifier
SPID | VARCHAR2(9) | The OS process ID
SID | NUMBER | The session ID of slave, if in use
SERIAL# | NUMBER | The session serial number of slave, if in use
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 143 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PX_PROCESS_SYSSTAT

This view contains information about the sessions running parallel execution.

Column Datatype Description

STATISTIC

VARCHAR2(30)

Name of the statistic:

  • Servers In Use - Number of PX servers currently performing parallel operations
  • Servers Available - Number of PX servers available to perform parallel operations
  • Servers Started - Number of times the system has had to create a PX server process
  • Servers Shutdown - Number of times a PX server process has been shut down. A PX server process will be shut down if it has not been used recently. The length of time it may remain "Available" is controlled by the PARALLEL_SERVER_IDLE_TIME initialization parameter.

    If this value is large, then consider increasing the parameter. This will improve performance by avoiding the latency of PX server process creation.

  • Servers HWM - Maximum number of concurrent PX server processes

    If this number is equal to the PARALLEL_MAX_SERVERS initialization parameter, then consider increasing the parameter. This could allow you to increase your throughput, especially if your system is under-utilized and the V$SYSSTAT statistic "Parallel operations downgraded to serial" is large.

  • Servers Cleaned Up - Number of times PMON had to clean up a PX server. This should only happen during abnormal termination of a parallel operation.

    If this number is large, then you should determine the cause.

  • Server Sessions - Total number of sessions created by all PX servers
  • Memory Chunks Allocated - Number of large memory chunks allocated by PX servers
  • Memory Chunks Freed - Number of large memory chunks freed
  • Memory Chunks Current - Number of large memory chunks currently being used
  • Memory Chunks HWM - Maximum number of concurrently allocated chunks
  • Buffers allocated - Number of times a message buffer has been allocated
  • Buffers freed - Number of times a message buffer has been freed
  • Buffers Current - Number of message buffers currently being used
  • Buffers HWM - Maximum number of concurrently allocated message buffers

VALUE

NUMBER

Value of the statistic
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 144 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PX_SESSION

This view contains information about the sessions running parallel execution.

Column | Datatype | Description
SADDR | RAW(4 | 8) | Session address
SID | NUMBER | Session identifier
SERIAL# | NUMBER | Session serial number
QCSID | NUMBER | Session identifier of the parallel coordinator
QCSERIAL# | NUMBER | Session serial number of the parallel coordinator
QCINST_ID | NUMBER | Instance number on which the parallel coordinator is running
SERVER_GROUP | NUMBER | The logical group of servers to which this cluster database process belongs
SERVER_SET | NUMBER | The logical set of servers to which this cluster database process belongs. A single server group will have at most two server sets.
SERVER# | NUMBER | The logical number of the cluster database process within a server set
DEGREE | NUMBER | The degree of parallelism being used by the server set
REQ_DEGREE | NUMBER | The degree of parallelism that was requested by the user when the statement was issued and prior to any resource, multi-user, or load balancing reductions
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 145 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$PX_SESSTAT

This view contains information about the sessions running parallel execution.

Column | Datatype | Description
SADDR | RAW(4 | 8) | Session address
SID | NUMBER | Session identifier
SERIAL# | NUMBER | Session serial number
QCSID | NUMBER | Session identifier of the parallel coordinator
QCSERIAL# | NUMBER | Session serial number of the parallel coordinator
QCINST_ID | NUMBER | Instance number on which the parallel coordinator is running
SERVER_GROUP | NUMBER | The logical group of servers to which this cluster database process belongs
SERVER_SET | NUMBER | The logical set of servers that this cluster database process belongs to. A single server group will have at most two server sets.
SERVER# | NUMBER | The logical number of the cluster database process within a server set
DEGREE | NUMBER | The degree of parallelism being used by the server set
REQ_DEGREE | NUMBER | The degree of parallelism that was requested by the user when the statement was issued and prior to any resource, multi-user, or load balancing reductions
STATISTIC# | NUMBER | Statistic number (identifier)
VALUE | NUMBER | Statistic value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 146 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$QUEUE

V$QUEUE contains information on the shared server message queues.

Column Datatype Description

PADDR

RAW(4 | 8)

Address of the process that owns the queue

TYPE

VARCHAR2(10)

Type of queue:

  • COMMON - Processed by servers
  • DISPATCHER

QUEUED

NUMBER

Number of items in the queue

WAIT

NUMBER

Total time that all items in this queue have waited (in hundredths of a second). Divide by TOTALQ for average wait per item.

TOTALQ

NUMBER

Total number of items that have ever been in the queue
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 147 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$QUEUEING_MTH

V$QUEUEING_MTH displays all available queuing resource allocation methods.

Column | Datatype | Description
NAME | VARCHAR2(40) | Name of the queuing resource allocation method
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 148 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RECOVER_FILE

This view displays the status of files needing media recovery.

Column | Datatype | Description
FILE# | NUMBER | File identifier number
ONLINE | VARCHAR2(7) | This column is obsolete and maintained only for compatibility reasons. The value of this column is always equal to the value in ONLINE_STATUS.
ONLINE_STATUS | VARCHAR2(7) | Online status (ONLINE, OFFLINE)
ERROR | VARCHAR2(18) | Why the file needs to be recovered: NULL if reason unknown, or OFFLINE NORMAL if recovery not needed
CHANGE# | NUMBER | SCN where recovery must start
TIME | DATE | Time of SCN when recovery must start
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 149 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RECOVERY_FILE_STATUS

V$RECOVERY_FILE_STATUS contains one row for each datafile for each RECOVER statement. This view contains useful information only for the Oracle process doing the recovery. When Recovery Manager directs a server process to perform recovery, only Recovery Manager is able to view the relevant information in this view. V$RECOVERY_FILE_STATUS will be empty to all other Oracle users.

See Also:

Oracle9i Recovery Manager User's Guide

Column | Datatype | Description
FILENUM | NUMBER | The number of the file being recovered
FILENAME | VARCHAR2(257) | The filename of the datafile being recovered
STATUS | VARCHAR2(13) | The status of the recovery (IN RECOVERY|CURRENT| NOT RECOVERED)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 150 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RECOVERY_LOG

This view lists information about archived logs that are needed to complete media recovery. This information is derived from the log history view, V$LOG_HISTORY.

V$RECOVERY_LOG contains useful information only for the Oracle process doing the recovery. When Recovery Manager directs a server process to perform recovery, only Recovery Manager is able to view the relevant information in this view. V$RECOVERY_LOG will be empty to all other Oracle users.

Column | Datatype | Description
THREAD# | NUMBER | Thread number of the archived log
SEQUENCE# | NUMBER | Sequence number of the archived log
TIME | DATE | Time of the first entry (lowest SCN) in the log
ARCHIVE_NAME | VARCHAR2(513) | Name of the file when archived, using the naming convention specified by the LOG_ARCHIVE_FORMAT initialization parameter See Also: "LOG_ARCHIVE_FORMAT"
See Also:

"V$LOG_HISTORY" and Oracle9i Recovery Manager User's Guide
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 151 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RECOVERY_PROGRESS

V$RECOVERY_PROGRESS can be used to track database recovery operations to ensure that they are not stalled, and also to estimate the time required to complete the operation in progress.

V$RECOVERY_PROGRESS is a subview of V$SESSION_LONGOPS.

See Also:

Oracle9i User-Managed Backup and Recovery Guide

Column | Datatype | Description
TYPE | VARCHAR2(64) | The type of recovery operation being performed
ITEM | VARCHAR2(32) | The item being measured
SOFAR | NUMBER | The amount of work done so far
TOTAL | NUMBER | The total amount of work expected
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 152 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RECOVERY_STATUS

V$RECOVERY_STATUS contains statistics of the current recovery process. This view contains useful information only for the Oracle process doing the recovery. When Recovery Manager directs a server process to perform recovery, only Recovery Manager is able to view the relevant information in this view. V$RECOVERY_STATUS will be empty to all other Oracle users.

See Also:

Oracle9i Recovery Manager User's Guide

Column | Datatype | Description
RECOVERY_CHECKPOINT | DATE | The point in time to which the recovery has occurred. If no logs have been applied, this is the point in time the recovery starts.
THREAD | NUMBER | The number of the redo thread currently being processed
SEQUENCE_NEEDED | NUMBER | Log sequence number of the log needed by the recovery process. The value is 0 if no log is needed.
SCN_NEEDED | VARCHAR2(16) | The low SCN of the log needed by recovery. The value is 0 if unknown or no log is needed.
TIME_NEEDED | DATE | Time when the log was created. The value is midnight on 1/1/88 if the time is unknown or if no log is needed.
PREVIOUS_LOG_NAME | VARCHAR2(257) | The filename of the log
PREVIOUS_LOG_STATUS | VARCHAR2(13) | The status of the previous log. Contains one of the following values: RELEASE; WRONG NAME; MISSING NAME; UNNEEDED NAME; NONE
REASON | VARCHAR2(13) | The reason recovery is returning control to the user (NEED LOG|LOG REUSED|THREAD DISABLED)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 153 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$REQDIST

This view lists statistics for the histogram of shared server dispatcher request times, divided into 12 buckets, or ranges of time. The time ranges grow exponentially as a function of the bucket number.

Column | Datatype | Description
BUCKET | NUMBER | Bucket number: 0 - 11; the maximum time for each bucket is (4 * 2^N)/100 seconds
COUNT | NUMBER | Count of requests whose total time to complete (excluding wait time) falls in this range
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 154 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RESERVED_WORDS

This view gives a list of all the keywords that are used by the PL/SQL compiler. This view helps developers to determine whether a word is already being used as a keyword in the language.

Column | Datatype | Description
KEYWORD | VARCHAR2(64) | The name of the keyword
LENGTH | NUMBER | The length of the keyword
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 155 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RESOURCE

This view contains resource name and address information.

Column | Datatype | Description
ADDR | RAW(4 | 8) | Address of the resource object
TYPE | VARCHAR2(2) | Resource type; the resource types are listed in Table 3-1
ID1 | NUMBER | Resource identifier #1
ID2 | NUMBER | Resource identifier #2
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 156 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RESOURCE_LIMIT

This view displays information about global resource use for some of the system resources. Use this view to monitor the consumption of resources so that you can take corrective action, if necessary. Many of the resources correspond to initialization parameters listed in Table 3-2.

Some resources, those used by DLM for example, have an initial allocation (soft limit), and the hard limit, which is theoretically infinite (although in practice it is limited by SGA size). During SGA reservation/initialization, a place is reserved in SGA for the INITIAL_ALLOCATION of resources, but if this allocation is exceeded, additional resources are allocated up to the value indicated by LIMIT_VALUE. The CURRENT_UTILIZATION column indicates whether the initial allocation has been exceeded. When the initial allocation value is exceeded, the additional required resources are allocated from the shared pool, where they must compete for space with other resources.

A good choice for the value of INITIAL_ALLOCATION will avoid the contention for space. For most resources, the value for INITIAL_ALLOCATION is the same as the LIMIT_VALUE. Exceeding LIMIT_VALUE results in an error.

Column | Datatype | Description
RESOURCE_NAME | VARCHAR2(30) | Name of the resource (see Table 3-2)
CURRENT_UTILIZATION | NUMBER | Number of (resources, locks, or processes) currently being used
MAX_UTILIZATION | NUMBER | Maximum consumption of this resource since the last instance start-up
INITIAL_ALLOCATION | VARCHAR2(10) | Initial allocation. This will be equal to the value specified for the resource in the initialization parameter file (UNLIMITED for infinite allocation).
LIMIT_VALUE | VARCHAR2(10) | Unlimited for resources and locks. This can be greater than the initial allocation value (UNLIMITED for infinite limit).
Table 3-2 Values for RESOURCE_NAME column
Resource Name | Corresponds to this Initialization Parameter
DML_LOCKS | See "DML_LOCKS"
ENQUEUE_LOCKS | This value is computed by Oracle. Use the V$ENQUEUE_LOCK view (described on ) to obtain more information about the enqueue locks.
ENQUEUE_RESOURCES | See "ENQUEUE_RESOURCES"
LM_PROCESSES | Lock manager processes
LM_LOCKS | See "LOCAL_LISTENER"
MAX_SHARED_SERVERS | See "MAX_SHARED_SERVERS"
PARALLEL_MAX_SERVERS | See "PARALLEL_MAX_SERVERS"
PROCESSES | See "PROCESSES"
ROLLBACK_SEGMENTS | See "MAX_ROLLBACK_SEGMENTS"
SESSIONS | See "SESSIONS"
SORT_SEGMENT_LOCKS | This value is computed by Oracle
TEMPORARY_LOCKS | This value is computed by Oracle
TRANSACTIONS | See "TRANSACTIONS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 157 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RMAN_CONFIGURATION

This view lists information about RMAN persistent configuration settings.

Column | Datatype | Description
CONF# | NUMBER | A unique key identifying this record within the database that owns it
NAME | VARCHAR2(65) | The name for this particular configuration. Example: RETENTION POLICY
VALUE | VARCHAR2(1025) | The value for this configuration row. Example: RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 158 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ROLLNAME

This view lists the names of all online rollback segments. It can only be accessed when the database is open.

Column | Datatype | Description
USN | NUMBER | Rollback (undo) segment number
NAME | VARCHAR2(30) | Rollback segment name
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 159 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ROLLSTAT

This view contains rollback segment statistics.

Column Datatype Description

USN

NUMBER

Rollback segment number

LATCH

NUMBER

Latch for the rollback segment

EXTENTS

NUMBER

Number of extents in the rollback segment

RSSIZE

NUMBER

Size (in bytes) of the rollback segment. This value differs by the number of bytes in one database block from the value of the BYTES column of the ALL/DBA/USER_SEGMENTS views.

See Also: Oracle9i Database Administrator's Guide.

WRITES

NUMBER

Number of bytes written to the rollback segment

XACTS

NUMBER

Number of active transactions

GETS

NUMBER

Number of header gets

WAITS

NUMBER

Number of header waits

OPTSIZE

NUMBER

Optimal size of the rollback segment

HWMSIZE

NUMBER

High water mark of rollback segment size

SHRINKS

NUMBER

Number of times the size of a rollback segment decreases

WRAPS

NUMBER

Number of times rollback segment is wrapped

EXTENDS

NUMBER

Number of times rollback segment size is extended

AVESHRINK

NUMBER

Average shrink size

AVEACTIVE

NUMBER

Current size of active extents, averaged over time.

STATUS

VARCHAR2(15)

Rollback segment status:

  • ONLINE
  • PENDING OFFLINE
  • OFFLINE
  • FULL

CUREXT

NUMBER

Current extent

CURBLK

NUMBER

Current block
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 160 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ROWCACHE

This view displays statistics for data dictionary activity. Each row contains statistics for one data dictionary cache.

Column | Datatype | Description
CACHE# | NUMBER | Row cache ID number
TYPE | VARCHAR2(11) | Parent or subordinate row cache type
SUBORDINATE# | NUMBER | Subordinate set number
PARAMETER | VARCHAR2(32) | Name of the initialization parameter that determines the number of entries in the data dictionary cache
COUNT | NUMBER | Total number of entries in the cache
USAGE | NUMBER | Number of cache entries that contain valid data
FIXED | NUMBER | Number of fixed entries in the cache
GETS | NUMBER | Total number of requests for information on the data object
GETMISSES | NUMBER | Number of data requests resulting in cache misses
SCANS | NUMBER | Number of scan requests
SCANMISSES | NUMBER | Number of times a scan failed to find the data in the cache
SCANCOMPLETES | NUMBER | For a list of subordinate entries, the number of times the list was scanned completely
MODIFICATIONS | NUMBER | Number of inserts, updates, and deletions
FLUSHES | NUMBER | Number of times flushed to disk
DLM_REQUESTS | NUMBER | Number of DLM requests
DLM_CONFLICTS | NUMBER | Number of DLM conflicts
DLM_RELEASES | NUMBER | Number of DLM releases
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 161 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ROWCACHE_PARENT

This view displays information for parent objects in the data dictionary. There is one row per lock owner, and one waiter for each object. This row shows the mode held or requested. For objects with no owners or waiters, a single row is displayed.

Column | Datatype | Description
INDX | NUMBER | Index of the row
HASH | NUMBER | Hash value
ADDRESS | RAW(4 | 8) | Address of the parent object
CACHE# | NUMBER | Parent cache ID
CACHE_NAME | VARCHAR2(64) | Parent cache name
EXISTENT | VARCHAR2(1) | Indicates whether the object is an existing object
LOCK_MODE | NUMBER | Mode the lock is held in
LOCK_REQUEST | NUMBER | Mode the lock is requested in
TXN | RAW(4) | Transaction currently locking the object
SADDR | RAW(4 | 8) | Address of the session
Note: The following are only relevant for Real Application Clusters.
INST_LOCK_REQUEST | NUMBER | Mode in which instance lock is being requested
INST_LOCK_RELEASE | NUMBER | Whether the instance lock needs to be released
INST_LOCK_TYPE | VARCHAR2(2) | Type of instance lock
INST_LOCK_ID1 | RAW(4) | ID associated with the instance lock
INST_LOCK_ID2 | RAW(4) | ID associated with the instance lock
KEY | RAW(100) | Contents of the key
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 162 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$ROWCACHE_SUBORDINATE

This view displays information for subordinate objects in the data dictionary.

Column | Datatype | Description
INDX | NUMBER | The index
HASH | NUMBER | The hash value
ADDRESS | RAW(4 | 8) | Address of the subordinate object
CACHE# | NUMBER | The parent cache ID
SUBCACHE# | NUMBER | The subcache ID
SUBCACHE_NAME | VARCHAR2(64) | The subcache name
EXISTENT | VARCHAR2(1) | Whether the object is an existing object
PARENT | RAW(4 | 8) | Address of the parent object
KEY | RAW(100) | The contents of the key
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 163 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RSRC_CONSUMER_GROUP

This view displays data related to currently active resource consumer groups.

Column | Datatype | Description
NAME | VARCHAR2(32) | Name of the consumer group
ACTIVE_SESSIONS | NUMBER | Number of currently active sessions in the consumer group
EXECUTION_WAITERS | NUMBER | Number of currently active sessions waiting for an execution time slice in which they will be able to use CPU.
REQUESTS | NUMBER | Cumulative number of requests that were executed in the consumer group
CPU_WAIT_TIME | NUMBER | Cumulative amount of time that sessions waited for CPU
CPU_WAITS | NUMBER | Cumulative number of times all sessions in the consumer group had to wait for CPU
CONSUMED_CPU_TIME | NUMBER | Cumulative amount of CPU time consumed by all sessions in the consumer group
YIELDS | NUMBER | Cumulative number of times sessions in the consumer group had to yield the CPU
QUEUE_LENGTH | NUMBER | Number of sessions waiting in the queue
CURRENT_UNDO_CONSUMPTION | NUMBER | Current amount (in kilobytes) of undo consumed by the consumer group
See Also:
  • Oracle9i Database Administrator's Guide for information on resource groups
  • Oracle9i Supplied PL/SQL Packages and Types Reference for information on creating resource groups with the DBMS_RESOURCE_MANAGER package
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 164 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RSRC_CONSUMER_GROUP_CPU_MTH

This view lists all resource allocation methods defined for resource consumer groups.

See Also:
  • Oracle9i Database Administrator's Guide for information on resource allocation methods
  • Oracle9i Supplied PL/SQL Packages and Types Reference on defining resource allocation methods for consumer groups with the DBMS_RESOURCE_MANAGER package
  • "V$RSRC_PLAN_CPU_MTH" for a listing of all resource allocation methods defined for resource plans

Column | Datatype | Description
NAME | VARCHAR2(40) | The name of the CPU resource allocation method
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 165 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RSRC_PLAN

This view displays the names of all currently active resource plans.

See Also:
  • "DBA_RSRC_PLANS" for a listing of all plans in the database
  • Oracle9i Database Administrator's Guide for information on resource plans
  • Oracle9i Supplied PL/SQL Packages and Types Reference on defining resource allocation methods for consumer groups with the DBMS_RESOURCE_MANAGER package

Column | Datatype | Description
NAME | VARCHAR2(32) | Name of the resource plan
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 166 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$RSRC_PLAN_CPU_MTH

This view lists all available CPU resource allocation methods defined for resource plans.

See Also:
  • "V$RSRC_CONSUMER_GROUP_CPU_MTH" for a listing of resource allocation methods defined for consumer groups
  • Oracle9i Database Administrator's Guide for information on resource plans
  • Oracle9i Supplied PL/SQL Packages and Types Reference on defining resource allocation methods for consumer plans with the DBMS_RESOURCE_MANAGER package

Column | Datatype | Description
NAME | VARCHAR2(32) | Name of the resource allocation method
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 167 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SEGMENT_STATISTICS

V$SEGMENT_STATISTICS displays information about segment-level statistics.

Column | Datatype | Description
OWNER | VARCHAR2(30) | Owner of the object
OBJECT_NAME | VARCHAR2(30) | Name of the object
SUBOBJECT_NAME | VARCHAR2(30) | Name of the subobject
TABLESPACE_NAME | VARCHAR2(30) | Name of the table space to which the object belongs
TS# | NUMBER | Tablespace number
OBJ# | NUMBER | Dictionary object number of the object
DATAOBJ# | NUMBER | Data object number of the object
OBJECT_TYPE | VARCHAR2(18) | Type of the object
STATISTIC_NAME | VARCHAR2(64) | Name of the statistic
STATISTIC# | NUMBER | Statistic number
VALUE | NUMBER | Statistic value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 168 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SEGSTAT

V$SEGSTAT displays information about segment-level statistics.

Column | Datatype | Description
TS# | NUMBER | Tablespace number
OBJ# | NUMBER | Dictionary object number
DATAOBJ# | NUMBER | Data object number
STATISTIC_NAME | VARCHAR2(64) | Name of the statistic
STATISTIC# | NUMBER | Statistic number
VALUE | NUMBER | Statistic value
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 169 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SEGSTAT_NAME

V$SEGSTAT_NAME displays information about segment-level statistics properties.

Column | Datatype | Description
STATISTIC# | NUMBER | Statistic number
NAME | VARCHAR2(64) | Name of the statistic
SAMPLED | VARCHAR2(3) | Indicates whether the statistic was collected by sampling (YES) or not (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 170 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESS_IO

This view lists I/O statistics for each user session.

Column | Datatype | Description
SID | NUMBER | Session identifier
BLOCK_GETS | NUMBER | Block gets for this session
CONSISTENT_GETS | NUMBER | Consistent gets for this session
PHYSICAL_READS | NUMBER | Physical reads for this session
BLOCK_CHANGES | NUMBER | Block changes for this session
CONSISTENT_CHANGES | NUMBER | Consistent changes for this session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 171 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION

This view lists session information for each current session.

Column Datatype Description

SADDR

RAW(4 | 8)

Session address

SID

NUMBER

Session identifier

SERIAL#

NUMBER

Session serial number. Used to identify uniquely a session's objects. Guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID.

AUDSID

NUMBER

Auditing session ID

PADDR

RAW(4 | 8)

Address of the process that owns this session

USER#

NUMBER

Oracle user identifier

USERNAME

VARCHAR2(30)

Oracle username

COMMAND

NUMBER

Command in progress (last statement parsed); for a list of values, see Table 3-3. These values also appear in the AUDIT_ACTIONS table.

OWNERID

NUMBER

The column contents are invalid if the value is 2147483644. Otherwise, this column contains the identifier of the user who owns the migratable session.

For operations using Parallel Slaves, interpret this value as a 4-byte value. The low-order 2 bytes of which represent the session number, and the high-order bytes the instance ID of the query coordinator.

TADDR

VARCHAR2(8)

Address of transaction state object

LOCKWAIT

VARCHAR2(8)

Address of lock waiting for; NULL if none

STATUS

VARCHAR2(8)

Status of the session: ACTIVE (currently executing SQL), INACTIVE, KILLED (marked to be killed), CACHED (temporarily cached for use by Oracle*XA), SNIPED (session inactive, waiting on the client)

SERVER

VARCHAR2(9)

Server type (DEDICATED| SHARED| PSEUDO| NONE)

SCHEMA#

NUMBER

Schema user identifier

SCHEMANAME

VARCHAR2(30)

Schema user name

OSUSER

VARCHAR2(30)

Operating system client user name

PROCESS

VARCHAR2(9)

Operating system client process ID

MACHINE

VARCHAR2(64)

Operating system machine name

TERMINAL

VARCHAR2(30)

Operating system terminal name

PROGRAM

VARCHAR2(48)

Operating system program name

TYPE

VARCHAR2(10)

Session type

SQL_ADDRESS

RAW(4)

Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed

SQL_HASH_VALUE

NUMBER

Used with SQL_ADDRESS to identify the SQL statement that is currently being executed

PREV_SQL_ADDR

RAW(4)

Used with PREV_HASH_VALUE to identify the last SQL statement executed

PREV_HASH_VALUE

NUMBER

Used with SQL_HASH_VALUE to identify the last SQL statement executed

MODULE

VARCHAR2(48)

Contains the name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure

MODULE_HASH

NUMBER

The hash value of the above MODULE

ACTION

VARCHAR2(32)

Contains the name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure

ACTION_HASH

NUMBER

The hash value of the above action name

CLIENT_INFO

VARCHAR2(64)

Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure

FIXED_TABLE_SEQUENCE

NUMBER

This contains a number that increases every time the session completes a call to the database and there has been an intervening select from a dynamic performance table. This column can be used by performance monitors to monitor statistics in the database. Each time the performance monitor looks at the database, it only needs to look at sessions that are currently active or have a higher value in this column than the highest value that the performance monitor saw the last time. All the other sessions have been idle since the last time the performance monitor looked at the database.

ROW_WAIT_OBJ#

NUMBER

Object ID for the table containing the ROWID specified in ROW_WAIT_ROW#

ROW_WAIT_FILE#

NUMBER

Identifier for the datafile containing the ROWID specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.

ROW_WAIT_BLOCK#

NUMBER

Identifier for the block containing the ROWID specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.

ROW_WAIT_ROW#

NUMBER

The current ROWID being locked. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.

LOGON_TIME

DATE

Time of logon

LAST_CALL_ET

NUMBER

The last call

PDML_ENABLED

VARCHAR2(3)

This column has been replaced by column PDML_STATUS

FAILOVER_TYPE

VARCHAR2(13)

Indicates whether and to what extent transparent application failover (TAF) is enabled for the session:

  • NONE - failover is disabled for this session
  • SESSION - the client is able to fail over its session following a disconnect
  • SELECT - the client is able to fail over queries in progress as well

See Also:

  • Oracle9i Database Concepts for more information on TAF
  • Oracle9i Net Services Administrator's Guide for information on configuring TAF

FAILOVER_METHOD

VARCHAR2(10)

Indicates the transparent application failover method for the session:

  • NONE - failover is disabled for this session
  • BASIC - the client itself reconnects following a disconnect
  • PRECONNECT - the backup instance can support all connections from every instance for which it is backup

FAILED_OVER

VARCHAR2(3)

Indicates (YES|NO) whether the session is running in failover mode and failover has occurred

RESOURCE_CONSUMER_GROUP

VARCHAR2(32)

Name of the session's current resource consumer group

PDML_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLED, PARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DML.

PDDL_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLED, PARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL.

PQ_STATUS

VARCHAR2(8)

If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLED, PARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY.

CURRENT_QUEUE_DURATION

NUMBER

If queued (1), the current amount of time the session has been queued. If not currently queued, value is 0.

CLIENT_IDENTIFIER

VARCHAR2(64)
Table 3-3 COMMAND Column of V$SESSION and Corresponding Commands
Number | Command | Number | Command
1 | CREATE TABLE | 2 | INSERT
3 | SELECT | 4 | CREATE CLUSTER
5 | ALTER CLUSTER | 6 | UPDATE
7 | DELETE | 8 | DROP CLUSTER
9 | CREATE INDEX | 10 | DROP INDEX
11 | ALTER INDEX | 12 | DROP TABLE
13 | CREATE SEQUENCE | 14 | ALTER SEQUENCE
15 | ALTER TABLE | 16 | DROP SEQUENCE
17 | GRANT OBJECT | 18 | REVOKE OBJECT
19 | CREATE SYNONYM | 20 | DROP SYNONYM
21 | CREATE VIEW | 22 | DROP VIEW
23 | VALIDATE INDEX | 24 | CREATE PROCEDURE
25 | ALTER PROCEDURE | 26 | LOCK
27 | NO-OP | 28 | RENAME
29 | COMMENT | 30 | AUDIT OBJECT
31 | NOAUDIT OBJECT | 32 | CREATE DATABASE LINK
33 | DROP DATABASE LINK | 34 | CREATE DATABASE
35 | ALTER DATABASE | 36 | CREATE ROLLBACK SEG
37 | ALTER ROLLBACK SEG | 38 | DROP ROLLBACK SEG
39 | CREATE TABLESPACE | 40 | ALTER TABLESPACE
41 | DROP TABLESPACE | 42 | ALTER SESSION
43 | ALTER USER | 44 | COMMIT
45 | ROLLBACK | 46 | SAVEPOINT
47 | PL/SQL EXECUTE | 48 | SET TRANSACTION
49 | ALTER SYSTEM | 50 | EXPLAIN
51 | CREATE USER | 52 | CREATE ROLE
53 | DROP USER | 54 | DROP ROLE
55 | SET ROLE | 56 | CREATE SCHEMA
57 | CREATE CONTROL FILE | 59 | CREATE TRIGGER
60 | ALTER TRIGGER | 61 | DROP TRIGGER
62 | ANALYZE TABLE | 63 | ANALYZE INDEX
64 | ANALYZE CLUSTER | 65 | CREATE PROFILE
66 | DROP PROFILE | 67 | ALTER PROFILE
68 | DROP PROCEDURE | 70 | ALTER RESOURCE COST
71 | CREATE SNAPSHOT LOG | 72 | ALTER SNAPSHOT LOG
73 | DROP SNAPSHOT LOG | 74 | CREATE SNAPSHOT
75 | ALTER SNAPSHOT | 76 | DROP SNAPSHOT
77 | CREATE TYPE | 78 | DROP TYPE
79 | ALTER ROLE | 80 | ALTER TYPE
81 | CREATE TYPE BODY | 82 | ALTER TYPE BODY
83 | DROP TYPE BODY | 84 | DROP LIBRARY
85 | TRUNCATE TABLE | 86 | TRUNCATE CLUSTER
91 | CREATE FUNCTION | 92 | ALTER FUNCTION
93 | DROP FUNCTION | 94 | CREATE PACKAGE
95 | ALTER PACKAGE | 96 | DROP PACKAGE
97 | CREATE PACKAGE BODY | 98 | ALTER PACKAGE BODY
99 | DROP PACKAGE BODY | 100 | LOGON
101 | LOGOFF | 102 | LOGOFF BY CLEANUP
103 | SESSION REC | 104 | SYSTEM AUDIT
105 | SYSTEM NOAUDIT | 106 | AUDIT DEFAULT
107 | NOAUDIT DEFAULT | 108 | SYSTEM GRANT
109 | SYSTEM REVOKE | 110 | CREATE PUBLIC SYNONYM
111 | DROP PUBLIC SYNONYM | 112 | CREATE PUBLIC DATABASE LINK
113 | DROP PUBLIC DATABASE LINK | 114 | GRANT ROLE
115 | REVOKE ROLE | 116 | EXECUTE PROCEDURE
117 | USER COMMENT | 118 | ENABLE TRIGGER
119 | DISABLE TRIGGER | 120 | ENABLE ALL TRIGGERS
121 | DISABLE ALL TRIGGERS | 122 | NETWORK ERROR
123 | EXECUTE TYPE | 157 | CREATE DIRECTORY
158 | DROP DIRECTORY | 159 | CREATE LIBRARY
160 | CREATE JAVA | 161 | ALTER JAVA
162 | DROP JAVA | 163 | CREATE OPERATOR
164 | CREATE INDEXTYPE | 165 | DROP INDEXTYPE
167 | DROP OPERATOR | 168 | ASSOCIATE STATISTICS
169 | DISASSOCIATE STATISTICS | 170 | CALL METHOD
171 | CREATE SUMMARY | 172 | ALTER SUMMARY
173 | DROP SUMMARY | 174 | CREATE DIMENSION
175 | ALTER DIMENSION | 176 | DROP DIMENSION
177 | CREATE CONTEXT | 178 | DROP CONTEXT
179 | ALTER OUTLINE | 180 | CREATE OUTLINE
181 | DROP OUTLINE | 182 | UPDATE INDEXES
183 | ALTER OPERATOR |  |
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 172 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION_CONNECT_INFO

This view displays information about network connections for the current session.

Column | Datatype | Description
SID | NUMBER | Session identifier (can be used to join this view with V$SESSION)
AUTHENTICATION_TYPE | VARCHAR2(15) | How the user was authenticated: DATABASE - username/password authentication OS - operating system external user authentication NETWORK - network protocol or ANO authentication PROXY - OCI proxy connection authentication
OSUSER | VARCHAR2(30) | The external username for this database user
NETWORK_SERVICE_BANNER | VARCHAR2(2000) | Product banners for each Net8 service used for this connection (one row per banner)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 173 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION_CURSOR_CACHE

This view displays information on cursor usage for the current session.

Note:

The V$SESSION_CURSOR_CACHE view is not a measure of the effectiveness of the SESSION_CACHED_CURSORS initialization parameter.

Column | Datatype | Description
MAXIMUM | NUMBER | Maximum number of cursors to cache. Once you hit this number, some cursors will need to be closed in order to open more. The value in this column is derived from the initialization parameter OPEN_CURSORS.
COUNT | NUMBER | The current number of cursors (whether they are in use or not)
OPENED_ONCE | NUMBER | Number of cursors opened at least once
OPEN | NUMBER | Current number of open cursors
OPENS | NUMBER | Cumulative total of cursor opens minus one. This is because the cursor that is currently open and being used for this query is not counted in the OPENS statistic.
HITS | NUMBER | Cumulative total of cursor open hits
HIT_RATIO | NUMBER | Ratio of the number of times an open cursor was found divided by the number of times a cursor was sought
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 174 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION_EVENT

This view lists information on waits for an event by a session. Note that the TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on those platforms that do not support a fast timing mechanism. If you are running on one of these platforms and you want this column to reflect true wait times, you must set TIMED_STATISTICS to true in the parameter file. Please remember that doing this will have a small negative effect on system performance.

See Also:

"TIMED_STATISTICS"

Column | Datatype | Description
SID | NUMBER | The ID of the session
EVENT | VARCHAR2(64) | The name of the wait event See Also: Appendix A, "Oracle Wait Events"
TOTAL_WAITS | NUMBER | The total number of waits for this event by this session
TOTAL_TIMEOUTS | NUMBER | The total number of timeouts for this event by this session
TIME_WAITED | NUMBER | The total amount of time waited for this event by this session, in hundredths of a second
AVERAGE_WAIT | NUMBER | The average amount of time waited for this event by this session, in hundredths of a second
MAX_WAIT | NUMBER | The maximum time (in hundredths of a second) waited for this event by this session
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 175 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION_LONGOPS

This view displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.

To monitor query execution progress, you must be using the cost-based optimizer and you must:

  • Set the TIMED_STATISTICS or SQL_TRACE parameter to true
  • Gather statistics for your objects with the ANALYZE statement or the DBMS_STATS package

You can add information to this view about application-specific long-running operations by using the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure.

See Also:

Oracle9i Supplied PL/SQL Packages and Types Reference for more information on DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS

Column | Datatype | Description
SID | NUMBER | Session identifier
SERIAL# | NUMBER | Session serial number
OPNAME | VARCHAR2(64) | Brief description of the operation
TARGET | VARCHAR2(64) | The object on which the operation is carried out
TARGET_DESC | VARCHAR2(32) | Description of the target
SOFAR | NUMBER | The units of work done so far
TOTALWORK | NUMBER | The total units of work
UNITS | VARCHAR2(32) | The units of measurement
START_TIME | DATE | The starting time of operation
LAST_UPDATE_TIME | DATE | Time when statistics last updated
TIME_REMAINING | NUMBER | Estimate (in seconds) of time remaining for the operation to complete
ELAPSED_SECONDS | NUMBER | The number of elapsed seconds from the start of operations
CONTEXT | NUMBER | Context
MESSAGE | VARCHAR2(512) | Statistics summary message
USERNAME | VARCHAR2(30) | User ID of the user performing the operation
SQL_ADDRESS | RAW(4) | Used with the value of the SQL_HASH_VALUE column to identify the SQL statement associated with the operation
SQL_HASH_VALUE | NUMER | Used with the value of the SQL_ADDRESS column to identify the SQL statement associated with the operation
QCSID | NUMBER | Session identifier of the parallel coordinator
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 176 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION_OBJECT_CACHE

This view displays object cache statistics for the current user session on the local server (instance).

Column | Datatype | Description
PINS | NUMBER | Number of object pins or look-ups in the cache
HITS | NUMBER | Number of object pins that found the object already in the cache
TRUE_HITS | NUMBER | Number of object pins that found the object already in the cache and in the desired state (thus, not requiring refresh from the database)
HIT_RATIO | NUMBER | The ratio of HITS/PINS
TRUE_HIT_RATIO | NUMBER | The ratio of TRUE_HITS/PINS
OBJECT_REFRESHES | NUMBER | Number of objects in the cache that were refreshed with a new value from the database
CACHE_REFRESHES | NUMBER | Number of times the whole cache (all objects) were refreshed
OBJECT_FLUSHES | NUMBER | Number of objects in the cache that were flushed to the database
CACHE_FLUSHES | NUMBER | Number of times the whole cache (all objects) were flushed to the database
CACHE_SHRINKS | NUMBER | Number of times the cache was shrunk to the optimal size
CACHED_OBJECTS | NUMBER | Number of objects currently cached
PINNED_OBJECTS | NUMBER | Number of objects currently pinned
CACHE_SIZE | NUMBER | Current size of the cache in bytes
OPTIMAL_SIZE | NUMBER | Optimal size of the cache in bytes
MAXIMUM_SIZE | NUMBER | Maximum size of the cache in bytes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 177 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSION_WAIT

This view lists the resources or events for which active sessions are waiting.

The following are tuning considerations:

  • P1RAW, P2RAW, and P3RAW display the same values as the P1, P2, and P3 columns, except that the numbers are displayed in hexadecimal.
  • The WAIT_TIME column contains a value of -2 on platforms that do not support a fast timing mechanism. If you are running on one of these platforms and you want this column to reflect true wait times, you must set the TIMED_STATISTICS parameter to TRUE. Remember that doing this has a small negative effect on system performance.

    In previous releases the WAIT_TIME column contained an arbitrarily large value instead of a negative value to indicate the platform did not have a fast timing mechanism.

  • The STATE column interprets the value of WAIT_TIME and describes the state of the current or most recent wait.

    See Also:

    "TIMED_STATISTICS" and Appendix A, "Oracle Wait Events"
    Column Datatype Description

    SID

    NUMBER

    Session identifier

    SEQ#

    NUMBER

    Sequence number that uniquely identifies this wait. Incremented for each wait.

    EVENT

    VARCHAR2(64)

    Resource or event for which the session is waiting

    See Also: Appendix A, "Oracle Wait Events"

    P1TEXT

    VARCHAR2(64)

    Description of first additional parameter

    P1

    NUMBER

    First additional parameter

    P1RAW

    RAW(4)

    First additional parameter

    P2TEXT

    VARCHAR2(64)

    Description of second parameter

    P2

    NUMBER

    Second additional parameter

    P2RAW

    RAW(4)

    Second additional parameter

    P3TEXT

    VARCHAR2(64)

    Description of third parameter

    P3

    NUMBER

    Third additional parameter

    P3RAW

    RAW(4)

    Third additional parameter

    WAIT_TIME

    NUMBER

    A nonzero value is the session's last wait time. A zero value means the session is currently waiting.

    SECONDS_IN_WAIT

    NUMBER

    If WAIT_TIME = 0, then SECONDS_IN_WAIT is the seconds spent in the current wait condition. If WAIT_TIME > 0, then SECONDS_IN_WAIT is the seconds since the start of the last wait, and SECONDS_IN_WAIT - WAIT_TIME / 100 is the active seconds since the last wait ended.

    STATE

    VARCHAR2(19)

    Wait state:

    • 0 - WAITING (the session is currently waiting)
    • -2 - WAITED UNKNOWN TIME (duration of last wait is unknown)
    • -1 - WAITED SHORT TIME (last wait <1/100th of a second)
    • >0 - WAITED KNOWN TIME (WAIT_TIME = duration of last wait)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 178 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SESSTAT

This view lists user session statistics. To find the name of the statistic associated with each statistic number (STATISTIC#), query the V$STATNAME view.

Column | Datatype | Description
SID | NUMBER | Session identifier
STATISTIC# | NUMBER | Statistic number (identifier) Note: Statistics numbers are not guaranteed to remain constant from one release to another. Therefore, you should rely on the statistics name rather than its number in your applications.
VALUE | NUMBER | Statistic value
See Also:

"V$STATNAME" and Appendix C, "Statistics Descriptions"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 179 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SGA

This view contains summary information on the system global area (SGA).

Column | Datatype | Description
NAME | VARCHAR2(20) | SGA component group
VALUE | NUMBER | Memory size (in bytes)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 180 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SGA_CURRENT_RESIZE_OPS

V$SGA_CURRENT_RESIZE_OPS displays information about SGA resize operations which are currently in progress. An operation can be a grow or a shrink of a dynamic SGA component. All sizes are expressed in bytes.

Column Datatype Description

COMPONENT

VARCHAR2(64)

Component name

OPER_TYPE

VARCHAR2(6)

Operation type:

  • GROW
  • SHRINK

OPER_MODE

VARCHAR2(6)

Operation mode:

  • MANUAL
  • AUTO

PARAMETER

VARCHAR2(64)

Name of the parameter for the resize operation

INITIAL_SIZE

NUMBER

Parameter value at the start of the operation

TARGET_SIZE

NUMBER

Desired value of the parameter after the resize

CURRENT_SIZE

NUMBER

Current value of the parameter

START_TIME

DATE

Start time of the operation

LAST_UPDATE_TIME

DATE

Last time progress was made for the operation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 181 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SGA_RESIZE_OPS

V$SGA_RESIZE_OPS displays information about the last 100 completed SGA resize operations. This does not include in-progress operations. All sizes are expressed in bytes.

Column Datatype Description

COMPONENT

VARCHAR2(64)

Component name

OPER_TYPE

VARCHAR2(6)

Operation type:

  • GROW
  • SHRINK

OPER_MODE

VARCHAR2(6)

Operation mode:

  • MANUAL
  • AUTO

PARAMETER

VARCHAR2(64)

Name of the parameter for the resize operation

INITIAL_SIZE

NUMBER

Parameter value at the start of the operation

TARGET_SIZE

NUMBER

Requested value of the parameter after the resize

FINAL_SIZE

NUMBER

Real value of the parameter after the resize

STATUS

VARCHAR2(6)

Completion status of the operation:

  • NORMAL
  • CANCEL
  • ERROR

START_TIME

DATE

Start time of the operation

END_TIME

DATE

End time of the operation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 182 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SGA_DYNAMIC_COMPONENTS

V$SGA_DYNAMIC_COMPONENTS displays information about the dynamic SGA components. This view summarizes information based on all completed SGA resize operations since instance startup. All sizes are expressed in bytes.

Column Datatype Description

COMPONENT

VARCHAR2(64)

Component name

CURRENT_SIZE

NUMBER

Current size of the component

MIN_SIZE

NUMBER

Minimum size of the component since instance startup

MAX_SIZE

NUMBER

Maximum size of the component since instance startup

OPER_COUNT

NUMBER

Number of operations since instance startup

LAST_OPER_TYPE

VARCHAR2(6)

Last completed operation for the component:

  • GROW
  • SHRINK

LAST_OPER_MODE

VARCHAR2(6)

Mode of the last completed operation:

  • MANUAL
  • AUTO

LAST_OPER_TIME

DATE

Start time of the last completed operation

GRANULE_SIZE

NUMBER

Granularity of the grow or the shrink operation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 183 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SGA_DYNAMIC_FREE_MEMORY

V$SGA_DYNAMIC_FREE_MEMORY displays information about the amount of SGA memory available for future dynamic SGA resize operations.

Column | Datatype | Description
CURRENT_SIZE | NUMBER | Amount of available memory (in bytes)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 184 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SGASTAT

This view contains detailed information on the system global area (SGA).

Column Datatype Description

NAME

VARCHAR2(26)

SGA component name

BYTES

NUMBER

Memory size in bytes

POOL

VARCHAR2(11)

Designates the pool in which the memory in NAME resides:

  • large pool - memory is allocated from the large pool
  • shared pool - memory is allocated from the shared pool
  • java pool - memory is allocated from the Java pool
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 185 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SHARED_POOL_ADVICE

V$SHARED_POOL_ADVICE displays information about estimated parse time savings in the shared pool for different sizes. The sizes range from 50% to 200% of the current shared pool size, in equal intervals. The value of the interval depends on the current size of the shared pool.

Column | Datatype | Description
SHARED_POOL_SIZE_FOR_ESTIMATE | NUMBER | Shared pool size for the estimate (in megabytes)
SHARED_POOL_SIZE_FACTOR | NUMBER | Size factor with respect to the current shared pool size
ESTD_LC_SIZE | NUMBER | Estimated memory in use by the library cache (in megabytes)
ESTD_LC_MEMORY_OBJECTS | NUMBER | Estimated number of library cache memory objects in the shared pool of the specified size
ESTD_LC_TIME_SAVED | NUMBER | Estimated elapsed parse time saved (in seconds), owing to library cache memory objects being found in a shared pool of the specified size. This is the time that would have been spent in reloading the required objects in the shared pool had they been aged out due to insufficient amount of available free memory.
ESTD_LC_TIME_SAVED_FACTOR | NUMBER | Estimated parse time saved factor with respect to the current shared pool size
ESTD_LC_MEMORY_OBJECT_HITS | NUMBER | Estimated number of times a library cache memory object was found in a shared pool of the specified size
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 186 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SHARED_POOL_RESERVED

This fixed view lists statistics that help you tune the reserved pool and space within the shared pool.

Column | Datatype | Description
The following columns of V$SHARED_POOL_RESERVED are valid only if the initialization parameter SHARED_POOL_RESERVED_SIZE is set to a valid value. See Also: "SHARED_POOL_RESERVED_SIZE"
FREE_SPACE | NUMBER | Total amount of free space on the reserved list
AVG_FREE_SIZE | NUMBER | Average size of the free memory on the reserved list
FREE_COUNT | NUMBER | Number of free pieces of memory on the reserved list
MAX_FREE_SIZE | NUMBER | Size of the largest free piece of memory on the reserved list
USED_SPACE | NUMBER | Total amount of used memory on the reserved list
AVG_USED_SIZE | NUMBER | Average size of the used memory on the reserved list
USED_COUNT | NUMBER | Number of used pieces of memory on the reserved list
MAX_USED_SIZE | NUMBER | Size of the largest used piece of memory on the reserved list
REQUESTS | NUMBER | Number of times that the reserved list was searched for a free piece of memory
REQUEST_MISSES | NUMBER | Number of times the reserved list did not have a free piece of memory to satisfy the request, and started flushing objects from the LRU list
LAST_MISS_SIZE | NUMBER | Request size of the last request miss, when the reserved list did not have a free piece of memory to satisfy the request and started flushing objects from the LRU list
MAX_MISS_SIZE | NUMBER | Request size of the largest request miss, when the reserved list did not have a free piece of memory to satisfy the request and started flushing objects from the LRU list
The following columns of V$SHARED_POOL_RESERVED contain values which are valid even if shared_pool_reserved_size is not set.
REQUEST_FAILURES | NUMBER | Number of times that no memory was found to satisfy a request (that is, the number of times the error ORA-04031 occurred)
LAST_FAILURE_SIZE | NUMBER | Request size of the last failed request (that is, the request size for the last ORA-04031 error)
ABORTED_REQUEST_THRESHOLD | NUMBER | Minimum size of a request which signals an ORA-04031 error without flushing objects
ABORTED_REQUESTS | NUMBER | Number of requests that signalled an ORA-04031 error without flushing objects
LAST_ABORTED_SIZE | NUMBER | Last size of the request that returned an ORA-04031 error without flushing objects from the LRU list
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 187 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SHARED_SERVER

This view contains information on the shared server processes.

Column | Datatype | Description
NAME | VARCHAR2(4) | Name of the server
PADDR | RAW(4 | 8) | Server's process address
STATUS | VARCHAR2(16) | Server status: EXEC - Executing SQL WAIT (ENQ) - Waiting for a lock WAIT (SEND) - Waiting to send data to user WAIT (COMMON) - Idle; waiting for a user request WAIT (RESET) - Waiting for a circuit to reset after a break QUIT - Terminating
MESSAGES | NUMBER | Number of messages processed
BYTES | NUMBER | Total number of bytes in all messages
BREAKS | NUMBER | Number of breaks
CIRCUIT | RAW(4 | 8) | Address of circuit currently being serviced
IDLE | NUMBER | Total idle time (in hundredths of a second)
BUSY | NUMBER | Total busy time (in hundredths of a second)
REQUESTS | NUMBER | Total number of requests taken from the common queue in this server's lifetime
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 188 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SHARED_SERVER_MONITOR

This view contains information for tuning the shared server.

Column | Datatype | Description
MAXIMUM_CONNECTIONS | NUMBER | Highest number of virtual circuits in use at one time since the instance started. If this value reaches the value set for the CIRCUITS initialization parameter, then consider raising the value of CIRCUITS. See Also: "CIRCUITS"
MAXIMUM_SESSIONS | NUMBER | Highest number of shared server sessions in use at one time since the instance started. If this reaches the value set for the SHARED_SERVER_SESSIONS initialization parameter, then consider raising the value of SHARED_SERVER_SESSIONS. See Also: "SHARED_SERVER_SESSIONS"
SERVERS_STARTED | NUMBER | Total number of shared servers started since the instance started (but not including those started during startup)
SERVERS_TERMINATED | NUMBER | Total number of shared servers stopped by Oracle since the instance started
SERVERS_HIGHWATER | NUMBER | Highest number of servers running at one time since the instance started. If this value reaches the value set for the MAX_SHARED_SERVERS initialization parameter, then consider raising the value of SHARED_SERVERS. See Also: "SHARED_SERVERS"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 189 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SORT_SEGMENT

This view contains information about every sort segment in a given instance. The view is only updated when the tablespace is of the TEMPORARY type.

Column | Datatype | Description
TABLESPACE_NAME | VARCHAR2(31) | Name of tablespace
SEGMENT_FILE | NUMBER | File number of the first extent
SEGMENT_BLOCK | NUMBER | Block number of the first extent
EXTENT_SIZE | NUMBER | Extent size
CURRENT_USERS | NUMBER | Number of active users of the segment
TOTAL_EXTENTS | NUMBER | Total number of extents in the segment
TOTAL_BLOCKS | NUMBER | Total number of blocks in the segment
RELATIVE_FNO | NUMBER | Relative file number of the sort segment header
USED_EXTENTS | NUMBER | Extents allocated to active sorts
USED_BLOCKS | NUMBER | Blocks allocated to active sorts
FREE_EXTENTS | NUMBER | Extents not allocated to any sort
FREE_BLOCKS | NUMBER | Blocks not allocated to any sort
ADDED_EXTENTS | NUMBER | Number of extent allocations
EXTENT_HITS | NUMBER | Number of times an unused extent was found in the pool
FREED_EXTENTS | NUMBER | Number of deallocated extents
FREE_REQUESTS | NUMBER | Number of requests to deallocate
MAX_SIZE | NUMBER | Maximum number of extents ever used
MAX_BLOCKS | NUMBER | Maximum number of blocks ever used
MAX_USED_SIZE | NUMBER | Maximum number of extents used by all sorts
MAX_USED_BLOCKS | NUMBER | Maximum number of blocks used by all sorts
MAX_SORT_SIZE | NUMBER | Maximum number of extents used by an individual sort
MAX_SORT_BLOCKS | NUMBER | Maximum number of blocks used by an individual sort
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 190 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SPPARAMETER

V$SPPARAMETER displays information about the contents of the server parameter file. If a server parameter file was not used to start the instance, then each row of the view will contain FALSE in the ISSPECIFIED column.

Column | Datatype | Description
SID | VARCHAR2(80) | SID for which the parameter is defined
NAME | VARCHAR2(80) | Name of the parameter
VALUE | VARCHAR2(255) | Parameter value (null if a server parameter file was not used to start the instance)
ISSPECIFIED | VARCHAR2(6) | Indicates whether the parameter was specified in the server parameter file (TRUE) or not (FALSE)
ORDINAL | NUMBER | Position (ordinal number) of the parameter value (0 if a server parameter file was not used to start the instance). Useful only for parameters whose values are lists of strings.
UPDATE_COMMENT | VARCHAR2(255) | Comments associated with the most recent update (null if a server parameter file was not used to start the instance)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 191 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL

V$SQL lists statistics on shared SQL area without the GROUP BY clause and contains one row for each child of the original SQL text entered.

Column | Datatype | Description
SQL_TEXT | VARCHAR2(1000) | First thousand characters of the SQL text for the current cursor
SHARABLE_MEM | NUMBER | Amount of shared memory used by this child cursor (in bytes)
PERSISTENT_MEM | NUMBER | Fixed amount of memory used for the lifetime of this child cursor (in bytes)
RUNTIME_MEM | NUMBER | Fixed amount of memory required during the execution of this child cursor
SORTS | NUMBER | Number of sorts that were done for this child cursor
LOADED_VERSIONS | NUMBER | Indicates whether the context heap is loaded (1) or not (0)
OPEN_VERSIONS | NUMBER | Indicates whether the child cursor is locked (1) or not (0)
USERS_OPENING | NUMBER | Number of users executing the statement
FETCHES | NUMBER | Number of fetches associated with the SQL statement
EXECUTIONS | NUMBER | Number of executions that took place on this object since it was brought into the library cache
USERS_EXECUTING | NUMBER | Number of users executing the statement
LOADS | NUMBER | Number of times the object was either loaded or reloaded
FIRST_LOAD_TIME | VARCHAR2(19) | Timestamp of the parent creation time
INVALIDATIONS | NUMBER | Number of times this child cursor has been invalidated
PARSE_CALLS | NUMBER | Number of parse calls for this child cursor
DISK_READS | NUMBER | Number of disk reads for this child cursor
BUFFER_GETS | NUMBER | Number of buffer gets for this child cursor
ROWS_PROCESSED | NUMBER | Total number of rows the parsed SQL statement returns
COMMAND_TYPE | NUMBER | Oracle command type definition
OPTIMIZER_MODE | VARCHAR2(10) | Mode under which the SQL statement is executed
OPTIMIZER_COST | NUMBER | Cost of this query given by the optimizer
PARSING_USER_ID | NUMBER | User ID of the user who originally built this child cursor
PARSING_SCHEMA_ID | NUMBER | Schema ID that was used to originally build this child cursor
KEPT_VERSIONS | NUMBER | Indicates whether this child cursor has been marked to be kept pinned in the cache using the DBMS_SHARED_POOL package
ADDRESS | RAW(4 | 8) | Address of the handle to the parent for this cursor
TYPE_CHK_HEAP | RAW(4) | Descriptor of the type check heap for this child cursor
HASH_VALUE | NUMBER | Hash value of the parent statement in the library cache
PLAN_HASH_VALUE | NUMBER | Numerical representation of the SQL plan for this cursor. Comparing one PLAN_HASH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line by line).
CHILD_NUMBER | NUMBER | Number of this child cursor
MODULE | VARCHAR2(64) | Contains the name of the module that was executing at the time that the SQL statement was first parsed, which is set by calling DBMS_APPLICATION_INFO.SET_MODULE
MODULE_HASH | NUMBER | Hash value of the module listed in the MODULE column
ACTION | VARCHAR2(64) | Contains the name of the action that was executing at the time that the SQL statement was first parsed, which is set by calling DBMS_APPLICATION_INFO.SET_ACTION
ACTION_HASH | NUMBER | Hash value of the action listed in the ACTION column
SERIALIZABLE_ABORTS | NUMBER | Number of times the transaction fails to serialize, producing ORA-08177 errors, per cursor
OUTLINE_CATEGORY | VARCHAR2(64) | If an outline was applied during construction of the cursor, then this column displays the category of that outline. Otherwise the column is left blank.
CPU_TIME | NUMBER | CPU time (in microseconds) used by this cursor for parsing/executing/fetching
ELAPSED_TIME | NUMBER | Elapsed time (in microseconds) used by this cursor for parsing/executing/fetching
OUTLINE_SID | NUMBER | Outline session identifier
CHILD_ADDRESS | RAW(4 | 8) | Address of the child cursor
SQLTYPE | NUMBER | Denotes the version of the SQL language used for this statement
REMOTE | VARCHAR2(1) | Indicates whether the cursor is remote mapped (Y) or not (N)
OBJECT_STATUS | VARCHAR2(19) | Status of the cursor (VALID or INVALID)
LITERAL_HASH_VALUE | NUMBER | Hash value of the literals which are replaced with system-generated bind variables and are to be matched, when CURSOR_SHARING is used. This is not the hash value for the SQL statement. If CURSOR_SHARING is not used, then the value is 0.
LAST_LOAD_TIME | VARCHAR2(19) | Time at which the query plan (heap 6) was loaded into the library cache
IS_OBSOLETE | VARCHAR2(1) | Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
CHILD_LATCH | NUMBER | Child latch number that is protecting the cursor
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 192 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_BIND_DATA

For each distinct bind variable in each cursor owned by the session querying this view, this view describes:

  • Actual bind data, if the bind variable is user defined
  • The underlying literal, if the CURSOR_SHARING parameter is set to FORCE and the bind variable is system generated. (System-generated binds have a value of 256 in the SHARED_FLAG2 column.)

    Column Datatype Description

    CURSOR_NUM

    NUMBER

    Cursor number for this bind

    POSITION

    NUMBER

    Bind position

    DATATYPE

    NUMBER

    Bind datatype

    SHARED_MAX_LEN

    NUMBER

    Shared maximum length for this bind from the shared cursor object associated with this bind

    PRIVATE_MAX_LEN

    NUMBER

    Private maximum length for this bind sent from the client

    ARRAY_SIZE

    NUMBER

    Maximum number of array elements (for array binds only)

    PRECISION

    NUMBER

    Precision (for numeric binds)

    SCALE

    NUMBER

    Scale (for numeric binds)

    SHARED_FLAG

    NUMBER

    Shared bind data flags

    SHARED_FLAG2

    NUMBER

    Shared bind data flags (continued)

    BUF_ADDRESS

    RAW(4 | 8)

    Bind buffer memory address

    BUF_LENGTH

    NUMBER

    Bind buffer length

    VAL_LENGTH

    NUMBER

    Actual bind value length

    BUF_FLAG

    NUMBER

    Bind buffer flags

    INDICATOR

    NUMBER

    Bind indicator

    VALUE

    VARCHAR2(4000)

    Contents of the bind buffer
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 193 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_BIND_METADATA

For each distinct bind variable in each cursor owned by the session querying this view, this view describes:

  • Bind metadata provided by the client, if the bind variable is user defined
  • Metadata based on the underlying literal, if the CURSOR_SHARING parameter is set to FORCE and the bind variable is system-generated.

    Column Datatype Description

    ADDRESS

    RAW(4 | 8)

    Memory address of the child cursor that owns this bind variable

    POSITION

    NUMBER

    Bind position

    DATATYPE

    NUMBER

    Bind datatype

    MAX_LENGTH

    NUMBER

    Maximum length of the bind value

    ARRAY_LEN

    NUMBER

    Maximum number of array elements (for array binds only)

    BIND_NAME

    VARCHAR2(30)

    User-defined or system-generated bind variable name (if used)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 194 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_CURSOR

This view displays debugging information for each cursor associated with the session querying this view.

Column | Datatype | Description
CURNO | NUMBER | Cursor number
FLAG | NUMBER | Flags set in the cursor
STATUS | VARCHAR2(9) | Status of the cursor; that is, what state the cursor is in
PARENT_HANDLE | RAW(4 | 8) | Pointer to the parent cursor handle
PARENT_LOCK | RAW(4 | 8) | Pointer to the parent cursor lock
CHILD_LOCK | RAW(4 | 8) | Pointer to the child cursor lock
CHILD_PIN | RAW(4 | 8) | Pointer to the child cursor pin
PERS_HEAP_MEM | NUMBER | Total amount of memory allocated from persistent heap for this cursor
WORK_HEAP_MEM | NUMBER | Total amount of memory allocated from the work heap for this cursor
BIND_VARS | NUMBER | Total number of bind positions in the query currently parsed into this cursor
DEFINE_VARS | NUMBER | Total number of define variables in the query currently parsed into this cursor
BIND_MEM_LOC | VARCHAR2(64) | Which memory heap the bind variables are stored in: either the UGA or the CGA
INST_FLAG | VARCHAR2(64) | Instantiation object flags
INST_FLAG2 | VARCHAR2(64) | Instantiation object flags (continued)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 195 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_PLAN

V$SQL_PLAN contains the execution plan information for each child cursor loaded in the library cache.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | Address of the handle to the parent for this cursor
HASH_VALUE | NUMBER | Hash value of the parent statement in the library cache. The two columns ADDRESS and HASH_VALUE can be used to join with V$SQLAREA to add the cursor-specific information.
CHILD_NUMBER | NUMBER | Number of the child cursor that uses this execution plan. The columns ADDRESS, HASH_VALUE, and CHILD_NUMBER can be used to join with V$SQL to add the child cursor-specific information.
OPERATION | VARCHAR2(30) | Name of the internal operation performed in this step (for example, TABLE ACCESS)
OPTIONS | VARCHAR2(30) | A variation on the operation described in the OPERATION column (for example, FULL)
OBJECT_NODE | VARCHAR2(10) | Name of the database link used to reference the object (a table name or view name). For local queries that use parallel execution, this column describes the order in which output from operations is consumed.
OBJECT# | NUMBER | Object number of the table or the index
OBJECT_OWNER | VARCHAR2(30) | Name of the user who owns the schema containing the table or index
OBJECT_NAME | VARCHAR2(64) | Name of the table or index
OPTIMIZER | VARCHAR2(20) | Current mode of the optimizer for the first row in the plan (statement line), for example, CHOOSE. When the operation is a database access (for example, TABLE ACCESS), this column indicates whether or not the object is analyzed.
ID | NUMBER | A number assigned to each step in the execution plan
PARENT_ID | NUMBER | ID of the next execution step that operates on the output of the current step
DEPTH | NUMBER | Depth (or level) of the operation in the tree. It is not necessary to issue a CONNECT BY statement to get the level information, which is generally used to indent the rows from the PLAN_TABLE table. The root operation (statement) is level 0.
POSITION | NUMBER | Order of processing for all operations that have the same PARENT_ID
SEARCH_COLUMNS | NUMBER | Number of index columns with start and stop keys (that is, the number of columns with matching predicates)
COST | NUMBER | Cost of the operation as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.
CARDINALITY | NUMBER | Estimate, by the cost-based optimizer, of the number of rows produced by the operation
BYTES | NUMBER | Estimate, by the cost-based optimizer, of the number of bytes produced by the operation
OTHER_TAG | VARCHAR2(35) | Describes the contents of the OTHER column. See EXPLAIN PLAN for values.
PARTITION_START | VARCHAR2(5) | Start partition of a range of accessed partitions
PARTITION_STOP | VARCHAR2(5) | Stop partition of a range of accessed partitions
PARTITION_ID | NUMBER | Step that computes the pair of values of the PARTITION_START and PARTITION_STOP columns
OTHER | VARCHAR2(4000) | Other information specific to the execution step that users may find useful. See EXPLAIN PLAN for values.
DISTRIBUTION | VARCHAR2(20) | Stores the method used to distribute rows from producer query servers to consumer query servers
CPU_COST | NUMBER | CPU cost of the operation as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.
IO_COST | NUMBER | I/O cost of the operation as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.
TEMP_SPACE | NUMBER | Temporary space usage of the operation (sort or hash-join) as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.
ACCESS_PREDICATES | VARCHAR2(4000) | Predicates used to locate rows in an access structure. For example, start or stop predicates for an index range scan.
FILTER_PREDICATES | VARCHAR2(4000) | Predicates used to filter rows before producing them
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 196 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_PLAN_STATISTICS

V$SQL_PLAN_STATISTICS provides execution statistics at the row source level for each child cursor.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | Address of the handle to the parent for this cursor
HASH_VALUE | NUMBER | Hash value of the parent statement in the library cache. The two columns ADDRESS and HASH_VALUE can be used to join with V$SQLAREA to locate the parent cursor.
CHILD_NUMBER | NUMBER | Number of the child cursor that uses this work area. The columns ADDRESS, HASH_VALUE, and CHILD_NUMBER can be used to join with V$SQL to locate the child cursor using this area.
OPERATION_ID | NUMBER | A number assigned to each step in the execution plan
EXECUTIONS | NUMBER | Number of times this cursor has been executed
LAST_STARTS | NUMBER | Number of times this operation has been started, during the last execution
STARTS | NUMBER | Number of times this operation has been started, accumulated over the past executions
LAST_OUTPUT_ROWS | NUMBER | Number of rows produced by the row source, during the last execution
OUTPUT_ROWS | NUMBER | Number of rows produced by the row source, accumulated over the past executions
LAST_CR_BUFFER_GETS | NUMBER | Number of buffers retrieved in consistent mode, during the last execution. Buffers are usually retrieved in consistent mode for queries.
CR_BUFFER_GETS | NUMBER | Number of buffers retrieved in consistent mode, accumulated over the past executions. Buffers are usually retrieved in consistent mode for queries.
LAST_CU_BUFFER_GETS | NUMBER | Number of buffers retrieved in current mode, during the last execution. Buffers are retrieved in current mode for statements such as INSERT, UPDATE, and DELETE.
CU_BUFFER_GETS | NUMBER | Number of buffers retrieved in current mode, accumulated over the past executions. Buffers are retrieved in current mode for statements such as INSERT, UPDATE, and DELETE.
LAST_DISK_READS | NUMBER | Number of physical disk reads performed by the operation, during the last execution
DISK_READS | NUMBER | Number of physical disk reads performed by the operation, accumulated over the past executions
LAST_DISK_WRITES | NUMBER | Number of physical disk writes performed by the operation, during the last execution
DISK_WRITES | NUMBER | Number of physical disk writes performed by the operation, accumulated over the past executions
LAST_ELAPSED_TIME | NUMBER | Elapsed time (in microseconds) corresponding to this operation, during the last execution
ELAPSED_TIME | NUMBER | Elapsed time (in microseconds) corresponding to this operation, accumulated over the past executions
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 197 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_PLAN_STATISTICS_ALL

V$SQL_PLAN_STATISTICS_ALL contains memory usage statistics for row sources that use SQL memory (sort or hash-join). This view concatenates information in V$SQL_PLAN with execution statistics from V$SQL_PLAN_STATISTICS and V$SQL_WORKAREA.

Column Datatype Description

ADDRESS

RAW(4 | 8)

Address of the handle to the parent for this cursor

HASH_VALUE

NUMBER

Hash value of the parent statement in the library cache. The two columns ADDRESS and HASH_VALUE can be used to join with V$SQLAREA to add the cursor-specific information.

CHILD_NUMBER

NUMBER

Number of the child cursor that uses this execution plan. The columns ADDRESS, HASH_VALUE, and CHILD_NUMBER can be used to join with V$SQL to add the child cursor-specific information.

OPERATION

VARCHAR2(30)

Name of the internal operation performed in this step (for example, TABLE ACCESS)

OPTIONS

VARCHAR2(30)

A variation on the operation described in the OPERATION column (for example, FULL)

OBJECT_NODE

VARCHAR2(10)

Name of the database link used to reference the object (a table name or view name). For local queries that use parallel execution, this column describes the order in which output from operations is consumed.

OBJECT#

NUMBER

Object number of the table or the index

OBJECT_OWNER

VARCHAR2(30)

Name of the user who owns the schema containing the table or index

OBJECT_NAME

VARCHAR2(64)

Name of the table or index

OPTIMIZER

VARCHAR2(20)

Current mode of the optimizer for the first row in the plan (statement line), for example, CHOOSE. When the operation is a database access (for example, TABLE ACCESS), this column indicates whether or not the object is analyzed.

ID

NUMBER

A number assigned to each step in the execution plan

PARENT_ID

NUMBER

ID of the next execution step that operates on the output of the current step

DEPTH

NUMBER

Depth (or level) of the operation in the tree. It is not necessary to issue a CONNECT BY statement to get the level information, which is generally used to indent the rows from the PLAN_TABLE table. The root operation (statement) is level 0.

POSITION

NUMBER

Order of processing for all operations that have the same PARENT_ID

SEARCH_COLUMNS

NUMBER

Number of index columns with start and stop keys (that is, the number of columns with matching predicates)

COST

NUMBER

Cost of the operation as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.

CARDINALITY

NUMBER

Estimate, by the cost-based optimizer, of the number of rows produced by the operation

BYTES

NUMBER

Estimate, by the cost-based optimizer, of the number of bytes produced by the operation

OTHER_TAG

VARCHAR2(35)

Describes the contents of the OTHER column. See EXPLAIN PLAN for values.

PARTITION_START

VARCHAR2(5)

Start partition of a range of accessed partitions

PARTITION_STOP

VARCHAR2(5)

Stop partition of a range of accessed partitions

PARTITION_ID

NUMBER

Step that computes the pair of values of the PARTITION_START and PARTITION_STOP columns

OTHER

VARCHAR2(4000)

Other information specific to the execution step that users may find useful. See EXPLAIN PLAN for values.

DISTRIBUTION

VARCHAR2(20)

Stores the method used to distribute rows from producer query servers to consumer query servers

CPU_COST

NUMBER

CPU cost of the operation as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.

IO_COST

NUMBER

I/O cost of the operation as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.

TEMP_SPACE

NUMBER

Temporary space usage of the operation (sort or hash-join) as estimated by the optimizer's cost-based approach. For statements that use the rule-based approach, this column is null.

ACCESS_PREDICATES

VARCHAR2(4000)

Predicates used to locate rows in an access structure. For example, start or stop predicates for an index range scan.

FILTER_PREDICATES

VARCHAR2(4000)

Predicates used to filter rows before producing them

EXECUTIONS

NUMBER

Number of times this cursor has been executed

LAST_STARTS

NUMBER

Number of times this operation has been started, during the last execution

STARTS

NUMBER

Number of times this operation has been started, accumulated over the past executions

LAST_OUTPUT_ROWS

NUMBER

Number of rows produced by the row source, during the last execution

OUTPUT_ROWS

NUMBER

Number of rows produced by the row source, accumulated over the past executions

LAST_CR_BUFFER_GETS

NUMBER

Number of buffers retrieved in consistent mode, during the last execution. Buffers are usually retrieved in consistent mode for queries.

CR_BUFFER_GETS

NUMBER

Number of buffers retrieved in consistent mode, accumulated over the past executions. Buffers are usually retrieved in consistent mode for queries.

LAST_CU_BUFFER_GETS

NUMBER

Number of buffers retrieved in current mode, during the last execution. Buffers are retrieved in current mode for statements such as INSERT, UPDATE, and DELETE.

CU_BUFFER_GETS

NUMBER

Number of buffers retrieved in current mode, accumulated over the past executions. Buffers are retrieved in current mode for statements such as INSERT, UPDATE, and DELETE.

LAST_DISK_READS

NUMBER

Number of physical disk reads performed by the operation, during the last execution

DISK_READS

NUMBER

Number of physical disk reads performed by the operation, accumulated over the past executions

LAST_DISK_WRITES

NUMBER

Number of physical disk writes performed by the operation, during the last execution

DISK_WRITES

NUMBER

Number of physical disk writes performed by the operation, accumulated over the past executions

LAST_ELAPSED_TIME

NUMBER

Elapsed time (in microseconds) corresponding to this operation, during the last execution

ELAPSED_TIME

NUMBER

Elapsed time (in microseconds) corresponding to this operation, accumulated over the past executions

POLICY

VARCHAR2(10)

Sizing policy for this work area:

  • MANUAL
  • AUTO

ESTIMATED_OPTIMAL_SIZE

NUMBER

Estimated size (in KB) required by this work area to execute the operation completely in memory (optimal execution). This is either derived from optimizer statistics or from previous executions.

ESTIMATED_ONEPASS_SIZE

NUMBER

Estimated size (in KB) required by this work area to execute the operation in a single pass. This is either derived from optimizer statistics or from previous executions.

LAST_MEMORY_USED

NUMBER

Memory size (in KB) used by this work area during the last execution of the cursor

LAST_EXECUTION

VARCHAR2(10)

Indicates whether this work area ran using OPTIMAL, ONE PASS, or under ONE PASS memory requirement (MULTI-PASS), during the last execution of the cursor

LAST_DEGREE

NUMBER

Degree of parallelism used, during the last execution of the cursor

TOTAL_EXECUTIONS

NUMBER

Number of times this work area was active

OPTIMAL_EXECUTIONS

NUMBER

Number of times this work area ran in optimal mode

ONEPASS_EXECUTIONS

NUMBER

Number of times this work area ran in one pass mode

MULTIPASSES_EXECUTIONS

NUMBER

Number of times this work area ran below the one pass memory requirement

ACTIVE_TIME

NUMBER

Average time this work area is active (in hundredths of a second)

MAX_TEMPSEG_SIZE

NUMBER

Maximum temporary segment size (in bytes) created by an instantiation of this work area. This column is null if this work area has never spilled to disk.

LAST_TEMPSEG_SIZE

NUMBER

Temporary segment size (in bytes) created in the last instantiation of this work area. This column is null if the last instantiation of this work area did not spill to disk.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 198 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_REDIRECTION

This view identifies SQL statements that are redirected.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | KGL address
PARENT_HANDLE | RAW(4 | 8) | KGL address of parent
HASH_VALUE | NUMBER | SQL hash
CHILD_NUMBER | NUMBER | Number of child (instance) for hash
PARSING_USER_ID | NUMBER |
PARSING_SCHEMA_ID | NUMBER |
COMMAND_TYPE | NUMBER | SELECT, UPDATE, INSERT, MERGE
REASON | VARCHAR2(14) | Reason for redirection ('INVALID OBJECT', 'ROWID', 'QUERY REWRITE', 'READ ONLY')
ERROR_CODE | NUMBER | Error code for local parse
POSITION | NUMBER | Error position, 0 if unknown
SQL_TEXT_PIECE | VARCHAR2(1000) | SQL Text containing position, usually a (qualified) identifier
ERROR_MESSAGE | VARCHAR2(1000) | Error code's corresponding error message resolved in the database language, no arguments resolved
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 199 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_SHARED_CURSOR

This view explains why a particular child cursor is not shared with existing child cursors. Each column identifies a specific reason why the cursor cannot be shared.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | Address of the child cursor
KGLHDPAR | RAW(4 | 8) | Address of the parent cursor
UNBOUND_CURSOR | VARCHAR2(1) | (Y|N) The existing child cursor was not fully built (in other words, it was not optimized)
SQL_TYPE_MISMATCH | VARCHAR2(1) | (Y|N) The SQL type does not match the existing child cursor
OPTIMIZER_MISMATCH | VARCHAR2(1) | (Y|N) The optimizer environment does not match the existing child cursor
OUTLINE_MISMATCH | VARCHAR2(1) | (Y|N) The outlines do not match the existing child cursor
STATS_ROW_MISMATCH | VARCHAR2(1) | (Y|N) The existing statistics do not match the existing child cursor
LITERAL_MISMATCH | VARCHAR2(1) | (Y|N) Non-data literal values do not match the existing child cursor
SEC_DEPTH_MISMATCH | VARCHAR2(1) | (Y|N) Security level does not match the existing child cursor
EXPLAIN_PLAN_CURSOR | VARCHAR2(1) | (Y|N) The child cursor is an explain plan cursor and should not be shared
BUFFERED_DML_MISMATCH | VARCHAR2(1) | (Y|N) Buffered DML does not match the existing child cursor
PDML_ENV_MISMATCH | VARCHAR2(1) | (Y|N) PDML environment does not match the existing child cursor
INST_DRTLD_MISMATCH | VARCHAR2(1) | (Y|N) Insert direct load does not match the existing child cursor
SLAVE_QC_MISMATCH | VARCHAR2(1) | (Y|N) The existing child cursor is a slave cursor and the new one was issued by the coordinator (or, the existing child cursor was issued by the coordinator and the new one is a slave cursor)
TYPECHECK_MISMATCH | VARCHAR2(1) | (Y|N) The existing child cursor is not fully optimized
AUTH_CHECK_MISMATCH | VARCHAR2(1) | (Y|N) Authorization/translation check failed for the existing child cursor
BIND_MISMATCH | VARCHAR2(1) | (Y|N) The bind metadata does not match the existing child cursor
DESCRIBE_MISMATCH | VARCHAR2(1) | (Y|N) The typecheck heap is not present during the describe for the child cursor
LANGUAGE_MISMATCH | VARCHAR2(1) | (Y|N) The language handle does not match the existing child cursor
TRANSLATION_MISMATCH | VARCHAR2(1) | (Y|N) The base objects of the existing child cursor do not match
ROW_LEVEL_SEC_MISMATCH | VARCHAR2(1) | (Y|N) The row level security policies do not match
INSUFF_PRIVS | VARCHAR2(1) | (Y|N) Insufficient privileges on objects referenced by the existing child cursor
INSUFF_PRIVS_REM | VARCHAR2(1) | (Y|N) Insufficient privileges on remote objects referenced by the existing child cursor
REMOTE_TRANS_MISMATCH | VARCHAR2(1) | (Y|N) The remote base objects of the existing child cursor do not match
LOGMINER_SESSION_MISMATCH | VARCHAR2(1) | (Y|N)
INCOMP_LTRL_MISMATCH | VARCHAR2(1) | (Y|N)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 200 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_SHARED_MEMORY

This view displays information about the cursor shared memory snapshot. Each SQL statement stored in the shared pool has one or more child objects associated with it. Each child object has a number of parts, one of which is the context heap, which holds, among other things, the query plan.

Column | Datatype | Description
SQL_TEXT | VARCHAR2(1000) | The SQL text of the shared cursor child object for which this row is displaying information
HASH_VALUE | NUMBER | The hash value of the above SQL text in the shared pool
HEAP_DESC | RAW(4 | 8) | Address of the descriptor for the context heap of the child cursor described in this row
STRUCTURE | VARCHAR2(16) | If the memory chunk described in this row was allocated using a comment of the form "X : Y", then this is the "X" part of the comment
FUNCTION | VARCHAR2(16) | Similar to the STRUCTURE column, this is the "Y" field of the comment
COMMENT | VARCHAR2(16) | The whole comment field that was supplied when this memory chunk was allocated
CHUNK_PTR | RAW(4 | 8) | Starting address of the allocated memory chunk
CHUNK_SIZE | NUMBER | Amount of memory allocated for this chunk
ALLOC_CLASS | VARCHAR2(8) | Class of memory that this chunk of memory belongs to. It will usually be either FREEABLE or PERMANENT.
CHUNK_TYPE | NUMBER | An index into a table of callback functions that tell the server how to recreate this chunk of memory should it need to be removed from the shared pool based on an LRU algorithm
SUBHEAP_DESC | RAW(4) | If the parent heap of this context heap is itself a subheap, then this is the address of the descriptor of the parent heap
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 201 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_WORKAREA

V$SQL_WORKAREA displays information about work areas used by SQL cursors. Each SQL statement stored in the shared pool has one or more child cursors that are listed in the V$SQL view. V$SQL_WORKAREA lists all work areas needed by these child cursors; V$SQL_WORKAREA can be joined with V$SQLAREA on (ADDRESS, HASH_VALUE) and with V$SQL on (ADDRESS, HASH_VALUE, CHILD_NUMBER).

You can use this view to find out answers to the following questions:

  • What are the top 10 work areas that require the most cache area?
  • For work areas allocated in AUTO mode, what percentage of work areas are running using maximum memory?

    Column Datatype Description

    ADDRESS

    RAW(4 | 8)

    Address of the parent cursor handle

    HASH_VALUE

    NUMBER

    Hash value of the parent statement in the library cache. Two columns PARENT_HANDLE and HASH_VALUE can be used to join with V$SQLAREA to locate the parent cursor.

    CHILD_NUMBER

    NUMBER

    Number of the child cursor that uses this work area. The columns PARENT_HANDLE, HASH_VALUE, and CHILD_NUMBER can be used to join with V$SQL to locate the child cursor using this area.

    WORKAREA_ADDRESS

    RAW(4 | 8)

    Address of the workarea handle. This is the "primary key" for the view.

    OPERATION_TYPE

    VARCHAR2(20)

    Type of operation using the work area (SORT, HASH JOIN, GROUP BY, BUFFERING, BITMAP MERGE, or BITMAP CREATE)

    OPERATION_ID

    NUMBER

    A unique number used to identify the operation in the execution plan. This identifier can be joined to V$SQL_PLAN to locate the operation that uses this work area.

    POLICY

    VARCHAR2(10)

    Sizing policy for this work area (MANUAL or AUTO)

    ESTIMATED_OPTIMAL_SIZE

    NUMBER

    Estimated size (in KB) required by this work area to execute the operation completely in memory (optimal execution). Derived from either optimizer statistics or previous executions.

    ESTIMATED_ONEPASS_SIZE

    NUMBER

    Estimated size (in KB) required by this work area to execute the operation in a single pass. Derived from either optimizer statistics or previous executions.

    LAST_MEMORY_USED

    NUMBER

    Memory (in KB) used by this work area during the last execution of the cursor

    LAST_EXECUTION

    VARCHAR2(10)

    Indicates whether this work area runs using OPTIMAL, ONE PASS, or ONE PASS memory requirement (or MULTI-PASS), during the last execution of the cursor

    LAST_DEGREE

    NUMBER

    Degree of parallelism used during the last execution of this operation

    TOTAL_EXECUTIONS

    NUMBER

    Number of times this work area was active

    OPTIMAL_EXECUTIONS

    NUMBER

    Number of times this work area ran in optimal mode

    ONEPASS_EXECUTIONS

    NUMBER

    Number of times this work area ran in one-pass mode

    MULTIPASSES_EXECUTIONS

    NUMBER

    Number of times this work area ran below the one-pass memory requirement

    ACTIVE_TIME

    NUMBER

    Average time this work area is active (in hundredths of a second)

    MAX_TEMPSEG_SIZE

    NUMBER

    Maximum temporary segment size (in bytes) created by an instantiation of this work area. This column is null if this work area has never spilled to disk.

    LAST_TEMPSEG_SIZE

    NUMBER

    Temporary segment size (in bytes) created in the last instantiation of this work area. This column is null if the last instantiation of this work area did not spill to disk.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 202 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_WORKAREA_ACTIVE

V$SQL_WORKAREA_ACTIVE contains an instantaneous view of the work areas currently allocated by the system. You can join this view against V$SQL_WORKAREA on WORKAREA_ADDRESS to access the definition of that work area. If a work area spills to disk, then this view contains information for the temporary segment created on behalf of this work area.

The last three columns are included to enable joining V$SQL_WORKAREA_ACTIVE with V$TEMPSEG_USAGE to retrieve more information on this temporary segment.

You can use this view to answer the following:

  • What are the top 10 largest work areas currently allocated in my system?
  • What percentage of memory is over-allocated (EXPECTED_SIZE < ACTUAL_MEM_USED) and under-allocated (EXPECTED_SIZE > ACTUAL_MEM_USED)?
  • What are the active work areas using more memory than what is expected by the memory manager?
  • What are the active work areas that have spilled to disk?

    Column Datatype Description

    WORKAREA_ADDRESS

    RAW(4 | 8)

    Address of the workarea handle. This is the "primary key" for the view.

    OPERATION_TYPE

    VARCHAR2(20)

    Type of operation using the work area (SORT, HASH JOIN, GROUP BY, BUFFERING, BITMAP MERGE, or BITMAP CREATE)

    OPERATION_ID

    NUMBER

    A unique number used to identify the operation in the execution plan. This identifier can be joined to V$SQL_PLAN to locate the operation that uses this work area.

    POLICY

    VARCHAR2(6)

    Sizing policy for this work area (MANUAL or AUTO)

    SID

    NUMBER

    Session identifier

    QCINST_ID

    NUMBER

    Query coordinator instance identifier. Along with QCSID, enables you to uniquely identify the query coordinator.

    QCSID

    NUMBER

    Query coordinator session identifier. This is the same as the SID if the work area is allocated by a serial cursor.

    ACTIVE_TIME

    NUMBER

    Average time this work area is active (in centi-seconds)

    WORK_AREA_SIZE

    NUMBER

    Maximum size of the work area as it is currently used by the operation

    EXPECTED_SIZE

    NUMBER

    Expected size (in KB) for this work area. EXPECTED_SIZE is set on behalf of the operation by the memory manager. Memory can be over-allocated when WORK_AREA_SIZE has a higher value than EXPECTED_SIZE. This can occur when the operation using this work area takes a long time to resize it.

    ACTUAL_MEM_USED

    NUMBER

    Amount of PGA memory (in KB) currently allocated on behalf of this work area. This value should range between 0 and WORK_AREA_SIZE.

    MAX_MEM_USED

    NUMBER

    Maximum memory amount (in KB) used by this work area

    NUMBER_PASSES

    NUMBER

    Number of passes corresponding to this work area (0 if running in OPTIMAL mode)

    TEMPSEG_SIZE

    NUMBER

    Size (in bytes) of the temporary segment used on behalf of this work area. This column is NULL if this work area has not (yet) spilled to disk.

    TABLESPACE

    VARCHAR2(31)

    Tablespace name for the temporary segment created on behalf of this work area. This column is NULL if this work area has not (yet) spilled to disk.

    SEGRFNO#

    NUMBER

    Relative file number within the tablespace for the temporary segment created on behalf of this work area. This column is NULL if this work area has not (yet) spilled to disk.

    SEGBLK#

    NUMBER

    Block number for the temporary segment created on behalf of this work area. This column is NULL if this work area has not (yet) spilled to disk.
    See Also:

    Oracle9i Database Performance Tuning Guide and Reference for more information on how to monitor SQL work areas
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 203 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQL_WORKAREA_HISTOGRAM

V$SQL_WORKAREA_HISTOGRAM displays the cumulative work area execution statistics (cumulated since instance startup) for different work area groups. The work areas are split into 33 groups based on their optimal memory requirements with the requirements increasing in powers of two. That is, work areas whose optimal requirement varies from 0 KB to 1 KB, 1 KB to 2 KB, 2 KB to 4 KB, ... and 2 TB to 4 TB.

For each work area group, the V$SQL_WORKAREA_HISTOGRAM view shows how many work areas in that group were able to run in optimal mode, how many were able to run in one-pass mode, and finally how many ran in multi-pass mode. The DBA can take a snapshot at the beginning and the end of a desired time interval to derive the same statistics for that interval.

Column | Datatype | Description
LOW_OPTIMAL_SIZE | NUMBER | Lower bound for the optimal memory requirement of work areas included in this row (bytes)
HIGH_OPTIMAL_SIZE | NUMBER | Upper bound for the optimal memory requirement of work areas included in this row (bytes)
OPTIMAL_EXECUTIONS | NUMBER | Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which have been executed in optimal mode since instance startup
ONEPASS_EXECUTIONS | NUMBER | Number of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which have been executed in one-pass mode since instance startup
MULTIPASSES_EXECUTIONS | NUMBER | Nnumber of work areas with an optimal memory requirement comprised between LOW_OPTIMAL_SIZE and HIGH_OPTIMAL_SIZE which have been executed in multi-pass mode since instance startup
TOTAL_EXECUTIONS | NUMBER | Sum of OPTIMAL_EXECUTIONS, ONEPASS_EXECUTIONS, and MULTIPASSES_EXECUTIONS
See Also:

Oracle9i Database Performance Tuning Guide and Reference for detailed information on how to monitor automatic PGA memory performance using this view
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 204 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQLAREA

V$SQLAREA lists statistics on shared SQL area and contains one row per SQL string. It provides statistics on SQL statements that are in memory, parsed, and ready for execution.

Column | Datatype | Description
SQL_TEXT | VARCHAR2(1000) | First thousand characters of the SQL text for the current cursor
SHARABLE_MEM | NUMBER | Amount of shared memory used by a cursor. If multiple child cursors exist, then the sum of all shared memory used by all child cursors.
PERSISTENT_MEM | NUMBER | Fixed amount of memory used for the lifetime of an open cursor. If multiple child cursors exist, the fixed sum of memory used for the lifetime of all the child cursors.
RUNTIME_MEM | NUMBER | Fixed amount of memory required during execution of a cursor. If multiple child cursors exist, the fixed sum of all memory required during execution of all the child cursors.
SORTS | NUMBER | Sum of the number of sorts that were done for all the child cursors
VERSION_COUNT | NUMBER | Number of child cursors that are present in the cache under this parent
LOADED_VERSIONS | NUMBER | Number of child cursors that are present in the cache and have their context heap (KGL heap 6) loaded
OPEN_VERSIONS | NUMBER | The number of child cursors that are currently open under this current parent
USERS_OPENING | NUMBER | The number of users that have any of the child cursors open
FETCHES | NUMBER | Number of fetches associated with the SQL statement
EXECUTIONS | NUMBER | Total number of executions, totalled over all the child cursors
USERS_EXECUTING | NUMBER | Total number of users executing the statement over all child cursors
LOADS | NUMBER | The number of times the object was loaded or reloaded
FIRST_LOAD_TIME | VARCHAR2(19) | Timestamp of the parent creation time
INVALIDATIONS | NUMBER | Total number of invalidations over all the child cursors
PARSE_CALLS | NUMBER | The sum of all parse calls to all the child cursors under this parent
DISK_READS | NUMBER | The sum of the number of disk reads over all child cursors
BUFFER_GETS | NUMBER | The sum of buffer gets over all child cursors
ROWS_PROCESSED | NUMBER | The total number of rows processed on behalf of this SQL statement
COMMAND_TYPE | NUMBER | The Oracle command type definition
OPTIMIZER_MODE | VARCHAR2(10) | Mode under which the SQL statement was executed
PARSING_USER_ID | NUMBER | The user ID of the user that has parsed the very first cursor under this parent
PARSING_SCHEMA_ID | NUMBER | The schema ID that was used to parse this child cursor
KEPT_VERSIONS | NUMBER | The number of child cursors that have been marked to be kept using the DBMS_SHARED_POOL package
ADDRESS | RAW(4 | 8) | Address of the handle to the parent for this cursor
HASH_VALUE | NUMBER | Hash value of the parent statement in the library cache
MODULE | VARCHAR2(64) | Contains the name of the module that was executing at the time that the SQL statement was first parsed as set by calling DBMS_APPLICATION_INFO.SET_MODULE
MODULE_HASH | NUMBER | Hash value of the module that is named in the MODULE column
ACTION | VARCHAR2(64) | Contains the name of the action that was executing at the time that the SQL statement was first parsed as set by calling DBMS_APPLICATION_INFO.SET_ACTION
ACTION_HASH | NUMBER | Hash value of the action that is named in the ACTION column
SERIALIZABLE_ABORTS | NUMBER | Number of times the transaction fails to serialize, producing ORA-08177 errors, totalled over all the child cursors
IS_OBSOLETE | VARCHAR2(1) | Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
CHILD_LATCH | NUMBER | Child latch number that is protecting the cursor
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 205 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQLTEXT

This view contains the text of SQL statements belonging to shared SQL cursors in the SGA.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | Used with HASH_VALUE to uniquely identify a cached cursor
HASH_VALUE | NUMBER | Used with ADDRESS to uniquely identify a cached cursor
COMMAND_TYPE | NUMBER | Code for the type of SQL statement (SELECT, INSERT, and so on)
PIECE | NUMBER | Number used to order the pieces of SQL text
SQL_TEXT | VARCHAR2(64) | A column containing one piece of the SQL text
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 206 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SQLTEXT_WITH_NEWLINES

This view is identical to the V$SQLTEXT view except that, to improve legibility, V$SQLTEXT_WITH_NEWLINES does not replace newlines and tabs in the SQL statement with spaces.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | Used with HASH_VALUE to uniquely identify a cached cursor
HASH_VALUE | NUMBER | Used with ADDRESS to uniquely identify a cached cursor
COMMAND_TYPE | NUMBER | Code for the type of SQL statement (SELECT, INSERT, and so on)
PIECE | NUMBER | Number used to order the pieces of SQL text
SQL_TEXT | VARCHAR2(64) | A column containing one piece of the SQL text
See Also:

"V$SQLTEXT"

Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 207 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STANDBY_LOG

V$STANDBY_LOG contains standby log file information from the control files.

Column Datatype Description

GROUP#

NUMBER

Log group number

THREAD#

NUMBER

Log thread number

SEQUENCE#

NUMBER

Log sequence number

BYTES

NUMBER

Size of the log (in bytes)

USED

NUMBER

Number of bytes used in the log

ARCHIVED

VARCHAR2(3)

Archive status

STATUS

VARCHAR2(10)

Indicates the log status. Possible values are:

  • UNUSED - Online redo log has never been written to. This is the state of a redo log that was just added, or just after a RESETLOGS when it is not the current redo log.
  • CURRENT - Current redo log. This implies that the redo log is active. The redo log could be open or closed.
  • ACTIVE - Log is active but is not the current log. It is needed for failure recovery. It may be in use for block recovery. It might or might not be archived.
  • CLEARING - Log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE statement. After the log is cleared, the status changes to UNUSED.
  • CLEARING_CURRENT - Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch, such as an I/O error writing the new log header.
  • INACTIVE - Log is no longer needed for instance recovery. It may be in use for managed recovery. It might or might not be archived.
  • INVALIDATED - Archived the current redo log without a log switch.

FIRST_CHANGE#

NUMBER

Lowest SCN in the log

FIRST_TIME

DATE

Time of first SCN in the log

LAST_CHANGE#

NUMBER

Last change number made to this datafile. Set to NULL if the datafile is being changed.

LAST_TIME

DATE

Time stamp of the last change
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 208 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STATISTICS_LEVEL

V$STATISTICS_LEVEL lists the status of the statistics/advisories controlled by STATISTICS_LEVEL.

Column | Datatype | Description
STATISTICS_NAME | VARCHAR2(64) | Name of the statistics/advisory
DESCRIPTION | VARCHAR2(4000) | Description of the statistics/advisory
SESSION_STATUS | VARCHAR2(8) | (ENABLED/DISABLED) Status of the statistics/advisory for this session
SYSTEM_STATUS | VARCHAR2(8) | (ENABLED/DISABLED) Status of the statistics/advisory system-wide
ACTIVATION_LEVEL | VARCHAR2(7) | Indicates the level of STATISTICS_LEVEL that enables this statistics/advisory (BASIC, TYPICAL, or ALL)
STATISTICS_VIEW_NAME | VARCHAR2(64) | If there is a single view externalizing this statistics/advisory, then this column contains the name of that view. If there is no such view, then this column is empty. If there are multiple views involved, then the DESCRIPTION column mentions the view names.
SESSION_SETTABLE | VARCHAR2(3) | Indicates whether this statistics/advisory can be set at the session level (YES) or not (NO)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 209 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STATNAME

This view displays decoded statistic names for the statistics shown in the V$SESSTAT and V$SYSSTAT tables.

On some platforms, the NAME and CLASS columns contain additional operating system-specific statistics.

Column Datatype Description

STATISTIC#

NUMBER

Statistic number

Note: Statistics numbers are not guaranteed to remain constant from one release to another. Therefore, you should rely on the statistics name rather than its number in your applications.

NAME

VARCHAR2(64)

Statistic name

CLASS

NUMBER

A number representing one or more statistics classes. The following class numbers are additive:

  • 1 - User
  • 2 - Redo
  • 4 - Enqueue
  • 8 - Cache
  • 16 - OS
  • 32 - Real Application Clusters
  • 64 - SQL
  • 128 - Debug
See Also:
  • "V$SESSTAT" and "V$SYSSTAT"
  • Appendix C, "Statistics Descriptions" for a description of each statistic
  • Your operating system-specific Oracle documentation
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 210 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STREAMS_APPLY_COORDINATOR

V$STREAMS_APPLY_COORDINATOR displays information about each apply process coordinator. The coordinator for an apply process gets transactions from the apply process reader and passes them to apply servers.

Column Datatype Description

SID

NUMBER

Session ID of the coordinator's session

SERIAL#

NUMBER

Serial number of the coordinator's session

STATE

VARCHAR2(21)

State of the coordinator:

  • INITIALIZING
  • APPLYING
  • SHUTTING DOWN CLEANLY
  • ABORTING

APPLY#

NUMBER

Apply process number. An apply process is an Oracle background process, prefixed by ap.

APPLY_NAME

VARCHAR2(30)

Name of the apply process

TOTAL_APPLIED

NUMBER

Total number of transactions applied by the apply process since the apply process was last started

TOTAL_WAIT_DEPS

NUMBER

Number of times since the apply process was last started that an apply server waited to apply a logical change record (LCR) in a transaction until another apply server applied a transaction because of a dependency between the transactions

TOTAL_WAIT_COMMITS

NUMBER

Number of times since the apply process was last started that an apply server waited to commit a transaction until another apply server committed a transaction to serialize commits

TOTAL_ADMIN

NUMBER

Number of administrative jobs issued since the apply process was last started

TOTAL_ASSIGNED

NUMBER

Number of transactions assigned to apply servers since the apply process was last started

TOTAL_RECEIVED

NUMBER

Total number of transactions received by the coordinator process since the apply process was last started

TOTAL_ERRORS

NUMBER

Number of transactions applied by the apply process that resulted in an apply error since the apply process was last started

LWM_TIME

DATE

Time when the message with the lowest message number was recorded. The creation time of the message with the lowest message number was also recorded at this time.

LWM_MESSAGE_NUMBER

NUMBER

Number of the message corresponding to the low-watermark. That is, messages with a commit message number less than or equal to this message number have definitely been applied, but some messages with a higher commit message number also may have been applied.

LWM_MESSAGE_CREATE_TIME

DATE

For captured messages, creation time at the source database of the message corresponding to the low-watermark. For user-enqueued messages, time when the message corresponding to the low-watermark was enqueued into the queue at the local database.

HWM_TIME

DATE

Time when the message with the highest message number was recorded. The creation time of the message with the highest message number was also recorded at this time.

HWM_MESSAGE_NUMBER

NUMBER

Number of the message corresponding to the high-watermark. That is, no messages with a commit message number greater than this message number have been applied.

HWM_MESSAGE_CREATE_TIME

DATE

For captured messages, creation time at the source database of the message corresponding to the high-watermark. For user-enqueued messages, time when the message corresponding to the high-watermark was enqueued into the queue at the local database.

STARTUP_TIME

DATE

Time when the apply process last started

ELAPSED_SCHEDULE_TIME

NUMBER

Time elapsed (in hundreths of a second) scheduling messages since the apply process was last started
Note:

The ELAPSED_SCHEDULE_TIME column is only populated if the TIMED_STATISTICS initialization parameter is set to true, or if the STATISTICS_LEVEL initialization parameter is set to TYPICAL or ALL.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 211 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STREAMS_APPLY_READER

V$STREAMS_APPLY_READER displays information about each apply reader. The apply reader for an apply process is a process which reads (dequeues) messages from the queue, computes message dependencies, builds transactions, and passes the transactions on to the apply process coordinator in commit order for assignment to the apply servers.

Column Datatype Description

SID

NUMBER

Session ID of the reader's session

SERIAL#

NUMBER

Serial number of the reader's session

APPLY#

NUMBER

Apply process number. An apply process is an Oracle background process, prefixed by ap.

APPLY_NAME

VARCHAR2(30)

Name of the apply process

STATE

VARCHAR2(17)

State of the reader:

  • IDLE
  • DEQUEUE MESSAGES
  • SCHEDULE MESSAGES

TOTAL_MESSAGES_DEQUEUED

NUMBER

Total number of messages dequeued since the apply process was last started

DEQUEUE_TIME

DATE

Time last message was received

DEQUEUED_MESSAGE_NUMBER

NUMBER

Number of the last message received

DEQUEUED_MESSAGE_CREATE_TIME

DATE

For captured messages, creation time at the source database of the last message received. For user-enqueued messages, time when the message was enqueued into the queue at the local database.

SGA_USED

NUMBER

Amount of SGA memory used (in bytes) by the apply process since it was last started

ELAPSED_DEQUEUE_TIME

NUMBER

Time elapsed (in hundreths of a second) dequeuing messages since the apply process was last started

ELAPSED_SCHEDULE_TIME

NUMBER

Time elapsed (in hundreths of a second) scheduling messages since the apply process was last started. Scheduling includes computing dependencies between messages and assembling messages into transactions.
Note:

The ELAPSED_DEQUEUE_TIME and ELAPSED_SCHEDULE_TIME columns are only populated if the TIMED_STATISTICS initialization parameter is set to true, or if the STATISTICS_LEVEL initialization parameter is set to TYPICAL or ALL.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 212 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STREAMS_APPLY_SERVER

V$STREAMS_APPLY_SERVER displays information about each apply server and its activities. An apply server receives events from the apply coordinator for an apply process. For each event received, an apply server either applies the event or sends the event to the appropriate apply handler.

Column Datatype Description

SID

NUMBER

Session ID of the apply server's session

SERIAL#

NUMBER

Serial number of the apply server's session

APPLY#

NUMBER

Apply process number. An apply process is an Oracle background process, prefixed by ap.

APPLY_NAME

VARCHAR2(30)

Name of the apply process

SERVER_ID

NUMBER

Parallel execution server number of the apply server

STATE

VARCHAR2(20)

State of the apply server:

  • IDLE - Performing no work
  • RECORD LOW-WATERMARK - Performing an administrative job that maintains information about the apply progress, which is used in the ALL_APPLY_PROGRESS and DBA_APPLY_PROGRESS data dictionary views
  • ADD PARTITION - Performing an administrative job that adds a partition that is used for recording information about in-progress transactions
  • DROP PARTITION - Performing an administrative job that drops a partition that was used to record information about in-progress transactions
  • EXECUTE TRANSACTION - Applying a transaction
  • WAIT COMMIT - Waiting to commit a transaction until all other transactions with a lower commit SCN are applied. This state is possible only if the COMMIT_SERIALIZATION apply process parameter is set to a value other than none and the PARALELLISM apply process parameter is set to a value greater than 1.
  • WAIT DEPENDENCY - Waiting to apply a logical change record (LCR) in a transaction until another transaction, on which it has a dependency, is applied. This state is possible only if the PARALELLISM apply process parameter is set to a value greater than 1.
  • WAIT FOR NEXT CHUNK - Waiting for the next set of logical change records (LCRs) for a large transaction

XIDUSN

NUMBER

Transaction ID undo segment number of the transaction currently being applied

XIDSLT

NUMBER

Transaction ID slot number of the transaction currently being applied

XIDSQN

NUMBER

Transaction ID sequence number of the transaction currently being applied

COMMITSCN

NUMBER

Commit system change number (SCN) of the transaction currently being applied

DEP_XIDUSN

NUMBER

Transaction ID undo segment number of a transaction on which the transaction being applied by this apply server depends

DEP_XIDSLT

NUMBER

Transaction ID slot number of a transaction on which the transaction being applied by this apply server depends

DEP_XIDSQN

NUMBER

Transaction ID sequence number of a transaction on which the transaction being applied by this apply server depends

DEP_COMMITSCN

NUMBER

Commit system change number (SCN) of the transaction on which this apply server depends

MESSAGE_SEQUENCE

NUMBER

Number of the current message being applied by the apply server. This value is reset to 1 at the beginning of each transaction.

TOTAL_ASSIGNED

NUMBER

Total number of transactions assigned to the apply server since the apply process was last started

TOTAL_ADMIN

NUMBER

Total number of administrative jobs done by the apply server since the apply process was last started. See the STATE information in this view for the types of administrative jobs.

TOTAL_MESSAGES_APPLIED

NUMBER

Total number of messages applied by this apply server since the apply process was last started

APPLY_TIME

DATE

Time last message was applied

APPLIED_MESSAGE_NUMBER

NUMBER

Number of the last message applied

APPLIED_MESSAGE_CREATE_TIME

DATE

Creation time at the source database of the last captured message applied. No information about user-enqueued messages is recorded in this column.

ELAPSED_DEQUEUE_TIME

NUMBER

Time elapsed (in hundreths of a second) dequeuing messages since the apply process was last started

ELAPSED_APPLY_TIME

NUMBER

Time elapsed (in hundreths of a second) applying messages since the apply process was last started
Note:

The ELAPSED_DEQUEUE_TIME and ELAPSED_APPLY_TIME columns are only populated if the TIMED_STATISTICS initialization parameter is set to true, or if the STATISTICS_LEVEL initialization parameter is set to TYPICAL or ALL.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý««««««««


Dynamic Performance (V$) Views, 213 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$STREAMS_CAPTURE

V$STREAMS_CAPTURE displays information about each capture process.

Column Datatype Description

SID

NUMBER

Session identifier of the capture process

SERIAL#

NUMBER

Session serial number of the capture process session

CAPTURE#

NUMBER

Capture process number. A capture process is an Oracle background process, prefixed by cp.

CAPTURE_NAME

VARCHAR2(30)

Name of the capture process

STARTUP_TIME

DATE

Time when the capture process was last started

STATE

VARCHAR2(17)

State of the capture process:

  • INITIALIZING
  • CAPTURING CHANGES
  • EVALUATING RULE
  • ENQUEUING MESSAGE
  • SHUTTING DOWN
  • CREATING LCR

TOTAL_MESSAGES_CAPTURED

NUMBER

Total changes captured since the capture process was last started

CAPTURE_TIME

DATE

Time when the most recent message was captured

CAPTURE_MESSAGE_NUMBER

NUMBER

Number of the most recently captured message

CAPTURE_MESSAGE_CREATE_TIME

DATE

Creation time of the most recently captured message

TOTAL_MESSAGES_ENQUEUED

NUMBER

Total number of messages enqueued since the capture process was last started

ENQUEUE_TIME

DATE

Time when the last message was enqueued

ENQUEUE_MESSAGE_NUMBER

NUMBER

Number of the last enqueued message

ENQUEUE_MESSAGE_CREATE_TIME

DATE

Creation time of the last enqueued message

ELAPSED_CAPTURE_TIME

NUMBER

Elapsed time (in hundreths of a second) scanning for changes in the redo log since the capture process was last started

ELAPSED_RULE_TIME

NUMBER

Elapsed time (in hundreths of a second) evaluating rules since the capture process was last started

ELAPSED_ENQUEUE_TIME

NUMBER

Elapsed time (in hundreths of a second) enqueuing messages since the capture process was last started

ELAPSED_LCR_TIME

NUMBER

Elapsed time (in hundreths of a second) creating logical change records (LCRs) since the capture process was last started
Note:

The ELAPSED_CAPTURE_TIME, ELAPSED_RULE_TIME, ELAPSED_ENQUEUE_TIME, and ELAPSED_LCR_TIME columns are only populated if the TIMED_STATISTICS initialization parameter is set to true, or if the STATISTICS_LEVEL initialization parameter is set to TYPICAL or ALL.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 214 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SUBCACHE

This view displays information about the subordinate caches currently loaded into library cache memory. The view walks through the library cache, printing out a row for each loaded subordinate cache per library cache object.

Column | Datatype | Description
OWNER_NAME | VARCHAR2(64) | Owner of object containing these cache entries
NAME | VARCHAR2(1000) | Object Name
TYPE | NUMBER | Object Type
HEAP_NUM | NUMBER | Heap number containing this subordinate cache
CACHE_ID | NUMBER | Subordinate cache ID
CACHE_CNT | NUMBER | Number of entries for this cache in this object
HEAP_SZ | NUMBER | Amount of extent space allocated to this heap
HEAP_ALOC | NUMBER | Amount of extent space allocated from this heap
HEAP_USED | NUMBER | Amount of space utilized in this heap
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 215 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SYSSTAT

This view lists system statistics. To find the name of the statistic associated with each statistic number (STATISTIC#), query the V$STATNAME view.

Column Datatype Description

STATISTIC#

NUMBER

Statistic number

Note: Statistics numbers are not guaranteed to remain constant from one release to another. Therefore, you should rely on the statistics name rather than its number in your applications.

NAME

VARCHAR2(64)

Statistic name

CLASS

NUMBER

A number representing one or more statistics class. The following class numbers are additive:

  • 1 - User
  • 2 - Redo
  • 4 - Enqueue
  • 8 - Cache
  • 16 - OS
  • 32 - Real Application Clusters
  • 64 - SQL
  • 128 - Debug

VALUE

NUMBER

Statistic value
See Also:

"V$STATNAME" and Appendix C, "Statistics Descriptions"
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº««««««««


Dynamic Performance (V$) Views, 216 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SYSTEM_CURSOR_CACHE

This view displays similar information to the V$SESSION_CURSOR_CACHE view except that this information is system wide.

See Also:

"V$SESSION_CURSOR_CACHE"

Column | Datatype | Description
OPENS | NUMBER | Cumulative total of cursor opens
HITS | NUMBER | Cumulative total of cursor open hits
HIT_RATIO | NUMBER | Ratio of the number of times you found an open cursor divided by the number of times you looked for a cursor
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 217 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SYSTEM_EVENT

This view contains information on total waits for an event. Note that the TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on those platforms that do not support a fast timing mechanism. If you are running on one of these platforms and you want this column to reflect true wait times, you must set TIMED_STATISTICS to TRUE in the parameter file; doing this will have a small negative effect on system performance.

See Also:

"TIMED_STATISTICS"

Column | Datatype | Description
EVENT | VARCHAR2(64) | The name of the wait event
TOTAL_WAITS | NUMBER | The total number of waits for this event
TOTAL_TIMEOUTS | NUMBER | The total number of timeouts for this event
TIME_WAITED | NUMBER | The total amount of time waited for this event, in hundredths of a second
AVERAGE_WAIT | NUMBER | The average amount of time waited for this event, in hundredths of a second
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 218 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SYSTEM_PARAMETER

V$SYSTEM_PARAMETER displays information about the initialization parameters that are currently in effect for the instance. A new session inherits parameter values from the instance-wide values.

Column Datatype Description

NUM

NUMBER

Parameter number

NAME

VARCHAR2(64)

Name of the parameter

TYPE

NUMBER

Parameter type:

  • 1 - Boolean
  • 2 - String
  • 3 - Integer
  • 4 - Parameter file
  • 5 - Reserved
  • 6 - Big integer

VALUE

VARCHAR2(512)

Instance-wide parameter value

ISDEFAULT

VARCHAR2(9)

Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE)

ISSES_MODIFIABLE

VARCHAR2(5)

Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)

ISSYS_MODIFIABLE

VARCHAR2(9)

Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:

  • IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.
  • DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.
  • FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances.

ISMODIFIED

VARCHAR2(8)

Indicates how the parameter was modified. If an ALTER SYSTEM was performed, the value will be MODIFIED.

ISADJUSTED

VARCHAR2(5)

Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)

DESCRIPTION

VARCHAR2(64)

Description of the parameter

UPDATE_COMMENT

VARCHAR2(255)

Comments associated with the most recent update
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 219 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$SYSTEM_PARAMETER2

V$SYSTEM_PARAMETER2 displays information about the initialization parameters that are currently in effect for the instance, with each list parameter value appearing as a row in the view. A new session inherits parameter values from the instance-wide values.

Presenting the list parameter values in this format enables you to quickly determine the values for a list parameter. For example, if a parameter value is a, b, then the V$SYSTEM_PARAMETER view does not tell you if the parameter has two values (both a and b) or one value (a, b). V$SYSTEM_PARAMETER2 makes the distinction between the list parameter values clear.

Column Datatype Description

NUM

NUMBER

Parameter number

NAME

VARCHAR2(64)

Name of the parameter

TYPE

NUMBER

Parameter type:

  • 1 - Boolean
  • 2 - String
  • 3 - Integer
  • 4 - Parameter file
  • 5 - Reserved
  • 6 - Big integer

VALUE

VARCHAR2(512)

Parameter value

ISDEFAULT

VARCHAR2(6)

Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE)

ISSES_MODIFIABLE

VARCHAR2(5)

Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)

ISSYS_MODIFIABLE

VARCHAR2(9)

Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:

  • IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.
  • DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.
  • FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances.

ISMODIFIED

VARCHAR2(8)

Indicates how the parameter was modified. If an ALTER SYSTEM was performed, the value will be MODIFIED.

ISADJUSTED

VARCHAR2(5)

Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)

DESCRIPTION

VARCHAR2(64)

Description of the parameter

ORDINAL

NUMBER

Position (ordinal number) of the parameter value. Useful only for parameters whose values are lists of strings.

UPDATE_COMMENT

VARCHAR2(255)

Comments associated with the most recent update
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº ðº««««««««


Dynamic Performance (V$) Views, 220 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TABLESPACE

This view displays tablespace information from the control file.

Column | Datatype | Description
TS# | NUMBER | Tablespace number
NAME | VARCHAR2(30) | Tablespace name
INCLUDED_IN_DATABASE_BACKUP | VARCHAR2(3) | Indicates whether the tablespace is included in full database backups using the BACKUP DATABASE RMAN command (YES) or not (NO). NO only if the CONFIGURE EXCLUDE RMAN command was used for this tablespace.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 221 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMP_CACHE_TRANSFER

V$TEMP_CACHE_TRANSFER displays the number of blocks pinged per datafile. This information in turn can be used to determine access patterns to existing datafiles and deciding new mappings from datafile blocks to PCM locks.

Column | Datatype | Description
FILE_NUMBER | NUMBER | Number of the datafile
X_2_NULL | NUMBER | Number of lock conversions from Exclusive-to-NULL for all blocks in the file
X_2_NULL_FORCED_WRITE | NUMBER | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-NULL conversions
X_2_NULL_FORCED_STALE | NUMBER | Number of times a block in the file was made STALE due to Exclusive-to-NULL conversions
X_2_S | NUMBER | Number of lock conversions from Exclusive-to-Shared for all blocks in the file
X_2_S_FORCED_WRITE | NUMBER | Number of forced writes that occur for blocks of the specified file due to Exclusive-to-Shared conversions
S_2_NULL | NUMBER | Number of lock conversions from Shared-to-NULL for all blocks in the file
S_2_NULL_FORCED_STALE | NUMBER | Number of times a block in the file was made STALE due to Shared-to-NULL conversions
RBR | NUMBER | Number of times the instance received a reuse block range cross instance call for this file
RBR_FORCED_WRITE | NUMBER | Number of blocks written due to reuse block range cross instance calls for this file
NULL_2_X | NUMBER | Number of lock conversions from NULL-to-Exclusive for all blocks of the specified file
S_2_X | NUMBER | Number of lock conversions from Shared-to-Exclusive for all blocks of the specified file
NULL_2_S | NUMBER | Number of lock conversions from NULL-to-Shared for all blocks of the specified file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 222 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMP_EXTENT_MAP

This view displays the status of each unit for all LOCALLY MANAGED temporary tablespaces.

Column | Datatype | Description
TABLESPACE_NAME | NUMBER | Name of tablespace this unit belongs to
FILE_ID | NUMBER | Absolute file number
BLOCK_ID | NUMBER | Begin block number for this unit
BYTES | NUMBER | Bytes in extent
BLOCKS | NUMBER | Blocks in extent
OWNER | NUMBER | Which instance own this unit (string)
RELATIVE_FNO | NUMBER | The relative file number
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 223 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMP_EXTENT_POOL

This view displays the state of temporary space cached and used for a given instance. Note that loading of the temporary space cache is lazy, and that instances can be dormant. Use GV$TEMP_EXTENT_POOL for information about all instances.

Column | Datatype | Description
TABLESPACE_NAME | VARCHAR2(30) | Name of the tablespace
FILE_ID | NUMBER | Absolute file number
EXTENTS_CACHED | NUMBER | How many extents have been cached
EXTENTS_USED | NUMBER | How many extents are actually being used
BLOCKS_CACHED | NUMBER | How many blocks are cached
BLOCKS_USED | NUMBER | How many blocks are used
BYTES_CACHED | NUMBER | How many bytes are cached
BYTES_USED | NUMBER | How many bytes used
RELATIVE_FNO | NUMBER | The relative file number
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº««««««««


Dynamic Performance (V$) Views, 224 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMP_SPACE_HEADER

This view displays aggregate information per file per LOCALLY MANAGED temporary tablespace regarding how much space is currently being used and how much is free as identified in the space header.

Column | Datatype | Description
TABLESPACE_NAME | VARCHAR2(30) | The name of the temporary tablespace
FILE_ID | NUMBER | The absolute file number
BYTES_USED | NUMBER | How many bytes are in use
BLOCKS_USED | NUMBER | How many blocks are in use
BYTES_FREE | NUMBER | How many bytes are free
BLOCKS_FREE | NUMBER | How many blocks are free
RELATIVE_FNO | NUMBER | The relative file number for the file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 225 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMPFILE

This view displays tempfile information.

Column | Datatype | Description
FILE# | NUMBER | The absolute file number
CREATION_CHANGE# | NUMBER | The creation System Change Number (SCN)
CREATION_TIME | DATE | The creation time
TS# | NUMBER | The tablespace number
RFILE# | NUMBER | The relative file number in tablespace
STATUS | VARCHAR2(7) | The status of the file (OFFLINE|ONLINE)
ENABLED | VARCHAR2(10) | Enabled for read and/or write
BYTES | NUMBER | The size of the file in bytes (from file header)
BLOCKS | NUMBER | The size of the file in blocks (from file header)
CREATE_BYTES | NUMBER | The creation size of the file (in bytes)
BLOCK_SIZE | NUMBER | The block size for the file
NAME | VARCHAR2(513) | The name of the file
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 226 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMPORARY_LOBS

This view displays temporary lobs.

Column | Datatype | Description
SID | NUMBER | Session ID
CACHE_LOBS | NUMBER | Number cache temp lobs
NOCACHE_LOBS | NUMBER | Number of nocache temp lobs
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 227 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMPSEG_USAGE

This view describes temporary segment usage.

Column Datatype Description

USERNAME

VARCHAR2(30)

User who requested temporary space

USER

VARCHAR2(30)

This column is obsolete and maintained only for compatibility reasons. The value of this column is always equal to the value in USERNAME.

SESSION_ADDR

RAW(4 | 8)

Address of shared SQL cursor

SESSION_NUM

NUMBER

Serial number of session

SQLADDR

RAW(4 | 8)

Address of SQL statement

SQLHASH

NUMBER

Hash value of SQL statement

TABLESPACE

VARCHAR2(31)

Tablespace in which space is allocated

CONTENTS

VARCHAR2(9)

Indicates whether tablespace is TEMPORARY or PERMANENT

SEGTYPE

VARCHAR2(9)

Type of sort segment:

  • SORT
  • HASH
  • DATA
  • INDEX
  • LOB_DATA
  • LOB_INDEX

SEGFILE#

NUMBER

File number of initial extent

SEGBLK#

NUMBER

Block number of the initial extent

EXTENTS

NUMBER

Extents allocated to the sort

BLOCKS

NUMBER

Extents in blocks allocated to the sort

SEGRFNO#

NUMBER

Relative file number of initial extent
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 228 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TEMPSTAT

This view contains information about file read/write statistics.

Column | Datatype | Description
FILE# | NUMBER | Number of the file
PHYRDS | NUMBER | Number of physical reads done
PHYWRTS | NUMBER | Number of times DBWR is required to write
PHYBLKRD | NUMBER | Number of physical blocks read
PHYBLKWRT | NUMBER | Number of blocks written to disk, which may be the same as PHYWRTS if all writes are single blocks
SINGLEBLKRDS | NUMBER | Number of single block reads
READTIM | NUMBER | Time (in hundredths of a second) spent doing reads if the TIMED_STATISTICS parameter is true; 0 if false
WRITETIM | NUMBER | Time (in hundredths of a second) spent doing writes if the TIMED_STATISTICS parameter is true; 0 if false
SINGLEBLKRDTIM | NUMBER | Cumulative single block read time (in hundredths of a second)
AVGIOTIM | NUMBER | Average time (in hundredths of a second) spent on I/O, if the TIMED_STATISTICS parameter is true; 0 if false
LSTIOTIM | NUMBER | Time (in hundredths of a second) spent doing the last I/O, if the TIMED_STATISTICS parameter is true; 0 if false
MINIOTIM | NUMBER | Minimum time (in hundredths of a second) spent on a single I/O, if the TIMED_STATISTICS parameter is true; 0 if false
MAXIORTM | NUMBER | Maximum time (in hundredths of a second) spent doing a single read, if the TIMED_STATISTICS parameter is true; 0 if false
MAXIOWTM | NUMBER | Maximum time (in hundredths of a second) spent doing a single write, if the TIMED_STATISTICS parameter is true; 0 if false
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 229 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$THREAD

This view contains thread information from the control file.

Column | Datatype | Description
THREAD# | NUMBER | Thread number
STATUS | VARCHAR2(6) | Thread status (OPEN| CLOSED)
ENABLED | VARCHAR2(8) | Enabled status: DISABLED, (enabled) PRIVATE, or (enabled) PUBLIC
GROUPS | NUMBER | Number of log groups assigned to this thread
INSTANCE | VARCHAR2(16) | Instance name, if available
OPEN_TIME | DATE | Last time the thread was opened
CURRENT_GROUP# | NUMBER | Current log group
SEQUENCE# | NUMBER | Sequence number of current log
CHECKPOINT_CHANGE# | NUMBER | SCN at last checkpoint
CHECKPOINT_TIME | DATE | Time of last checkpoint
ENABLE_CHANGE# | NUMBER | SCN at which thread was enabled
ENABLE_TIME | DATE | Time of enable SCN
DISABLE_CHANGE# | NUMBER | SCN at which thread was disabled
DISABLE_TIME | DATE | Time of disable SCN
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 230 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TIMER

This view lists the elapsed time in hundredths of seconds. Time is measured since the beginning of the epoch, which is operating system specific, and wraps around to 0 again whenever the value overflows four bytes (roughly 497 days).

Column | Datatype | Description
HSECS | NUMBER | Elapsed time in hundredths of a second
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 231 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TIMEZONE_NAMES

This view lists valid time zone names.

Column | Datatype | Description
TZNAME | VARCHAR2(64) | Time zone region (for example, US/Pacific)
TZABBREV | VARCHAR2(64) | Corresponding daylight abbreviation (for example, PDT)
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 232 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TRANSACTION

This view lists the active transactions in the system.

Column | Datatype | Description
ADDR | RAW(4 | 8) | Address of the transaction state object
XIDUSN | NUMBER | Undo segment number
XIDSLOT | NUMBER | Slot number
XIDSQN | NUMBER | Sequence number
UBAFIL | NUMBER | Undo block address (UBA) filenum
UBABLK | NUMBER | UBA block number
UBASQN | NUMBER | UBA sequence number
UBAREC | NUMBER | UBA record number
STATUS | VARCHAR2(16) | Status
START_TIME | VARCHAR2(20) | Start time (wall clock)
START_SCNB | NUMBER | Start system change number (SCN) base
START_SCNW | NUMBER | Start SCN wrap
START_UEXT | NUMBER | Start extent number
START_UBAFIL | NUMBER | Start UBA file number
START_UBABLK | NUMBER | Start UBA block number
START_UBASQN | NUMBER | Start UBA sequence number
START_UBAREC | NUMBER | Start UBA record number
SES_ADDR | RAW(4 | 8) | User session object address
FLAG | NUMBER | Flag
SPACE | VARCHAR2(3) | YES if a space transaction
RECURSIVE | VARCHAR2(3) | YES if a recursive transaction
NOUNDO | VARCHAR2(3) | YES if a no undo transaction
PTX | VARCHAR 2(3) | YES if parallel transaction
NAME | VARCHAR2(256) | Name of a named transaction
PRV_XIDUSN | NUMBER | Previous transaction undo segment number
PRV_XIDSLT | NUMBER | Previous transaction slot number
PRV_XIDSQN | NUMBER | Previous transaction sequence number
PTX_XIDUSN | NUMBER | Rollback segment number of the parent XID
PTX_XIDSLT | NUMBER | Slot number of the parent XID
PTX_XIDSQN | NUMBER | Sequence number of the parent XID
DSCN-B | NUMBER | Dependent SCN base
DSCN-W | NUMBER | Dependent SCN wrap
USED_UBLK | NUMBER | Number of undo blocks used
USED_UREC | NUMBER | Number of undo records used
LOG_IO | NUMBER | Logical I/O
PHY_IO | NUMBER | Physical I/O
CR_GET | NUMBER | Consistent gets
CR_CHANGE | NUMBER | Consistent changes
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Dynamic Performance (V$) Views, 233 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TRANSACTION_ENQUEUE

V$TRANSACTION_ENQUEUE displays locks owned by transaction state objects.

Column Datatype Description

ADDR

RAW(4 | 8)

Address of lock state object

KADDR

RAW(4 | 8)

Address of lock

SID

NUMBER

Identifier for session holding or acquiring the lock

TYPE

VARCHAR2(2)

Type of lock. TX indicates transaction enqueue.

ID1

NUMBER

Lock identifier #1 (depends on type)

ID2

NUMBER

Lock identifier #2 (depends on type)

LMODE

NUMBER

Lock mode in which the session holds the lock:

  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)

REQUEST

NUMBER

Lock mode in which the process requests the lock:

  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)

CTIME

NUMBER

Time since current mode was granted

BLOCK

NUMBER

The lock is blocking another lock
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº ðº««««««««


Dynamic Performance (V$) Views, 234 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$TYPE_SIZE

This view lists the sizes of various database components for use in estimating data block capacity.

Column | Datatype | Description
COMPONENT | VARCHAR2(8) | Component name, such as segment or buffer header
TYPE | VARCHAR2(8) | Component type
DESCRIPTION | VARCHAR2(32) | Description of the component
TYPE_SIZE | NUMBER | Size of the component
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýðº««««««««


Dynamic Performance (V$) Views, 235 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$UNDOSTAT

V$UNDOSTAT displays a histogram of statistical data to show how well the system is working. The available statistics include undo space consumption, transaction concurrency, and length of queries executed in the instance. You can use this view to estimate the amount of undo space required for the current workload. Oracle uses this view to tune undo usage in the system. The view returns null values if the system is in manual undo management mode.

Each row in the view keeps statistics collected in the instance for a 10-minute interval. The rows are in descending order by the BEGIN_TIME column value. Each row belongs to the time interval marked by (BEGIN_TIME, END_TIME). Each column represents the data collected for the particular statistic in that time interval. The first row of the view contains statistics for the (partial) current time period. The view contains a total of 1008 rows, spanning a 7 day cycle.

Column | Datatype | Description
BEGIN_TIME | DATE | Identifies the beginning of the time interval
END_TIME | DATE | Identifies the end of the time interval
UNDOTSN | NUMBER | Represents the last active undo tablespace in the duration of time. The tablespace ID of the active undo tablespace is returned in this column. If more than one undo tablespace was active in that period, the active undo tablespace that was active at the end of the period is reported.
UNDOBLKS | NUMBER | Represents the total number of undo blocks consumed. You can use this column to obtain the consumption rate of undo blocks, and thereby estimate the size of the undo tablespace needed to handle the workload on your system.
TXNCOUNT | NUMBER | Identifies the total number of transactions executed within the period
MAXQUERYLEN | NUMBER | Identifies the length of the longest query (in number of seconds) executed in the instance during the period. You can use this statistic to estimate the proper setting of the UNDO_RETENTION initialization parameter.
MAXCONCURRENCY | NUMBER | Identifies the highest number of transactions executed concurrently within the period
UNXPSTEALCNT | NUMBER | Number of attempts to obtain undo space by stealing unexpired extents from other transactions
UNXPBLKRELCNT | NUMBER | Number of unexpired blocks removed from certain undo segments so they can be used by other transactions
UNXPBLKREUCNT | NUMBER | Number of unexpired undo blocks reused by transactions
EXPSTEALCNT | NUMBER | Number of attempts to steal expired undo blocks from other undo segments
EXPBLKRELCNT | NUMBER | Number of expired undo blocks stolen from other undo segments
EXPBLKREUCNT | NUMBER | Number of expired undo blocks reused within the same undo segments
SSOLDERRCNT | NUMBER | Identifies the number of times the error ORA-01555 occurred. You can use this statistic to decide whether or not the UNDO_RETENTION initialization parameter is set properly given the size of the undo tablespace. Increasing the value of UNDO_RETENTION can reduce the occurrence of this error.
NOSPACEERRCNT | NUMBER | Identifies the number of times space was requested in the undo tablespace and there was no free space available. That is, all of the space in the undo tablespace was in use by active transactions. The corrective action is to add more space to the undo tablespace.
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Dynamic Performance (V$) Views, 236 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$VERSION

This view lists version numbers of core library components in the Oracle database server. There is one row for each component.

Column | Datatype | Description
BANNER | VARCHAR2(64) | Component name and version number
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýý ðº ðº««««««««


Dynamic Performance (V$) Views, 237 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$VPD_POLICY

This view lists all the fine-grained security policies and predicates associated with the cursors currently in the library cache.

Column | Datatype | Description
ADDRESS | RAW(4 | 8) | Cursor address
PARADDR | RAW(4 | 8) | Parent cursor address
SQL_HASH | NUMBER | SQL hash number
CHILD_NUMBER | NUMBER | Cursor's child number under the parent
OBJECT_OWNER | VARCHAR2(30) | Owner of the object with policy
OBJECT_NAME | VARCHAR2(30) | Name of the object with policy
POLICY_GROUP | VARCHAR2(30) | Name of the policy group
POLICY | VARCHAR2(30) | Name of the policy
POLICY_FUNCTION_OWNER | VARCHAR2(30) | Owner of the policy function
PREDICATE | VARCHAR2(4096) | Predicate for the policy, truncated to 4096 bytes in length
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº««««««««


Dynamic Performance (V$) Views, 238 of 238

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

V$WAITSTAT

This view lists block contention statistics. This table is only updated when timed statistics are enabled.

Column | Datatype | Description
CLASS | VARCHAR2(18) | Class of the block
COUNT | NUMBER | Number of waits by this OPERATION for this CLASS of block
TIME | NUMBER | Sum of all wait times for all the waits by this OPERATION for this CLASS of block
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº««««««««


Oracle Corporation

Copyright Information
Copyright © 1994-2002 Oracle Corporation. All rights reserved.

Trademark Information
Oracle is a registered trademark of Oracle Corporation.


Documentation Feedback

We are constantly improving the content and delivery of our documentation. Tell us what you think. Comments sent to infodev_us@oracle.com will be delivered to the appropriate person. The address is for documentation comments only. Contact Oracle Support Services for software support.

 Oracle
Copyright © 2002 Oracle Corporation.
Home


What's New in Oracle9i Database Reference?

Part Number A96536-02
Go to Documentation Home
Home 		Go to Book List
Book List 		Go to Table of Contents
Contents 		Go to Index
Index 		Go to Master Index
Master Index 		Go to Feedback page
Feedback
Go to previous page Go to next page
View PDF

What's New in Oracle9i Database Reference?

This section describes new features of Oracle9i release 2 (9.2) and provides pointers to additional information. New features information from previous releases is also retained to help those users upgrading to the current release.

The following sections describe the new features in Oracle9i Database Reference:

  • Oracle9i Release 2 (9.2) New Features in Oracle9i Database Reference
  • Oracle9i Release 1 (9.0.1) New Features in Oracle9i Database Reference

Oracle9i Release 2 (9.2) New Features in Oracle9i Database Reference

The following initialization parameters are new to this release:

AUDIT_SYS_OPERATIONS | DG_BROKER_CONFIG_FILE n
DG_BROKER_START | FILE_MAPPING
FILESYSTEMIO_OPTIONS | LOG_PARALLELISM
OLAP_PAGE_POOL_SIZE | OPTIMIZER_DYNAMIC_SAMPLING
STATISTICS_LEVEL |
See Also:

Chapter 1, "Initialization Parameters" for more information about these initialization parameters

The following static data dictionary views are new to this release:

ALL_ Views | DBA_ Views | USER_ Views
ALL_APPLY | DBA_APPLY |
ALL_APPLY_CONFLICT_COLUMNS | DBA_APPLY_CONFLICT_COLUMNS |
ALL_APPLY_DML_HANDLERS | DBA_APPLY_DML_HANDLERS |
ALL_APPLY_ERROR | DBA_APPLY_ERROR |
 | DBA_APPLY_INSTANTIATED_OBJECTS |
ALL_APPLY_KEY_COLUMNS | DBA_APPLY_KEY_COLUMNS |
ALL_APPLY_PARAMETERS | DBA_APPLY_PARAMETERS |
ALL_APPLY_PROGRESS | DBA_APPLY_PROGRESS |
 | DBA_AQ_AGENT_PRIVS | USER_AQ_AGENT_PRIVS
 | DBA_AQ_AGENTS |
 | DBA_AW_PS | USER_AW_PS
 | DBA_AWS | USER_AWS
ALL_CAPTURE | DBA_CAPTURE |
ALL_CAPTURE_PARAMETERS | DBA_CAPTURE_PARAMETERS |
ALL_CAPTURE_PREPARED_DATABASE | DBA_CAPTURE_PREPARED_DATABASE |
ALL_CAPTURE_PREPARED_SCHEMAS | DBA_CAPTURE_PREPARED_SCHEMAS |
ALL_CAPTURE_PREPARED_TABLES | DBA_CAPTURE_PREPARED_TABLES |
ALL_CONS_OBJ_COLUMNS | DBA_CONS_OBJ_COLUMNS | USER_CONS_OBJ_COLUMNS
ALL_EVALUATION_CONTEXT_TABLES | DBA_EVALUATION_CONTEXT_TABLES | USER_EVALUATION_CONTEXT_TABLES
ALL_EVALUATION_CONTEXT_VARS | DBA_EVALUATION_CONTEXT_VARS | USER_EVALUATION_CONTEXT_VARS
ALL_EVALUATION_CONTEXTS | DBA_EVALUATION_CONTEXTS | USER_EVALUATION_CONTEXTS
ALL_JAVA_ARGUMENTS | DBA_JAVA_ARGUMENTS | USER_JAVA_ARGUMENTS
ALL_JAVA_CLASSES | DBA_JAVA_CLASSES | USER_JAVA_CLASSES
ALL_JAVA_DERIVATIONS | DBA_JAVA_DERIVATIONS | USER_JAVA_DERIVATIONS
ALL_JAVA_FIELDS | DBA_JAVA_FIELDS | USER_JAVA_FIELDS
ALL_JAVA_IMPLEMENTS | DBA_JAVA_IMPLEMENTS | USER_JAVA_IMPLEMENTS
ALL_JAVA_INNERS | DBA_JAVA_INNERS | USER_JAVA_INNERS
ALL_JAVA_LAYOUTS | DBA_JAVA_LAYOUTS | USER_JAVA_LAYOUTS
ALL_JAVA_METHODS | DBA_JAVA_METHODS | USER_JAVA_METHODS
ALL_JAVA_NCOMPS | DBA_JAVA_NCOMPS | USER_JAVA_NCOMPS
ALL_JAVA_RESOLVERS | DBA_JAVA_RESOLVERS | USER_JAVA_RESOLVERS
ALL_JAVA_THROWS | DBA_JAVA_THROWS | USER_JAVA_THROWS
ALL_LOB_TEMPLATES | DBA_LOB_TEMPLATES | USER_LOB_TEMPLATES
 | DBA_LOGSTDBY_EVENTS |
 | DBA_LOGSTDBY_LOG |
 | DBA_LOGSTDBY_NOT_UNIQUE |
 | DBA_LOGSTDBY_PARAMETERS |
 | DBA_LOGSTDBY_PROGRESS |
 | DBA_LOGSTDBY_SKIP |
 | DBA_LOGSTDBY_SKIP_TRANSACTION |
 | DBA_LOGSTDBY_UNSUPPORTED |
ALL_OBJ_COLATTRS | DBA_OBJ_COLATTRS | USER_OBJ_COLATTRS
ALL_PROPAGATION | DBA_PROPAGATION |
ALL_PUBLISHED_COLUMNS | DBA_PUBLISHED_COLUMNS | USER_PUBLISHED_COLUMNS
 | DBA_REGISTRY | USER_REGISTRY
ALL_REGISTRY_BANNERS |  |
 | DBA_REGISTRY_HIERARCHY |
ALL_RULE_SET_RULES | DBA_RULE_SET_RULES | USER_RULE_SET_RULES
ALL_RULE_SETS | DBA_RULE_SETS | USER_RULE_SETS
ALL_RULES | DBA_RULES | USER_RULES
ALL_STREAMS_GLOBAL_RULES | DBA_STREAMS_GLOBAL_RULES |
ALL_STREAMS_SCHEMA_RULES | DBA_STREAMS_SCHEMA_RULES |
ALL_STREAMS_TABLE_RULES | DBA_STREAMS_TABLE_RULES |
ALL_SUBPARTITION_TEMPLATES | DBA_SUBPARTITION_TEMPLATES | USER_SUBPARTITION_TEMPLATES
ALL_XML_SCHEMAS | DBA_XML_SCHEMAS | USER_XML_SCHEMAS
ALL_XML_TAB_COLS | DBA_XML_TAB_COLS | USER_XML_TAB_COLS
ALL_XML_TABLES | DBA_XML_TABLES | USER_XML_TABLES
ALL_XML_VIEW_COLS | DBA_XML_VIEW_COLS | USER_XML_VIEW_COLS
ALL_XML_VIEWS | DBA_XML_VIEWS | USER_XML_VIEWS
See Also:

Chapter 2, "Static Data Dictionary Views" for more information about these static data dictionary views

The following dynamic performance views are new to this release:

GV$AW_CALC | V$AW_CALC
GV$AW_OLAP | V$AW_OLAP
GV$AW_SESSION_INFO | V$AW_SESSION_INFO
GV$BACKUP_SPFILE | V$BACKUP_SPFILE
GV$DATABASE_BLOCK_CORRUPTION | V$DATABASE_BLOCK_CORRUPTION
GV$DATABASE_INCARNATION | V$DATABASE_INCARNATION
GV$DATAGUARD_STATUS | V$DATAGUARD_STATUS
GV$LIBRARY_CACHE_MEMORY | V$LIBRARY_CACHE_MEMORY
GV$LOGMNR_STATS | V$LOGMNR_STATS
GV$MAP_COMP_LIST | V$MAP_COMP_LIST
GV$MAP_ELEMENT | V$MAP_ELEMENT
GV$MAP_EXT_ELEMENT | V$MAP_EXT_ELEMENT
GV$MAP_FILE | V$MAP_FILE
GV$MAP_FILE_EXTENT | V$MAP_FILE_EXTENT
GV$MAP_FILE_IO_STACK | V$MAP_FILE_IO_STACK
GV$MAP_LIBRARY | V$MAP_LIBRARY
GV$MAP_SUBELEMENT | V$MAP_SUBELEMENT
GV$MTTR_TARGET_ADVICE | V$MTTR_TARGET_ADVICE
GV$PGA_TARGET_ADVICE | V$PGA_TARGET_ADVICE
GV$PGA_TARGET_ADVICE_HISTOGRAM | V$PGA_TARGET_ADVICE_HISTOGRAM
GV$SEGMENT_STATISTICS | V$SEGMENT_STATISTICS
GV$SEGSTAT | V$SEGSTAT
GV$SEGSTAT_NAME | V$SEGSTAT_NAME
GV$SGA_CURRENT_RESIZE_OPS | V$SGA_CURRENT_RESIZE_OPS
GV$SGA_DYNAMIC_COMPONENTS | V$SGA_DYNAMIC_COMPONENTS
GV$SGA_DYNAMIC_FREE_MEMORY | V$SGA_DYNAMIC_FREE_MEMORY
GV$SGA_RESIZE_OPS | V$SGA_RESIZE_OPS
GV$SHARED_POOL_ADVICE | V$SHARED_POOL_ADVICE
GV$SQL_PLAN_STATISTICS | V$SQL_PLAN_STATISTICS
GV$SQL_PLAN_STATISTICS_ALL | V$SQL_PLAN_STATISTICS_ALL
GV$SQL_WORKAREA_HISTOGRAM | V$SQL_WORKAREA_HISTOGRAM
GV$STATISTICS_LEVEL | V$STATISTICS_LEVEL
GV$STREAMS_APPLY_COORDINATOR | V$STREAMS_APPLY_COORDINATOR
GV$STREAMS_APPLY_READER | V$STREAMS_APPLY_READER
GV$STREAMS_APPLY_SERVER | V$STREAMS_APPLY_SERVER
GV$STREAMS_CAPTURE | V$STREAMS_CAPTURE
GV$TEMPSEG_USAGE | V$TEMPSEG_USAGE
See Also:

Chapter 3, "Dynamic Performance (V$) Views" for more information about these dynamic performance views

The following static data dictionary views have new columns in this release:

Static Data Dictionary View | New Columns
ALL_IND_SUBPARTITIONS | HIGH_VALUE HIGH_VALUE_LENGTH
ALL_LOBS | RETENTION FREEPOOLS
ALL_MVIEWS | UNKNOWN_PREBUILT UNKNOWN_PLSQL_FUNC UNKNOWN_EXTERNAL_TABLE UNKNOWN_CONSIDER_FRESH UNKNOWN_IMPORT
ALL_NESTED_TABLES | ELEMENT_SUBSTITUTABLE
ALL_PART_TABLES | DEF_COMPRESSION
ALL_QUEUE_TABLES | SECURE
ALL_TAB_PARTITIONS | COMPRESSION
ALL_TAB_SUBPARTITIONS | HIGH_VALUE HIGH_VALUE_LENGTH COMPRESSION
ALL_VARRAYS | ELEMENT_SUBSTITUTABLE
DBA_FGA_AUDIT_TRAIL | USERHOST CLIENT_ID EXT_NAME
DBA_IND_SUBPARTITIONS | HIGH_VALUE HIGH_VALUE_LENGTH
DBA_LOBS | RETENTION FREEPOOLS
DBA_MVIEWS | UNKNOWN_PREBUILT UNKNOWN_PLSQL_FUNC UNKNOWN_EXTERNAL_TABLE UNKNOWN_CONSIDER_FRESH UNKNOWN_IMPORT
DBA_NESTED_TABLES | ELEMENT_SUBSTITUTABLE
DBA_PART_TABLES | DEF_COMPRESSION
DBA_QUEUE_TABLES | SECURE
DBA_TAB_PARTITIONS | COMPRESSION
DBA_TAB_SUBPARTITIONS | HIGH_VALUE HIGH_VALUE_LENGTH COMPRESSION
DBA_TABLESPACES | FORCE_LOGGING
DBA_VARRAYS | ELEMENT_SUBSTITUTABLE
USER_IND_SUBPARTITIONS | HIGH_VALUE HIGH_VALUE_LENGTH
USER_LOBS | RETENTION FREEPOOLS
USER_MVIEWS | UNKNOWN_PREBUILT UNKNOWN_PLSQL_FUNC UNKNOWN_EXTERNAL_TABLE UNKNOWN_CONSIDER_FRESH UNKNOWN_IMPORT
USER_NESTED_TABLES | ELEMENT_SUBSTITUTABLE
USER_PART_TABLES | DEF_COMPRESSION
USER_QUEUE_TABLES | SECURE
USER_TAB_PARTITIONS | COMPRESSION
USER_TAB_SUBPARTITIONS | HIGH_VALUE HIGH_VALUE_LENGTH COMPRESSION
USER_TABLESPACES | FORCE_LOGGING
USER_VARRAYS | ELEMENT_SUBSTITUTABLE
See Also:

Chapter 2, "Static Data Dictionary Views" for more information about the new columns in these static data dictionary views

The following dynamic performance views have new columns in this release:

Dynamic Performance View | New Columns
GV$ARCHIVE_DEST and V$ARCHIVE_DEST | DEST_NAME NET_TIMEOUT REGISTER REMOTE_TEMPLATE
GV$ARCHIVE_DEST_STATUS and V$ARCHIVE_DEST_STATUS | DEST_NAME PROTECTION_MODE SRL
GV$ARCHIVED_LOG and V$ARCHIVED_LOG | ACTIVATION#
GV$BACKUP_CORRUPTION and V$BACKUP_CORRUPTION | CORRUPTION_TYPE
GV$COPY_CORRUPTION and V$COPY_CORRUPTION | CORRUPTION_TYPE
GV$DATABASE and V$DATABASE | PROTECTION_MODE PROTECTION_LEVEL DATAGUARD_BROKER GUARD_STATUS SUPPLEMENTAL_LOG_DATA_MIN SUPPLEMENTAL_LOG_DATA_PK SUPPLEMENTAL_LOG_DATA_UI FORCE_LOGGING
GV$DATAFILE_COPY and V$DATAFILE_COPY | SCANNED
GV$DB_CACHE_ADVICE and V$DB_CACHE_ADVICE | SIZE_FACTOR
GV$DB_OBJECT_CACHE and V$DB_OBJECT_CACHE | CHILD_LATCH
GV$FILE_CACHE_TRANSFER and V$FILE_CACHE_TRANSFER | CR_TRANSFERS CUR_TRANSFERS
GV$LATCH_CHILDREN and V$LATCH_CHILDREN | MISSES_WAITLIST SLEEPS_WAITLIST WAIT_TIME_WAITLIST
GV$LATCH_PARENT and V$LATCH_PARENT | MISSES_WAITLIST SLEEPS_WAITLIST WAIT_TIME_WAITLIST
GV$LOGMNR_CALLBACK and V$LOGMNR_CALLBACK | STATE TYPE CAPABILITY
GV$LOGMNR_CONTENTS and V$LOGMNR_CONTENTS | PXIDUSN PXIDSLT PXIDSQN
GV$LOGMNR_REGION and V$LOGMNR_REGION | MEMSTATE STATE
GV$LOGSTDBY and V$LOGSTDBY | HIGH_SCN
GV$PGASTAT and V$PGASTAT | UNIT
GV$PROCESS and V$PROCESS | PGA_FREEABLE_MEM
GV$ROLLSTAT and V$ROLLSTAT | LATCH
GV$SQL and V$SQL | FETCHES CHILD_LATCH
GV$SQL_PLAN and V$SQL_PLAN | SEARCH_COLUMNS ACCESS_PREDICATES FILTER_PREDICATES
GV$SQL_SHARED_CURSOR and V$SQL_SHARED_CURSOR | NO_TRIGGER_MISMATCH FLASHBACK_CURSOR
GV$SQL_WORKAREA and V$SQL_WORKAREA | MAX_TEMPSEG_SIZE LAST_TEMPSEG_SIZE
GV$SQL_WORKAREA_ACTIVE and V$SQL_WORKAREA_ACTIVE | TEMPSEG_SIZE TABLESPACE SEGRFNO# SEGBLK#
GV$SQLAREA and V$SQLAREA | FETCHES CHILD_LATCH
See Also:

Chapter 3, "Dynamic Performance (V$) Views" for more information about the new columns in these dynamic performance views

Oracle9i Release 1 (9.0.1) New Features in Oracle9i Database Reference

The following initialization parameters are new to this release:

ARCHIVE_LAG_TARGET | CIRCUITS
CLUSTER_INTERCONNECTS | CLUSTER_DATABASE
CLUSTER_DATABASE_INSTANCES | DB_n K_CACHE_SIZE
DB_CACHE_ADVICE | DB_CACHE_SIZE
DB_CREATE_FILE_DEST | DB_CREATE_ONLINE_LOG_DEST_n
DB_KEEP_CACHE_SIZE | DB_RECYCLE_CACHE_SIZE
DISPATCHERS | DRS_START
FAL_CLIENT | FAL_SERVER
FAST_START_MTTR_TARGET | GLOBAL_CONTEXT_POOL_SIZE
LOG_ARCHIVE_DEST_n (n = 6, 7, ... 10) | LOG_ARCHIVE_DEST_STATE_n (n = 6, 7, ... 10)
LOGMNR_MAX_PERSISTENT_SESSIONS | MAX_DISPATCHERS
MAX_SHARED_SERVERS | NLS_LENGTH_SEMANTICS
NLS_NCHAR_CONV_EXCP | NLS_TIMESTAMP_FORMAT
NLS_TIMESTAMP_TZ_FORMAT | PGA_AGGREGATE_TARGET
PLSQL_COMPILER_FLAGS | PLSQL_NATIVE_C_COMPILER
PLSQL_NATIVE_LIBRARY_DIR | PLSQL_NATIVE_LIBRARY_SUBDIR_COUNT
PLSQL_NATIVE_LINKER | PLSQL_NATIVE_MAKE_FILE_NAME
PLSQL_NATIVE_MAKE_UTILITY | REMOTE_ARCHIVE_ENABLE
REMOTE_LISTENER | SGA_MAX_SIZE
SHARED_SERVER_SESSIONS | SHARED_SERVERS
SPFILE | STANDBY_FILE_MANAGEMENT
STANDBY_PRESERVES_NAMES | trace_enabled
UNDO_MANAGEMENT | UNDO_RETENTION
UNDO_SUPPRESS_ERRORS | UNDO_TABLESPACE
WORKAREA_SIZE_POLICY |
See Also:

Chapter 1, "Initialization Parameters" for more information about these initialization parameters

The following static data dictionary views are new to this release:

ALL_ Views | DBA_ Views | USER_ Views
 | DBA_APPLICATION_ROLES | USER_APPLICATION_ROLES
 | DBA_ATTRIBUTE_TRANSFORMATIONS | USER_ATTRIBUTE_TRANSFORMATIONS
ALL_AUDIT_POLICIES | DBA_AUDIT_POLICIES | USER_AUDIT_POLICIES
ALL_BASE_TABLE_MVIEWS | DBA_BASE_TABLE_MVIEWS | USER_BASE_TABLE_MVIEWS
ALL_EXTERNAL_LOCATIONS | DBA_EXTERNAL_LOCATIONS | USER_EXTERNAL_LOCATIONS
ALL_EXTERNAL_TABLES | DBA_EXTERNAL_TABLES | USER_EXTERNAL_TABLES
 | DBA_FGA_AUDIT_TRAIL |
 | DBA_GLOBAL_CONTEXT |
ALL_INDEXTYPE_COMMENTS | DBA_INDEXTYPE_COMMENTS | USER_INDEXTYPE_COMMENTS
ALL_JOIN_IND_COLUMNS | DBA_JOIN_IND_COLUMNS | USER_JOIN_IND_COLUMNS
ALL_LOG_GROUP_COLUMNS | DBA_LOG_GROUP_COLUMNS | USER_LOG_GROUP_COLUMNS
ALL_LOG_GROUPS | DBA_LOG_GROUPS | USER_LOG_GROUPS
 | DBA_MVIEW_LOG_FILTER_COLS |
ALL_MVIEW_LOGS | DBA_MVIEW_LOGS | USER_MVIEW_LOGS
ALL_MVIEW_REFRESH_TIMES | DBA_MVIEW_REFRESH_TIMES | USER_MVIEW_REFRESH_TIMES
ALL_OPERATOR_COMMENTS | DBA_OPERATOR_COMMENTS | USER_OPERATOR_COMMENTS
ALL_PENDING_CONV_TABLES | DBA_PENDING_CONV_TABLES | USER_PENDING_CONV_TABLES
ALL_POLICY_CONTEXTS | DBA_POLICY_CONTEXTS | USER_POLICY_CONTEXTS
ALL_POLICY_GROUPS | DBA_POLICY_GROUPS | USER_POLICY_GROUPS
ALL_PROCEDURES | DBA_PROCEDURES | USER_PROCEDURES
 | DBA_PROXIES | USER_PROXIES
 | DBA_REGISTERED_MVIEW_GROUPS |
ALL_REGISTERED_MVIEWS | DBA_REGISTERED_MVIEWS | USER_REGISTERED_MVIEWS
 | DBA_REPCAT_EXCEPTIONS |
 | DBA_REPEXTENSIONS |
 | DBA_REPSITES_NEW |
 | DBA_RESUMABLE | USER_RESUMABLE
ALL_SECONDARY_OBJECTS | DBA_SECONDARY_OBJECTS | USER_SECONDARY_OBJECTS
ALL_SOURCE_TAB_COLUMNS | DBA_SOURCE_TAB_COLUMNS | USER_SOURCE_TAB_COLUMNS
ALL_SOURCE_TABLES | DBA_SOURCE_TABLES | USER_SOURCE_TABLES
ALL_SQLJ_TYPE_ATTRS | DBA_SQLJ_TYPE_ATTRS | USER_SQLJ_TYPE_ATTRS
ALL_SQLJ_TYPE_METHODS | DBA_SQLJ_TYPE_METHODS | USER_SQLJ_TYPE_METHODS
ALL_SQLJ_TYPES | DBA_SQLJ_TYPES | USER_SQLJ_TYPES
ALL_STORED_SETTINGS | DBA_STORED_SETTINGS | USER_STORED_SETTINGS
ALL_SUBSCRIBED_COLUMNS | DBA_SUBSCRIBED_COLUMNS | USER_SUBSCRIBED_COLUMNS
ALL_SUBSCRIBED_TABLES | DBA_SUBSCRIBED_TABLES | USER_SUBSCRIBED_TABLES
ALL_SUBSCRIPTIONS | DBA_SUBSCRIPTIONS | USER_SUBSCRIPTIONS
ALL_TAB_COLS | DBA_TAB_COLS | USER_TAB_COLS
 | DBA_TEMPLATE_REFGROUPS |
 | DBA_TEMPLATE_TARGETS |
 | DBA_TRANSFORMATIONS | USER_TRANSFORMATIONS
ALL_TYPE_VERSIONS | DBA_TYPE_VERSIONS | USER_TYPE_VERSIONS
 | DBA_UNDO_EXTENTS |
See Also:

Chapter 2, "Static Data Dictionary Views" for more information about these static data dictionary views

The following dynamic performance views are new to this release:

GV$ACTIVE_SESS_POOL_MTH | V$ACTIVE_SESS_POOL_MTH
GV$ARCHIVE_DEST_STATUS | V$ARCHIVE_DEST_STATUS
GV$ARCHIVE_GAP | V$ARCHIVE_GAP
GV$CACHE_TRANSFER | V$CACHE_TRANSFER
GV$CLASS_CACHE_TRANSFER | V$CLASS_CACHE_TRANSFER
GV$CR_BLOCK_SERVER | V$CR_BLOCK_SERVER
GV$ENQUEUE_STAT | V$ENQUEUE_STAT
GV$FILE_CACHE_TRANSFER | V$FILE_CACHE_TRANSFER
GV$GC_ELEMENT | V$GC_ELEMENT
GV$GC_ELEMENTS_WITH_COLLISIONS | V$GC_ELEMENTS_WITH_COLLISIONS
GV$GCSHVMASTER_INFO | V$GCSHVMASTER_INFO
GV$GCSPFMASTER_INFO | V$GCSPFMASTER_INFO
GV$GES_BLOCKING_ENQUEUE | V$GES_BLOCKING_ENQUEUE
GV$GES_CONVERT_LOCAL | V$GES_CONVERT_LOCAL
GV$GES_CONVERT_REMOTE | V$GES_CONVERT_REMOTE
GV$GES_ENQUEUE | V$GES_ENQUEUE
GV$GES_LATCH | V$GES_LATCH
GV$GES_RESOURCE | V$GES_RESOURCE
GV$GES_STATISTICS | V$GES_STATISTICS
GV$GES_TRAFFIC_CONTROLLER | V$GES_TRAFFIC_CONTROLLER
GV$GLOBALCONTEXT | V$GLOBALCONTEXT
GV$HVMASTER_INFO | V$HVMASTER_INFO
GV$LOGMNR_CALLBACK | V$LOGMNR_CALLBACK
GV$LOGMNR_LOGFILE | V$LOGMNR_LOGFILE
GV$LOGMNR_PROCESS | V$LOGMNR_PROCESS
GV$LOGMNR_REGION | V$LOGMNR_REGION
GV$LOGMNR_SESSION | V$LOGMNR_SESSION
GV$LOGMNR_TRANSACTION | V$LOGMNR_TRANSACTION
GV$LOGSTDBY | V$LOGSTDBY
GV$LOGSTDBY_STATS | V$LOGSTDBY_STATS
GV$MANAGED_STANDBY | V$MANAGED_STANDBY
GV$MVREFRESH | V$MVREFRESH
 | V$OBJECT_USAGE
GV$PGASTAT | V$PGASTAT
GV$QUEUEING_MTH | V$QUEUEING_MTH
GV$REPLPROP | V$REPLPROP
GV$REPLQUEUE | V$REPLQUEUE
GV$RESUMABLE | V$RESUMABLE
GV$RMAN_CONFIGURATION | V$RMAN_CONFIGURATION
GV$SHARED_SERVER_MONITOR | V$SHARED_SERVER_MONITOR
GV$SPPARAMETER | V$SPPARAMETER
GV$SQL_PLAN | V$SQL_PLAN
GV$SQL_REDIRECTION | V$SQL_REDIRECTION
GV$SQL_WORKAREA | V$SQL_WORKAREA
GV$SQL_WORKAREA_ACTIVE | V$SQL_WORKAREA_ACTIVE
GV$STANDBY_LOG | V$STANDBY_LOG
GV$TEMP_CACHE_TRANSFER | V$TEMP_CACHE_TRANSFER
GV$TIMEZONE_NAMES | V$TIMEZONE_NAMES
GV$UNDOSTAT | V$UNDOSTAT
GV$VPD_POLICY | V$VPD_POLICY
See Also:

Chapter 3, "Dynamic Performance (V$) Views" for more information about these dynamic performance views

The following static data dictionary views have new columns in this release:

Static Data Dictionary View | New Columns
ALL_ALL_TABLES | DEPENDENCIES
ALL_ARGUMENTS | CHAR_LENGTH CHAR_USED
ALL_ASSOCIATIONS | INTERFACE_VERSION
ALL_CLUSTERS | DEPENDENCIES
ALL_CONSTRAINTS | INDEX_OWNER INDEX_NAME INVALID VIEW_RELATED
ALL_DIMENSIONS | COMPILE_STATE
ALL_IND_COLUMNS | CHAR_LENGTH
ALL_IND_PARTITIONS | DOMIDX_OPSTATUS PARAMETERS
ALL_INDEXES | JOIN_INDEX
ALL_INDEXTYPE_OPERATORS | OPERATOR_SCHEMA
ALL_INDEXTYPES | INTERFACE_VERSION PARTITIONING
ALL_MVIEWS | USE_NO_INDEX
ALL_OBJECT_TABLES | DEPENDENCIES
ALL_OPBINDINGS | PROPERTY
ALL_OUTLINES | SIGNATURE
ALL_PART_INDEXES | DEF_PARAMETERS
ALL_POLICIES | POLICY_GROUP STATIC_POLICY
ALL_REPCAT_TEMPLATE_OBJECTS | DDL_NUM
ALL_REPCAT_TEMPLATE_SITES | INSTANTIATION_DATE
ALL_REPCOLUMN | CTYPE_TOID CTYPE_OWNER CTYPE_HASHCODE CTYPE_MOD TOP CHAR_LENGTH CHAR_USED
ALL_REPDDL | DDL_NUM
ALL_REPFLAVOR_COLUMNS | TYPE_TOID TYPE_OWNER TYPE_HASHCODE TYPE_MOD TOP
ALL_REPOBJECT | NESTED_TABLE
ALL_SUMDELTA | SEQUENCE
ALL_TAB_COL_STATISTICS | OWNER
ALL_TAB_COLUMNS | CHAR_LENGTH CHAR_USED V80_FMT_IMAGE DATA_UPGRADED
ALL_TAB_PRIVS | HIERARCHY
ALL_TAB_PRIVS_MADE | HIERARCHY
ALL_TAB_PRIVS_RECD | HIERARCHY
ALL_TABLES | DEPENDENCIES
ALL_TYPE_ATTRS | INHERITED
ALL_TYPE_METHODS | FINAL INSTANTIABLE OVERRIDING INHERITED
ALL_TYPES | FINAL INSTANTIABLE SUPERTYPE_OWNER SUPERTYPE_NAME LOCAL_ATTRIBUTES LOCAL_METHODS TYPEID
ALL_USTATS | PARTITION_NAME
ALL_VIEWS | SUPERVIEW_NAME
DBA_ALL_TABLES | DEPENDENCIES
DBA_ASSOCIATIONS | INTERFACE_VERSION
DBA_AUDIT_EXISTS | CLIENT_ID SESSION_CPU
DBA_AUDIT_OBJECT | CLIENT_ID SESSION_CPU
DBA_AUDIT_SESSION | CLIENT_ID SESSION_CPU
DBA_AUDIT_STATEMENT | CLIENT_ID SESSION_CPU
DBA_AUDIT_TRAIL | CLIENT_ID SESSION_CPU
DBA_CLUSTERS | DEPENDENCIES
DBA_CONSTRAINTS | INDEX_OWNER INDEX_NAME INVALID VIEW_RELATED
DBA_CONTEXT | TYPE
DBA_DIMENSIONS | COMPILE_STATE
DBA_IND_COLUMNS | CHAR_LENGTH
DBA_IND_PARTITIONS | DOMIDX_OPSTATUS PARAMETERS
DBA_INDEXES | JOIN_INDEX
DBA_INDEXTYPE_OPERATORS | OPERATOR_SCHEMA
DBA_INDEXTYPES | INTERFACE_VERSION PARTITIONING
DBA_MVIEWS | USE_NO_INDEX
DBA_OBJECT_TABLES | DEPENDENCIES
DBA_OPBINDINGS | PROPERTY
DBA_OUTLINES | SIGNATURE
DBA_PART_INDEXES | DEF_PARAMETERS
DBA_POLICIES | POLICY_GROUP STATIC_POLICY
DBA_REPCAT_TEMPLATE_OBJECTS | DDL_NUM
DBA_REPCAT_TEMPLATE_SITES | INSTANTIATION_DATE
DBA_REPCOLUMN | CTYPE_TOID CTYPE_OWNER CTYPE_HASHCODE CTYPE_MOD TOP CHAR_LENGTH CHAR_USED
DBA_REPDDL | DDL_NUM
DBA_REPFLAVOR_COLUMNS | TYPE_TOID TYPE_OWNER TYPE_HASHCODE TYPE_MOD TOP
DBA_REPOBJECT | NESTED_TABLE
DBA_RSRC_PLAN_DIRECTIVES | ACTIVE_SESS_POOL_P1 QUEUEING_P1 SWITCH_GROUP SWITCH_TIME SWITCH_ESTIMATE MAX_EST_EXEC_TIME UNDO_POOL
DBA_RSRC_PLANS | ACTIVE_SESS_POOL_MTH QUEUEING_MTH
DBA_TAB_COL_STATISTICS | OWNER
DBA_TAB_COLUMNS | CHAR_LENGTH CHAR_USED V80_FMT_IMAGE DATA_UPGRADED
DBA_TAB_PRIVS | HIERARCHY
DBA_TABLES | DEPENDENCIES
DBA_TABLESPACES | BLOCK_SIZE SEGMENT_SPACE_MANAGEMENT
DBA_TYPE_ATTRS | INHERITED
DBA_TYPE_METHODS | FINAL INSTANTIABLE OVERRIDING INHERITED
DBA_TYPES | FINAL INSTANTIABLE SUPERTYPE_OWNER SUPERTYPE_NAME LOCAL_ATTRIBUTES LOCAL_METHODS TYPEID
DBA_USTATS | PARTITION_NAME
DBA_VIEWS | SUPERVIEW_NAME
USER_ALL_TABLES | DEPENDENCIES
USER_ARGUMENTS | CHAR_LENGTH CHAR_USED
USER_ASSOCIATIONS | INTERFACE_VERSION
USER_AUDIT_OBJECT | CLIENT_ID SESSION_CPU
USER_AUDIT_SESSION | CLIENT_ID SESSION_CPU
USER_AUDIT_STATEMENT | CLIENT_ID SESSION_CPU
USER_AUDIT_TRAIL | CLIENT_ID SESSION_CPU
USER_CLUSTERS | DEPENDENCIES
USER_CONSTRAINTS | INDEX_OWNER INDEX_NAME INVALID VIEW_RELATED
USER_DIMENSIONS | COMPILE_STATE
USER_IND_COLUMNS | CHAR_LENGTH
USER_IND_PARTITIONS | DOMIDX_OPSTATUS PARAMETERS
USER_INDEXES | JOIN_INDEX
USER_INDEXTYPE_OPERATORS | OPERATOR_SCHEMA
USER_INDEXTYPES | INTERFACE_VERSION PARTITIONING
USER_MVIEWS | USE_NO_INDEX
USER_OBJECT_TABLES | DEPENDENCIES
USER_OPBINDINGS | PROPERTY
USER_OUTLINES | SIGNATURE
USER_PART_INDEXES | DEF_PARAMETERS
USER_POLICIES | POLICY_GROUP STATIC_POLICY
USER_REPCAT_TEMPLATE_OBJECTS | DDL_NUM
USER_REPCAT_TEMPLATE_SITES | INSTANTIATION_DATE
USER_REPCOLUMN | CTYPE_TOID CTYPE_OWNER CTYPE_HASHCODE CTYPE_MOD TOP CHAR_LENGTH CHAR_USED
USER_REPDDL | DDL_NUM
USER_REPFLAVOR_COLUMNS | TYPE_TOID TYPE_OWNER TYPE_HASHCODE TYPE_MOD TOP
USER_REPOBJECT | NESTED_TABLE
USER_REPPARAMETER_COLUMN | SNAME
USER_TAB_COLUMNS | CHAR_LENGTH CHAR_USED DATA_UPGRADED V80_FMT_IMAGE
USER_TAB_PRIVS | HIERARCHY
USER_TAB_PRIVS_MADE | HIERARCHY
USER_TAB_PRIVS_RECD | HIERARCHY
USER_TABLES | DEPENDENCIES
USER_TABLESPACES | BLOCK_SIZE SEGMENT_SPACE_MANAGEMENT
USER_TYPE_ATTRS | INHERITED
USER_TYPE_METHODS | FINAL INSTANTIABLE OVERRIDING INHERITED
USER_TYPES | FINAL INSTANTIABLE SUPERTYPE_OWNER SUPERTYPE_NAME LOCAL_ATTRIBUTES LOCAL_METHODS TYPEID
USER_USTATS | PARTITION_NAME
USER_VIEWS | SUPERVIEW_NAME
See Also:

Chapter 2, "Static Data Dictionary Views" for more information about the new columns in these static data dictionary views

The following dynamic performance views have new columns in this release:

Dynamic Performance View | New Columns
GV$ARCHIVE and V$ARCHIVE | ISCURRENT
GV$ARCHIVE_DEST and V$ARCHIVE_DEST | ARCHIVER SCHEDULE LOG_SEQUENCE DELAY_MINS PROCESS MANIFEST FAILURE_COUNT MAX_FAILURE ALTERNATE DEPENDENCY REGISTER QUOTA_SIZE QUOTA_USED MOUNTID TRANSMIT_MODE AFFIRM TYPE
GV$ARCHIVED_LOG and V$ARCHIVED_LOG | DEST_ID APPLIED STATUS DICTIONARY_BEGIN DICTIONARY_END END_OF_REDO BACKUP_COUNT ARCHIVAL_THREAD#
GV$BACKUP_SET and V$BACKUP_SET | KEEP KEEP_UNTIL KEEP_OPTIONS
GV$BUFFER_POOL and V$BUFFER_POOL | BLOCK_SIZE RESIZE_STATE CURRENT_SIZE TARGET_SIZE TARGET_BUFFERS PREV_SIZE PREV_BUFFERS
GV$BUFFER_POOL_STATISTICS and V$BUFFER_POOL_STATISTICS | BLOCK_SIZE
GV$CIRCUIT and V$CIRCUIT | PCIRCUIT
GV$DATABASE and V$DATABASE | STANDBY_MODE REMOTE_ARCHIVE ACTIVATION# DATABASE_ROLE ARCHIVELOG_CHANGE# SWITCHOVER_STATUS
GV$DATAFILE and V$DATAFILE | BLOCK1_OFFSET AUX_NAME
GV$DATAFILE_COPY and V$DATAFILE_COPY | STATUS KEEP KEEP_UNTIL KEEP_OPTIONS
GV$DB_CACHE_ADVICE and V$DB_CACHE_ADVICE | BLOCK_SIZE ADVICE_STATUS
GV$DELETED_OBJECT and V$DELETED_OBJECT | OBJECT_DATA
GV$FILESTAT and V$FILESTAT | SINGLEBLKRDS SINGLEBLKRDTIM
GV$INSTANCE and V$INSTANCE | ACTIVE_STATE
GV$INSTANCE_RECOVERY and V$INSTANCE_RECOVERY | TARGET_MTTR ESTIMATED_MTTR CKPT_BLOCK_WRITES
GV$LATCH and V$LATCH | WAIT_TIME
GV$LATCH_CHILDREN and V$LATCH_CHILDREN | WAIT_TIME
GV$LATCH_MISSES and V$LATCH_MISSES | LOCATION
GV$LATCH_PARENT and V$LATCH_PARENT | WAIT_TIME
GV$LOGFILE and V$LOGFILE | TYPE
GV$LOGMNR_CONTENTS and V$LOGMNR_CONTENTS | CSCN COMMIT_TIMESTAMP TX_NAME OPERATION_CODE SEQUENCE# REDO_VALUE UNDO_VALUE SQL_COLUMN_TYPE SQL_COLUMN_NAME REDO_LENGTH REDO_OFFSET UNDO_LENGTH UNDO_OFFSET
GV$LOGMNR_LOGS and V$LOGMNR_LOGS | DICTIONARY_BEGIN DICTIONARY_END
GV$MLS_PARAMETERS and V$MLS_PARAMETERS | UPDATE_COMMENT
GV$PARAMETER and V$PARAMETER | UPDATE_COMMENT
GV$PARAMETER2 and V$PARAMETER2 | ORDINAL UPDATE_COMMENT
GV$PROCESS and V$PROCESS | PGA_USED_MEM PGA_ALLOC_MEM PGA_MAX_MEM
GV$PROXY_DATAFILE and V$PROXY_DATAFILE | KEEP KEEP_UNTIL KEEP_OPTIONS
GV$RECOVER_FILE and V$RECOVER_FILE | ONLINE_STATUS
GV$RSRC_CONSUMER_GROUP and V$RSRC_CONSUMER_GROUP | QUEUE_LENGTH CURRENT_UNDO_CONSUMPTION
GV$SESSION and V$SESSION | CURRENT_QUEUE_DURATION CLIENT_IDENTIFIER
GV$SESSION_EVENT and V$SESSION_EVENT | TIME_WAITED_MICRO
GV$SORT_USAGE and V$SORT_USAGE | USERNAME
GV$SQL and V$SQL | PLAN_HASH_VALUE CPU_TIME ELAPSED_TIME OUTLINE_SID CHILD_ADDRESS SQLTYPE REMOTE OBJECT_STATUS LITERAL_HASH_VALUE LAST_LOAD_TIME IS_OBSOLETE
GV$SQL_SHARED_CURSOR and V$SQL_SHARED_CURSOR | LOGMINER_SESSION_MISMATCH INCOMP_LTRL_MISMATCH OVERLAP_TIME_MISMATCH USER_BIND_PEEK_MISMATCH TYPCHK_DEP_MISMATCH
GV$SQLAREA and V$SQLAREA | CPU_TIME ELAPSED_TIME IS_OBSOLETE
GV$SYSTEM_EVENT and V$SYSTEM_EVENT | TIME_WAITED_MICRO
GV$SYSTEM_PARAMETER and V$SYSTEM_PARAMETER | UPDATE_COMMENT
GV$SYSTEM_PARAMETER2 and V$SYSTEM_PARAMETER2 | ORDINAL UPDATE_COMMENT
GV$TABLESPACE and V$TABLESPACE | INCLUDED_IN_DATABASE_BACKUP
GV$TEMPSTAT and V$TEMPSTAT | SINGLEBLKRDS SINGLEBLKRDTIM
GV$TRANSACTION and V$TRANSACTION | NAME
See Also:

Chapter 3, "Dynamic Performance (V$) Views" for more information about the new columns in these dynamic performance views
Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.
All Rights Reserved.
ýýýýº ðº ðº ðº««««««««


Link Target Not Found

The destination you selected is not available in this set of documents. If you're viewing this from a CD, check the product software CD or the OTN documentation site for additional documents. If you're viewing this from OTN, search other document sets.

 Oracle
Copyright © 2002 Oracle Corporation.

Home


Description of image file

ABS(n)


Description of image file

ACOS(n)


Description of image file

ADD { ( column datatype [DEFAULT expr] [inline_constraint [inline_constraint]...]
       [inline_ref_constraint] )
    }
    [, { ( column datatype [DEFAULT expr] [inline_constraint [inline_constraint]...]
          [inline_ref_constraint] )
       }
    ]...
[column_properties]


Description of image file

ADD PARTITION [ partition ]
  partitioning_storage_clause
  [ update_global_index_clause ]
  [ parallel_clause ]


Description of image file

ADD subpartition_spec
  [ update_global_index_clause ]
  [ parallel_clause ]


Description of image file

ADD PARTITION [partition]
  list_values_clause
  [table_partition_description]


Description of image file

ADD subpartition_spec


Description of image file

ADD_MONTHS(d,n)


Description of image file

ADD OVERFLOW [segment_attributes_clause]
[( PARTITION [segment_attributes_clause]
   [, PARTITION [segment_attributes_clause]]...
 )
]


Description of image file

ADD PARTITION [partition]
  range_values_clause
  [table_partition_description]


Description of image file

{ add_range_partition_clause
| add_hash_partition_clause
| add_list_partition_clause
}


Description of image file

/*+ ALL_ROWS */


Description of image file

ALLOCATE EXTENT
  [ ( { SIZE integer [ K | M ]
      | DATAFILE 'filename'
      | INSTANCE integer
      }
        [ SIZE integer [ K | M ]
        | DATAFILE 'filename'
        | INSTANCE integer
        ]...
    )
  ]


Description of image file

{ { ADD | MODIFY } ATTRIBUTE
  { attribute [datatype] | ( attribute datatype [, attribute datatype]... ) }
| DROP ATTRIBUTE { attribute | ( attribute [, attribute]... ) }
}


Description of image file

ALTER CLUSTER [ schema. ]cluster
  { physical_attributes_clause
  | SIZE integer [ K | M ]
  | allocate_extent_clause
  | deallocate_unused_clause
  | { CACHE | NOCACHE }
  }
    [ physical_attributes_clause
    | SIZE integer [ K | M ]
    | allocate_extent_clause
    | deallocate_unused_clause
    | { CACHE | NOCACHE }
    ]...
  [ parallel_clause ] ;


Description of image file

ALTER DATABASE [ database ]
  { startup_clauses
  | recovery_clauses
  | database_file_clauses
  | logfile_clauses
  | controlfile_clauses
  | standby_database_clauses
  | default_settings_clauses
  | conversion_clauses
  | redo_thread_clauses
  | security_clause
  } ;


Description of image file

ALTER DIMENSION [ schema. ]dimension
  { ADD
      { level_clause
      | hierarchy_clause
      | attribute_clause
      }
      [ ADD
        { level_clause
        | hierarchy_clause
        | attribute_clause
        }
      ]...
  | DROP
      { LEVEL level [ RESTRICT | CASCADE ]
      | HIERARCHY hierarchy)
      | ATTRIBUTE level
      }
      [ DROP
        { LEVEL level [ RESTRICT | CASCADE ]
        | HIERARCHY hierarchy)
        | ATTRIBUTE level
        }
      ]...
  | COMPILE
  } ;


Description of image file

{ add_column_clause
| modify_column_clause
| drop_column_clause
| parallel_clause
| external_data_properties
| REJECT LIMIT { integer | UNLIMITED }
}
[ add_column_clause
| modify_column_clause
| drop_column_clause
| parallel_clause
| external_data_properties
| REJECT LIMIT { integer | UNLIMITED }
]...


Description of image file

ALTER FUNCTION [ schema. ]function
  C0MPILE [ DEBUG ]
  [ REUSE SETTINGS ];


Description of image file

ALTER INDEX [ schema. ]index
  { { {deallocate_unused_clause | allocate_extent_clause}
    | parallel_clause
    | physical_attributes_clause
    | logging_clause
    }
      [ { deallocate_unused_clause | allocate_extent_clause }
        | parallel_clause
        | physical_attributes_clause
        | logging_clause
      ]...
  | rebuild_clause
  | PARAMETERS ('ODCI_parameters')
  | { ENABLE | DISABLE }
  | UNUSABLE
  | RENAME TO new_name
  | COALESCE
  | { MONITORING | NOMONITORING } USAGE
  | UPDATE BLOCK REFERENCES
  | alter_index_partitioning
  } ;


Description of image file

{ modify_index_default_attrs
| modify_index_partition
| rename_index_partition
| drop_index_partition
| split_index_partition
| modify_index_subpartition
}


Description of image file

ALTER INDEXTYPE [ schema. ]indextype
{ { ADD | DROP } [ schema. ]operator (parameter_types)
    [ , { ADD | DROP } [ schema. ]operator (parameter_types)
    ]...
  [ using_type_clause ]
| COMPILE
} ;


Description of image file

{ index_org_table_clause
| alter_overflow_clause
| alter_mapping_table_clauses
| COALESCE
}


Description of image file

ALTER JAVA { SOURCE | CLASS } [ schema. ]object_name
  [ RESOLVER
      ( ( match_string [ , ] { schema_name | - } )
          [ ( match_string [ , ] { schema_name | - } )
          ]...
      )
  ]
  { { COMPILE | RESOLVE }
  | invoker_rights_clause
  } ;


Description of image file

MAPPING TABLE
  { UPDATE BLOCK REFERENCES
  | allocate_extent_clause
  | deallocate_unused_clause
  }


Description of image file

ALTER MATERIALIZED VIEW [ schema. ](materialized_view)
  [ physical_attributes_clause
  | data_segment_compression
  | LOB_storage_clause
    [, LOB_storage_clause ]...
  | modify_LOB_storage_clause
    [, modify_LOB_storage_clause ]...
  | alter_table_partitioning
  | parallel_clause
  | logging_clause
  | allocate_extent_clause
  | { CACHE | NOCACHE }
  ]
  [ alter_iot_clauses ]
  [ USING INDEX physical_attributes_clause ]
  [ MODIFY scoped_table_ref_constraint
  | REBUILD
  | alter_mv_refresh
  ]
  [ { ENABLE | DISABLE } QUERY REWRITE
  | COMPILE
  | CONSIDER FRESH
  ] ;


Description of image file

ALTER MATERIALIZED VIEW LOG ON [ schema. ]table
  [ physical_attributes_clause
  | alter_table_partitioning
  | parallel_clause
  | logging_clause
  | allocate_extent_clause
  | { CACHE | NOCACHE }
  ]
  [ ADD
      { { OBJECT ID | PRIMARY KEY | ROWID }
        [ ( column [, column ]...) ]
      | ( column [, column]... )
      }
        [, { { OBJECT ID | PRIMARY KEY | ROWID }
             [ ( column [, column ]...) ]
           | ( column [, column]... )
           }
        ]...
      [ new_values_clause ]
  ] ;


Description of image file

{ ADD | DROP }
  { map_order_function_spec | subprogram_spec }
    [, { map_order_function_spec | subprogram_spec }
    ]...


Description of image file

REFRESH
  { { FAST | COMPLETE | FORCE }
  | ON { DEMAND | COMMIT }
  | {START WITH | NEXT } date
  | WITH PRIMARY KEY
  | USING
      { DEFAULT MASTER ROLLBACK SEGMENT
      | MASTER ROLLBACK SEGMENT rollback_segment
      }
  }


Description of image file

ALTER OPERATOR [ schema. ]operator COMPILE;


Description of image file

ALTER OUTLINE [ PUBLIC | PRIVATE ] outline
  { REBUILD
  | RENAME TO new_outline_name
  | CHANGE CATEGORY TO  new_category_name
  }
    [ REBUILD
    | RENAME TO new_outline_name
    | CHANGE CATEGORY TO new_category_name
    ]... ;


Description of image file

{ OVERFLOW
    { allocate_extent_clause | deallocate_unused_clause }
      [ allocate_extent_clause | deallocate_unused_clause ]...
    | add_overflow_clause
    }


Description of image file

ALTER PACKAGE [ schema. ]package
  COMPILE [ DEBUG ]
  [ PACKAGE | SPECIFICATION | BODY ]
  [ REUSE SETTINGS ] ;


Description of image file

ALTER PROCEDURE [ schema. ]procedure
  COMPILE [ DEBUG ]
  [ REUSE SETTINGS ] ;


Description of image file

ALTER PROFILE profile LIMIT
  { resource_parameters | password_parameters }
    [ resource_parameters | password_parameters ]... ;


Description of image file

ALTER RESOURCE COST
  { CPU_PER_SESSION
  | CONNECT_TIME
  | LOGICAL_READS_PER_SESSION
  | PRIVATE_SGA
  }
  integer
    [  { CPU_PER_SESSION
       | CONNECT_TIME
       | LOGICAL_READS_PER_SESSION
       | PRIVATE_SGA
       }
       integer
    ] ... ;


Description of image file

ALTER ROLE role
  { NOT IDENTIFIED | IDENTIFIED
    { BY password
    | USING [ schema. ]package
    | EXTERNALLY
    | GLOBALLY
    }
  } ;


Description of image file

ALTER ROLLBACK SEGMENT rollback_segment
  { ONLINE
  | OFFLINE
  | storage_clause
  | SHRINK [ TO integer [ K | M ] ]
  } ;


Description of image file

ALTER SEQUENCE [ schema. ]sequence
  { INCREMENT BY integer
  | { MAXVALUE integer | NOMAXVALUE }
  | { MINVALUE integer | NOMINVALUE }
  | { CYCLE | NOCYCLE }
  | { CACHE integer | NOCACHE }
  | { ORDER | NOORDER }
  }
    [ INCREMENT BY integer
    | { MAXVALUE integer | NOMAXVALUE }
    | { MINVALUE integer | NOMINVALUE }
    | { CYCLE | NOCYCLE }
    | { CACHE integer | NOCACHE }
    | { ORDER | NOORDER }
    ]... ;


Description of image file

ALTER SESSION
  { ADVISE { COMMIT | ROLLBACK | NOTHING }
  | CLOSE DATABASE LINK dblink
  | { ENABLE | DISABLE } COMMIT IN PROCEDURE
  | { ENABLE | DISABLE | FORCE } PARALLEL
      { DML | DDL | QUERY } [ PARALLEL integer ]
  | { ENABLE RESUMABLE [ TIMEOUT integer ] [ NAME string ]
    | DISABLE RESUMABLE
    }
  | alter_session_set_clause
  } ;


Description of image file

SET parameter_name = parameter_value
      [ parameter_name = parameter_value ]...
  [ COMMENT = 'text' ]


Description of image file

ALTER SYSTEM
  { archive_log_clause
  | CHECKPOINT [ GLOBAL | LOCAL ]
  | CHECK DATAFILES [ GLOBAL | LOCAL ]
  | { ENABLE | DISABLE } DISTRIBUTED RECOVERY
  | { ENABLE | DISABLE } RESTRICTED SESSION
  | FLUSH SHARED_POOL
  | end_session_clauses
  | SWITCH LOGFILE
  | { SUSPEND | RESUME }
  | { QUIESCE RESTRICTED | UNQUIESCE }
  | SHUTDOWN [ IMMEDIATE ] dispatcher_name
  | REGISTER
  | SET alter_system_set_clause
        [ alter_system_set_clause ]...
  | RESET alter_system_reset_clause
        [ alter_system_reset_clause ]...
  };


Description of image file

parameter_name
  [ SCOPE = { MEMORY | SPFILE | BOTH } ]
  [ SID = 'sid' ]


Description of image file

parameter_name = parameter_value [, parameter_value ]...
  [ COMMENT 'text' ]
  [ DEFERRED ]
  [ SCOPE = { MEMORY | SPFILE | BOTH } ]
  [ SID = { 'sid' | * } ]


Description of image file

ALTER TABLE [ schema. ]table
  [ alter_table_properties
  | column_clauses
  | constraint_clauses
  | alter_table_partitioning
  | alter_external_table_clauses
  | move_table_clause
  ]
  [ enable_disable_clause
  | { ENABLE | DISABLE } { TABLE LOCK | ALL TRIGGERS }
      [ enable_disable_clause
      | { ENABLE | DISABLE } { TABLE LOCK | ALL TRIGGERS }
      ]...
  ] ;


Description of image file

{ modify_table_default_attrs
| set_subpartition_template
| modify_table_partition
| modify_table_subpartition
| move_table_partition
| move_table_subpartition
| add_table_partition
| coalesce_table_partition
| drop_table_partition
| drop_table_subpartition
| rename_partition_subpart
| truncate_partition_subpart
| split_table_partition
| split_table_subpartition
| merge_table_partitions
| merge_table_subpartitions
| exchange_partition_subpart
}


Description of image file

{ { physical_attributes_clause
  | logging_clause
  | data_segment_compression
  | supplemental_lg_grp_clauses
  | allocate_extent_clause
  | deallocate_unused_clause
  | { CACHE | NOCACHE }
  | { MONITORING | NOMONITORING }
  | upgrade_table_clause
  | records_per_block_clause
  | parallel_clause
  | row_movement_clause
  }
    [ physical_attributes_clause
    | logging_clause
    | supplemental_lg_grp_clauses
    | allocate_extent_clause
    | deallocate_unused_clause
    | { CACHE | NOCACHE }
    | { MONITORING | NOMONITORING }
    | upgrade_table_clause
    | records_per_block_clause
    | parallel_clause
    | row_movement_clause
    ]..
  | RENAME TO new_table_name
}
[ alter_iot_clauses ]


Description of image file

ALTER TABLESPACE tablespace
  { datafile_tempfile_clauses
  | DEFAULT [ data_segment_compression ] storage_clause
  | MINIMUM EXTENT integer [ K | M ]
  | ONLINE
  | OFFLINE [ NORMAL | TEMPORARY | IMMEDIATE ]
  | { BEGIN | END } BACKUP
  | READ { ONLY | WRITE }
  | PERMANENT| TEMPORARY
  | COALESCE
  | logging_clause
  | [ NO ] FORCE LOGGING
  } ;


Description of image file

ALTER TRIGGER [ schema. ]trigger
  { ENABLE
  | DISABLE
  | RENAME TO new_name
  | COMPILE [ DEBUG ] [ REUSE SETTINGS ]
  } ;


Description of image file

ALTER TYPE [ schema. ]type
  { compile_type_clause
  | replace_type_clause
  | { alter_method_spec
    | alter_attribute_definition
    | [ NOT ] { INSTANTIABLE | FINAL }
    }
    [ dependent_handling_clause ]
  } ;


Description of image file

ALTER USER
  { user
    { IDENTIFIED
      { BY password [ REPLACE old_password ]
      | EXTERNALLY
      | GLOBALLY AS 'external_name'
      }
    | DEFAULT TABLESPACE tablespace
    | TEMPORARY TABLESPACE tablespace
    | QUOTA { integer [ K | M ]
            | UNLIMITED
            } ON tablespace
      [ QUOTA { integer [ K | M ]
              | UNLIMITED
              } ON tablespace
      ]...
    | PROFILE profile
    | DEFAULT ROLE { role [, role ]...
                   | ALL [ EXCEPT role [, role ]... ]
                   | NONE
                   }
    | PASSWORD EXPIRE
    | ACCOUNT { LOCK | UNLOCK }
    }
      [  { IDENTIFIED
           { BY password [ REPLACE old_password ]
           | EXTERNALLY
           | GLOBALLY AS 'external_name'
           }
         | DEFAULT TABLESPACE tablespace
         | TEMPORARY TABLESPACE tablespace
         | QUOTA { integer [ K | M ]
                 | UNLIMITED
                 } ON tablespace
           [ QUOTA { integer [ K | M ]
                   | UNLIMITED
                   } ON tablespace
           ]...
         | PROFILE profile
         | DEFAULT ROLE { role [, role ]...
                        | ALL [ EXCEPT role [, role ]... ]
                        | NONE
                        }
         | PASSWORD EXPIRE
         | ACCOUNT { LOCK | UNLOCK }
         }
      ]...
  | user [, user ]... proxy_clause;


Description of image file

MODIFY VARRAY varray_item
  ( modify_LOB_parameters )


Description of image file

ALTER VIEW [ schema. ]view
  { ADD out_of_line_constraint
  | MODIFY CONSTRAINT constraint { RELY | NORELY }
  | DROP { CONSTRAINT constraint | PRIMARY KEY | UNIQUE ( column [, column ]... ) }
  | COMPILE
  } ;


Description of image file

[ query_partition_clause ]
[ order_by_clause [ windowing_clause ] ]


Description of image file

analytic_function ([ arguments ]) OVER (analytic_clause)


Description of image file

ANALYZE
  { TABLE [ schema. ]table
      [ PARTITION ( partition ) | SUBPARTITION ( subpartition ) ]
  | INDEX [ schema. ]index
      [ PARTITION ( partition ) | SUBPARTITION ( subpartition ) ]
  | CLUSTER [ schema. ]cluster
  }
  { compute_statistics_clause
  | estimate_statistics_clause
  | validation_clauses
  | LIST CHAINED ROWS [ into_clause ]
  | DELETE [ SYSTEM ] STATISTICS
  } ;


Description of image file

/*+ AND_EQUAL ( table index index [ index ] [ index ] [ index ] ) */


Description of image file

{ CHARACTER [VARYING] ( size )
| { CHAR | NCHAR } VARYING ( size )
| VARCHAR ( size )
| NATIONAL { CHARACTER | CHAR } [VARYING] ( size )
| { NUMERIC | DECIMAL | DEC } [( precision [, scale] )]
| { INTEGER | INT | SMALLINT }
| FLOAT [( size )]
| DOUBLE PRECISION
| REAL
}


Description of image file

{ SYS.AnyData | SYS.AnyType | SYS.AnyDataSet }


Description of image file

/*+ APPEND */


Description of image file

ARCHIVE LOG [THREAD integer]
  { { SEQUENCE integer
    | CHANGE integer
    | CURRENT [ NOSWITCH ]
    | GROUP integer
    | LOGFILE 'filename' [ USING BACKUP CONTROLFILE ]
    | NEXT
    | ALL
    | START
    }
    [ TO 'location' ]
  | STOP
  }


Description of image file

ASCII(char)


Description of image file

ASCIISTR('string')


Description of image file

ASIN(n)


Description of image file

ASSOCIATE STATISTICS WITH
  { column_association | function_association } ;


Description of image file

ATAN(n)


Description of image file

ATAN2(n{, | /}m)


Description of image file

ATTRIBUTE level DETERMINES
  { dependent_column | ( dependent_column [, dependent_column ]... ) }


Description of image file

AUDIT { sql_statement_clause | schema_object_clause }
  [ BY { SESSION | ACCESS } ]
  [ WHENEVER [ NOT ] SUCCESSFUL ];


Description of image file

BY
{ proxy [, proxy ]... [ ON BEHALF OF { user [, user ]... | ANY } ]
| user [, user ]...
}


Description of image file

ON { [ schema. ]object | DIRECTORY directory_name | DEFAULT }


Description of image file

AUTHENTICATED BY user
IDENTIFIED BY password


Description of image file

AUTOEXTEND { OFF | ON [ NEXT integer [ K | M ] ] [maxsize_clause] }


Description of image file

AVG([ DISTINCT | ALL ] expr)
  [ OVER(analytic_clause) ]


Description of image file

BFILENAME('directory','filename')


Description of image file

BIN_TO_NUM(expr[,expr]...)


Description of image file

BINDING
( parameter_type [, parameter_type]... ) RETURN return_type  implementation_clause
[, ( parameter_type [, parameter_type]... ) RETURN return_type implementation_clause]...


Description of image file

BITAND(argument1,argument2)


Description of image file

[ schema.]table
  ( [ [schema.]table. | t_alias.]column [ASC | DESC]
        [,[ [schema.]table. | t_alias.]column [ASC | DESC] ]... )
FROM [schema.]table [t_alias]
       [,[schema.]table [t_alias] ]...
WHERE condition [local_partitioned_index] index_attributes


Description of image file

BUILD {IMMEDIATE | DEFERRED}


Description of image file

C [ NAME name ]
  LIBRARY lib_name
  [ AGENT IN (argument[, argument ]...) ]
  [ WITH CONTEXT ]
  [ PARAMETERS (parameter[, parameter]...) ]


Description of image file

/*+ CACHE ( table ) */


Description of image file

CALL { [schema.] [type. | package.]
         { function | procedure | method }
         [@ dblink_name]
     | object_access_expression
     }
     [ expr [, expr]... ]
     [INTO :host_variable [[INDICATOR] :indicator_variable]];


Description of image file

LANGUAGE { Java_declaration | C_declaration }


Description of image file

CANCEL [IMMEDIATE] [WAIT | NOWAIT]


Description of image file

CASE { simple_case_expression | searched_case_expression } [else_clause] END


Description of image file

CAST({expr | (subquery)| MULTISET(subquery)}
  AS type_name)


Description of image file

CEIL(n)


Description of image file

{ CHAR ( size [ BYTE | CHAR ] )
| VARCHAR2 ( size [ BYTE | CHAR ] )
| NCHAR ( size )
| NVARCHAR2 ( size )
}


Description of image file

CHARACTER SET character_set


Description of image file

CHARTOROWID(char)


Description of image file

/*+ CHOOSE */


Description of image file

CHR(n [USING NCHAR_CS])


Description of image file

/*+ CLUSTER ( table ) */


Description of image file

CLUSTER [schema .] cluster index_attributes


Description of image file

COALESCE(expr[,expr]...)


Description of image file

COALESCE PARTITION [update_global_index_clause] [parallel_clause]


Description of image file

COLUMNS [schema .] table . column [, [schema .] table . column]...
using_statistics_type


Description of image file

{ { add_column_clause
  | modify_column_clause
  | drop_column_clause
  }
    [ add_column_clause
    | modify_column_clause
    | drop_column_clause
    ]...
| rename_column_clause
| modify_collection_retrieval [modify_collection_retrieval]...
| modify_LOB_storage_clause
| alter_varray_col_properties
}


Description of image file

{ object_type_col_properties
| nested_table_col_properties
| { varray_col_properties | LOB_storage_clause }
  [ LOB_partition_storage ]
| XMLType_column_properties
}...


Description of image file

COMMENT ON
{ TABLE [schema .] { table | view | materialized view }
| COLUMN [schema .] { table . | view . | materialized view . } column
| OPERATOR [schema .] operator
| INDEXTYPE [schema .] indextype
}
IS 'text';


Description of image file

COMMIT [WORK] [ COMMENT 'text' | FORCE 'text' [, integer] ];


Description of image file

COMMIT TO SWITCHOVER TO
  { {PHYSICAL | LOGICAL} PRIMARY
  | {PHYSICAL | LOGICAL} STANDBY
  }
   [ {WITH | WITHOUT} SESSION SHUTDOWN ]
   [ WAIT | NOWAIT ]


Description of image file

COMPILE [DEBUG] [SPECIFICATION | BODY] [REUSE SETTINGS]


Description of image file

COMPOSE('string')


Description of image file

PARTITION BY RANGE ( column_list )
  [ subpartition_by_list | subpartition_by_hash ]
  ( PARTITION [ partition ] range_values_clause table_partition_description
    [, PARTITION [ partition ] range_values_clause table_partition_description ] ...
  )


Description of image file

{ ( condition )
| NOT condition
| condition { AND | OR } condition
}


Description of image file

{ ( expr )
| { + | - | PRIOR } expr
| expr { * | / | + | - | || } expr
}

Note: The double vertical bars are shown in boldface type because they are part of the syntax (indicating concatenation) rather than BNF punctuation.


Description of image file

COMPUTE [ SYSTEM ] STATISTICS [for_clause]


Description of image file

CONCAT(char1,char2)


Description of image file

{ comparison_condition
| logical_condition
| membership_condition
| range_condition
| null_condition
| equals_path
| exists_condition
| like_condition
| is_of_type_condition
| under_path
| compound_condition
}


Description of image file

[ ALL | FIRST ]
WHEN condition THEN insert_into_clause [values_clause]
[insert_into_clause [values_clause]]...
[WHEN condition THEN insert_into_clause [values_clause]
 [insert_into_clause [values_clause]]...
]...
[ELSE insert_into_clause [values_clause]
 [insert_into_clause [values_clause]]...
]


Description of image file

{ ADD { out_of_line_constraint
        [ out_of_line_constraint ]...
      | out_of_line_REF_constraint
      }
| MODIFY { CONSTRAINT constraint
         | PRIMARY KEY
         | UNIQUE (column)
           [, UNIQUE (column) ]...
         }
            constraint_state
| RENAME CONSTRAINT old_name TO new_name
| drop_constraint_clause
}


Description of image file

[ [[NOT] DEFERRABLE] [INITIALLY { IMMEDIATE | DEFERRED }]
| [INITIALLY { IMMEDIATE | DEFERRED }] [[NOT] DEFERRABLE]
]
[ RELY | NORELY ] [using_index_clause] [ ENABLE | DISABLE ]
[ VALIDATE | NOVALIDATE ] [exceptions_clause]


Description of image file

{ inline_constraint
| out_of_line_constraint
| inline_ref_constraint
| out_of_line_ref_constraint
}


Description of image file

[FINAL] [INSTANTIABLE] CONSTRUCTOR FUNCTION datatype
    [ [SELF IN OUT datatype, ] parameter datatype [, parameter datatype]... ]
    RETURN SELF AS RESULT
    {IS | AS} {pl/sql_block | call_spec}


Description of image file

[FINAL] [INSTANTIABLE] CONSTRUCTOR FUNCTION datatype
  [ [SELF IN OUT datatype,] parameter datatype [, parameter datatype]... ]
  RETURN SELF AS RESULT
  [ {IS | AS} call_spec ]


Description of image file

WITH INDEX CONTEXT , SCAN CONTEXT implementation_type


Description of image file

{ CREATE STANDBY CONTROLFILE AS 'filename' [REUSE]
| BACKUP CONTROLFILE TO
  { 'filename' [REUSE] | trace_file_clause }
}


Description of image file

{ RESET COMPATIBILITY | CONVERT }


Description of image file

CONVERT(char,dest_char_set[,source_char_set])


Description of image file

CORR(expr1,expr2) [OVER (analytic_clause)]


Description of image file

COS(n)


Description of image file

COSH(n)


Description of image file

COUNT({* | [DISTINCT | ALL] expr}) [OVER (analytic_clause)]


Description of image file

COVAR_POP(expr1,expr2) [OVER (analytic_clause)]


Description of image file

COVAR_SAMP(expr1,expr2) [OVER (analytic_clause)]


Description of image file

CREATE CLUSTER [schema .] cluster ( column datatype [, column datatype]... )
[{ physical_attributes_clause
 | SIZE integer [ K | M ]
 | TABLESPACE tablespace
 | { INDEX | [SINGLE TABLE] HASHKEYS integer [HASH IS expr] }
 }
 [ physical_attributes_clause
 | SIZE integer [ K | M ]
 | TABLESPACE tablespace
 | { INDEX | [SINGLE TABLE] HASHKEYS integer [HASH IS expr] }
 ]...
]
[parallel_clause] [ N0ROWDEPENDENCIES | ROWDEPENDENCIES ] [ CACHE | N0CACHE ];


Description of image file

CREATE [OR REPLACE] CONTEXT namespace USING [schema .] package
[ INITIALIZED { EXTERNALLY | GLOBALLY }
| ACCESSED GLOBALLY
]
;


Description of image file

CREATE CONTROLFILE [REUSE] [SET] DATABASE database
[logfile_clause] { RESETL0GS | NORESETL0GS }
                   [DATAFILE datafile_tempfile_spec [, datafile_tempfile_spec]...]
[{ MAXLOGFILES integer
 | MAXLOGMEMBERS integer
 | MAXLOGHISTORY integer
 | MAXDATAFILES integer
 | MAXINSTANCES integer
 | { ARCHIVELOG | NOARCHIVELOG }
 | FORCE LOGGING
 }
 [ MAXLOGFILES integer
 | MAXLOGMEMBERS integer
 | MAXLOGHISTORY integer
 | MAXDATAFILES integer
 | MAXINSTANCES integer
 | { ARCHIVELOG | NOARCHIVELOG }
 | FORCE LOGGING
 ]...
]
[character_set_clause];


Description of image file

CREATE DATABASE [database]
{ USER SYS IDENTIFIED BY password
| USER SYSTEM IDENTIFIED BY password
| CONTROLFILE REUSE
| LOGFILE [GROUP integer] redo_log_file_spec
     [, [GROUP integer] redo_log_file_spec]...
| MAXLOGFILES integer
| MAXLOGMEMBERS integer
| MAXLOGHISTORY integer
| MAXDATAFILES integer
| MAXINSTANCES integer
| { ARCHIVELOG | NOARCHIVELOG }
| FORCE LOGGING
| CHARACTER SET charset
| NATIONAL CHARACTER SET charset
| DATAFILE datafile_tempfile_spec [, datafile_tempfile_spec]...
| EXTENT MANAGEMENT LOCAL
| default_temp_tablespace
| undo_tablespace_clause
| set_time_zone_clause
}...
;


Description of image file

CREATE [SHARED] [PUBLIC] DATABASE LINK dblink
[ CONNECT TO { CURRENT_USER | user IDENTIFIED BY password [authenticated_clause] }
| authenticated_clause
]
[USING 'connect_string'];


Description of image file

CREATE DIMENSION [schema .] dimension level_clause [level_clause]...
{ hierarchy_clause | attribute_clause } [ hierarchy_clause | attribute_clause ]...;


Description of image file

CREATE [OR REPLACE] DIRECTORY directory AS 'path_name';


Description of image file

CREATE [OR REPLACE] FUNCTION [schema .] function
[( argument [ IN | OUT | IN OUT ] [NOCOPY] datatype
   [, argument [ IN | OUT | IN OUT ] [NOCOPY] datatype]...
 )
]
RETURN datatype
[{ invoker_rights_clause | DETERMINISTIC | parallel_enable_clause }
 [ invoker_rights_clause | DETERMINISTIC | parallel_enable_clause ]...
]
{ { AGGREGATE | PIPELINED } USING [schema .] implementation_type
| [PIPELINED] { IS | AS } { pl/sql_function_body | call_spec }
}
;


Description of image file

CREATE [OR REPLACE] TYPE [schema .] type_name;


Description of image file

CREATE [UNIQUE | BITMAP] INDEX [schema.]index ON
  {cluster_index_clause | table_index_clause | bitmap_join_index_clause};


Description of image file

CREATE [OR REPLACE] INDEXTYPE [schema .] indextype FOR
[schema .] operator ( paramater_type [, paramater_type]... )
[, [schema .] operator ( paramater_type [, paramater_type]... )]...
USING [schema .] implementation_type;


Description of image file

CREATE [OR REPLACE] [AND { RESOLVE | COMPILE }] [NOFORCE] JAVA
{ { SOURCE | RESOURCE } NAMED [schema .] primary_name
| CLASS [SCHEMA schema]
}
[invoker_rights_clause]
[RESOLVER
 ( ( match_string [,] { schema_name | - } )
   [( match_string [,] { schema_name | - } )]...
 )
]
{ USING
  { BFILE ( directory_object_name , server_file_name )
  | { CLOB | BLOB | BFILE } subquery
  | 'key_for_BLOB'
  }
| AS source_text
}
;


Description of image file

CREATE [OR REPLACE] LIBRARY [schema .] libname
{ IS | AS } 'filename' [AGENT 'agent_dblink'];


Description of image file

CREATE MATERIALIZED VIEW [schema.]materialized_view
  [OF [schema.]object_type]
  [(scoped_table_ref_constraint)]
  ON PREBUILT TABLE [{WITH | WITHOUT} REDUCED PRECISION]
  | physical_properties materialized_view_props
  [USING INDEX
    [physical_attributes_clause | TABLESPACE tablespace]
      [physical_attributes_clause | TABLESPACE tablespace]...
  ]
  | USING NO INDEX
  [create_mv_refresh]
  [FOR UPDATE] [{DISABLE | ENABLE} QUERY REWRITE] AS subquery;


Description of image file

CREATE MATERIALIZED VIEW LOG ON [schema .] table
[{ physical_attributes_clause
 | TABLESPACE tablespace
 | logging_clause
 | { CACHE | NOCACHE }
 }
 [ physical_attributes_clause
 | TABLESPACE tablespace
 | logging_clause
 | { CACHE | NOCACHE }
 ]...
]
[parallel_clause] [table_partitioning_clauses]
[WITH
 { OBJECT ID | PRIMARY KEY | ROWID | SEQUENCE | ( column [, column]... ) }
 [, { OBJECT ID | PRIMARY KEY | ROWID | SEQUENCE | ( column [, column]... ) }]...
 [ "new_values_clause" ]
];


Description of image file

{ REFRESH
  { { FAST | COMPLETE | FORCE }
  | ON { DEMAND | COMMIT }
  | { START WITH | NEXT } date
  | WITH { PRIMARY KEY | ROWID }
  | USING
    { DEFAULT [ MASTER | LOCAL ] ROLLBACK SEGMENT
    | [ MASTER | LOCAL ] ROLLBACK SEGMENT rollback_segment
    }
    [ DEFAULT [ MASTER | LOCAL ] ROLLBACK SEGMENT
    | [ MASTER | LOCAL ] ROLLBACK SEGMENT rollback_segment
    ]...
  }
  [ { FAST | COMPLETE | FORCE }
  | ON { DEMAND | COMMIT }
  | { START WITH | NEXT } date
  | WITH { PRIMARY KEY | ROWID }
  | USING
    { DEFAULT [ MASTER | LOCAL ] ROLLBACK SEGMENT
    | [ MASTER | LOCAL ] ROLLBACK SEGMENT rollback_segment
    }
    [ DEFAULT [ MASTER | LOCAL ] ROLLBACK SEGMENT
    | [ MASTER | LOCAL ] ROLLBACK SEGMENT rollback_segment
    ]...
  ]...
| NEVER REFRESH
}


Description of image file

CREATE [OR REPLACE] TYPE [schema. .] type_name
{ IS | AS } TABLE OF datatype;


Description of image file

CREATE [ OR REPLACE ] TYPE [ schema.]type_name [ invoker_rights_clause ]
  { { IS | AS } OBJECT
  | UNDER [schema.]supertype
  }
  [ sqlj_object_type ]
  [ ( attribute datatype [ sqlj_object_type_attr ]
      [, attribute datatype [ sqlj_object_type_attr ]...
    [, element_spec
      [, element_spec ]...]
    )
  ]
  [ [ NOT ] FINAL ]
  [ [ NOT ] INSTANTIABLE ];


Description of image file

CREATE [OR REPLACE] OPERAT0R [schema .] operator binding_clause;


Description of image file

CREATE [OR REPLACE] [ PUBLIC | PRIVATE ] OUTLINE [outline]
  [FROM [ PUBLIC | PRIVATE ] source_outline]
  [FOR CATEGORY category]
  [ON statement];


Description of image file

CREATE [OR REPLACE] PACKAGE [schema .] package
[invoker_rights_clause] { IS | AS } pl/sql_package_spec;


Description of image file

CREATE [OR REPLACE] PACKAGE BODY [schema .] package { IS | AS } pl/sql_package_body;


Description of image file

CREATE PFILE [= 'pfile_name'] FROM SPFILE [= 'spfile_name'];


Description of image file

CREATE [OR REPLACE] PROCEDURE [schema .] procedure
[( argument [ IN | OUT | IN OUT ] [NOCOPY] datatype
   [, argument [ IN | OUT | IN OUT ] [NOCOPY] datatype]...
 )
]
[invoker_rights_clause] { IS | AS } { pl/sql_subprogram_body | call_spec };


Description of image file

CREATE PROFILE profile LIMIT
{ resource_parameters | password_parameters }
[ resource_parameters | password_parameters ]...;


Description of image file

CREATE ROLE role
[ NOT IDENTIFIED
| IDENTIFIED { BY password | USING [schema .] package | EXTERNALLY | GLOBALLY }
]
;


Description of image file

CREATE [PUBLIC] ROLLBACK SEGMENT rollback_segment
[{ TABLESPACE tablespace | storage_clause } [ TABLESPACE tablespace | storage_clause ]...];


Description of image file

CREATE SCHEMA AUTHORIZATION schema
{ create_table_statement | create_view_statement | grant_statement }
[ create_table_statement | create_view_statement | grant_statement ]...;


Description of image file

CREATE SEQUENCE [schema .] sequence
[{ { INCREMENT BY | START WITH } integer
 | { MAXVALUE integer | NOMAXVALUE }
 | { MINVALUE integer | NOMINVALUE }
 | { CYCLE | NOCYCLE }
 | { CACHE integer | NOCACHE }
 | { ORDER | NOORDER }
 }
 [ { INCREMENT BY | START WITH } integer
 | { MAXVALUE integer | NOMAXVALUE }
 | { MINVALUE integer | NOMINVALUE }
 | { CYCLE | NOCYCLE }
 | { CACHE integer | NOCACHE }
 | { ORDER | NOORDER }
 ]...
]
;


Description of image file

CREATE SPFILE [= 'spfile_name'] FROM PFILE [= 'pfile_name'];


Description of image file

CREATE [OR REPLACE] [PUBLIC] SYNONYM [schema .] synonym
FOR [schema .] object [@ dblink];


Description of image file

{ relational_table | object_table | XMLType_table }


Description of image file

CREATE [UNDO] TABLESPACE tablespace
[DATAFILE datafile_tempfile_spec [, datafile_tempfile_spec]... ]
[{ MINIMUM EXTENT integer [ K | M ]
 | BLOCKSIZE integer [K]
 | logging_clause
 | FORCE LOGGING
 | DEFAULT [data_segment_compression] storage_clause
 | { ONLINE | OFFLINE }
 | { PERMANENT | TEMPORARY }
 | extent_management_clause
 | segment_management_clause
 }
 [ MINIMUM EXTENT integer [ K | M ]
 | BLOCKSIZE integer [K]
 | logging_clause
 | FORCE LOGGING
 | DEFAULT [data_segment_compression] storage_clause
 | { ONLINE | OFFLINE }
 | { PERMANENT | TEMPORARY }
 | extent_management_clause
 | segment_management_clause
 ]...
]
;


Description of image file

CREATE TEMPORARY TABLESPACE tablespace
  [TEMPFILE datafile_tempfile_spec] temp_tablespace_extent;


Description of image file

CREATE [OR REPLACE] TRIGGER [schema .] trigger
{ BEFORE | AFTER | INSTEAD OF }
{ dml_event_clause
| { ddl_event [OR ddl_event]...
  | database_event [OR database_event]...
  }
  ON { [schema .] SCHEMA | DATABASE }
}
[WHEN ( condition ) ]
{ pl/sql_block | call_procedure_statement }


Description of image file

{ create_incomplete_type
| create_object_type
| create_varray_type
| create_nested_table_type
}


Description of image file

CREATE [ OR REPLACE ] TYPE BODY [ schema . ] type_name
  { IS | AS } { subprogram_declaration | map_order_func_declaration }
                [;{ subprogram_declaration | map_order_func_declaration } ]...
  END;


Description of image file

CREATE USER user IDENTIFIED
{ BY password | EXTERNALLY | GLOBALLY AS 'external_name' }
[{ DEFAULT TABLESPACE tablespace
 | TEMPORARY TABLESPACE tablespace
 | QUOTA { integer [ K | M ] | UNLIMITED } ON tablespace
   [QUOTA { integer [ K | M ] | UNLIMITED } ON tablespace]...
 | PROFILE profile
 | PASSWORD EXPIRE
 | ACCOUNT { LOCK | UNLOCK }
 }
 [ DEFAULT TABLESPACE tablespace
 | TEMPORARY TABLESPACE tablespace
 | QUOTA { integer [ K | M ] | UNLIMITED } ON tablespace
   [QUOTA { integer [ K | M ] | UNLIMITED } ON tablespace]...
 | PROFILE profile
 | PASSWORD EXPIRE
 | ACCOUNT { LOCK | UNLOCK }
 ]...
]
;


Description of image file

CREATE [OR REPLACE] TYPE [schema. .] type_name
{ IS | AS } { VARRAY | VARYING ARRAY } ( limit ) OF datatype;


Description of image file

CREATE [OR REPLACE] [[NO] FORCE] VIEW [schema .] view
[ ( { alias [inline_constraint [inline_constraint]...]
    | out_of_line_constraint
    }
    [, { alias inline_constraint [inline_constraint]...
       |out_of_line_constraint
       }
    ]...
  )
| object_view_clause
| XMLType_view_clause
]
AS subquery [subquery_restriction_clause];


Description of image file

CUME_DIST(expr[,expr]...) WITHIN GROUP
  (ORDER BY
    expr [DESC | ASC] [NULLS {FIRST | LAST}]
      [,expr [DESC | ASC] [NULLS {FIRST | LAST}]]...)


Description of image file

CUME_DIST( ) OVER([query_partition_clause] order_by_clause)


Description of image file

CURRENT_DATE


Description of image file

CURRENT_TIMESTAMP[(precision)]


Description of image file

CURSOR ( subquery )


Description of image file

/*+ CURSOR_SHARING_EXACT */


Description of image file

{ COMPRESS | NOCOMPRESS }


Description of image file

{ CREATE DATAFILE {'filename' [, 'filename']... | filenumber [, filenumber]...}
  [AS { datafile_tempfile_spec [, datafile_tempfile_spec]... | NEW }]
| DATAFILE {'filename' [, 'filename']... | filenumber [, filenumber]...}
  { ONLINE
  | OFFLINE [DROP]
  | RESIZE integer [ K | M ]
  | autoextend_clause
  | END BACKUP
  }
| TEMPFILE {'filename' [, 'filename']...  | filenumber [, filenumber]...}
  { RESIZE integer [ K | M ]
  | autoextend_clause
  | DROP [INCLUDING DATAFILES]
  | ONLINE
  | OFFLINE
  }
| RENAME FILE 'filename' [, 'filename']... TO 'filename'
}


Description of image file

{ ADD { DATAFILE | TEMPFILE }
      [datafile_tempfile_spec [, datafile_tempfile_spec]...]
| RENAME DATAFILE 'filename' [, 'filename']... TO 'filename' [, 'filename']...
| { DATAFILE | TEMPFILE } { ONLINE | OFFLINE }
}


Description of image file

['filename'] [SIZE integer [ K | M ]] [REUSE] [autoextend_clause]


Description of image file

{ Oracle_built_in_datatypes
| ANSI_supported_datatypes
| user_defined_types
| Oracle_supplied_types
}


Description of image file

{ DATE
| TIMESTAMP [( fractional_seconds_precision )] [WITH [LOCAL] TIME ZONE] )
| INTERVAL YEAR [( year_precision )] TO MONTH
| INTERVAL DAY [( day_precision )] TO SECOND [( fractional_seconds_precision )]
}


Description of image file

datetime_value_expr AT
{ LOCAL
| TIME ZONE { ' [ + | - ] hh:mm'
              | DBTIMEZONE
              | SESSIONTIMEZONE
              | 'time_zone_name'
              | expr
              }
}


Description of image file

database [. domain [. domain]...] [@ connect_descriptor]


Description of image file

DBTIMEZONE


Description of image file

DEALLOCATE UNUSED [KEEP integer [ K | M ]]


Description of image file

DECODE(expr,search,result[,search,result]...[,default])


Description of image file

DECOMPOSE('string' [CANONICAL | COMPATIBILITY])


Description of image file

DEFAULT COST ( cpu_cost , io_cost , network_cost )


Description of image file

DEFAULT SELECTIVITY default_selectivity


Description of image file

{ CHARACTER SET character_set
| NATIONAL CHARACTER SET character_set
| set_time_zone_clause
| DEFAULT TEMPORARY TABLESPACE tablespace
| RENAME GLOBAL_NAME TO database . domain [. domain]...
}


Description of image file

DEFAULT TEMPORARY TABLESPACE tablespace
     [TEMPFILE datafile_tempfile_spec] temp_tablespace_extent_clause


Description of image file

DELETE [hint] [FROM]
{ dml_table_expression_clause | ONLY ( dml_table_expression_clause ) }
[t_alias] [where_clause] [returning_clause];


Description of image file

DENSE_RANK(expr[,expr]...) WITHIN GROUP
  (ORDER BY
  expr [DESC | ASC] [NULLS {FIRST | LAST}]
    [,expr [DESC | ASC] [NULLS {FIRST | LAST}]]...)


Description of image file

DENSE_RANK( ) OVER([query_partition_clause] order_by_clause)


Description of image file

{ INVALIDATE
| CASCADE [ { [NOT] INCLUDING TABLE DATA
            | CONVERT TO SUBSTITUTABLE
            }
          ] [[FORCE] exceptions_clause]
}


Description of image file

DEPTH(correlation_integer)


Description of image file

DEREF(expr)


Description of image file

DISASSOCIATE STATISTICS FROM
{ COLUMNS [schema .] table . column [, [schema .] table . column]...
| FUNCTIONS [schema .] function [, [schema .] function]...
| PACKAGES [schema .] package [, [schema .] package]...
| TYPES [schema .] type [, [schema .] type]...
| INDEXES [schema .] index [, [schema .] index]...
| INDEXTYPES [schema .] indextype [, [schema .] indextype]...
}
[FORCE];


Description of image file

{ DELETE | INSERT | UPDATE [OF column [, column]...] }
[OR { DELETE | INSERT | UPDATE [OF column [, column]...] }]...
ON { [schema .] table | [NESTED TABLE nested_table_column OF] [schema .] view }
[referencing_clause] [FOR EACH ROW]


Description of image file

{ [schema .]
  { table
    [ { PARTITION ( partition ) | SUBPARTITION ( subpartition ) }
    | @ dblink
    ]
  | { view | materialized view } [@ dblink]
  }
| ( subquery [subquery_restriction_clause] )
| table_collection_expression
}


Description of image file

INDEXTYPE IS indextype
  [parallel_clause] [PARAMETERS ('ODCI_parameters')]


Description of image file

/*+ DRIVING_SITE ( table ) */


Description of image file

DROP CLUSTER [schema .] cluster [INCLUDING TABLES [CASCADE CONSTRAINTS]];


Description of image file

{ SET UNUSED { COLUMN column | ( column [, column]... ) }
  [{ CASCADE CONSTRAINTS | INVALIDATE }
     [ CASCADE CONSTRAINTS | INVALIDATE ]...]
| DROP { COLUMN column | ( column [, column]... ) }
  [{ CASCADE CONSTRAINTS | INVALIDATE }
     [ CASCADE CONSTRAINTS | INVALIDATE ]...]
  [CHECKPOINT integer]
| DROP { UNUSED COLUMNS | COLUMNS CONTINUE } [CHECKPOINT integer]
}


Description of image file

DROP
{ { PRIMARY KEY | UNIQUE ( column [, column]... ) }
  [CASCADE] [{ KEEP | DROP } INDEX]
| CONSTRAINT constraint [CASCADE]
}


Description of image file

DROP CONTEXT namespace;


Description of image file

DROP [PUBLIC] DATABASE LINK dblink;


Description of image file

DROP DIMENSION [schema .] dimension;


Description of image file

DROP DIRECTORY directory_name;


Description of image file

DROP FUNCTION [schema .] function_name;


Description of image file

DROP INDEX [schema .] index [FORCE];


Description of image file

DROP PARTITION partition_name


Description of image file

DROP INDEXTYPE [schema .] indextype [FORCE];


Description of image file

DROP JAVA { SOURCE | CLASS | RESOURCE } [schema .] object_name;


Description of image file

DROP LIBRARY library_name;


Description of image file

DROP MATERIALIZED VIEW [schema .] materialized_view;


Description of image file

DROP MATERIALIZED VIEW LOG ON [schema .] table;


Description of image file

DROP OPERATOR [schema .] operator [FORCE];


Description of image file

DROP OUTLINE outline;


Description of image file

DROP PACKAGE [BODY] [schema .] package;


Description of image file

DROP PR0CEDURE [schema .] procedure;


Description of image file

DROP PROFILE profile [CASCADE];


Description of image file

DROP ROLE role;


Description of image file

DROP ROLLBACK SEGMENT rollback_segment;


Description of image file

DROP SEQUENCE [schema .] sequence_name;


Description of image file

DROP [PUBLIC] SYNONYM [schema .] synonym [FORCE];


Description of image file

DROP TABLE [schema .] table [CASCADE CONSTRAINTS];


Description of image file

DROP PARTITION partition [update_global_index_clause [parallel_clause]]


Description of image file

DROP SUBPARTITION subpartition [update_global_index_clause [parallel_clause]]


Description of image file

DROP TABLESPACE tablespace
[INCLUDING CONTENTS [AND DATAFILES] [CASCADE CONSTRAINTS]];


Description of image file

DROP TRIGGER [schema .] trigger;


Description of image file

DROP TYPE [schema .] type_name [ FORCE | VALIDATE ];


Description of image file

DROP TYPE BODY [schema .] type_name;


Description of image file

DROP USER user [CASCADE];


Description of image file

DROP VIEW [schema .] view [CASCADE CONSTRAINTS];


Description of image file

DUMP(expr[,return_fmt[,start_position[,length]]])


Description of image file

/*+ DYNAMIC_SAMPLING ( [table] integer ) */


Description of image file

[ inheritance_clauses ]
{ subprogram_spec
| constructor_spec
| map_order_function_spec
}
  [ subprogram_clause
  | constructor_spec
  | map_order_function_spec ]...
[, pragma_clause ]


Description of image file

ELSE else_expr


Description of image file

{EMPTY_BLOB | EMPTY_CLOB}( )


Description of image file

{ ENABLE | DISABLE } [ VALIDATE | NOVALIDATE ]
{ UNIQUE ( column [, column]... )
| PRIMARY KEY
| CONSTRAINT constraint
}
[using_index_clause] [exceptions_clause]
[CASCADE] [{ KEEP | DROP } INDEX]


Description of image file

{ DISCONNECT SESSION 'integer1 , integer2' [POST_TRANSACTION]
| KILL SESSION 'integer1 , integer2'
}
[IMMEDIATE]


Description of image file

EQUALS_PATH ( column, path_string [, correlation_integer] )


Description of image file

ESTIMATE [ SYSTEM ] STATISTICS [for_clause]
[SAMPLE integer { ROWS | PERCENT }]


Description of image file

EXCEPTIONS INTO [schema .] table


Description of image file

EXCHANGE { PARTITION partition | SUBPARTITION subpartition }
  WITH TABLE table [{ INCLUDING | EXCLUDING } INDEXES]
  [{ WITH | WITHOUT } VALIDATION]
  [exceptions_clause] [update_global_index_clause [parallel_clause]]


Description of image file

EXISTS ( subquery )


Description of image file

EXISTSNODE(XMLType_instance, XPath_string[, namespace_string])


Description of image file

EXP(n)


Description of image file

/*+ EXPAND_GSET_TO_UNION */


Description of image file

EXPLAIN PLAN [SET STATEMENT_ID = 'text']
[INTO [schema .] table [@ dblink]] FOR statement;


Description of image file

{   simple_expression
  | compound_expression
  | case_expression
  | cursor_expression
  | datetime_expression
  | function_expression
  | interval_expression
  | object_access_expression
  | scalar_subquery_expression
  | type_constructor_expression
  | variable_expression
}


Description of image file

{ expr [, expr ]... | ( expr [, expr]... ) }


Description of image file

EXTENT MANAGEMENT
{ DICTIONARY | LOCAL [ AUTOALLOCATE | UNIFORM [SIZE integer [ K | M ]]] }


Description of image file

DEFAULT DIRECTORY directory
[ACCESS PARAMETERS { ( opaque_format_spec ) | USING CLOB subquery }]
LOCATION ( [directory :] 'location_specifier' [, [directory :] 'location_specifier']...)


Description of image file

( [TYPE access_driver_type] external_data_properties )
[REJECT LIMIT { integer | UNLIMITED }]


Description of image file

EXTRACT
( { { YEAR
    | MONTH
    | DAY
    | HOUR
    | MINUTE
    | SECOND
    }
  | { TIMEZONE_HOUR
    | TIMEZONE_MINUTE
    }
  | { TIMEZONE_REGION
    | TIMEZONE_ABBR
    }
  }
  FROM { datetime_value_expression | interval_value_expression }
)


Description of image file

EXTRACT(XMLType_instance, XPath_string[, namespace_string])


Description of image file

EXTRACTVALUE(XMLType_instance, XPath_string[, namespace_string])


Description of image file

/*+ FACT ( table ) */


Description of image file

{ datafile_tempfile_spec | redo_log_file_spec }


Description of image file

[ DISCONNECT [ FROM SESSION ] ] [ parallel_clause ]
FINISH [ SKIP [ STANDBY LOGFILE ] ] [ WAIT | NOWAIT ]


Description of image file

aggregate_function KEEP
( DENSE_RANK FIRST ORDER BY
  expr [ DESC | ASC ] [ NULLS { FIRST | LAST }]
  [, expr [ DESC | ASC ] [ NULLS { FIRST | LAST }]]...
)
[OVER query_partitioning_clause]


Description of image file

/*+ FIRST_ROWS (n) */


Description of image file

FIRST_VALUE ( expr ) OVER ( analytic_clause )


Description of image file

AS OF {SCN | TIMESTAMP} expr


Description of image file

FLOOR (n)


Description of image file

FOR
{ TABLE
| ALL [INDEXED] COLUMNS [SIZE integer]
| COLUMNS [SIZE integer]
  { column | attribute } [SIZE integer] [{ column | attribute } [SIZE integer]]...
| ALL [LOCAL] INDEXES
}
[FOR
 { TABLE
 | ALL [INDEXED] COLUMNS [SIZE integer]
 | COLUMNS [SIZE integer]
   { column | attribute } [SIZE integer] [{ column | attribute } [SIZE integer]]...
 | ALL [LOCAL] INDEXES
 }
]...


Description of image file

FOR UPDATE
[OF [[schema .] { table | view } .] column
 [, [[schema .] { table | view } .] column]...
]
[ NOWAIT | WAIT integer ]


Description of image file

FROM_TZ ( timestamp_value , time_zone_value )


Description of image file

[STANDBY] DATABASE
[{ UNTIL { CANCEL | TIME date | CHANGE integer }
 | USING BACKUP CONTROLFILE
 }
 [ UNTIL { CANCEL | TIME date | CHANGE integer }
 | USING BACKUP CONTROLFILE
 ]...
]


Description of image file

/*+ FULL ( table ) */


Description of image file

{ single_row_function
| aggregate_function
| analytic_function
| object_reference_function
| user_defined_function
}


Description of image file

{ FUNCTIONS [schema .] function [, [schema .] function]...
| PACKAGES [schema .] package [, [schema .] package]...
| TYPES [schema .] type [, [schema .] type]...
| INDEXES [schema .] index [, [schema .] index]...
| INDEXTYPES [schema .] indextype [, [schema .] indextype]...
}
{ using_statistics_type
| { default_cost_clause [, default_selectivity_clause]
  | default_selectivity_clause [, default_cost_clause]
  }
}


Description of image file

FUNCTION name (parameter datatype[, parameter datatype ]...)
  RETURN datatype
  { IS | AS } { pl/sql_block | call_spec }


Description of image file

FUNCTION name ( parameter datatype [, parameter datatype]... ) return_clause


Description of image file

RECOVER [AUTOMATIC] [FROM 'location']
{ { full_database_recovery
  | partial_database_recovery
  | LOGFILE 'filename'
  }
  [ { TEST | ALLOW integer CORRUPTION | parallel_clause }
    [ TEST | ALLOW integer CORRUPTION | parallel_clause ]...
  ]
| CONTINUE [DEFAULT]
| CANCEL
}


Description of image file

GLOBAL PARTITION BY RANGE ( column_list )
  ( index_partitioning_clause )


Description of image file

GRANT
{ grant_system_privileges
| grant_object_privileges
}
;


Description of image file

{ object_privilege | ALL [PRIVILEGES] } [( column [, column]... )]
[, { object_privilege | ALL [PRIVILEGES] } [( column [, column]... )]]...
on_object_clause
TO grantee_clause
[WITH GRANT OPTION] [WITH HIERARCHY OPTION]


Description of image file

{ system_privilege | role | ALL PRIVILEGES }
[, { system_privilege | role | ALL PRIVILEGES }]...
TO grantee_clause [IDENTIFIED BY password] [WITH ADMIN OPTION]


Description of image file

{ user | role | PUBLIC } [, { user | role | PUBLIC }]...


Description of image file

GREATEST ( expr [, expr]... )


Description of image file

GROUP BY
{ expr | rollup_cube_clause | grouping_sets_clause }
[, { expr | rollup_cube_clause | grouping_sets_clause }]...
[ HAVING condition ]


Description of image file

{ expr
   { = | != | ^= | <> | > | < | >= | <= }
   { ANY | SOME | ALL }
   ( { expression_list | subquery } )
| expr [, expr ]...
   { = | != | ^= | <> }
   { ANY | SOME | ALL }
   ( { expression_list [, expression_list ]...
     | subquery } )
}


Description of image file

GROUP_ID ( )


Description of image file

GROUPING ( expr )


Description of image file

expression_list [, expression_list ]...


Description of image file

GROUPING_ID ( expr [, expr]... )


Description of image file

GROUPING SETS ( { rollup_cube_clause | grouping_expression_list } )


Description of image file

/*+ HASH_AJ */


Description of image file

/*+ HASH ( table ) */


Description of image file

PARTITION BY HASH ( column [, column] ... )
{ individual_hash_partitions | hash_partitions_by_quantity }


Description of image file

PARTITIONS hash_partition_quantity [STORE IN ( tablespace [, tablespace]... )]
[OVERFLOW STORE IN ( tablespace [, tablespace]... )]


Description of image file

/*+ HASH_SJ */


Description of image file

HEXTORAW ( char )


Description of image file

[START WITH condition] CONNECT BY condition


Description of image file

HIERARCHY hierarchy
( child_level CHILD OF parent_level [CHILD OF parent_level]... [join_clause] )


Description of image file

[ ANCILLARY TO
  primary_operator ( parameter_type [, parameter_type]... )
  [, primary_operator ( parameter_type [, parameter_type]... )]...
| context_clause [COMPUTE ANCILLARY DATA]
]
using_function_clause


Description of image file

/*+ INDEX_ASC ( table [index [index]...] ) */


Description of image file

[ { physical_attributes_clause
  | logging_clause
  | ONLINE
  | COMPUTE STATISTICS
  | TABLESPACE { tablespace | DEFAULT }
  | key_compression
  | { SORT | NOSORT }
  | REVERSE
  | parallel_clause
  }
    [ physical_attributes_clause
    | logging_clause
    | ONLINE
    | COMPUTE STATISTICS
    | TABLESPACE { tablespace | DEFAULT }
    | key_compression
    | { SORT | NOSORT }
    | REVERSE
    | parallel_clause
    ]...
]


Description of image file

/*+ INDEX_COMBINE ( table [index [index]...] ) */


Description of image file

/*+ INDEX_DESC ( table [index [index]...] ) */


Description of image file

{ column | column_expression }


Description of image file

/*+ INDEX_FFS ( table [index [index]...] ) */


Description of image file

/*+ INDEX ( table [index [index]...] ) */


Description of image file

[INCLUDING column_name] OVERFLOW [segment_attributes_clause]


Description of image file

[ { mapping_table_clause
  | PCTTHRESHOLD integer
  | key_compression
  }
    [ mapping_table_clause
    | PCTTHRESHOLD integer
    | key_compression ]...
]
[index_org_overflow_clause]


Description of image file

PARTITION
[partition [{ segment_attributes_clause | key_compression }
            [ segment_attributes_clause | key_compression ]...
           ]
]


Description of image file

PARTITION [ partition ] VALUES LESS THAN ( value[, value...] )
  [ segment_attributes_clause ]


Description of image file

{ STORE IN (tablespace[, tablespace ]...)
| (SUBPARTITION [ subpartition [ TABLESPACE tablespace ] ]
    [, SUBPARTITION [ subpartition [ TABLESPACE tablespace ] ] ]...)
}


Description of image file

( PARTITION [partition partitioning_storage_clause]
  [, PARTITION [partition partitioning_storage_clause]]...
)


Description of image file

[ NOT ] { OVERRIDING | FINAL | INSTANTIABLE }
  [ [ NOT ] { OVERRIDING | FINAL | INSTANTIABLE } ]...


Description of image file

INITCAP ( char )


Description of image file

[CONSTRAINT constraint_name]
{ [NOT] NULL
| UNIQUE
| PRIMARY KEY
| references_clause
| CHECK ( condition )
} [constraint_state]


Description of image file

{ SCOPE  IS [schema. ] scope_table
| WITH ROWID
| [CONSTRAINT constraint_name] references_clause [constraint_state]
}


Description of image file

INSERT [hint] { single_table_insert | multi_table_insert };


Description of image file

INTO dml_table_expression_clause [t_alias] [( column [, column]... )]


Description of image file

{ INSTR | INSTRB | INSTRC | INSTR2 | INSTR4 }
( string , substring [, position [, occurrence]] )


Description of image file

[ + | - ] digit [digit]...


Description of image file

INTERVAL ' { integer | integer time_expr | time_expr } '
{ { DAY | HOUR | MINUTE } [( leading_precision )])
| SECOND [( leading_precision [, fractional_seconds_precision] )]
}
[TO { DAY | HOUR | MINUTE | SECOND [( fractional_seconds_precision )] }]


Description of image file

interval_value_expr { DAY TO SECOND | YEAR TO MONTH }


Description of image file

INTERVAL 'integer [- integer]'
{ YEAR | MONTH } [( precision )] [TO { YEAR | MONTH }]


Description of image file

INTO [schema .] table


Description of image file

AUTHID { CURRENT_USER | DEFINER }


Description of image file

expr IS [NOT] OF [TYPE] ( [ONLY] [schema .] type [, [ONLY] [schema .] type]... )


Description of image file

JAVA NAME 'string'


Description of image file

JOIN KEY
{ child_key_column | ( child_key_column [, child_key_column]... ) }
REFERENCES parent_level
[JOIN KEY
 { child_key_column | ( child_key_column [, child_key_column]... ) }
 REFERENCES parent_level
]...


Description of image file

{ INNER | { LEFT | RIGHT | FULL } [OUTER] }


Description of image file

table_reference
  { [join_type] JOIN table_reference
      { ON condition | USING ( column [, column]... ) }
  | { CROSS JOIN | NATURAL [join_type] JOIN } table_reference
  }


Description of image file

{ COMPRESS [integer] | NOCOMPRESS }


Description of image file

LAG ( value_expr [, offset] [, default] )
   OVER ( [query_partition_clause] order_by_clause )


Description of image file

{ BLOB | CLOB | NCLOB | BFILE }


Description of image file

aggregate_function KEEP
( DENSE_RANK LAST ORDER BY
  expr [ DESC | ASC ] [NULLS { FIRST | LAST }]
  [, expr [ DESC | ASC ] [NULLS { FIRST | LAST }]]...
)
[OVER query_partitioning_clause]


Description of image file

LAST_DAY ( date )


Description of image file

LAST_VALUE ( expr ) OVER ( analytic_clause )


Description of image file

LEAD ( value_expr [, offset] [, default] )
   OVER ( [query_partition_clause] order_by_clause )


Description of image file

/*+ LEADING ( table ) */


Description of image file

LEAST ( expr [, expr]... )


Description of image file

{ LENGTH | LENGTHB | LENGTHC | LENGTH2 | LENGTH4 } ( char )


Description of image file

LEVEL level IS
{ level_table . level_column
| ( level_table . level_column [, level_table . level_column]...)
}


Description of image file

char1 [NOT] {LIKE | LIKEC | LIKE2 | LIKE4} char2 [ESCAPE esc_char]


Description of image file

{ REGR_SLOPE
| REGR_INTERCEPT
| REGR_COUNT
| REGR_R2
| REGR_AVGX
| REGR_AVGY
| REGR_SXX
| REGR_SYY
| REGR_SXY
}
( expr1 , expr2 ) [OVER ( analytic_clause )]


Description of image file

PARTITION BY LIST ( column )
( PARTITION [partition] list_values_clause table_partition_description
  [, PARTITION [partition] list_values_clause table_partition_description ]...
)


Description of image file

VALUES ( {value | NULL [ , {value | NULL} ...) | DEFAULT
       )


Description of image file

LN ( n )


Description of image file

{ TABLESPACE tablespace
| { ENABLE | DISABLE } STORAGE IN ROW
| storage_clause
| CHUNK integer
| PCTVERSION integer
| RETENTION
| FREEPOOLS integer
| { CACHE
  | { NOCACHE | CACHE READS } [ logging_clause ]
  }
}
[ TABLESPACE tablespace
| { ENABLE | DISABLE } STORAGE IN ROW
| storage_clause
| CHUNK integer
| PCTVERSION integer
| RETENTION
| FREEPOOLS integer
| { CACHE
  | { NOCACHE | CACHE READS } [ logging_clause ]
  }
]...


Description of image file

PARTITION partition
{ LOB_storage_clause | varray_col_properties }
[ LOB_storage_clause | varray_col_properties ]...
[( SUBPARTITION subpartition
   { LOB_storage_clause | varray_col_properties }
   [ LOB_storage_clause | varray_col_properties ]...
 )
]


Description of image file

LOB
{ ( LOB_item [, LOB_item]... ) STORE AS ( LOB_parameters )
| ( LOB_item ) STORE AS
  { LOB_segname ( LOB_parameters )
  | LOB_segname
  | ( LOB_parameters )
  }
}


Description of image file

LOCAL
[ on_range_partitioned_table
| on_list_partitioned_table
| on_hash_partitioned_table
| on_comp_partitioned_table
]


Description of image file

LOCALTIMESTAMP [( timestamp_precision )]


Description of image file

LOCK TABLE
[schema .] { table | view }
[ { PARTITION ( partition ) | SUBPARTITION ( subpartition ) }
| @ dblink
]
[, [schema .] { table | view }
 [ { PARTITION ( partition ) | SUBPARTITION ( subpartition ) }
 | @ dblink
 ]
]...
IN lockmode MODE [NOWAIT];


Description of image file

LOG ( m , n )


Description of image file

LOGFILE [GROUP integer] redo_log_file_spec
                  [, [GROUP integer] redo_log_file_spec]...


Description of image file

{ { ARCHIVELOG | NOARCHIVELOG }
| [NO] FORCE LOGGING
| ADD [STANDBY] LOGFILE [THREAD integer]
  [GROUP integer] redo_log_file_spec [, [GROUP integer] redo_log_file_spec]...
| DROP [STANDBY] LOGFILE logfile_descriptor [, logfile_descriptor]...
| ADD [STANDBY] LOGFILE MEMBER 'filename' [REUSE] [, 'filename' [REUSE]]...
  TO logfile_descriptor [, logfile_descriptor]...
| DROP [STANDBY] LOGFILE MEMBER 'filename' [, 'filename']...
| ADD SUPPLEMENTAL LOG DATA
   [ ( { PRIMARY KEY | UNIQUE INDEX }
       [, { PRIMARY KEY | UNIQUE INDEX }]... ) COLUMNS ]
| DROP SUPPLEMENTAL LOG DATA
| RENAME FILE 'filename' [, 'filename']... TO 'filename'
| CLEAR [UNARCHIVED] LOGFILE
  logfile_descriptor [, logfile_descriptor]... [UNRECOVERABLE DATAFILE]
}


Description of image file

{ GROUP integer
| ( 'filename' [, 'filename']... )
| 'filename'
}


Description of image file

  {LOGGING | NOLOGGING}


Description of image file

{ LONG | LONG RAW | RAW ( size ) }


Description of image file

LOWER ( char )


Description of image file

LPAD ( char1 , n [, char2] )


Description of image file

LTRIM ( char [, set] )


Description of image file

MAKE_REF ( { table | view } , key [, key]... )


Description of image file

RECOVER MANAGED STANDBY DATABASE
  [ recover_clause | cancel_clause | finish_clause ]


Description of image file

{ MAP | ORDER } MEMBER function_declaration


Description of image file

{ MAP | ORDER } MEMBER function_spec


Description of image file

{ MAPPING TABLE | NOMAPPING }


Description of image file

[column_properties]
[table_partitioning_clauses]
[CACHE | NOCACHE]
[parallel_clause]
[build_clause]


Description of image file

MAX ( [ DISTINCT | ALL ] expr ) [OVER ( analytic_clause )]


Description of image file

MAXSIZE { UNLIMITED | integer [ K | M ] }


Description of image file

{ ORDSYS.ORDAudio
| ORDSYS.ORDImage
| ORDSYS.ORDVideo
| ORDSYS.ORDDoc
| ORDSYS.OrdImageSignature
}


Description of image file

{ expr [NOT] IN ( { expression_list | subquery } )
| ( expr [, expr]... [NOT] IN ( { expression_list [, expression_list ]...
                                | subquery } )
}


Description of image file

MERGE [hint] INTO [schema .] table [t_alias] USING [schema .]
{ table | view | subquery } [t_alias] ON ( condition )
WHEN MATCHED THEN merge_update_clause
WHEN NOT MATCHED THEN merge_insert_clause;


Description of image file

/*+ MERGE_AJ */


Description of image file

/*+ MERGE ( table ) */


Description of image file

INSERT ( column [, column]... ) VALUES ( expr [, expr]... )


Description of image file

/*+ MERGE_SJ */


Description of image file

MERGE PARTITIONS partition_1 , partition_2
[INTO partition_spec] [update_global_index_clause] [parallel_clause]


Description of image file

MERGE SUBPARTITIONS subpart_1, subpart_2
  [ INTO subpartition_spec ]
  [ update_global_index_clause ][ parallel_clause ]


Description of image file

UPDATE SET column = { expr | DEFAULT } [, column = { expr | DEFAULT }]...


Description of image file

MIN ( [ DISTINCT | ALL ] expr ) [OVER ( analytic_clause )]


Description of image file

MOD ( m , n )


Description of image file

( column [datatype] [DEFAULT expr] [ inline_constraint [inline_constraint]... ]
  [, column [datatype] [DEFAULT expr] [ inline_constraint [inline_constraint] ... ] ]
)


Description of image file

[ NOT ] SUBSTITUTABLE AT ALL LEVELS [ FORCE ]


Description of image file

MODIFY NESTED TABLE collection_item RETURN AS { LOCATOR | VALUE }


Description of image file

MODIFY modify_col_properties | modify_col_substitutable


Description of image file

MODIFY PARTITION partition
  { partition_attributes
  | alter_mapping_table_clause
  | [REBUILD] UNUSABLE LOCAL INDEXES
  }


Description of image file

{ { { allocate_extent_clause | deallocate_unused_clause }
  | { LOB LOB_item | VARRAY varray } modify_LOB_parameters
      [ {LOB LOB_item | VARRAY varray } modify_LOB_parameters]...
  }
| [REBUILD] UNUSABLE LOCAL INDEXES
}


Description of image file

MODIFY DEFAULT ATTRIBUTES [FOR PARTITION partition]
{ physical_attributes_clause
| TABLESPACE { tablespace | DEFAULT }
| logging_clause
}
[ physical_attributes_clause
| TABLESPACE { tablespace | DEFAULT }
| logging_clause
]...

ÿ


Description of image file

MODIFY PARTITION partition
{ { physical_attributes_clause
  | logging_clause
  | deallocate_unused_clause
  | allocate_extent_clause
  }
  [ physical_attributes_clause
  | logging_clause
  | deallocate_unused_clause
  | allocate_extent_clause
  ]...
| PARAMETERS ( 'alter_partition_params' )
| COALESCE
| UPDATE BLOCK REFERENCES
| UNUSABLE
}

ÿ


Description of image file

MODIFY SUBPARTITION subpartition
{ UNUSABLE
| allocate_extent_clause
| deallocate_unused_clause
}


Description of image file

MODIFY PARTITION partition
  { partition_attributes
  | {ADD | DROP} VALUES (partition_value[, partition_value]...)
  | [REBUILD] UNUSABLE LOCAL INDEXES
  }


Description of image file

{ { allocate_extent_clause | deallocate_unused_clause }
| { LOB LOB_item |  VARRAY varray } modify_LOB_parameters
    [ { LOB LOB_item | VARRAY varray } modify_LOB_parameters ] ...
| [ REBUILD ] UNUSABLE LOCAL INDEXES
| { ADD | DROP } VALUES value [, value]...
}


Description of image file

{ storage_clause
| PCTVERSION integer
| RETENTION
| FREEPOOLS integer
| REBUILD FREEPOOLS
| { CACHE
  | { NOCACHE | CACHE READS } [ logging_clause ]
  }
| { allocate_extent_clause
  | deallocate_unused_clause
  }
}
[ storage_clause
| PCTVERSION integer
| RETENTION
| FREEPOOLS integer
| REBUILD FREEPOOLS
| { CACHE
  | { NOCACHE | CACHE READS } [ logging_clause ]
  }
| { allocate_extent_clause
  | deallocate_unused_clause
  }
]...


Description of image file

MODIFY LOB ( LOB_item ) ( modify_LOB_parameters )


Description of image file

MODIFY PARTITION partition
  { partition_attributes
  | { add_hash_subpartition
    | add_list_subpartition
    }
  | COALESCE SUBPARTITION [update_global_index_clause][parallel_clause]
  | alter_mapping_table_clause
  | [REBUILD] UNUSABLE LOCAL INDEXES
  }


Description of image file

MODIFY DEFAULT ATTRIBUTES [FOR PARTITION partition]
  [segment_attributes_clause]
  [data_segment_compression]
  [PCTTHRESHOLD integer]
  [key_compression]
  [alter_overflow_clause]
  [{ LOB ( LOB_item ) | VARRAY varray } ( LOB_parameters )
    [{ LOB ( LOB_item ) | VARRAY varray } ( LOB_parameters )]...
  ]


Description of image file

{ modify_range_partition | modify_hash_partition | modify_list_partition }


Description of image file

MODIFY SUBPARTITION subpartition {modify_hash_subpartition | modify_list_subpartition}


Description of image file

MONTHS_BETWEEN ( date1 , date2 )


Description of image file

MOVE [ONLINE]
  [segment_attributes_clause]
  [data_segment_compression]
  [index_org_table_clause]
  [ { LOB_storage_clause | varray_col_properties }
    [ { LOB_storage_clause | varray_col_properties } ]...
  ]
  [parallel_clause]


Description of image file

MOVE PARTITION partition [MAPPING TABLE] [table_partition_description]
[update_global_index_clause] [parallel_clause]


Description of image file

MOVE SUBPARTITION subpartition subpartition_attributes
[update_global_index_clause] [parallel_clause]


Description of image file

{ ALL insert_into_clause [values_clause]
  [insert_into_clause [values_clause]]...
| conditional_insert_clause
}
subquery


Description of image file

NCHR ( number )


Description of image file

NESTED TABLE { nested_item | COLUMN_VALUE }
[ substitutable_column_clause ] STORE AS storage_table
[ ( ( object_properties )
    [ physical_properties ] [ column_properties ] ) ]
[ RETURN AS { LOCATOR | VALUE } ]


Description of image file

NEW_TIME ( date , zone1 , zone2 )


Description of image file

{ INCLUDING | EXCLUDING } NEW VALUES


Description of image file

NEXT_DAY ( date , char )


Description of image file

/*+ NL_AJ */


Description of image file

/*+ NL_SJ */


Description of image file

NLS_CHARSET_DECL_LEN ( byte_count , char_set_id )


Description of image file

NLS_CHARSET_ID ( text )


Description of image file

NLS_CHARSET_NAME ( number )


Description of image file

NLS_INITCAP ( char [, 'nlsparam'] )


Description of image file

NLS_LOWER ( char [, 'nlsparam' ] )


Description of image file

NLS_UPPER ( char [, 'nlsparam'] )


Description of image file

NLSSORT ( char [, 'nlsparam' ] )


Description of image file

/*+ NO_EXPAND */


Description of image file

/*+ NO_FACT ( table ) */


Description of image file

/*+ NO_INDEX ( table [index [index]...] ) */


Description of image file

/*+ NO_MERGE ( table ) */


Description of image file

/*+ NO_PUSH_PRED ( table ) */


Description of image file

/*+ NO_PUSH_SUBQ */


Description of image file

/*+ NO_UNNEST */


Description of image file

/*+ NOAPPEND */


Description of image file

NOAUDIT
{ sql_statement_clause [, sql_statement_clause]...
| schema_object_clause [, schema_object_clause]...
}
[WHENEVER [NOT] SUCCESSFUL];


Description of image file

/*+ NOCACHE ( table ) */


Description of image file

/*+ NOPARALLEL ( table ) */


Description of image file

/*+ NOPARALLEL_INDEX ( table [index [index]...] ) */


Description of image file

/*+ NOREWRITE */


Description of image file

NTILE ( expr ) OVER ( [query_partition_clause] order_by_clause )


Description of image file

expr IS [NOT] NULL


Description of image file

NULLIF ( expr1 , expr2 )


Description of image file

[ + | - ]
{ digit [digit]... [.] [digit [digit]...] | . digit [digit]... }
[{ E | e } [ + | - ] digit [digit]...]


Description of image file

NUMBER [ ( precision [, scale] ) ]


Description of image file

NUMTODSINTERVAL ( n , 'char_expr' )


Description of image file

NUMTOYMINTERVAL ( n , 'char_expr' )


Description of image file

NVL ( expr1 , expr2 )


Description of image file

NVL2 ( expr1 , expr2 , expr3 )


Description of image file

{ table_alias . column . | object_table_alias . | (expr) . }
{ attribute [. attribute]... [. method ( [argument [, argument]...] ) ]
| method ( [argument [, argument]...] )
}


Description of image file

[schema .] object [. part] [@ dblink]


Description of image file

{ { column | attribute } [DEFAULT expr]
  [inline_constraint [inline_constraint]... | inline_ref_constraint]
| { out_of_line_constraint | out_of_line_ref_constraint | supplemental_logging_props }
}


Description of image file

CREATE [GLOBAL TEMPORARY] TABLE [schema .] table OF [schema .]object_type
[ object_table_substitution ]
[( object_properties )] [ON COMMIT { DELETE | PRESERVE } ROWS]
[OID_clause] [OID_index_clause] [physical_properties] [table_properties];


Description of image file

[NOT] SUBSTITUTABLE AT ALL LEVELS


Description of image file

COLUMN column substitutable_column_clause


Description of image file

OF [schema .] type_name
{ WITH OBJECT IDENTIFIER { DEFAULT | ( attribute [, attribute]... ) }
| UNDER [schema .] superview
}
( {out_of_line_constraint
  | attribute inline_constraint [inline_constraint]...
  }
  [, { out_of_line_constraint
     | attribute inline_constraint [inline_constraint]...
     }
  ]...
)


Description of image file

OBJECT IDENTIFIER IS { SYSTEM GENERATED | PRIMARY KEY }


Description of image file

OIDINDEX [index]
( { physical_attributes_clause | TABLESPACE tablespace }
  [ physical_attributes_clause | TABLESPACE tablespace ]...
)


Description of image file

[ STORE IN (tablespace[, tablespace]...) ]
  (PARTITION
     [ partition [ segment_attribute_clause
                   [ segment_attribute_clause ]... ]
                 [ index_subpartition_clause ] ]
       [, PARTITION
         [ partition [ segment_attribute_clause
                       [ segment_attribute_clause ]... ]
                     [ index_subpartition_clause ] ]... ])


Description of image file

{ STORE IN (tablespace[, tablespace ]...)
| (PARTITION [ partition [ TABLESPACE tablespace ] ]
    [, PARTITION [ partition [ TABLESPACE tablespace ] ] ]...)
}


Description of image file

( PARTITION [partition [segment_attributes_clause [segment_attributes_clause]...]]
  [, PARTITION [partition [segment_attributes_clause [segment_attributes_clause]...]] ]...
)


Description of image file

{ schema . object
| { DIRECTORY directory_name
  | JAVA { SOURCE | RESOURCE } [schema .] object
  }
}


Description of image file

{ character_datatypes
| number_datatypes
| long_and_raw_datatypes
| datetime_datatypes
| large_object_datatypes
| rowid_datatypes
}


Description of image file

{ any_types | XML_types | spatial_type | media_types }


Description of image file

ORDER [SIBLINGS] BY
{ expr | position | c_alias } [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]
[, { expr | position | c_alias } [ ASC | DESC ] [ NULLS FIRST | NULLS LAST ]]...


Description of image file

/*+ ORDERED */


Description of image file

/*+ ORDERED_PREDICATES */


Description of image file

[CONSTRAINT constraint_name]
{ UNIQUE ( column [, column]... )
| PRIMARY KEY ( column [, column]...
| FOREIGN KEY ( column [, column]...   references_clause
| CHECK ( condition )
} [constraint_state]


Description of image file

{ SCOPE FOR ( { ref_col | ref_attr } ) IS [ schema. ] scope_table
| REF ( { ref_col | ref_attr } ) WITH ROWID
| [ CONSTRAINT constraint_name ]
      FOREIGN KEY ( { ref_col | ref_attr } ) references_clause [ constraint_state ]
}


Description of image file

{ NOPARALLEL | PARALLEL [integer] }


Description of image file

PARALLEL_ENABLE
[( PARTITION argument BY
   { ANY | { HASH | RANGE } ( column [, column]... ) }
 )
 [streaming_clause]
]


Description of image file

/*+ PARALLEL ( table [{ , integer | , DEFAULT) | , } [ , integer | , DEFAULT ] ] ) */


Description of image file

/*+ PARALLEL_INDEX
( table [index [, index]...] [{ , integer | , DEFAULT | , } [ , integer | , DEFAULT ]] ) */


Description of image file

{ TABLESPACE tablespace [, tablespace]...
| DATAFILE {'filename' [, 'filename']... | filenumber [, filenumber]...}
| STANDBY
  { TABLESPACE tablespace [, tablespace]...
  | DATAFILE {'filename' [, 'filename']...  | filenumber [, filenumber]...}
  }
  UNTIL [CONSISTENT WITH] CONTROLFILE
}


Description of image file

[{ physical_attributes_clause
 | logging_clause
 | allocate_extent_clause
 | deallocate_unused_clause
 }
 [ physical_attributes_clause
 | logging_clause
 | allocate_extent_clause
 | deallocate_unused_clause
 ]...
]
[OVERFLOW
 { physical_attributes_clause
 | logging_clause
 | allocate_extent_clause
 | deallocate_unused_clause
 }
 [ physical_attributes_clause
 | logging_clause
 | allocate_extent_clause
 | deallocate_unused_clause
 ]...
]
[ data_segment_compression ]
[{ LOB LOB_item | VARRAY varray } modify_LOB_parameters
 [{ LOB LOB_item | VARRAY varray } modify_LOB_parameters]...
]


Description of image file

[schema .] { table | view }
[ @ dblink
| PARTITION ( partition )
| (SUBPARTITION ( subpartition )
]


Description of image file

  SUBPARTITIONS hash_subpartition_quantity [STORE IN (tablespace [, tablespace]... )]
| ( subpartition_spec [, subpartition_spec] ... )


Description of image file

PARTITION [partition] [table_partition_description]


Description of image file

[ { TABLESPACE tablespace
  | OVERFLOW [ TABLESPACE tablespace ]
  | LOB ( LOB_item ) STORE AS
    { LOB_segname [ ( TABLESPACE tablespace ) ]
    | ( TABLESPACE tablespace )
    }
  | VARRAY varray_item STORE AS LOB LOB_segname
  } [ { TABLESPACE tablespace
      | OVERFLOW [ TABLESPACE tablespace ]
      | LOB ( LOB_item ) STORE AS
        { LOB_segname [ ( TABLESPACE tablespace ) ]
        | ( TABLESPACE tablespace )
        }
      | VARRAY varray_item STORE AS LOB LOB_segname
      }
    ]...
]


Description of image file

{ { FAILED_LOGIN_ATTEMPTS
  | PASSWORD_LIFE_TIME
  | PASSWORD_REUSE_TIME
  | PASSWORD_REUSE_MAX
  | PASSWORD_LOCK_TIME
  | PASSWORD_GRACE_TIME
  }
  { expr | UNLIMITED | DEFAULT }
| PASSWORD_VERIFY_FUNCTION { function | NULL | DEFAULT }
}


Description of image file

PATH ( correlation_integer )


Description of image file

PERCENT_RANK ( expr [, expr]... ) WITHIN GROUP
( ORDER BY
  expr [ DESC | ASC ] [NULLS { FIRST | LAST }]
  [, expr [ DESC | ASC ] [NULLS { FIRST | LAST }]]...
)


Description of image file

PERCENT_RANK ( ) OVER ( [query_partition_clause] order_by_clause )


Description of image file

PERCENTILE_CONT ( expr ) WITHIN GROUP ( ORDER BY expr [ DESC | ASC ] )
[OVER ( query_partition_clause )]


Description of image file

PERCENTILE_DISC ( expr ) WITHIN GROUP ( ORDER BY expr [ DESC | ASC ] )
[OVER ( query_partition_clause )]


Description of image file

[{ PCTFREE integer
 | PCTUSED integer
 | INITRANS integer
 | MAXTRANS integer
 | storage_clause
 }
 [ PCTFREE integer
 | PCTUSED integer
 | INITRANS integer
 | MAXTRANS integer
 | storage_clause
 ]...
]


Description of image file

{ segment_attributes_clause [ data_segment_compression ]
  | ORGANIZATION
      { HEAP [ segment_attributes_clause ] [ data_segment_compression ]
      | INDEX [ segment_attributes_clause ] index_org_table_clause
      | EXTERNAL external_table_clause
      }
  | CLUSTER cluster ( column[, column ]... )
}


Description of image file

POWER ( m , n )


Description of image file

/*+ PQ_DISTRIBUTE
( table [,] outer_distribution , inner_distribution ) */


Description of image file

PRAGMA RESTRICT_REFERENCES
( { method_name | DEFAULT } ,
  { RNDS | WNDS | RNPS | WNPS | TRUST }
  [, { RNDS | WNDS | RNPS | WNPS | TRUST }]...
)


Description of image file

PROCEDURE name (parameter datatype[, parameter datatype]...)
  { IS | AS } { pl/sql_block | call_spec }


Description of image file

PROCEDURE name ( parameter datatype [, parameter datatype]... ) [ {IS | AS} call_spec ]


Description of image file

{ GRANT | REVOKE } CONNECT THROUGH proxy
[WITH
 { ROLE { role_name [, role_name]... | ALL EXCEPT role_name [, role_name]... }
 | NO ROLES
 }
]
[AUTHENTICATED USING
 { PASSWORD
 | DISTINGUISHED NAME
 | CERTIFICATE [TYPE 'type'] [VERSION 'version']
 }
]


Description of image file

/*+ PUSH_PRED ( table ) */


Description of image file

/*+ PUSH_SUBQ */


Description of image file

This graphic shows the order in which Oracle returns the rows for a query of a
hierarchical tree. Beginning with the root row, Oracle returns one child row of
the root, and then one child of that child row, and so forth until a leaf row
(one without children) is encountered.

At this point, Oracle goes up in the hierarchy until the next row with a child
row is found, and the Oracle returns that child, and so forth until the next
leaf row is returned.

This process continues, with Oracle returning to the root row for the next child
only when all of the "descendants" of the first child row have been returned.


Description of image file

PARTITION BY value_expr [, value_expr]...


Description of image file

{ query_name
| [schema .]
  { table [ { PARTITION ( partition )
            | SUBPARTITION ( subpartition )
            } [sample_clause]
          | [sample_clause]
          | @ dblink
          ]
  | { view | materialized view } [@ dblink]
  }
| ( subquery [subquery_restriction_clause] )
|
}


Description of image file

expr [NOT] BETWEEN expr AND expr


Description of image file

PARTITION BY RANGE ( column [, column]... )
  (PARTITION [partition] range_values_clause table_partition_description
    [, PARTITION [partition] range_values_clause table_partition_description]... )


Description of image file

VALUES LESS THAN
  ( { value | MAXVALUE } [, { value | MAXVALUE }]... )


Description of image file

RANK ( expr [, expr]... ) WITHIN GROUP
( ORDER BY
  expr [ DESC | ASC ] [NULLS { FIRST | LAST }]
  [, expr [ DESC | ASC ] [NULLS { FIRST | LAST }]]...
)


Description of image file

RANK ( ) OVER ( [query_partition_clause] order_by_clause )


Description of image file

RATIO_TO_REPORT ( expr ) OVER ( [query_partition_clause] )


Description of image file

RAWTOHEX ( raw )


Description of image file

RAWTONHEX ( raw )


Description of image file

REBUILD
  [ {PARTITION partition | SUBPARTITION subpartition}
  | {REVERSE | NOREVERSE} ]
  [ parallel_clause
  | TABLESPACE tablespace
  | PARAMETERS ('ODCI_parameters')
  | ONLINE
  | COMPUTE STATISTICS
  | physical_attributes_clause
  | key_compression
  | logging_clause ]
    [ parallel_clause
    | TABLESPACE tablespace
    | PARAMETERS ('ODCI_parameters')
    | ONLINE
    | COMPUTE STATISTICS
    | physical_attributes_clause
    | key_compression
    | logging_clause ]...


Description of image file

{ MINIMIZE | NOMINIMIZE } RECORDS_PER_BLOCK


Description of image file

{ { DISCONNECT [ FROM SESSION ]
  | { TIMEOUT integer | NOTIMEOUT }
  }
| { NODELAY | DEFAULT DELAY | DELAY integer }
| NEXT integer
| EXPIRE integer | NO EXPIRE
| parallel_clause
| THROUGH { [ THREAD integer ] SEQUENCE integer
          | ALL ARCHIVELOG
          | { ALL | LAST | NEXT } SWITCHOVER
          }
} [ DISCONNECT [ FROM SESSION ]
  | { TIMEOUT integer | NOTIMEOUT }
  | { NODELAY | DEFAULT DELAY | DELAY integer }
  | NEXT integer
  | EXPIRE integer | NO EXPIRE
  | parallel_clause
  | THROUGH { [ THREAD integer ] SEQUENCE integer
            | ALL ARCHIVELOG
            | { ALL | LAST | NEXT } SWITCHOVER
            }
  ] ...


Description of image file

{ general_recovery
| managed_standby_recovery
| END BACKUP
}


Description of image file

[ 'filename' | ( 'filename' [, 'filename']... ) ]
[SIZE integer [ K | M ]] [REUSE]


Description of image file

{ ENABLE [PUBLIC] THREAD integer | DISABLE THREAD integer }


Description of image file

REF ( correlation_variable )


Description of image file

REFERENCES [schema .] { object_table | view } [ (column [, column]...) ]
[ON DELETE { CASCADE | SET NULL }] [constraint_state]


Description of image file

REFERENCING
 { OLD [AS] old | NEW [AS] new | PARENT [AS] parent }
 [ OLD [AS] old | NEW [AS] new | PARENT [AS] parent ]...


Description of image file

REFTOHEX ( expr )


Description of image file

{ column datatype [DEFAULT expr]
  [ inline_constraint [inline_constraint]... | inline_ref_constraint ]
| { out_of_line_constraint | out_of_line_ref_constraint | supplemental_logging_props }
}
[, { column datatype [DEFAULT expr]
  [ inline_constraint [inline_constraint]... | inline_ref_constraint ]
| { out_of_line_constraint | out_of_line_ref_constraint | supplemental_logging_props }
]...


Description of image file

CREATE [GLOBAL TEMPORARY] TABLE [schema.]table
  [(relational_properties)]
  [ON COMMIT {DELETE | PRESERVE} ROWS]
  physical_properties
  table_properties;


Description of image file

RENAME old_name TO new_name;


Description of image file

RENAME COLUMN old_name TO new_name


Description of image file

RENAME { PARTITION partition | SUBPARTITION subpartition } TO new_name


Description of image file

RENAME { PARTITION | SUBPARTITION }
  current_name TO new_name


Description of image file

REPLACE ( char , search_string [, replacement_string] )


Description of image file

REPLACE [invoker_rights_clause] AS OBJECT
  (attribute datatype[, attribute datatype]...
  [, element_spec[, element_spec]...])


Description of image file

{ { SESSIONS_PER_USER
  | CPU_PER_SESSION
  | CPU_PER_CALL
  | CONNECT_TIME
  | IDLE_TIME
  | LOGICAL_READS_PER_SESSION
  | LOGICAL_READS_PER_CALL
  | COMPOSITE_LIMIT
  }
  { integer | UNLIMITED | DEFAULT }
| PRIVATE_SGA { integer [ K | M ] | UNLIMITED | DEFAULT }
}


Description of image file

{ RETURN datatype [{ IS | AS } call_spec] | sqlj_object_type_sig }


Description of image file

RETURNING expr [, expr]... INTO data_item [, data_item]...


Description of image file

REVOKE
{ revoke_system_privileges
| revoke_object_privileges
}
[, { revoke_system_privileges
   | revoke_object_privileges
   }
]...
;


Description of image file

{ object_privilege | ALL [PRIVILEGES] } [( column [, column]... )]
[, { object_privilege | ALL [PRIVILEGES] } [( column [, column]... )]]...
on_object_clause FROM grantee_clause [CASCADE CONSTRAINTS] [FORCE]


Description of image file

{ system_privilege | role | ALL PRIVILEGES }
[, { system_privilege | role | ALL PRIVILEGES }]...
FROM grantee_clause


Description of image file

/*+ REWRITE [( view [view]... )] */


Description of image file

ROLLBACK [WORK] [ TO [SAVEPOINT] savepoint | FORCE 'text' ];


Description of image file

{ ROLLUP | CUBE } ( grouping_expression_list )


Description of image file

ROUND ( date [, fmt ] )


Description of image file

ROUND ( number [, integer ] )


Description of image file

{ ENABLE | DISABLE } ROW MOVEMENT


Description of image file

ROW_NUMBER ( ) OVER ( [query_partition_clause] order_by_clause )


Description of image file

{ ROWID | UROWID [( size )] }


Description of image file

/*+ ROWID ( table ) */


Description of image file

ROWIDTOCHAR ( rowid )


Description of image file

ROWIDTONCHAR ( rowid )


Description of image file

RPAD ( char1 , n [, char2] )


Description of image file

RTRIM ( char [, set ] )


Description of image file

/*+ RULE */


Description of image file

SAMPLE [BLOCK] ( sample_percent )


Description of image file

SAVEPOINT savepoint;


Description of image file

{ object_option [, object_option]... | ALL } auditing_on_clause


Description of image file

SCOPE FOR ( { ref_column | ref_attribute } ) IS [schema .] scope_table_name
[, SCOPE FOR ( { ref_column | ref_attribute } ) IS [schema .] scope_table_name]...


Description of image file

WHEN condition THEN return_expr
  [WHEN condition THEN return_expr]...


Description of image file

GUARD {ALL | STANDBY | NONE}


Description of image file

 { physical_attributes_clause
 | TABLESPACE tablespace
 | logging_clause
 }
 [ physical_attributes_clause
 | TABLESPACE tablespace
 | logging_clause
 ]...


Description of image file

SEGMENT SPACE MANAGEMENT { MANUAL | AUTO }


Description of image file

subquery [for_update_clause];


Description of image file

{ *
| { query_name.*
  | [schema.] { table | view | materialized view } .*
  | expr [[AS] c_alias]
  }
  [, { query_name.*
     | [schema.] { table | view | materialized view } .*
     | expr [[AS] c_alias]
     }
  ]...
}


Description of image file

SESSIONTIMEZONE


Description of image file

SET { CONSTRAINT | CONSTRAINTS }
{ constraint [, constraint]... | ALL }
{ IMMEDIATE | DEFERRED };


Description of image file

SET ROLE
{ role [IDENTIFIED BY password] [, role [IDENTIFIED BY password]]...
| ALL [EXCEPT role [, role]...]
| NONE
}
;


Description of image file

SET SUBPARTITION TEMPLATE
  { ( SUBPARTITION subpartition [list_values_clause] [partitioning_storage_clause]
      [,  SUBPARTITION subpartition [list_values_clause] [partitioning_storage_clause] ...] )
  | hash_subpartition_quantity
  }


Description of image file

SET TIME_ZONE = ' { { + | - } hh : mi | time_zone_region } '


Description of image file

SET TRANSACTION
{ { READ { ONLY | WRITE }
  | ISOLATION LEVEL { SERIALIZABLE | READ COMMITTED }
  | USE ROLLBACK SEGMENT rollback_segment
  }
  [NAME 'test']
| NAME 'test'
}
;


Description of image file

SIGN ( n )


Description of image file

expr WHEN comparison_expr THEN return_expr
  [WHEN comparison_expr THEN return_expr]...


Description of image file

{ expr { = | != | ^= | <> | > | < | >= | <= } expr
| expr [, expr ]... { = | != | ^= | <> } ( subquery )
}


Description of image file

{ [ query_name .
  | [schema .] { table . | view . | materialized view . }
  ] { column | ROWID }
| ROWNUM
| text
| number
| sequence . { CURRVAL | NEXTVAL }
| NULL
}


Description of image file

SIN ( n )


Description of image file

{ number_function
| character_function
| datetime_function
| conversion_function
| miscellaneous_single_row_function
}


Description of image file

insert_into_clause { values_clause [returning_clause] | subquery }


Description of image file

SINH ( n )


Description of image file

SOUNDEX ( char )


Description of image file

MDSYS.SDO_Geometry


Description of image file

SPLIT PARTITION partition_name_old AT ( value [, value]... )
[INTO ( index_partition_description , index_partition_description )] [parallel_clause]


Description of image file

SPLIT PARTITION current_partition { AT | VALUES } ( value [, value]... )
[INTO ( partition_spec , partition_spec )]
[update_global_index_clause] [parallel_clause]


Description of image file

This graphic shows four levels of a hierarchical tree.

Level 1 contains the root/parent node of the tree. A root node is always at the
top of a hierarchical tree. The root node has two "children" at Level 2. Each of
these children in turn has children at Level 3. Therefore, the Level 2 nodes are
parent/child nodes.

At Level 3, some of the nodes in turn have children at Level 4. These Level 3
nodes are parent/child nodes. Other Level 3 nodes have no children at Level 4.
These Level 3 nodes are child/leaf nodes. A leaf node has no children at lower
levels.


Description of image file

{ { statement_option | ALL } [, { statement_option | ALL }]...
| { system_privilege | ALL PRIVILEGES }
  [, { system_privilege | ALL PRIVILEGES }]...
}
[auditing_by_clause]


Description of image file

EXTERNAL NAME java_ext_name LANGUAGE JAVA USING
     (SQLData | CustomDatum | OraData)


Description of image file

EXTERNAL NAME 'field_name'


Description of image file

RETURN {datatype | SELF AS RESULT}
EXTERNAL { VARIABLE NAME 'java_static_field_name'
         | NAME 'java_method_sig'
         }


Description of image file

SQRT ( n )


Description of image file

{ ACTIVATE [PHYSICAL | LOGICAL] STANDBY DATABASE [SKIP [STANDBY LOGFILE]
| SET STANDBY DATABASE TO MAXIMIZE
    {PROTECTION | AVAILABILITY | PERFORMANCE}
| REGISTER [OR REPLACE] [PHYSICAL | LOGICAL] LOGFILE
                    [redo_log_file_spec [, redo_log_file_spec]...]
| commit_switchover_clause
| START LOGICAL STANDBY APPLY
     {NEW PRIMARY dblink | INITIAL [scn_value]}
| {STOP | ABORT} LOGICAL STANDBY APPLY
}
[parallel_clause]


Description of image file

/*+ STAR */


Description of image file

/*+ STAR_TRANSFORMATION */


Description of image file

{ MOUNT [{ STANDBY | CLONE } DATABASE]
| OPEN { [READ WRITE] [RESETLOGS | NORESETLOGS][MIGRATE]
       | READ ONLY
       }
}


Description of image file

STDDEV ( [ DISTINCT | ALL ] expr ) [OVER ( analytic_clause )]


Description of image file

STDDEV_POP ( expr ) [OVER ( analytic_clause )]


Description of image file

STDDEV_SAMP ( expr ) [OVER ( analytic_clause )]


Description of image file

STORAGE
( { INITIAL integer [ K | M ]
  | NEXT integer [ K | M ]
  | MINEXTENTS integer
  | MAXEXTENTS { integer | UNLIMITED }
  | PCTINCREASE integer
  | FREELISTS integer
  | FREELIST GROUPS integer
  | OPTIMAL [ integer [ K | M ] | NULL ]
  | BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
  }
  [ INITIAL integer [ K | M ]
  | NEXT integer [ K | M ]
  | MINEXTENTS integer
  | MAXEXTENTS { integer | UNLIMITED }
  | PCTINCREASE integer
  | FREELISTS integer
  | FREELIST GROUPS integer
  | OPTIMAL [ integer [ K | M ] | NULL ]
  | BUFFER_POOL { KEEP | RECYCLE | DEFAULT }
  ]...
)


Description of image file

{ ORDER | CLUSTER } BY ( column [, column]... )


Description of image file

SUBPARTITION BY HASH ( column [, column]... )
[SUBPARTITIONS quantity [STORE IN ( tablespace [, tablespace]... )]
| subpartition_template
]


Description of image file

SUBPARTITION BY LIST ( column ) [subpartition_template]


Description of image file

SUBPARTITION [subpartition] [list_values_clause] [partitioning_storage_clause]


Description of image file

SUBPARTITION TEMPLATE
( SUBPARTITION subpartition [ list_values_clause ] [ partitioning_storage_clause ]
  [, SUBPARTITION subpartition [ list_values_clause ] [ partitioning_storage_clause ] ]
)
| hash_subpartition_quantity


Description of image file

{ MEMBER | STATIC } { procedure_declaration
                    | function_declaration
                    | constructor_declaration
                    }


Description of image file

{ MEMBER | STATIC } { procedure_spec | function_spec }


Description of image file

[ subquery_factoring_clause ]
SELECT [ hint ] [ { DISTINCT | UNIQUE } | ALL ] select_list
FROM table_reference [, table_reference]...
[ where_clause ]
[ hierarchical_query_clause ]
[ group_by_clause ]
[ HAVING condition ]
[ { UNION | UNION ALL | INTERSECT | MINUS } ( subquery )]
[ order_by_clause ]


Description of image file

WITH query_name AS ( subquery )  [, query_name AS ( subquery ) ]...


Description of image file

WITH { READ ONLY | CHECK OPTION [CONSTRAINT constraint] }


Description of image file

[ELEMENT] IS OF [TYPE] ( [ONLY] type )
| [NOT] SUBSTITUTABLE AT ALL LEVELS


Description of image file

{ SUBSTR
| SUBSTRB
| SUBSTRC
| SUBSTR2
| SUBSTR4
}
( string , position [, substring_length] )


Description of image file

SUM ( [ DISTINCT | ALL ] expr ) [OVER ( analytic_clause )]


Description of image file

{ ADD SUPPLEMENTAL LOG GROUP log_group ( column [, column]... ) [ALWAYS]
| DROP SUPPLEMENTAL LOG GROUP log_group
}


Description of image file

SUPPLEMENTAL LOG GROUP log_group ( column [, column]... ) [ALWAYS]


Description of image file

SYS_CONNECT_BY_PATH (column, char)


Description of image file

SYS_CONTEXT ( 'namespace' , 'parameter' [, length] )


Description of image file

SYS_DBURIGEN
( { column | attribute } [rowid]
  [, { column | attribute } [rowid]]...
  [, 'text ( )']
)


Description of image file

SYS_EXTRACT_UTC ( datetime_with_timezone )


Description of image file

SYS_GUID ( )


Description of image file

SYS_TYPEID ( object_type_value )


Description of image file

SYS_XMLAGG ( expr [fmt] )


Description of image file

SYS_XMLGEN ( expr [fmt] )


Description of image file

SYSDATE


Description of image file

SYSTIMESTAMP


Description of image file

TABLE ( collection_expression ) [( + )]


Description of image file

[schema .] table [t_alias]
( index_expr [ ASC | DESC ] [, index_expr [ ASC | DESC ]]... )
[ { { global_partitioned_index | local_partitioned_index }
    | index_attributes
  }
| domain_index_clause
]


Description of image file

[ segment_attributes_clause ]
[ data_segment_compression | key_compression ]
[ OVERFLOW [ segment_attributes_clause ] ]
[ { LOB_storage_clause | varray_col_properties }
    [ LOB_storage_clause | varray_col_properties ]...
]
[partition_level_subpartition]


Description of image file

{ range_partitioning
| hash_partitioning
| list_partitioning
| composite_partitioning
}


Description of image file

[column_properties]
[table_partitioning_clauses]
[CACHE | NOCACHE]
[parallel_clause]
[ROWDEPENDENCIES | NOROWDEPENDENCIES]
[MONITORING | NOMONITORING]
[enable_disable_clause]
  [enable_disable_clause]...
[row_movement_clause]
[AS subquery]


Description of image file

{ ONLY (query_table_expression) [flashback_clause] [t_alias]
| query_table_expression [flashback_clause] [t_alias]
| (joined_table)
| joined_table
}


Description of image file

TAN ( n )


Description of image file

TANH ( n )


Description of image file

[EXTENT MANAGEMENT LOCAL] [UNIFORM [SIZE integer [ K | M ]]]


Description of image file

[N] 'c [c]...'


Description of image file

TO_CHAR ( nchar | clob | nclob )


Description of image file

TO_CHAR ( date [, fmt [, 'nlsparam' ]] )


Description of image file

TO_CHAR ( n [, fmt [, 'nlsparam']] )


Description of image file

TO_CLOB ( lob_column | char )


Description of image file

TO_DATE ( char [, fmt [, 'nlsparam']] )


Description of image file

TO_DSINTERVAL ( char ['nlsparam'] )


Description of image file

TO_LOB ( long_column )


Description of image file

TO_MULTI_BYTE ( char )


Description of image file

TO_NCHAR ( {char | clob | nclob} [, fmt [, 'nlsparam']] )


Description of image file

TO_NCHAR ( { datetime | interval } [, fmt [, 'nlsparam']] )


Description of image file

TO_NCHAR ( n [, fmt [, 'nlsparam']] )


Description of image file

TO_NCLOB ( lob_column | char )


Description of image file

TO_NUMBER ( char [, fmt [, 'nlsparam']] )


Description of image file

TO_SINGLE_BYTE ( char )


Description of image file

TO_TIMESTAMP ( char [ , fmt ['nlsparam']] )


Description of image file

TO_TIMESTAMP_TZ ( char [ , fmt ['nlsparam']] )


Description of image file

TO_YMINTERVAL ( char )


Description of image file

TRACE [ RESETLOGS | NORESETLOGS]


Description of image file

TRANSLATE ( 'char' , 'from_string' , 'to_string' )


Description of image file

TRANSLATE ( text USING { CHAR_CS | NCHAR_CS } )


Description of image file

TREAT ( expr AS [REF] [schema.] type )


Description of image file

TRIM
( [{ { LEADING | TRAILING | BOTH } [trim_character])
   | trim_character
   }
   FROM
  ]
  trim_source
)


Description of image file

TRUNC ( date [, fmt] )


Description of image file

TRUNC ( n [, m] )


Description of image file

TRUNCATE
{ TABLE [schema .] table [{ PRESERVE | PURGE } MATERIALIZED VIEW LOG]
| CLUSTER [schema .] cluster
}
[{ DROP | REUSE } STORAGE];


Description of image file

TRUNCATE { PARTITION partition | SUBPARTITION subpartition }
  [{ DROP | REUSE } STORAGE] [update_global_index_clause [parallel_clause]]


Description of image file

[NEW] [schema.] type_name ( [expr [, expr]...] )


Description of image file

TZ_OFFSET
( { 'time_zone_name'
  | '{ + | - } hh : mi'
  | SESSIONTIMEZONE
  | DBTMEZONE
  }
)


Description of image file

UID


Description of image file

UNDER_PATH ( column [, levels], path_string [, correlation_integer] )


Description of image file

UNDO TABLESPACE tablespace
[DATAFILE datafile_tempfile_spec [, datafile_tempfile_spec]...]


Description of image file

UNISTR ( 'string' )


Description of image file

/*+ UNNEST */


Description of image file

UPDATE [hint]
{ dml_table_expression_clause | ONLY ( dml_table_expression_clause ) }
[t_alias] update_set_clause [where_clause] [returning_clause];


Description of image file

{ UPDATE | INVALIDATE } GLOBAL INDEXES


Description of image file

SET
{ { ( column [, column]... ) = ( subquery )
  | column = { expr | ( subquery ) | DEFAULT }
  }
  [, { ( column [, column]... ) = ( subquery )
     | column = { expr | ( subquery ) | DEFAULT }
     }
  ]...
| VALUE ( t_alias ) = { expr | ( subquery ) }
}


Description of image file

UPDATEXML(XMLType_instance, XPath_string, value_expr
                          [, XPath_string, value_expr] ...
                          [, namespace_string])


Description of image file

UPGRADE [[NOT] INCLUDING DATA]
[column_properties]


Description of image file

UPPER ( char )


Description of image file

/*+ USE_CONCAT */


Description of image file

/*+ USE_HASH ( table [table]... ) */


Description of image file

/*+ USE_MERGE ( table [table]... ) */


Description of image file

/*+ USE_NL ( table [table]... ) */


Description of image file

USER


Description of image file

[schema .] { [package .] function | user_defined_operator }
[@ dblink .] [( [ DISTINCT | ALL ] expr [, expr]... )]


Description of image file

USERENV ( 'parameter' )


Description of image file

USING [schema .] [ package . | type . ] function_name


Description of image file

USING INDEX
  [ [ schema.]index )
  | ( create_index_statement )
  | { LOCAL | global_partitioned_index }
  | { PCTFREE integer
    | INITRANS integer
    | MAXTRANS integer
    | TABLESPACE tablespace
    | storage_clause
    | { SORT | NOSORT }
    | logging_clause
    }
      [ PCTFREE integer
      | INITRANS integer
      | MAXTRANS integer
      | TABLESPACE tablespace
      | storage_clause
      | { SORT | NOSORT }
      | logging_clause
      ]...
  ]


Description of image file

USING { [schema .] statistics_type | NULL }


Description of image file

USING [schema .] implementation_type


Description of image file

{ VALIDATE REF UPDATE [SET DANGLING TO NULL]
| VALIDATE STRUCTURE [CASCADE] [into_clause] { OFFLINE| ONLINE }
}


Description of image file

VALUE ( correlation_variable )


Description of image file

VALUES ( { expr | DEFAULT } [, { expr | DEFAULT }]... )


Description of image file

VAR_POP ( expr ) [OVER ( analytic_clause )]


Description of image file

VAR_SAMP ( expr ) [OVER ( analytic_clause )]


Description of image file

: host_variable [[INDICATOR] : indicator_variable]


Description of image file

VARIANCE ( [ DISTINCT | ALL ] expr ) [OVER ( analytic_clause )]


Description of image file

VARRAY varray_item
    { substitutable_column_clause
    | STORE AS LOB
        { LOB_segname ( LOB_parameters )
        | LOB_segname
        | ( LOB_parameters
        }
    }


Description of image file

VSIZE ( expr )


Description of image file

WHERE condition


Description of image file

WIDTH_BUCKET ( expr , min_value , max_value , num_buckets )


Description of image file

{ ROWS | RANGE }
{ BETWEEN
  { UNBOUNDED PRECEDING
  | CURRENT ROW
  | value_expr { PRECEDING | FOLLOWING }
  }
  AND
  { UNBOUNDED FOLLOWING
  | CURRENT ROW
  | value_expr { PRECEDING | FOLLOWING }
  }
| { UNBOUNDED PRECEDING
  | CURRENT ROW
  | value_expr PRECEDING
  }
}


Description of image file

XMLATTRIBUTES
  (value_expr [AS c_alias]
    [, value_expr [AS c_alias]...)


Description of image file

{ XMLType | URIType }


Description of image file

XMLAGG (XMLType_instance [ order_by_clause ])


Description of image file

XMLCOLATTVAL ( value_expr [AS identifier]
                        [, value_expr [AS identifier]... )


Description of image file

XMLCONCAT ( XMLType_instance [, XMLType_instance]... )


Description of image file

XMLELEMENT ( [NAME] identifier [, XML_attributes_clause] [, value_expr [, value_expr]... ] )


Description of image file

XMLFOREST (value_expr [AS c_alias]
            [, value_expr [AS c_alias]... ])


Description of image file

[ XMLSCHEMA XMLSchema_URL ] ELEMENT {element | XMLSchema_URL # element}


Description of image file

XMLSEQUENCE ( XMLType_instance
            | sys_refcursor_instance [, fmt ]
            )


Description of image file

XMLTRANSFORM (XMLType_instance, XMLType_instance)


Description of image file

XMLTYPE [COLUMN] column [XMLType_storage] [XMLSchema_spec]


Description of image file

STORE AS OBJECT RELATIONAL
         | CLOB [ { LOB_segname [ (LOB_parameters) ]
                  | LOB_parameters
                  }
                ]


Description of image file

CREATE TABLE [schema.] table OF XMLTYPE
  [XMLTYPE XMLType_storage] [XMLSchema_spec]


Description of image file

OF XMLTYPE [ XMLSchema_spec ]
   WITH OBJECT IDENTIFIER { DEFAULT | ( expr [, expr ]...) }