参考10g2 db concept ,文件有点大能传么?
感谢公司DBA
1.
transaction1
step1:set transaction isolation level serializable -- trans starts
step4:select * from eis_users_temp where id=803939
=======================
transaction2
step2:
update eis_users_temp set first_name = 'bo' where id=803939
step3:commit
执行顺序:step1;step2,step3;step4
step4 不能看到修改后的结果!!That is serializable
换成:set transaction isolation level read committed; 可以看到结果(这个也是oracle默认的隔离设置)
set transaction read only; -- 不能做任何DML,DDL操作,只能select!,它是serializable的子集,所以也看不到修改
把update换成
Insert into eis_users_temp (select * from eis_users_temp where id=803939);
delete from eis_users_temp where id=803939
也是同样的结果
2.
transaction1
step1:set transaction isolation level serializable -- trans starts
step4:
update eis_users_temp set first_name = 'bo1'
where id=803939
=======================
transaction2
step2:
update eis_users_temp set first_name = 'bo2' where id=803939
step3:commit
执行顺序:step1;step2,step3;step4
执行结果:更新为bo2, transaction1企图修改同一条数据 803939 报错
修改另外一条数据801660,没有问题!!
update eis_users_temp set first_name = 'bo1'
where id=801660
commit 变成rollback,也没有问题
如果换成:set transaction isolation level read committed; 都不会有错
================================================
serializable & read committed都是row level locking
read only is Table Locks ?
read committed的情况下
T1
update eis_users_temp set first_name = 'bo1'
where id=803939
T2
update eis_users_temp set first_name = 'bo2'
where id=803939
T1->T2 .都能够执行,但是T1 不COMMIT,T2会阻塞。显然的
oracle在行级别只有X独占锁
但是要注意的是加在行级别,如果修改不同的数据是没有问题的
=====================================
Trans1:
select * from eis_users where id <> 803939 for update
Trans2:
select * from eis_users where id=803939 for update
这两个是不会冲突的 ,select * for update 是行级锁
另外看看:http://www.itpub.net/thread-914687-1-1.html
分享到:
相关推荐
滑膜故障检测大牛Edwards的论文,发表于automatic期刊 Sliding mode observers for fault detection and isolation 非常详细的介绍了滑膜观测器
Maltab Fault diagnosis and isolation(FDI)工具箱
Discuss how lock manager uses lock mode, lock resources, and lock compatibility to achieve transaction isolation. Describe the various transaction types and how transactions differ from batches....
牛心线粒体ATP合成酶的分离纯化的方法学研究,朱杰,孙润广,科研工作者们在过去的50年前赴后继的工作中深入了ATP合成酶的功能,并努力尝试解析该酶的空间结构以其能够从结构基础上对ATP合成酶�
web application security, 2010
人体肠道中氯霉素同化菌的分离鉴定与特性研究,赵鑫,田丰伟,采用传统微生物分离方法,以氯霉素为培养基唯一碳源,从健康人粪便样品中分离到五株氯霉素同化微生物。根据菌株形态、生理生化特
Isolation and characterization of a novel mesonivirus from Culex mosquitoes in China
ADI 隔离器件手册
To provide you with a thorough understanding of the tools and facilities available for managing, monitoring and fault isolation of IP Multicast networks333
A Bayesian sparse reconstruction method for fault detection and isolation
A sequential Monte Carlo filtering approach
Interface and Isolation Digital Isolators Interface and Isolation Level Translators Interface and Isolation Protection Products Power Management Linear Regulators Power Management Multi-Output ...
基于邻居相关状态的多智能体分布式故障检测与隔离算法,李俨,方浩,本文针对节点动力学模型为一般线性系统模型的多智能体系统,提出了一种基于邻居相关状态的分布式故障检测与隔离算法。首先,通过对�
RANSACTION ISOLATION LEVEL
Fault detection and isolation for a class of uncertain state-feedback fuzzy control systems(长文)
Adaptive fault detection and isolation approach for actuator stuck faults in closed-loop systems
Cockroach provides snapshot isolation (SI) and serializable snapshot isolation (SSI) semantics, allowing externally consistent, lock-free reads and writes--both from a historical snapshot timestamp ...
Fault detection and isolation for networked control systems
Isolation and Preliminary Identification of Aluminium-resistant Microorganisms from the Rhizophric Soil of Tea Plant,吴颖,梁月荣,Microorganism isolated from rhizospheric soil of tea plant was ...