我的编程空间,编程开发者的网络收藏夹
学习永远不晚

Generate Script to kill multiple Oracle sessions

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

Generate Script to kill multiple Oracle sessions

$ cd /data/oracle/SHRARS/backup/export/ITSK0004746383

$ sqlplus -s / as sysdba < killsession.sql
set head off
set linesize 80
set pagesize 1000
select 'ALTER SYSTEM KILL SESSION '''|| sid ||','|| SERIAL# ||''' immediate;'
from v\$session
where username IN ('CREDIT', 'METABASE_CREDIT')
order by username;
exit
EOF


$sqlplus / as sysdba;
SQL>@killsession.sql


$ cat killsession.sql

ALTER SYSTEM KILL SESSION '1294,33195' immediate;
ALTER SYSTEM KILL SESSION '1295,50713' immediate;
ALTER SYSTEM KILL SESSION '1298,7193' immediate;
ALTER SYSTEM KILL SESSION '11,6559' immediate;
ALTER SYSTEM KILL SESSION '12,4241' immediate;
ALTER SYSTEM KILL SESSION '13,43041' immediate;
ALTER SYSTEM KILL SESSION '18,33047' immediate;
ALTER SYSTEM KILL SESSION '20,18697' immediate;
ALTER SYSTEM KILL SESSION '22,43179' immediate;
ALTER SYSTEM KILL SESSION '24,22839' immediate;
ALTER SYSTEM KILL SESSION '25,26477' immediate;
ALTER SYSTEM KILL SESSION '27,39063' immediate;
ALTER SYSTEM KILL SESSION '28,16391' immediate;
ALTER SYSTEM KILL SESSION '33,15411' immediate;
ALTER SYSTEM KILL SESSION '265,8067' immediate;
ALTER SYSTEM KILL SESSION '266,18241' immediate;
ALTER SYSTEM KILL SESSION '267,43603' immediate;
ALTER SYSTEM KILL SESSION '268,10399' immediate;
ALTER SYSTEM KILL SESSION '274,1221' immediate;
ALTER SYSTEM KILL SESSION '275,62325' immediate;
ALTER SYSTEM KILL SESSION '277,42223' immediate;
ALTER SYSTEM KILL SESSION '278,7343' immediate;
ALTER SYSTEM KILL SESSION '282,35757' immediate;
ALTER SYSTEM KILL SESSION '284,4955' immediate;
ALTER SYSTEM KILL SESSION '286,36563' immediate;
ALTER SYSTEM KILL SESSION '287,19961' immediate;
ALTER SYSTEM KILL SESSION '515,30293' immediate;
ALTER SYSTEM KILL SESSION '519,32899' immediate;
ALTER SYSTEM KILL SESSION '522,52349' immediate;
ALTER SYSTEM KILL SESSION '527,22901' immediate;
ALTER SYSTEM KILL SESSION '529,32971' immediate;
ALTER SYSTEM KILL SESSION '532,10831' immediate;
ALTER SYSTEM KILL SESSION '533,48323' immediate;
ALTER SYSTEM KILL SESSION '534,20303' immediate;
ALTER SYSTEM KILL SESSION '535,32059' immediate;
ALTER SYSTEM KILL SESSION '536,17155' immediate;
ALTER SYSTEM KILL SESSION '537,35009' immediate;
ALTER SYSTEM KILL SESSION '540,1325' immediate;
ALTER SYSTEM KILL SESSION '544,11927' immediate;
ALTER SYSTEM KILL SESSION '770,20397' immediate;
ALTER SYSTEM KILL SESSION '772,23053' immediate;
ALTER SYSTEM KILL SESSION '773,28053' immediate;
ALTER SYSTEM KILL SESSION '782,2387' immediate;
ALTER SYSTEM KILL SESSION '784,48639' immediate;
ALTER SYSTEM KILL SESSION '785,43135' immediate;
ALTER SYSTEM KILL SESSION '786,40917' immediate;
ALTER SYSTEM KILL SESSION '787,6837' immediate;
ALTER SYSTEM KILL SESSION '790,19759' immediate;
ALTER SYSTEM KILL SESSION '793,15377' immediate;
ALTER SYSTEM KILL SESSION '794,43759' immediate;
ALTER SYSTEM KILL SESSION '795,51489' immediate;
ALTER SYSTEM KILL SESSION '1027,40997' immediate;
ALTER SYSTEM KILL SESSION '1031,65177' immediate;
ALTER SYSTEM KILL SESSION '1033,55291' immediate;
ALTER SYSTEM KILL SESSION '1036,36143' immediate;
ALTER SYSTEM KILL SESSION '1038,59219' immediate;
ALTER SYSTEM KILL SESSION '1040,38831' immediate;
ALTER SYSTEM KILL SESSION '1042,57453' immediate;
ALTER SYSTEM KILL SESSION '1044,25747' immediate;
ALTER SYSTEM KILL SESSION '1045,57295' immediate;
ALTER SYSTEM KILL SESSION '1280,9343' immediate;
ALTER SYSTEM KILL SESSION '1281,2485' immediate;
ALTER SYSTEM KILL SESSION '1284,34733' immediate;
ALTER SYSTEM KILL SESSION '1285,4495' immediate;
ALTER SYSTEM KILL SESSION '1286,34371' immediate;
ALTER SYSTEM KILL SESSION '1287,30681' immediate;
ALTER SYSTEM KILL SESSION '1288,2105' immediate;
ALTER SYSTEM KILL SESSION '8,50775' immediate;
ALTER SYSTEM KILL SESSION '263,4043' immediate;
ALTER SYSTEM KILL SESSION '273,58961' immediate;
ALTER SYSTEM KILL SESSION '524,44481' immediate;
ALTER SYSTEM KILL SESSION '531,26673' immediate;
ALTER SYSTEM KILL SESSION '1299,25877' immediate;

73 rows selected.

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

Generate Script to kill multiple Oracle sessions

下载Word文档到电脑,方便收藏和打印~

下载Word文档

编程热搜

目录