以下SQL查询当前连入Oracle数据库的会话的详细信息。
Command is:
—— —— —— —— ——
select
a.program,a.osuser,a.type,a.sid,a.serial#,a.paddr,a.username,a.command,a.status,a.schema#,a.schemaname,
b.TEMPORARY_TABLESPACE,b.username
from
v$session a,dba_users b
where
a.schemaname = b.username;
—— —— —— —— ——
Log:

——————————————————————————
Ending。

1 thought on “Oracle DB:查看当前数据库活动会话的相关信息”

  1. 比方说,要查看哪些用户是用PL/SQL Developer登录的Oracle实例,可以用下面的语句筛选:
    set pagesize 100
    set linesize 400

    col TEMPORARY_TABLESPACE for a8
    col program for a14
    col username for a12
    col osuser for a14
    col schemaname for a9
    col machine for a23

    select
    a.program,a.osuser,a.machine,a.type,a.sid,a.serial#,a.paddr,a.username,a.command,a.status,a.schema#,a.schemaname,
    b.TEMPORARY_TABLESPACE,b.username
    from
    v$session a,dba_users b
    where
    a.schemaname = b.username
    and
    a.program=’plsqldev.exe’;

    查询结果:

    ——————
    Done。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

隐藏
变装