ningbo-seo 发表于 2013-1-28 19:29:26

oracle数据查询字典

数据字典dict总是属于Oracle用户sys的。
1、用户:
 select username from dba_users;
改口令
 alter user spgroup identified by spgtest;
2、表空间:
 select * from dba_data_files;
 select * from dba_tablespaces;//表空间
 select tablespace_name,sum(bytes), sum(blocks)
from dba_free_space group by tablespace_name;//空闲表空间
 select * from dba_data_files
where tablespace_name='RBS';//表空间对应的数据文件
 select * from dba_segments
where tablespace_name='INDEXS';
3、数据库对象:
 select * from dba_objects;
 CLUSTER、DATABASE LINK、FUNCTION、INDEX、LIBRARY、PACKAGE、PACKAGE BODY、
 PROCEDURE、SEQUENCE、SYNONYM、TABLE、TRIGGER、TYPE、UNDEFINED、VIEW。
4、表:
 select * from dba_tables;
 analyze my_table compute statistics;->dba_tables后6列
 select extent_id,bytes from dba_extents
页: [1]
查看完整版本: oracle数据查询字典