--查看oracle表空间相关:
select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size from dba_tablespaces t, dba_data_files d where t.tablespace_name = d.tablespace_name group by t.tablespace_name;
--查看oracle表字段,注释,大小相关:
select tab.TABLE_NAME, --表名 |
--查看oracle用户锁表相关:
select
distinct sid,
v$session.username 用户名,
last_call_et 持续时间,
status 状态,
LOCKWAIT 等待锁,
machine 用户电脑名,
logon_time 开始登入时间,
sql_text
from v$session, v$process, v$sqlarea,dba_ddl_locks
where paddr = addr
and sql_hash_value = hash_value
and v$session.username is not null
and status='ACTIVE'
and dba_ddl_locks.type='Body'
and dba_ddl_locks.session_id = v$session.SID
and dba_ddl_locks.owner='实例名'
order by last_call_et desc