oracle表空间处理操作
查看表空间使用率:
SELECT SUM(bytes) / (1024 * 1024) AS free_space, tablespace_name
FROM dba_free_space
GROUP BY tablespace_name;
SELECT a.tablespace_name,
a.bytes total,
b.bytes used,
c.bytes free,
(b.bytes * 100) / a.bytes "% USED ",
(c.bytes * 100) / a.bytes "% FREE "
FROM sys.sm$ts_avail a, sys.sm$ts_used b, sys.sm$ts_free c
WHERE a.tablespace_name = b.tablespace_name
AND a.tablespace_name = c.tablespace_name;
查看数据文件位置
Select * FROM DBA_DATA_FILES;
扩容表空间:
ALTER TABLESPACE "USERS" ADD DATAFILE '/u02/app/ora11g/users03.dbf' SIZE 8G;
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。
文章标题:oracle表空间处理操作
本文作者:wangzhirui
发布时间:2018-09-27, 13:51:43
最后更新:2025-02-27, 02:03:55
原始链接:https://wangzhirui.com/2018/09/27/oracle表空间处理操作/转载请保留原文链接及作者。