没有合适的资源?快使用搜索试试~ 我知道了~
首页Oracle数据库数据字典详解与应用
"Oracle数据字典是Oracle数据库中的一个重要组成部分,它存储了关于数据库结构、权限、表空间、索引、用户、过程等所有元数据的信息。数据字典对于数据库管理员(DBA)和开发人员来说是至关重要的工具,因为它提供了对数据库内部工作的洞察,帮助管理和维护数据库的完整性和安全性。Oracle Database Reference 10g Release 2 (10.2) 是一份官方文档,包含了关于Oracle数据库10g版本的详细参考信息,由众多贡献者共同编撰完成。"
在Oracle数据库中,数据字典主要由系统表和视图组成,这些表和视图存储在特定的schema下,如DBA、USER和ALL。这些schema下的对象提供了不同级别的访问权限,DBA视图提供全库的视角,USER视图显示当前用户的对象,而ALL视图则包含当前用户有权查看的所有对象。
1. **数据字典视图**:
- **DBA_视图**:如DBA_TABLES、DBA_SEGMENTS、DBA_INDEXES等,用于查看整个数据库的所有对象信息,包括表、段、索引等。
- **USER_视图**:如USER_TABLES、USER_SEGMENTS、USER_INDEXES等,只显示当前用户拥有的对象信息。
- **ALL_视图**:如ALL_TABLES、ALL_SEGMENTS、ALL_INDEXES等,显示当前用户有权限访问的所有对象信息。
2. **数据字典表**:
- **SYS_表**:如SYSTabControl、SYSObject$、SYSIndex$等,这些是Oracle数据库内部使用的表,存储了数据库的各种元数据。
3. **数据字典的使用**:
- **查询数据字典**:例如,查询所有表的命令可以是`SELECT * FROM DBA_TABLES;`,查询特定用户表的命令可以是`SELECT * FROM USER_TABLES;`
- **权限管理**:通过查询DBA_ROLES、DBA_USERS和DBA_TAB_PRIVS等视图,可以了解用户角色和权限分配。
- **性能监控**:通过DBA_HIST_ACTIVE_SESS_HISTORY等视图,可以进行性能分析和问题诊断。
- **存储管理**:使用DBA_DATA_FILES、DBA_FREE_SPACE等视图,可以查看数据文件和自由空间信息。
4. **数据字典的安全性**:
- 数据字典的访问受到权限控制,只有具备适当权限的用户才能查看或修改其中的信息。
- DBA通常会使用GRANT和REVOKE语句来控制用户对数据字典的访问。
5. **数据字典维护**:
- 数据字典的维护是DBA的重要职责,包括定期检查数据字典的完整性,确保其准确反映数据库状态。
- Oracle提供了一些实用程序,如DBMS_METADATA,用于获取和比较数据字典中的元数据。
Oracle Database Reference文档是学习和理解Oracle数据字典的权威指南,涵盖了从基本概念到高级特性的广泛内容,包括SQL语法、PL/SQL编程、数据库管理、性能优化等多个方面。通过这份文档,用户可以深入理解Oracle数据库的工作原理,有效地进行数据库管理和开发工作。
xvi
DBA_DMT_USED_EXTENTS............................................................................................................ 4-42
DBA_ENABLED_AGGREGATIONS ............................................................................................... 4-42
DBA_ENABLED_TRACES.................................................................................................................. 4-43
DBA_ENCRYPTED_COLUMNS........................................................................................................ 4-43
DBA_EPG_DAD_AUTHORIZATION ............................................................................................. 4-43
DBA_ERRORS....................................................................................................................................... 4-43
DBA_EVALUATION_CONTEXT_TABLES ..................................................................................... 4-44
DBA_EVALUATION_CONTEXT_VARS ......................................................................................... 4-44
DBA_EVALUATION_CONTEXTS .................................................................................................... 4-44
DBA_EXP_FILES ................................................................................................................................... 4-44
DBA_EXP_OBJECTS ............................................................................................................................ 4-44
DBA_EXP_VERSION ........................................................................................................................... 4-44
DBA_EXTENTS ..................................................................................................................................... 4-45
DBA_EXTERNAL_LOCATIONS....................................................................................................... 4-45
DBA_EXTERNAL_TABLES ................................................................................................................ 4-45
DBA_FEATURE_USAGE_STATISTICS ........................................................................................... 4-46
DBA_FGA_AUDIT_TRAIL................................................................................................................. 4-48
DBA_FILE_GROUP_EXPORT_INFO ............................................................................................... 4-49
DBA_FILE_GROUP_FILES................................................................................................................. 4-49
DBA_FILE_GROUP_TABLES............................................................................................................. 4-49
DBA_FILE_GROUP_TABLESPACES................................................................................................ 4-49
DBA_FILE_GROUP_VERSIONS ...................................................................................................... 4-49
DBA_FILE_GROUPS............................................................................................................................ 4-50
DBA_FREE_SPACE............................................................................................................................... 4-50
DBA_FREE_SPACE_COALESCED ................................................................................................... 4-50
DBA_HIGH_WATER_MARK_STATISTICS ................................................................................... 4-50
DBA_HIST_ACTIVE_SESS_HISTORY............................................................................................ 4-51
DBA_HIST_BASELINE ....................................................................................................................... 4-53
DBA_HIST_BG_EVENT_SUMMARY.............................................................................................. 4-53
DBA_HIST_BUFFER_POOL_STAT................................................................................................... 4-54
DBA_HIST_BUFFERED_QUEUES.................................................................................................... 4-54
DBA_HIST_BUFFERED_SUBSCRIBERS........................................................................................ 4-55
DBA_HIST_COMP_IOSTAT
.............................................................................................................. 4-55
DBA_HIST_CR_BLOCK_SERVER.................................................................................................... 4-56
DBA_HIST_CURRENT_BLOCK_SERVER ..................................................................................... 4-57
DBA_HIST_DATABASE_INSTANCE .............................................................................................. 4-57
DBA_HIST_DATAFILE........................................................................................................................ 4-58
DBA_HIST_DB_CACHE_ADVICE................................................................................................... 4-58
DBA_HIST_DLM_MISC ..................................................................................................................... 4-59
DBA_HIST_ENQUEUE_STAT ........................................................................................................... 4-59
DBA_HIST_EVENT_NAME............................................................................................................... 4-59
DBA_HIST_FILEMETRIC_HISTORY.............................................................................................. 4-60
DBA_HIST_FILESTATXS.................................................................................................................... 4-60
DBA_HIST_INST_CACHE_TRANSFER ......................................................................................... 4-61
DBA_HIST_INSTANCE_RECOVERY.............................................................................................. 4-61
DBA_HIST_JAVA_POOL_ADVICE .................................................................................................. 4-63
DBA_HIST_LATCH.............................................................................................................................. 4-63
xvii
DBA_HIST_LATCH_CHILDREN ..................................................................................................... 4-64
DBA_HIST_LATCH_MISSES_SUMMARY .................................................................................... 4-65
DBA_HIST_LATCH_NAME............................................................................................................... 4-65
DBA_HIST_LATCH_PARENT ........................................................................................................... 4-65
DBA_HIST_LIBRARYCACHE ........................................................................................................... 4-66
DBA_HIST_LOG................................................................................................................................... 4-66
DBA_HIST_METRIC_NAME ............................................................................................................ 4-67
DBA_HIST_MTTR_TARGET_ADVICE .......................................................................................... 4-67
DBA_HIST_OPTIMIZER_ENV.......................................................................................................... 4-68
DBA_HIST_OSSTAT............................................................................................................................ 4-68
DBA_HIST_OSSTAT_NAME............................................................................................................. 4-69
DBA_HIST_PARAMETER .................................................................................................................. 4-69
DBA_HIST_PARAMETER_NAME ................................................................................................... 4-69
DBA_HIST_PGA_TARGET_ADVICE.............................................................................................. 4-70
DBA_HIST_PGASTAT......................................................................................................................... 4-70
DBA_HIST_PROCESS_MEM_SUMMARY .................................................................................... 4-71
DBA_HIST_RESOURCE_LIMIT ....................................................................................................... 4-71
DBA_HIST_ROWCACHE_SUMMARY........................................................................................... 4-72
DBA_HIST_RULE_SET ....................................................................................................................... 4-72
DBA_HIST_SEG_STAT ....................................................................................................................... 4-73
DBA_HIST_SEG_STAT_OBJ.............................................................................................................. 4-74
DBA_HIST_SERVICE_NAME ........................................................................................................... 4-75
DBA_HIST_SERVICE_STAT .............................................................................................................. 4-75
DBA_HIST_SERVICE_WAIT_CLASS.............................................................................................. 4-75
DBA_HIST_SESS_TIME_STATS....................................................................................................... 4-76
DBA_HIST_SESSMETRIC_HISTORY............................................................................................. 4-76
DBA_HIST_SGA................................................................................................................................... 4-76
DBA_HIST_SGA_TARGET_ADVICE.............................................................................................. 4-77
DBA_HIST_SGASTAT......................................................................................................................... 4-77
DBA_HIST_SHARED_POOL_ADVICE .......................................................................................... 4-77
DBA_HIST_SNAP_ERROR................................................................................................................ 4-78
DBA_HIST_SNAPSHOT..................................................................................................................... 4-78
DBA_HIST_SQL_BIND_METADATA ............................................................................................. 4-79
DBA_HIST_SQL_PLAN ...................................................................................................................... 4-79
DBA_HIST_SQL_SUMMARY............................................................................................................ 4-81
DBA_HIST_SQL_WORKAREA_HSTGRM .................................................................................... 4-81
DBA_HIST_SQLBIND......................................................................................................................... 4-82
DBA_HIST_SQLSTAT ......................................................................................................................... 4-82
DBA_HIST_SQLTEXT ......................................................................................................................... 4-85
DBA_HIST_STAT_NAME................................................................................................................... 4-85
DBA_HIST_STREAMS_APPLY_SUM ............................................................................................. 4-85
DBA_HIST_STREAMS_CAPTURE .................................................................................................. 4-86
DBA_HIST_STREAMS_POOL_ADVICE........................................................................................ 4-87
DBA_HIST_SYS_TIME_MODEL ...................................................................................................... 4-87
DBA_HIST_SYSMETRIC_HISTORY ............................................................................................... 4-87
DBA_HIST_SYSMETRIC_SUMMARY............................................................................................ 4-88
DBA_HIST_SYSSTAT .......................................................................................................................... 4-88
xviii
DBA_HIST_SYSTEM_EVENT ........................................................................................................... 4-89
DBA_HIST_TABLESPACE_STAT...................................................................................................... 4-89
DBA_HIST_TBSPC_SPACE_USAGE ............................................................................................... 4-89
DBA_HIST_TEMPFILE........................................................................................................................ 4-90
DBA_HIST_TEMPSTATXS ................................................................................................................. 4-90
DBA_HIST_THREAD.......................................................................................................................... 4-91
DBA_HIST_UNDOSTAT..................................................................................................................... 4-91
DBA_HIST_WAITCLASSMET_HISTORY...................................................................................... 4-92
DBA_HIST_WAITSTAT....................................................................................................................... 4-93
DBA_HIST_WR_CONTROL.............................................................................................................. 4-93
DBA_IND_COLUMNS........................................................................................................................ 4-93
DBA_IND_EXPRESSIONS ................................................................................................................. 4-94
DBA_IND_PARTITIONS .................................................................................................................... 4-94
DBA_IND_STATISTICS...................................................................................................................... 4-94
DBA_IND_SUBPARTITIONS............................................................................................................ 4-94
DBA_INDEXES...................................................................................................................................... 4-94
DBA_INDEXTYPE_ARRAYTYPES ................................................................................................... 4-94
DBA_INDEXTYPE_COMMENTS ..................................................................................................... 4-94
DBA_INDEXTYPE_OPERATORS..................................................................................................... 4-94
DBA_INDEXTYPES.............................................................................................................................. 4-95
DBA_INTERNAL_TRIGGERS .......................................................................................................... 4-95
DBA_JAVA_ARGUMENTS................................................................................................................. 4-95
DBA_JAVA_CLASSES.......................................................................................................................... 4-95
DBA_JAVA_DERIVATIONS ............................................................................................................... 4-95
DBA_JAVA_FIELDS ............................................................................................................................. 4-95
DBA_JAVA_IMPLEMENTS ................................................................................................................ 4-95
DBA_JAVA_INNERS............................................................................................................................ 4-95
DBA_JAVA_LAYOUTS......................................................................................................................... 4-96
DBA_JAVA_METHODS ...................................................................................................................... 4-96
DBA_JAVA_NCOMPS ......................................................................................................................... 4-96
DBA_JAVA_POLICY............................................................................................................................. 4-96
DBA_JAVA_RESOLVERS.................................................................................................................... 4-96
DBA_JAVA_THROWS
......................................................................................................................... 4-97
DBA_JOBS.............................................................................................................................................. 4-97
DBA_JOBS_RUNNING....................................................................................................................... 4-97
DBA_JOIN_IND_COLUMNS ............................................................................................................ 4-97
DBA_KGLLOCK ................................................................................................................................... 4-97
DBA_LIBRARIES.................................................................................................................................. 4-98
DBA_LMT_FREE_SPACE.................................................................................................................... 4-98
DBA_LMT_USED_EXTENTS............................................................................................................. 4-98
DBA_LOB_PARTITIONS.................................................................................................................... 4-98
DBA_LOB_SUBPARTITIONS............................................................................................................ 4-98
DBA_LOB_TEMPLATES ..................................................................................................................... 4-98
DBA_LOBS............................................................................................................................................. 4-99
DBA_LOCK ............................................................................................................................................ 4-99
DBA_LOCK_INTERNAL .................................................................................................................... 4-99
DBA_LOCKS.......................................................................................................................................... 4-99
xix
DBA_LOG_GROUP_COLUMNS...................................................................................................... 4-99
DBA_LOG_GROUPS ......................................................................................................................... 4-100
DBA_LOGMNR_LOG ....................................................................................................................... 4-100
DBA_LOGMNR_PURGED_LOG.................................................................................................... 4-100
DBA_LOGMNR_SESSION .............................................................................................................. 4-101
DBA_LOGSTDBY_EVENTS ............................................................................................................ 4-101
DBA_LOGSTDBY_HISTORY .......................................................................................................... 4-102
DBA_LOGSTDBY_LOG.................................................................................................................... 4-103
DBA_LOGSTDBY_NOT_UNIQUE................................................................................................. 4-103
DBA_LOGSTDBY_PARAMETERS................................................................................................. 4-104
DBA_LOGSTDBY_PROGRESS....................................................................................................... 4-105
DBA_LOGSTDBY_SKIP ................................................................................................................... 4-106
DBA_LOGSTDBY_SKIP_TRANSACTION.................................................................................. 4-106
DBA_LOGSTDBY_UNSUPPORTED.............................................................................................. 4-107
DBA_METHOD_PARAMS............................................................................................................... 4-107
DBA_METHOD_RESULTS............................................................................................................... 4-107
DBA_MVIEW_AGGREGATES ........................................................................................................ 4-107
DBA_MVIEW_ANALYSIS ................................................................................................................ 4-107
DBA_MVIEW_COMMENTS............................................................................................................ 4-108
DBA_MVIEW_DETAIL_RELATIONS............................................................................................ 4-108
DBA_MVIEW_JOINS ........................................................................................................................ 4-108
DBA_MVIEW_KEYS.......................................................................................................................... 4-108
DBA_MVIEW_LOG_FILTER_COLS............................................................................................... 4-108
DBA_MVIEW_LOGS ......................................................................................................................... 4-108
DBA_MVIEW_REFRESH_TIMES................................................................................................... 4-109
DBA_MVIEWS .................................................................................................................................... 4-109
5 Static Data Dictionary Views: DBA_NESTED_TABLE_COLS to USER_XML_
VIEWS
DBA_NESTED_TABLE_COLS .............................................................................................................. 5-1
DBA_NESTED_TABLES......................................................................................................................... 5-1
DBA_OBJ_AUDIT_OPTS....................................................................................................................... 5-1
DBA_OBJ_COLATTRS ........................................................................................................................... 5-2
DBA_OBJECT_SIZE ................................................................................................................................ 5-2
DBA_OBJECT_TABLES.......................................................................................................................... 5-3
DBA_OBJECTS......................................................................................................................................... 5-3
DBA_OPANCILLARY ............................................................................................................................. 5-3
DBA_OPARGUMENTS .......................................................................................................................... 5-3
DBA_OPBINDINGS ............................................................................................................................... 5-3
DBA_OPERATOR_COMMENTS......................................................................................................... 5-3
DBA_OPERATORS.................................................................................................................................. 5-3
DBA_OPTSTAT_OPERATIONS ........................................................................................................... 5-3
DBA_ORPHAN_KEY_TABLE ............................................................................................................... 5-4
DBA_OUTLINE_HINTS......................................................................................................................... 5-4
DBA_OUTLINES ..................................................................................................................................... 5-4
DBA_OUTSTANDING_ALERTS ......................................................................................................... 5-4
DBA_PART_COL_STATISTICS............................................................................................................ 5-5
xx
DBA_PART_HISTOGRAMS ................................................................................................................. 5-5
DBA_PART_INDEXES ............................................................................................................................ 5-5
DBA_PART_KEY_COLUMNS .............................................................................................................. 5-6
DBA_PART_LOBS ................................................................................................................................... 5-6
DBA_PART_TABLES............................................................................................................................... 5-6
DBA_PARTIAL_DROP_TABS............................................................................................................... 5-6
DBA_PENDING_CONV_TABLES....................................................................................................... 5-6
DBA_PENDING_TRANSACTIONS ................................................................................................... 5-6
DBA_PLSQL_OBJECT_SETTINGS ..................................................................................................... 5-6
DBA_POLICIES........................................................................................................................................ 5-7
DBA_POLICY_CONTEXTS ................................................................................................................... 5-7
DBA_POLICY_GROUPS........................................................................................................................ 5-7
DBA_PRIV_AUDIT_OPTS .................................................................................................................... 5-7
DBA_PROCEDURES............................................................................................................................... 5-7
DBA_PROFILES ....................................................................................................................................... 5-7
DBA_PROPAGATION............................................................................................................................ 5-8
DBA_PROXIES......................................................................................................................................... 5-8
DBA_PUBLISHED_COLUMNS ........................................................................................................... 5-8
DBA_QUEUE_SCHEDULES ................................................................................................................. 5-8
DBA_QUEUE_SUBSCRIBERS........................................................................................................... 5-10
DBA_QUEUE_TABLES........................................................................................................................ 5-10
DBA_QUEUES....................................................................................................................................... 5-10
DBA_RCHILD ....................................................................................................................................... 5-10
DBA_RECOVERABLE_SCRIPT ........................................................................................................ 5-10
DBA_RECOVERABLE_SCRIPT_BLOCKS...................................................................................... 5-11
DBA_RECOVERABLE_SCRIPT_ERRORS...................................................................................... 5-11
DBA_RECOVERABLE_SCRIPT_PARAMS..................................................................................... 5-11
DBA_RECYCLEBIN.............................................................................................................................. 5-12
DBA_REDEFINITION_ERRORS ...................................................................................................... 5-13
DBA_REDEFINITION_OBJECTS ..................................................................................................... 5-13
DBA_REFRESH ...............................................................................................................................
...... 5-14
DBA_REFRESH_CHILDREN............................................................................................................. 5-14
DBA_REFS.............................................................................................................................................. 5-14
DBA_REGISTERED_ARCHIVED_LOG.......................................................................................... 5-14
DBA_REGISTERED_MVIEW_GROUPS......................................................................................... 5-14
DBA_REGISTERED_MVIEWS.......................................................................................................... 5-15
DBA_REGISTRY ................................................................................................................................... 5-15
DBA_REGISTRY_HIERARCHY ........................................................................................................ 5-16
DBA_REGISTRY_HISTORY .............................................................................................................. 5-16
DBA_REGISTRY_LOG........................................................................................................................ 5-17
DBA_REPAIR_TABLE.......................................................................................................................... 5-17
DBA_RESOURCE_INCARNATIONS .............................................................................................. 5-17
DBA_RESUMABLE .............................................................................................................................. 5-18
DBA_REWRITE_EQUIVALENCES................................................................................................... 5-19
DBA_RGROUP...................................................................................................................................... 5-19
DBA_ROLE_PRIVS .............................................................................................................................. 5-19
DBA_ROLES .......................................................................................................................................... 5-20
剩余947页未读,继续阅读
2008-12-20 上传
2013-12-12 上传
2008-05-04 上传
2008-10-12 上传
2012-12-07 上传
2011-01-09 上传
TouchStone_soft
- 粉丝: 0
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功