易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle dead lock deep research.

Update SQLS will lead dead lock exception. Because by default, it use optimistic lock but not pessimistic lock.
Below description is exceprted from the attachment(It exceeds my image that this blog can not upload the attachment,hehe)
Optimistic locking offers an elegant solution to the problems outlined above. Optimistic locking does
not lock records when they are read, and proceeds on the assumption that the data being updated has not
changed since the read. Since no locks are taken out during the read, it doesn’t matter if the user goes to
lunch after starting a transaction, and deadlocks are all but eliminated since users should never have to
wait on each other’s locks
There are some ways to resolve this problem.
1. Create a pessimistic lock. Change the sql like below formal.
First: select … from … for update nowait 
Second: update the resultSet.
2. Execute the SQL again after a random duration when program meets this kind of exception. (It will consume lot of db server resource. I don't think it is the better way)
3. Schedule the SQL executed sequenced or split data without interfere.


相关文档:

一次oracle support的危机现场处理(之二)

天有不测风云,
IBM 的中端磁盘阵列这次又惹祸了。在微码升级的时候,
DS4800 发生故障。导致当时在这台库上的几套生产库报错了。
IBM工程师把阵列故障恢复后,拍拍屁股走人,阵列上的数据又得我们来想办法抢救了。。。。
还好有oracle support的支持我们最终化解了这次危机。下文详细介绍了整个恢复的过程。
oracle工 ......

Oracle 多行转列函数

Oracle中使用WMSYS.WM_CONCAT函数进行多行转列
原数据:
rank   name 
AA      NAME1
AA      NAME2
AA      NAME3 
BB      NAME4
BB      NAME5
SQL>select  trim(t.rank) as rank,
   &nbs ......

oracle PL SQL学习案例(三)

存储过程
========================================================================== 
========================================================================== 
【训练15.1】  创建一个显示雇员总人数的存储过程。
  步骤1:登录SCOTT账户(或学生个人账户)。
  步骤2: ......

oracle grant

oracle grant
授权语句--select * from dba_users; 查询数据库中的所有用户
--alter user TEST_SELECT account lock; 锁住用户
--alter user TEST_SELECT account unlock; 给用户解锁
--create user xujin identified by   xujin; 建立用户
--grant create tablespace to xujin; 授权
--grant select ......

ORACLE学习之路

买本书 先从安装开始吧 然后买本PLSQL 学学语法 这是最基本的 接下来就研究故障后怎么修复 再就是备份 优化 集群 然后还要学习LINUX操作 这是一定要的 装WINDOWS上的ORACLE不多 再花2W去考个OCP 就行了
oracle的官方教材的顺序是sql基础,结构,备份恢复,性能优化。
sql语句的基础还是很重要的。如果你想做开发pl/sql一 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号