128.Note the points about data dictionary views and dynamic performance views:
1) These are stored in the SYSTEM tablespace.
2) These are the based on the virtual tables.
3) These are owned by the SYS user.
4) These can be queried by a normal user only if O7_DICTIONARY_ACCESSIBILTY parameter is set to
TRUE.
5) The V$FIXED_TABLE view can be queried to list the names of these views.
Which statements listed describe the data dictionary views?
A.1 and 3
B.2, 3, and 5
C.1, 2, and 3
D.2, 3, 4, and 5
答案:A
首先他们都属于sys,并且保存在system表空间
1、正确
2、错误,基于基表
3、正确
4、错误
a.8i之后引入了一个参数 o7_dictionary_aaccessibility ,利用该参数可以控制
select any table 的访问权限,如果为true,表示可以查询数据字典,即允许访问
sys用户下的对象,9i之后默认为false
b.也可以直接设置
grant select on dba_users to user;
如果是动态视图的话,这里需要注意需要下面这样设置
grant select on v_$session to bk; --这里v$session 实际是v_$sessioin的一个同义词
c.总体设置
grant select any dictionary to user;
5.错误
V$FIXED_TABLE 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.
--这里说的是可以查到所有的动态性能表,视图和派生表,题目说的是数据字典,比如user_tables
SQL> select * from V$FIXED_TABLE where name like 'USER%';
no rows selected
一、数据字典
1.它是一组只读的系统表[与审计有关的AUD$开头的除外,他们是可以进行修改的]
2.分类
a.基表
在创建数据库的时候通过sql.bsq来自动生成这些基表,基表永远是最先被创建的对象,他们无法理解里面的内容就和天书一样
b.数据字典视图
通过运行catalog.sql,存放位置为$ORACLE_HOME/rdbms/admin下存放的
i.user_*,自己的
ii.all_*,能看到的
iii.dba_*,所有的
*_objects --字典式静态视图,也就是数据发生变化的时候,oracle并不会及时的刷新,只有当执行了analyze命令之后,这些视图才会刷新
以apex_开始的用户是oracle application express的用户,是一个图形化的开发和部署工具
通常只有oracle服务器进程可以修改数据字典中的数据
3.存储了如下信息
a.数据库的逻辑结构和物理结构,如表空间和数据文件信息
b.所有数据库对象定义的信息,包括表、索引、视图、序列号、同义词、过程、函数、软件包和触发器
c.所有数据库对象的磁盘空间分配的信息
d.oracle 用户名
e.每个用户所授予的权限和角色
f.完整性约束的信息
g.列的默认值
h.审计信息
4.包含了以下信息
a.对象的属主
b.用户所拥有的权限
c.对象的创建时间
d.对象存储参数位置
e.对象存储空间的使用情况等
二、动态性能视图
以v$开头,不允许dml操作,可以通过v$fixed_table 或者dictionary来得到所有的动态性能视图,dict_columns获取字典列的信息可以获取如下信息
1.会话活动的信息
2.对象打开或者关闭的信息
3.对象在线或离线的信息
1) These are stored in the SYSTEM tablespace.
2) These are the based on the virtual tables.
3) These are owned by the SYS user.
4) These can be queried by a normal user only if O7_DICTIONARY_ACCESSIBILTY parameter is set to
TRUE.
5) The V$FIXED_TABLE view can be queried to list the names of these views.
Which statements listed describe the data dictionary views?
A.1 and 3
B.2, 3, and 5
C.1, 2, and 3
D.2, 3, 4, and 5
答案:A
首先他们都属于sys,并且保存在system表空间
1、正确
2、错误,基于基表
3、正确
4、错误
a.8i之后引入了一个参数 o7_dictionary_aaccessibility ,利用该参数可以控制
select any table 的访问权限,如果为true,表示可以查询数据字典,即允许访问
sys用户下的对象,9i之后默认为false
b.也可以直接设置
grant select on dba_users to user;
如果是动态视图的话,这里需要注意需要下面这样设置
grant select on v_$session to bk; --这里v$session 实际是v_$sessioin的一个同义词
c.总体设置
grant select any dictionary to user;
5.错误
V$FIXED_TABLE 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.
--这里说的是可以查到所有的动态性能表,视图和派生表,题目说的是数据字典,比如user_tables
SQL> select * from V$FIXED_TABLE where name like 'USER%';
no rows selected
一、数据字典
1.它是一组只读的系统表[与审计有关的AUD$开头的除外,他们是可以进行修改的]
2.分类
a.基表
在创建数据库的时候通过sql.bsq来自动生成这些基表,基表永远是最先被创建的对象,他们无法理解里面的内容就和天书一样
b.数据字典视图
通过运行catalog.sql,存放位置为$ORACLE_HOME/rdbms/admin下存放的
i.user_*,自己的
ii.all_*,能看到的
iii.dba_*,所有的
*_objects --字典式静态视图,也就是数据发生变化的时候,oracle并不会及时的刷新,只有当执行了analyze命令之后,这些视图才会刷新
以apex_开始的用户是oracle application express的用户,是一个图形化的开发和部署工具
通常只有oracle服务器进程可以修改数据字典中的数据
3.存储了如下信息
a.数据库的逻辑结构和物理结构,如表空间和数据文件信息
b.所有数据库对象定义的信息,包括表、索引、视图、序列号、同义词、过程、函数、软件包和触发器
c.所有数据库对象的磁盘空间分配的信息
d.oracle 用户名
e.每个用户所授予的权限和角色
f.完整性约束的信息
g.列的默认值
h.审计信息
4.包含了以下信息
a.对象的属主
b.用户所拥有的权限
c.对象的创建时间
d.对象存储参数位置
e.对象存储空间的使用情况等
二、动态性能视图
以v$开头,不允许dml操作,可以通过v$fixed_table 或者dictionary来得到所有的动态性能视图,dict_columns获取字典列的信息可以获取如下信息
1.会话活动的信息
2.对象打开或者关闭的信息
3.对象在线或离线的信息