给你一个语句,查看剩余表空间
SELECT upper(f.tablespace_name) 表空间名,
d.Tot_grootte_Mb "表空间大小(M)",
d.Tot_grootte_Mb - f.total_bytes "已使用空间(M)",
round((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2) "使用比",
f.total_bytes "空闲空间(M)",
f.max_bytes "最大块(M)"
FROM
(SELECT tablespace_name,
round(SUM(bytes)/(1024*1024),2) total_bytes,
round(MAX(bytes)/(1024*1024),2) max_bytes
FROM sys.dba_free_space
GROUP BY tablespace_name) f,
(SELECT dd.tablespace_name, round(SUM(dd.bytes)/(1024*1024),2) Tot_grootte_Mb
FROM sys.dba_data_files dd
GROUP BY dd.tablespace_name) d
WHERE d.tablespace_name = f.tablespace_name
ORDER BY 4 DESC
SELECT upper(f.tablespace_name) 表空间名,
d.Tot_grootte_Mb "表空间大小(M)",
d.Tot_grootte_Mb - f.total_bytes "已使用空间(M)",
round((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2) "使用比",
f.total_bytes "空闲空间(M)",
f.max_bytes "最大块(M)"
FROM
(SELECT tablespace_name,
round(SUM(bytes)/(1024*1024),2) total_bytes,
round(MAX(bytes)/(1024*1024),2) max_bytes
FROM sys.dba_free_space
GROUP BY tablespace_name) f,
(SELECT dd.tablespace_name, round(SUM(dd.bytes)/(1024*1024),2) Tot_grootte_Mb
FROM sys.dba_data_files dd
GROUP BY dd.tablespace_name) d
WHERE d.tablespace_name = f.tablespace_name
ORDER BY 4 DESC
解决方案 »
- oracle10g 临时表里的记录怎么加锁
- sql统计在职人数和历史人数(按月、按年)!!!!!!!!!!!
- 各位'大虾'们救命啊!小弟要因此失业了.请好心人帮忙来看看吧!急......救急如救命,谢谢啦!
- oracle10g的数据如何导入oracle9i中?急
- 在PL/SQL中set echo on 是什么意思啊?
- 序列尚未在此进程中定义?100分求解答
- 帮忙纠正一个语法错误
- developer/2000是否就是oracle网站上的Oracle Developer Suite for Windows ?
- ORACLE有关包的创建问题?
- 长生天啊,oracle怎么对我这么残忍
- oracle 给硬盘加锁?
- 使用动态语句子如何处理单条记录急~~~
alter tablespace user_tabs add datafile 'x:\yyy.dbf' sizeof 250m autoextend on;autoextend 设置为 on 就好啦!
看帮助或是用楼上诸位的脚本都可以,若实在不会,DBA Studio傻瓜式的也可以啊。
ORA-01119: error in creating database file '/dev/rora_data207.dbf'
ORA-27040: skgfrcre: create error, unable to create file
IBM AIX RISC System/6000 Error: 13: Permission denied