locked by transaction

今天晚上在做oracle数据库查询时,又他么的碰到锁表了。我看了好久,才发现IDEA的数据库界面没有点击自动提交按钮。导致锁表。锁表的提示是

locked by transaction:select ....

分析后想起来是锁表了。然后就查询了百度,在CSDN博客中找到如下解决方法:

新建查询,输入:

SELECT s.username,l.OBJECT_ID,l.SESSION_ID,s.SERIAL#,l.ORACLE_USERNAME,l.OS_USER_NAME,l.PROCESS FROM V$LOCKED_OBJECT l,V$SESSION S WHERE l.SESSION_ID=S.SID;

这时候可以查到SESSION_ID和SERIAL#

关键的一步就是

alter system kill session  ‘200,348‘;

其中200是SESSION_ID,348是SERIAL#的值。就可以解决了。

参考来源:http://blog.csdn.net/until_tl/article/details/71774786

时间: 09-09

locked by transaction的相关文章

ORA-01591: lock held by in-doubt distributed transaction问题解决

昨天跑批量数据的程序时遇到oracle错误: $tail -f INDB_ERROR_8.LOG [Time]2014-12-01 04:10:31: activeAccountDeposit in oracle error: =ORA-01591: lock held by in-doubt distributed transaction 20.21.65527021 [Time]2014-12-01 04:10:31: 文件:/billing/drecv4/drecvlog/201411/D

Method, apparatus and system for acquiring a global promotion facility utilizing a data-less transaction

A data processing system includes a global promotion facility and a plurality of processors coupled by an interconnect. In response to execution of an acquisition instruction by a first processor among the plurality of processors, the first processor

事务Transaction 那点事儿

Transaction 也就是所谓的事务了,通俗理解就是一件事情.从小,父母就教育我们,做事情要有始有终,不能半途而废. 事务也是这样,不能做一般就不做了,要么做完,要么就不做.也就是说,事务必须是一个不可分割的整体,就像我们在化学课里学到的原子,原子是构成物质的最小单位.于是,人们就归纳出事务的第一个特性:原子性(Atomicity).我靠,一点都不神秘嘛. 特别是在数据库领域,事务是一个非常重要的概念,除了原子性以外,它还有一个极其重要的特性,那就是:一致性(Consistency).也就是

How to acquire an Android phone with locked bootloader?

As we know that some devices come with locked bootloaders like Sony, HUAWEI, hTC...If you try to unlock bootloader, the data would disappear!!! Take hTC d826Y for example, our goal is to do physical acquisition so as to carve deleted data. But hTC D8

spring junit jpa transaction

package com.fengshu.gotian.applicationImpl; import java.util.List; import javax.annotation.Resource; import org.apache.log4j.Logger; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration;

Cannot lock storage /tmp/hadoop-root/dfs/name. The directory is already locked.

[[email protected] bin]# ./hadoop namenode -format 12/05/21 06:13:51 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG:   host = nn01/127.0.0.1 STARTUP_MSG:  

Spring Transaction

spring 推荐使用 public void save(Good good) {         this.sessionFactory.getCurrentSession().save(good);     } 以上编写dao代码,推荐使用hibernateTemplate,避免框架的入侵.这种方式如果不配置事务管理 <!--<aop:config>-->         <!--<aop:pointcut id="goodServiceMethods&q

[原创]MySQL下关于begin或start transaction是否真正开启新事务的探索?

Server version:         5.6.21-log MySQL Community Server (GPL) 前提提要: 我们知道MySQL的RR(repeatable read)隔离级别下,事务无法看到正在活跃的事务所做的操作包括提交后的. 一般手动开启事务的命令是begin或start transaction:我以前的理解是一旦执行这条语句就已经开启了事务,也就是事务id已经生成(可用于MVCC版本比较),事务A和事务B一起执行begin,事务A的所有操作的提交事务B都看不

JDBC - Transaction

Transaction: a bunch of operation in logic, the unit which consists the operation will works all or breaks down all. Every operation of MySQL server is a independent transaction in default situation. TPL(Transaction Processing Language): start transa