Oracle查看用户操作sql语句以及数据库日志
--查看日志文件
select member from v$logfile;
--查看表空间使用情况
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 segment_name,
tablespace_name,
r.status,
(initial_extent /
1024) initialextent,
(next_extent /
1024) nextextent,
max_extents,
v.curext curextent
FROM
dba_rollback_segs r, v$rollstat v
WHERE r.segment_id
= v.usn(+)
ORDER BY
segment_name;
posted on 2016-08-03 17:37 梦幻之城,理想王国 阅读(2729) 评论(0) 编辑 收藏 举报