动态网站制作指南
[  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库学院 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息

本月文章推荐
.linux怎么给一个普通用户reboot权.
.[技术]Oracle数据库空间的使用和.
.oracle移植到mysql注意事项.
.9i中一个特殊等待事件--null eve.
.ORACLE的PL/SQL二.
.ORA-19550问题及ORA-00106问题.
.Oracle--SQL行列转换实战.
.查看SGA区剩余可用内存的方法.
.Oracle数据库技术(29).
.Linux信号简介.
.Oracle PL/SQL的第一次接触.
.上海Oracle OpenWorld大会纪事-0.
.oracle-触发redo写的几个条件.
.Linux环境主要数据库简介.
.Oracle9i初始化参数中文说明(10).
.MobiLink通过Oracle返回下载的数.
.[oracle]使用Oracle10g jdbc 驱动.
.如何通过实例配置Oracle监听器.
.全球获得Oracle认证者逾越20万人.
.双机容错环境下Oracle数据库应用.

Kill Session[Metalink]

文章类别:Oracle教程 | 发表日期:2008-2-9 |



  Killing the session will not clear the locks. The session on the remote database will remain idle waiting for input until the network read times out. Only then the kill session is processed, and locks are released.
  Solution Description
  --------------------
  Options:
  ========
  You can shutdown and restart the database or use the ORAKILL utility to kill threads.
  Oracle has provided an ORAKILL utility that will kill shadow threads. Each user's connection is represented by a thread in the Oracle process. If a user's session is killed, then their Oracle session is killed - not the thread.
  Oracle has provided an ORAKILL utility which can be passed a thread ID and will kill the specified thread.
  
  To make sure you do not kill a background process (which would crash your database), you must perform a select to ensure you get the correct thread.
  ---
  select p.spid "OS Thread", b.name "Name-User", s.osuser, s.program
  from v$process p, v$session s, v$bgprocess b
  where p.addr = s.paddr
  and p.addr = b.paddr UNION ALL
  select p.spid "OS Thread", s.username "Name-User", s.osuser, s.program
  from v$process p, v$session s
  where p.addr = s.paddr
  and s.username is not null;
  ---
  This will list all Shadow processes and backgound processes.
  Each shadow process will show the thread ID - this is what must be killed via the ORAKILL utility.
  
  The kill session behavior is mentioned in the ORACLE7 Server Administrator's Guide (pg 4-13). It does not eXPlicitly indicate what happens to the session while it is in the KILLED PSEUDO state. What's happening is that PMON periodically checks to see if any sessions have been killed.
  If it finds one, it attempts to rollback the transaction for that session(that was in progress when it was killed). The reason this can take a long time is because PMON may have more than one transaction to rollback at a time(if other sessions have been killed, or if processes have died etc).
  Thus, it may take a while to finally cleanup the killed session and have it disappear from the session monitor. The system i/o monitor correctly shows the reads and writes being performed by PMON in order to rollback the session's transaction.
  
  PMON will not delete the session object itself until the client connected to that session notices that it has been killed. Therefore, the sequence of events is:
  
  1) alter system kill session is issued - the STATUS of the session object in V$SESSION becomes KILLED, its server becomes PSEUDO.
  
  2) PMON cleans up the *resources* allocated to the session(i.e.,
rolls back its transaction, releases its locks, etc).
  
  3) the entry in V$SESSION remains there until the client of that session (the client is the process associated with the OSUSER,MACHINE,PROCESS columns in the V$SESSION view) tries to do another request.
  
  4) the client attempts another SQL statement and gets back ORA-28.
  
  5) PMON can now remove the entry from V$SESSION.
  This behavior is necessary because the client still has pointers to the session object even though the session has been killed. Therefore, the object cannot be deleted until the client is no longer pointing at it.

上一篇:学习Oracle--Statspack分析 人气:282
下一篇:Oracle JOB 用法小结 人气:410
点击此处浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-5-16 乘风多用户PHP统计系统 v3.4
2008-5-16 轩溪下载系统 v3.78 build 0515
2008-5-16 普沙B2B 浙江省商贸网 v2.0
2008-5-16 asp抓蜘蛛的小程序 v1.0
2008-5-16 齐齐乐网私服发布站 仿haosf新版
2008-5-16 IssTech信息反馈系统 v1.0
2008-5-16 自由领域大头贴(js接口版) 修正版
2008-5-16 医院网站系统
2008-5-16 智拓-分类信息管理系统 v5.0
2008-5-7 Windows XP SP3 官方英文版
2008-5-7 Windows XP SP3 官方香港中文版
2008-5-7 Windows XP SP3 官方繁体中文版
2008-5-7 Windows XP SP3 官方简体中文版
2008-4-30 Multiple Unzip Wizard 1.02
2008-4-30 Multiple Unrar Wizard 1.0.0
2008-4-30 WinZip Install/Try/Uninstall a
2008-4-30 ZIP压缩文件修复器WzipFix 2.0
2008-4-30 Pentazip 6.01 Build 189 For Wi
  发表评论
姓 名: 验证码: [ 全部贴吧 ] [ 浏览评论 ]
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号