一、数据字典
不仅是每个Oracle数据库的核心组件之一,也是所有数据库用户重要的信息资源;描述数据与对象的数据;包含只读的表和视图;存储在系统表空间;所有者为sys;由Oracle server维护;通过select语句访问。
执行数据定义语言(definition language,DDL)语句或有些数据操纵语言 (data manipulation language ,DML) 语句时会更新数据字典。
包括两部分:
1、 基表(base tables),在create database执行时(执行sql.bsq脚本)创建;用户不能直接访问因为它们是被加密的,无法用DML语句直接更新这些表,有一个例外,AUD$。基表举例:IND$,包含数据的索引信息。
2、数据字典视图,在执行$ORACLE_HOME/rdbms/admin/catalog.sql,catproc.sql脚本时创建。
数据字典的内容:审计、用户被赋予的特权和角色、用户名字、完整性约束、资源的分配情况、逻辑和物理结构。
数据字典视图种类:
数据字典举例:
概览: DICTIONARY, DICT_COLUMNS
Schema objects: DBA_TABLES, DBA_INDEXES,DBA_TAB_COLUMNS, DBA_CONSTRAINTS
空间分配: DBA_SEGMENTS, DBA_EXTENTS
数据库结构: DBA_TABLESPACES,DBA_DATA_FILES
Data dictionary views are static views that answer questions such as:
• Was the object ever created?
• What is the object a part of?
• Who owns the object?
• What privileges do users have?
• What restrictions are on the object?
二、动态性能视图
虚表;记录当前数据库活动及活动状态;在数据库运行期间持续更新;可通过访问内存和控制文件获得的信息;用于数据库的监视和性能调优;所有者为sys;synonymous以v$开头;在V$FIXED_TABLE里列出所有这些表的名字。
DBA可以在这些视图上再创建视图。
The dynamic performance tables answer questions such as:
• Is the object online and available?
• Is the object open?
• What locks are being held?
• Is the session active?
举例:
•V$CONTROLFILE: Lists the names of the control files
•V$DATABASE: Contains database information from the control file.
•V$DATAFILE: Contains data file information from the control file
•V$INSTANCE: Displays the state of the current instance
•V$PARAMETER: Lists parameters and values currently in effect for the session
•V$SESSION: Lists session information for each current session
•V$SGA: Contains summary information on the system global area (SGA)
•V$SPPARAMETER: Lists the contents of the SPFILE
•V$TABLESPACE: Displays tablespace information from the control file
•V$THREAD: Contains thread information from the control file
•V$VERSION: Version numbers of core library components in the Oracle server
三、管理脚本命名规则
Practice 5: Using Data Dictionary and Dynamic Performance Views
1 Which of the following statements are true about the data dictionary?
a The data dictionary describes the database and its objects.
b The data dictionary includes two types of objects: base tables and data dictionary
views.
c The data dictionary is a set of tables.
d The data dictionary records and verifies information about its associated database.
答案:a,b,c,d。
2 Base tables are created using the catalog.sql script.
a True
b False
答案:b。
解析:是在create database时创建,catalog.sql是创建视图。
3 Which three of the following statements are true about how the data dictionary is used?
a The Oracle server modifies it when a DML statement is executed.
b It is used to find information about users, schema objects, and storage structures.
c It is used by users and DBAs as a reference.
d The data dictionary is a necessary ingredient for the database to function.
答案:b,c,d。
4 Data dictionary views are static views.
a True
b False
答案:a。
5 The information for a dynamic performance view is gathered from the control file.
a True
b False
答案:b。
6 Which of the following questions might a dynamic performance view answer?
a Is the object online and available?
b What locks are being held?
c Who owns the object?
d What privileges do users have?
e Is the session active?
答案:a,b,d,e。

7 Connect as SYSTEM/MANAGER and find a list of the data dictionary views.
8 Identify the database name, instance name, and size of the database blocks.
Hint: Query the V$DATABASE, V$THREAD, and V$PARAMETER dynamic
performance views.
9 List the name of the data files.
Hint: Query the V$DATAFILE dynamic performance view.
10 Identify the data file that makes up the SYSTEM tablespace.
Hint: Query the DBA_DATA_FILES data dictionary view to identify the SYSTEM
tablespace data file.
11 How much free space is available in the database and how much is already used?
Hints
- Query the DBA_FREE_SPACE data dictionary view to show how much free
space is available in the database.
- Query the DBA_SEGMENTS data dictionary view to display how much space is
already used.
12 List the name and creation date of the database users.
Hint: Query the DBA_USERS data dictionary view to list the name and the creation
of the database users.
本文出自 “冰冷的太阳” 博客,请务必保留此出处http://luotaoyang.blog.51cto.com/545649/284100

转载于:https://blog.51cto.com/xutt1986/578252

