读一致性测试一例
首先构造产生读一致性的案例环境,本例采用2个session来构造读一致性案例(当然一个session也可完成该实验)。为力求效果明了,本次排除延时块清除以及itl重用等情况。
Session 1:
SQL> conn mecoyoo/mecoyoo@test
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as mecoyooSQL> create table test_cr (id number, value number) tablespace test;
Table createdSQL> insert into test_cr values(1,10′);
1 row insertedSQL> insert into test_cr values(2,20′);
1 row insertedSQL> commit;
Commit completeSQL> exec pro_test_cr;
执行pro_test_cr,在此过程中,开启session 2 并执行相应 DML操作,等待session 1 产生结果。
