oracle表空间处理操作

查看表空间使用率:

1
2
3
4
5
6
7
8
9
10
11
12
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;

查看数据文件位置

1
Select * FROM DBA_DATA_FILES;

扩容表空间:

1
ALTER TABLESPACE "USERS" ADD DATAFILE '/u02/app/ora11g/users03.dbf' SIZE 8G;
# oracle
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×