jdbc PreparedStatement ps 对象的execute()方法 无法执行,无反应
来源:互联网 发布:java编写软件手机软件 编辑:程序博客网 时间:2024/06/05 09:41
原因是行被锁住了。执行下面方法 查询被锁对象
1.下面的语句用来查询哪些对象被锁:
select b.username,b.sid,b.serial#,logon_time
from v$locked_object a,v$session bwhere a.session_id = b.sid order by b.logon_time
2.下面的语句用来杀死一个进程:
执行 alter system kill session '76, 41967'; (其中76, 41967 分别是上面查询出的sid,serial#)
【注】以上两步,可以通过Oracle的管理控制台来执行。
3.如果利用上面的命令杀死一个进程后,进程状态被置为"killed",但是锁定的资源很长时间没有被释放,那么可以在os一级再杀死相应的进程(线程),首先执行下面的语句获得进程(线程)号:
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=24 (24是上面的sid)
4.在OS上杀死这个进程(线程):
1)在unix上,用root身份执行命令:
#kill -9 12345(即第3步查询出的spid)
2)在windows(unix也适用)用orakill杀死线程,orakill是oracle提供的一个可执行命令,语法为:
orakill sid thread
其中:
sid:表示要杀死的进程属于的实例名
thread:是要杀掉的线程号,即第3步查询出的spid。
例:c:>orakill orcl 12345
OK 问题解决
阅读全文
0 0
- jdbc PreparedStatement ps 对象的execute()方法 无法执行,无反应
- jdbc中PreparedStatement对象的几个常用方法
- JDBC中输出PreparedStatement对象中的SQL语句的方法
- PreparedStatement中的execute()方法
- PreparedStatement 的 execute方法和executeUpdate方法区别
- 使用PreparedStatement的execute方法需要注意的问题
- java jdbc的基本方法conn,PreparedStatement
- command对象的Execute方法
- Server对象的Execute方法
- ORACLE 执行EXECUTE IMMEDIATE没反应
- JDBC Statement接口实现的execute方法
- JDBC中PreparedStatement接口提供的execute、executeQuery和executeUpdate之间的区别及用法
- JDBC中PreparedStatement接口提供的execute、executeQuery和executeUpdate之间的区别及用法
- JDBC中PreparedStatement接口提供的execute、executeQuery和executeUpdate之间的区别及用法
- 执行adb命令无反应
- hbase执行create命令时延迟无反应的解决方法
- jdbc PreparedStatement 的使用
- JDBC的PreparedStatement用法
- pthread_attr_t 线程属性
- CQBZOJ 邮递员(直播剪枝技巧)
- MySQL5.7免密重置root密码
- java String...param (3点参数使用 )
- Android中的内存管理机制
- jdbc PreparedStatement ps 对象的execute()方法 无法执行,无反应
- 开发工具——SharedPerference使用
- 【python爬虫笔记】一:先爬一个小页面
- Hibernate 常见异常
- Linux系统结构 详解
- javascript常用实例的实现与封装1
- java.sql.SQLException: Generated keys not requested. You need to ... 错误
- mybatis中 插入字符串空值无法修改
- js回调函数在项目中的运用