我想请教一下, 在一个事务内, 有没有可能 不 读取,在一个事物内已经更新但还没有提交的数据

解决方案 »

  1.   

    应该不能吧,oracle的策略就是客户端只处理内存里的数据,与磁盘的数据交互是另外的进程
      

  2.   

    除了在同一个session,可以看到自己没有提交的数据外,其他的session不可以看到没有提交的数据。
    允许其他用户看到未提交的数据的隔离级别是READ UNCOMMITED.
    但是oracle不支持这种隔离级别,SQLSERVER和DB2支持READ UNCOMMITED.
    以下来自oracle:READ UNCOMMITTED. The READ UNCOMMITTED isolation level allows dirty reads. [del]Oracle Database doesn't use dirty reads, nor does it even allow them[/del]. The basic goal of a READ UNCOMMITTED isolation level is to provide a standards-based definition that allows for nonblocking reads. As you've seen, Oracle Database provides for nonblocking reads by default. You'd be hard-pressed to make a SELECT query block and wait in the database (as noted earlier, there is the special case of a distributed transaction). Every single query, be it a SELECT, INSERT, UPDATE, MERGE, or DELETE, executes in a read-consistent fashion. It might seem funny to refer to an UPDATE statement as a query, but it is. UPDATE statements have two components: a read component as defined by the WHERE clause, and a write component as defined by the SET clause. UPDATE statements read and write to the database, as do all DML statements. The case of a single row INSERT using the VALUES clause is the only exception to this, because such statements have no read component—just the write component. 
      

  3.   

    oracle do not allows dirty reads.
      

  4.   

    oracle是读一致的,在一个事务内更新了但没提交,读取的是提交的数据,在其它对话中读的是未提交的.