一些有用的SQL
程序员文章站
2022-06-08 08:35:58
...
select * from v$license
--取得数据库目前的进程数
select count(*) from v$process
--取得进程数的上限
select value from v$parameter where name = 'processes'
--获取SID
select instance_name from v$instance
--
select sid,
v$session.username 用户名,
last_call_et 持续时间,
status 状态,
LOCKWAIT 等待锁,
machine 用户电脑名,
logon_time 开始登入时间,
sql_text
from v$session, v$process, v$sqlarea
where paddr = addr
and sql_hash_value = hash_value
and status = 'ACTIVE'
and v$session.username is not null
order by last_call_et desc
--取得数据库目前的进程数
select count(*) from v$process
--取得进程数的上限
select value from v$parameter where name = 'processes'
--获取SID
select instance_name from v$instance
--
select sid,
v$session.username 用户名,
last_call_et 持续时间,
status 状态,
LOCKWAIT 等待锁,
machine 用户电脑名,
logon_time 开始登入时间,
sql_text
from v$session, v$process, v$sqlarea
where paddr = addr
and sql_hash_value = hash_value
and status = 'ACTIVE'
and v$session.username is not null
order by last_call_et desc
上一篇: 详谈PHP文件目录基础操作