12
返回列表 发新帖
楼主: like_7412

请教profile的使用

[复制链接]
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
发表于 2002-5-18 02:43 | 显示全部楼层
看一下 metalink 上這一篇吧Problem Description
-------------------

If "init.ora" resource_limit = true, and idle_time set in profile.

When idle_time exceeds, the session status becomes 'sniped' in v$session,
but sniped sessions never get cleaned up.

Using 'alter system kill session' to kill the session, session status becomes
'killed' in v$session, but still is never cleaned up.


Solution Description
--------------------

On Unix, and if using a dedicated server, use the following shell script to
kill the shadow process (script has been tested on Solaris, AIX, Tru64 and
HPUX):

#!/bin/sh
tmpfile=/tmp/tmp.$$
sqlplus system/manager <<EOF
spool $tmpfile
select p.spid from v\$process p,v\$session s
where s.paddr=p.addr
and s.status='SNIPED';
EOF
for x in `cat $tmpfile | grep "^[0123456789]"`
do
kill -9 $x
done
rm $tmpfile
  

Explanation
-----------

According to several bugs as shown in references, it's still expected behaviour
that sniped session may never clean up. The only workaround is to kill the
shadow process.

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
发表于 2002-5-18 02:48 | 显示全部楼层
如果os 是 NT 的話看這篇:

====================================Since Windows NT does not provide a tool to kill individual threads, Oracle ships the ORAKILL utility with RDBMS versions 7.3.3.6 & up. This utility has the same effect of a KILL -9 command for killing a shadow process or background process in UNIX.

ORAKILL is run from the Command Prompt in the following syntax:
C:> orakill <Sid> <Threadid>
where: Sid is the Oracle instance to target
Thread is the thread id of the thread to kill

Threadid can be retrived from the spid column of the V$PROCESS data dictionary view.
You can use the following query to find the session threadid.

select p.spid THREADID, s.osuser, s.program
from v$process p, v$session s
where p.addr=s.paddr;

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表