📝 BLOG.IK.AM

@making's memo
(🗃 Categories 🏷 Tags)

Oracleで特定のOSユーザーが実行中のSQLを出力するSQL

🗃 {Middleware/RDBMS/Oracle}

🗓 Updated at 2013-05-08T12:08:10Z by Toshiaki Maki  🗓 Created at 2013-05-08T12:08:10Z by Toshiaki Maki  {✒️️ Edit  ⏰ History}


💣 Danger: This content is obsolete. You should avoid reading. If you really want to read, please click .

メモ

select username, osuser, machine, terminal, program, 
sid, serial#, status, sql_address, sql_text
from v$session ss, v$sqltext sq
where type = 'USER'
    and osuser = XXXXX'
    and status = 'ACTIVE'
    and ss.sql_address = sq.address
order by ss.osuser, ss.sid, ss.serial#, sq.piece