📝 BLOG.IK.AM

@making's memo
(🗃 Categories 🏷 Tags)

OracleでSessionをまとめてkillするSQLを吐くSQL

🗃 {Middleware/RDBMS/Oracle}

🗓 Updated at 2013-05-08T12:07:45Z by Toshiaki Maki  🗓 Created at 2013-05-08T09:48:01Z by Toshiaki Maki  {✒️️ Edit  ⏰ History}


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

メモ

select sid, serial#, username, machine, osuser, program, status, sql_id,
'alter system kill session ''' || sid || ',' || serial# || ''';' killsql
from v$session
where username is not null
order by osuser;

killsqlカラムの結果をこぴってはりつけて実行。
SQLDeveloperとかで実行する想定


【参考】MySQLの場合

http://tech.basicinc.jp/MySQL/2014/04/06/mysql_processlist_kill/