查看Oracle数据库中的,已经连接好的..当前用户状况
参考:
http://stackoverflow.com/questions/1043096/how-to-list-active-open-connections-in-oracle
以sys身份连接进入,执行如下sql 语句:
SQL> select
substr(a.spid,1,9)
pid,
substr(b.sid,1,5)
sid,
substr(b.serial#,1,5)
ser#,
substr(b.machine,1,6)
box,
substr(b.username,1,10)
username,
--
b.server,
substr(b.osuser,1,8)
os_user,
substr(b.program,1,30)
program
from v$session b, v$process a
where
b.paddr = a.addr
and
type=‘USER‘
order by spid;
**************************
运行结果:
PID SID SER#
BOX USERNAME OS_USER PROGRAM
---------
----- ----- ------ ---------- --------
------------------------------
2744
1 5 localh
SYS oracle
[email protected]
6747
57 8 localh
SYS oracle
[email protected] (TN
7457
60 20 localh SYSMAN
oracle OMS
7489
26 70 localh SYSMAN
oracle OMS
26819 49
6269 localh SYS
oracle [email protected]
(TN
26822 43 3610 localh
SYS oracle
[email protected] (TN
26829
45 4967
localh
oracle [email protected]
(
6911 61
14 localh SYS
oracle [email protected]
(TN
7553 58
14 localh SYSMAN oracle
OMS
7558 62
3 localh SYSMAN
oracle OMS
26833 56
513
localh
oracle [email protected]
(
PID SID SER#
BOX USERNAME OS_USER PROGRAM
---------
----- ----- ------ ---------- --------
------------------------------
6781
59 14 localh DBSNMP
oracle
[email protected]
6828
27 251 localh DBSNMP
oracle
[email protected]
6936
30 281 localh
SYS oracle
[email protected] (TN
7254
42 367 localh DBSNMP
oracle [email protected]
15 rows
selected.
SQL>
可以看到,rman是以sys身份连接进入的。
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。