易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle 数据库里查看表空间施用情况

 oracle 数据库里查看表空间施用景况;
oracle表空间的事儿情况要常常查看,正常闲空比率过低的时分就应该思考增大表看空间了。查看步骤如次SQL:
步骤1:
select dbf.tablespace_name,
dbf.totalspace "总量(M)",
dbf.totalblocks as 总块数,
dfs.freespace "余下总量(M)",
dfs.freeblocks "余下块数",
(dfs.freespace / dbf.totalspace) * 100 "闲空比率"
from (select t.tablespace_name,
sum(t.bytes) / 1024 / 1024 totalspace,
sum(t.blocks) totalblocks
from dba_data_files t
group by t.tablespace_name) dbf,
(select tt.tablespace_name,
sum(tt.bytes) / 1024 / 1024 freespace,
sum(tt.blocks) freeblocks
from dba_free_space tt
group by tt.tablespace_name) dfs
where trim(dbf.tablespace_name) = trim(dfs.tablespace_name)
步骤2:
SELECT Total.name "Tablespace Name",
Free_space, (total_space-Free_space) Used_space, total_space
from
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) TOTAL_SPACE
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name = Total.name
应发幸存的表空间不够的差错时,处置如次:
一:找到该表空间对应的数据文件及途径
select * from dba_data_files t
where t.tablespace_name = 'ARD'
二:增大数据文件
alter database datafile '全途径的数据文件姓名' resize ***M
三:增加数据文件
alter tablespace 表空间姓名
add datafile '全途径的数据文件姓名' ***M
诠注:表空间尽可能让free百分比保持在十%之上,如若仅次于十%便增多datafile也许resizedatafile,通常数据文件不用超过二G
本文来源:
我的异常网
Oracle Exception


相关文档:

在Oracle中创建视图,提示无权限 ORA

 今天在对表创建视图的时候,用户提示 ORA-01031用户权限不足 
使用system用户对其分配dba等权限,依然无法创建视图。 
继续赋予权限 
grant select any table to AAA; 
授予用户询所有表的权限 
grant select any dictionary to AAA; 
再次授取用户select任何字典的权限 
......

ORACLE parent latch和children latch

         About parent vs child latches. There is no fundamental low level difference between parent and child latches, they are all small regions of memory modified with atomic test-and-set style opcodes.
You see parent (and solitary) latches from x$ksll ......

Oracle select in/exists/not in/not exits

in 是把外表和内表作hash 连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询。
一直以来认为exists比in效率高的说法是不准确的。
如果查询的两个表大小相当,那么用in和exists差别不大。
in 是把外表和内表作hash
连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询。
一直以 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号