在Oracle中查询表的大小和表空间的大小
有两种含义的表大小。一种是分配给一个表的物理空间数量,而不管空间是否被使用。可以这样查询获得字节数:
select segment_name, bytes
from user_segments
where segment_type = 'TABLE';
或者
Select Segment_Name,Sum(bytes)/1024/1024 from User_Extents Group By Segment_Name
另一种表实际使用的空间。这样查询:
analyze table emp compute statistics;
select num_rows * avg_row_len
from user_tables
where table_name = 'EMP';
查看每个表空间的大小
Select Tablespace_Name,Sum(bytes)/1024/1024 from Dba_Segments Group By Tablespace_Name
本文转自:http://www.admin99.net/read.php/257.htm
相关文档:
表空间:
Oracle的UNDOTBS01.DBF文件太大的解决办法
1、.禁止undo tablespace自动增长
alter database datafile 'full_path\undotbs01.dbf' autoextend off;
2.-- 创建一个新的小空间的undo tablespace
create undo tablespace undotBS2 datafile ......
原 文:平凡岁月:jira的安装(oracle数据库)http://www.trucy.org/blog/ray/archives/000927.html
以下是基于原文的补充完善后的内容:
JIRA是一个优秀的问题(or bugs,task,improvement,new feature  ......
--oracle jobs批处理命令参考
qlplus /nolog
connect sys/lee as sysdba
--以下两句在sys(即具有dba权限的用户)用户下执行
show parameter job_queue_processes;
alter system set job_queue_processes=10;
exit
sqlplus /nolog
connect jcy/jcy
ALTER TABLE T_OA_AFFICHE MODIFY (INPUT_TIME DATE);
ALTER TABLE ......
使用SYS用户以SYSDBA身份登录系统
查看修改前sga_max_size,sga_target大小
show parameter sga_max_size;
show parameter sga_target;
修改参数
alter system set sga_max_size=1600m scope=spfile;
alter system set sga_target=1600m scope=spfile;
查看修改后sga_max_size,sga_target大小
show parameter sga_ ......
Oracle日期函数学习时,在教程有几个实例如下:
Months_between(’01-sep-95’, ’11-jan-94’)
结果是:19.6774194
Add_months 在指定的月份上面增加相应得月份
例如:
Add_months(’11-jan-94’, 6)
结果是:11-jul-94
Next_day 计算规定日期的后一个特定日期
例如:
Next_ ......