oracle process过大,不停机处理oracle超过最大processes数故障

在做oracle数据库管理的时候,经常会有用户遇到超过最大进程数的错误,表现为新的连接无法登入数据库。一致提示超过最大的process数 。其实这个问题,如果用户是测试环境,好解决。直接关闭数据库或者直接kill掉所有的“LOCAL=NO”的进程。

但是很多情况是,用户无法接受停机,或者kill掉所有的远端连接。基于以上情况,写了如下脚本

#!/usr/bin/perl

#write by wulei

#get the first parameter

$arg1="";

chomp($arg1);

while($arg1 eq "")

{

print "please input your first parameter:";

$arg1=;

chomp($arg1);

if($arg1 ne ""){

@temp1=`ps -eo lstart,pid,args | grep '$arg1' | grep -v grep`;

$process_count=`ps -eo lstart,pid,args | grep '$arg1' | grep -v grep | wc -l`;

chomp($process_count);

if($process_count eq "0")

{

$arg1="";

print "we got 0 processes,please retry!\n";

next;

}

print "We will kill $process_count(count) processes\n";

print "All the processes list below!!!!!!!!!!!!!!!!!\n";

print "#############################################################\n";

print @temp1;

}

chomp($arg1);

}

#get the second parameter

$arg2="";

chomp($arg2);

while($arg2 eq "")

{

print "\n";

print "\n";

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值