一个很菜的问题。在一个事务内, 有没有可能 不 读取,已经更新但还没有提交的数据

跑步的小伙子 2009-07-12 05:46:48
我想请教一下, 在一个事务内, 有没有可能 不 读取,在一个事物内已经更新但还没有提交的数据
...全文
117 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
weiluo12 2009-07-13
  • 打赏
  • 举报
回复
已更新,不读取,除非不读该记录。
阿三 2009-07-13
  • 打赏
  • 举报
回复
oracle是读一致的,在一个事务内更新了但没提交,读取的是提交的数据,在其它对话中读的是未提交的.
yhuib 2009-07-13
  • 打赏
  • 举报
回复
或者是非等待的共享锁
yhuib 2009-07-13
  • 打赏
  • 举报
回复
想不读取的话不知道一条一条的用非等待的排它锁锁住再读取可不可以。
白发程序猿 2009-07-13
  • 打赏
  • 举报
回复
不读取就只能用条件过滤掉
sleepzzzzz 2009-07-13
  • 打赏
  • 举报
回复
oracle do not allows dirty reads.
zl3450341 2009-07-12
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 welyngj 的回复:]
除了在同一个session,可以看到自己没有提交的数据外,其他的session不可以看到没有提交的数据。
允许其他用户看到未提交的数据的隔离级别是READ UNCOMMITED.
但是oracle不支持这种隔离级别,SQLSERVER和DB2支持READ UNCOMMITED.
以下来自oracle:

READ UNCOMMITTED. The READ UNCOMMITTED isolation level allows dirty reads.Oracle Database doesn't use dirty reads, nor does it even allow them. The basic…
[/Quote]

学习了
mcgrady0314 2009-07-12
  • 打赏
  • 举报
回复
关注
suncrafted 2009-07-12
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 welyngj 的回复:]
除了在同一个session,可以看到自己没有提交的数据外,其他的session不可以看到没有提交的数据。
允许其他用户看到未提交的数据的隔离级别是READ UNCOMMITED.
但是oracle不支持这种隔离级别,SQLSERVER和DB2支持READ UNCOMMITED.
以下来自oracle:

READ UNCOMMITTED. The READ UNCOMMITTED isolation level allows dirty reads. Oracle Database doesn't use dirty reads, nor does it even allow them. The …
[/Quote]

学习了
welyngj 的回复都很有高度
又是违规昵称 2009-07-12
  • 打赏
  • 举报
回复
更新了没有提交,能算一个事务吗?
welyngj 2009-07-12
  • 打赏
  • 举报
回复
除了在同一个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.
liggway 2009-07-12
  • 打赏
  • 举报
回复
应该不能吧,oracle的策略就是客户端只处理内存里的数据,与磁盘的数据交互是另外的进程

17,086

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