--5 data dictonary contents and usage
data dictionary
在创建database 的时候create database的过程中oracle会自动调用
d:oracleora92rdbmsadminsql.bsq来创建该系统里面的基本表(数据字
典表)同事创建了dynamic performance tables(动态性能表是内存表在
database启动的时候产生,在database关闭的时候自动消失,记录的是
database运行时的一些信息,性能优化时数据的来源就来自这)
---data dictionary
数据字典保存在table里面oracle 数据字典表是只读的而且是加密的不允许
用户用dml command直接去修改系统table
data dictionary 用来
1. 描述database and database objects的结构信息
2. 包括两部分
1)Base table(用sql.bsq创建的)
储存database 地描述信息
在create db得时候通过sql.bsq创建的,同时base 表里的信息是read only
得并且是加了密的,data dictionary views则对data dictionary里的信息
进行翻译让这些信息可以读出来(data dictionary views create using
catalog.sql)
----data dicrionary contents
1.logical and physical database structure
2.definitions and space allocations of objuects
3.integrity constraints
4.users
5.roles
6.privileges
7.auditing(可以记录在文件里面也可以记录在data dictionary)
----how the data dictionary is used
1.the oracle server usees it to find information about
A.users
B.schema objects
C.storage structures
2 the oracle server modifies it when a ddl statement is executed
3. users and dbas can use it as a read-only reference for
information about the database
----data dictionary view categories(分三层)
1.dba what is in all the schemas
2.all what the user can access
3.user what is in the user's schema
dba_*** :all of the objuects in the database (包括所有的data
dictionary 信息,所有的user 所有的objects 每个用户的权限及角色等)
all_***:objects accessible by the current user(这个用户可以访问到的
数据对象,包括user自己拥有的数据对象也包括别人授权可以访问的)
user_***:objects owned by the current user(只包括自己拥有得数据对
象和自己可以存取的数据对象)
三个数据字典视图结构是完全一样的只是有的少了没必要的owners栏位
sql>connect sys/test as sysdba
sql>grant dba to testuser
sql>connect testuser/pwd
sql>select * from dba_tables
有资料产生
sql>connect sys/test as sysdba
sql>revoke dba from testuser
sql>connect testuser/pwd
sql>select * from dba_tables;
表或视图不存在
要访问dba_**得信息需要有dba权限的用户。user_*** all_***没有该限定
----dynamic performance tables
1.views are continually updated while the database is operational
2.information is accessed from
A.memory (也就是内容在数据库启动的nomount阶段的信息)
B.control file(也就是内容在数据库启动的mount 阶段的信息)
3.dba uses dynamic views to monitor and tune the database
4.dynamic views are owned by sys user
5.DML is not allowed
查data dictionary and dynamic performance views
通过desc dictionary
查动态性能标desc v$fixed_table;(v$fixed_table也叫修理表)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/202861/viewspace-796273/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/202861/viewspace-796273/