Search more than 15000 articles


read uncommitted

the default isolation level is READ COMMITTED. It means, a session read the committed data.
Session 1:

SQL> set transaction isolation level read committed;

Transaction set.

Session 2:

SQL> update emp set sal=4000 where ename='SCOTT';

1 row updated.

Session 1:

SQL> select sal from emp where ename='SCOTT';

       SAL
———-
      3000

Session 2:

SQL> commit;
Commit complete.

Session 1:

SQL> select sal from emp where ename='SCOTT';

       SAL
———-
      4000
SQL> update emp set sal=3000 where ename='SCOTT';

1 row updated.

SQL> commit;
Commit complete.

When the session 1 reads the salary of Scott, it gets the value that is committed in the database.
Another isolation level is SERIALIZABLE.
Session 1:

SQL> set transaction isolation level serializable;

Transaction set.

Session 2:

SQL> update emp set sal=5000 where ename='SCOTT';

1 row

…click on the title to read the full article…


Leave a Reply

You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>