Oracle 9i学习日志(9)--数据字典与动态性能视图及练习相关推荐

  1. 十三、oracle 数据字典和动态性能视图

    一.概念 数据字典是oracle数据库中最重要的组成部分,它提供了数据库的一些系统信息. 动态性能视图记载了例程启动后的相关信息. 二.数据字典 1).数据字典记录了数据库的系统信息,它是只读表和视图 ...

  2. 我的Oracle 9i学习日志(20)-- profile

    配置文件是下列口令和资源限制的指定集合: • 口令过期和失效 • 口令历史记录 • 口令复杂性校验 • 帐户锁定 • CPU 时间 • 输入/输出(I/O) 操作 • 空闲时间 • 连接时间 • 内存 ...

  3. oracle 9i 只读模式,我的oracle 9i学习日志(6)--Starting Up and shutting down a Database

    Starting Up a Database 1.NOMOUNT 这个状态下oracle server完成下列任务: a.读取初始化参数文件: b.为SGA分配内存: c.启动后台进程: d.打开al ...

  4. 我的Oracle 9i学习日志(11)--重做日志文件及练习

    一.重做日志文件特征:   记录对数据所做的所有更改:提供恢复机制:可以划分成组:至少需要两个组(每个组至少一个成员). 二.结构 联机重做日志文件组: • 一组相同的联机重做日志文件副本称作联机重做 ...

  5. 我的Oracle 9i学习日志(18)-- 维护数据完整性.b

    创建禁止性约束: •加disable关键字即可. SQL> create table t(id int, name char(10)); 表已创建. SQL> desc t  名称     ...

  6. Oracle 原理 : 动态性能视图和数据字典

    Oracle 的数据字典包含了两部分:数据字典表和数据字典视图.数据字典基本表是由$ORACLE_HOME\RDBMS\ADMIN\sql.bsq这文件所创建.表名大多以$结尾,属于sys用户,放在S ...

  7. 从Oracle到PostgreSQL:动态性能视图 vs 标准统计视图

    从 Oracle 到 PostgreSQL :从 Uptime 到数据库实例运行时间 Oracle数据库的性能视图几乎可以说是最引以为骄傲的功能,在那样细粒度的采样统计强度下,依然保持卓越的性能,基于 ...

  8. oracle 查看动态性能视图,oracle常用动态性能视图

    今天通过视频学习,和网上搜索总结了一些oracle 常用的动态性能视图和大家分享 要查看oralce有哪些可用的动态性能视图可以看v$fixed_table 1.关于数据库/实例的动态性能视图 v$d ...

  9. Oracle 动态性能视图 (x$, v$, gv$, v_$, gv_$)

    sys :  x$(内存对象))--->v$(内存对象)---->v_$(view)----->v$(public sysnonym) 一. 动态性能视图 1.1 动态性能图 动态性 ...

最新文章

  1. iOS11解决导航栏影藏返回文字的方法
  2. css div 边缘渐变,围绕div的CSS3渐变边框
  3. 深度学习(二十八)——SOM, Group Normalization, MobileNet, 花式卷积进阶
  4. Java多线程系列---“JUC原子类”02之 框架
  5. LoadRunner 11安装Micosoft Visual C++ 2005 SP1时提示命令行选项语法错误
  6. php将xml转为array,php将xml数据转化为数组(array)
  7. tableau示例超市数据在哪儿_Tableau | 超市销售数据可视化分析
  8. linux以二进制查看文件内容,Linux下二进制文件的查看和编辑
  9. 解决Adobe PhotoShop用户界面字体过小的问题
  10. Java游戏项目之推箱子
  11. 51单片机——LED流水灯
  12. 超好用的自动化测试工具——Python脚本
  13. python 经典图书排行榜_计算机优秀书籍每周销售排行榜
  14. 解构华为AI技术布局:构建无所不及的智能
  15. html字数统计,html中利用javascript实现文本框字数的动态计算
  16. HTML5 新特性: Web Worker 的创建与使用(webpack + TS 环境)
  17. 智媒链全球社区见面会 中国·北京(首场)
  18. 星梦小组KTV点歌系统简介
  19. 宋宝华:论一切都是文件之匿名inode
  20. F623光猫超级管理员密码获取

热门文章

  1. vc++修改软件程序菜单实例
  2. CORS 请求未能成功_CORS 测试 提示错误 Reason: header authorization
  3. Linux Kernel TCP/IP Stack — L2 Layer — Traffic Control(流量控制)的基本操作
  4. Go 语言编程 — defer 关键字
  5. 互联网协议 — SCTP 流控制传输协议
  6. Notepad++自用主题推荐
  7. 51单片机中将变量、数组、函数设置在固定位置,定位到绝对地址
  8. Java 8 Lambda 表达式解析
  9. shell脚本示例:批量比较多个文件的内容是否相同
  10. Linux驱动程序中THIS_MODULE 的定义