ORA-02049: 超时: 分布式事务处理等待锁模拟
来源:互联网 发布:淘宝街拍地址 编辑:程序博客网 时间:2024/06/10 22:31
现场报这个错,我想模拟一下,看是什么问题。
在数据库B上建表:
create table TEST(
A NUMBER,
B DATE
);
insert into test (A, B) values (2, to_date('16-04-2015 16:38:26', 'dd-mm-yyyy hh24:mi:ss'));
insert into test (A, B) values (1, to_date('24-03-2015 16:32:36', 'dd-mm-yyyy hh24:mi:ss'));
insert into test (A, B) values (2, to_date('16-04-2015 16:35:19', 'dd-mm-yyyy hh24:mi:ss'));
insert into test (A, B) values (2, to_date('16-04-2015 16:35:19', 'dd-mm-yyyy hh24:mi:ss'));
commit;
在数据库A上:
drop database link to_B;
create database link to_B
connect to B_user identified by B_password
using '(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.15.10)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)';
在数据库B上执行update不提交:
SQL> update test set b = sysdate where A =2;
在数据库A上:
SQL> show parameter distributed_lock_timeout;
NAME TYPE VALUE
------------------------------------ ----------- -------
distributed_lock_timeout integer 60
SQL> update test@to_B set b = sysdate where A =2;
update test@to_B set b = sysdate where A =2
*
第 1 行出现错误:
ORA-02049: 超时: 分布式事务处理等待锁
ORA-02063: 紧接着 line (起自 TO_B)
等待60s后就报超时,就是distributed_lock_timeout设置的值
解决方案:数据库B上的事务尽快提交,或者数据库B上的SQL(update or delete or merge)太慢,需要调优。
0 0
- ORA-02049: 超时: 分布式事务处理等待锁模拟
- ORA-02049: 超时: 分布式事务处理等待锁
- ORA-02049 超时分布式事务处理等待锁
- 【ORA-02049】超时分布式事务处理等待锁
- 【ORA-02049】超时分布式事务处理等待锁 解决方法
- 【ORA-02049】超时分布式事务处理等待锁 解决方法
- 【ORA-02049】超时分布式事务处理等待锁 解决方法
- ORA-02049: 超时: 分布式事务处理等待锁诊断
- ORA-02049: 超时: 分布式事务处理等待锁 问题的解决
- 【ORA-02049】超时分布式事务处理等待锁 解决方法
- 关于“ORA-02049: 超时: 分布式事务处理等待锁”的原因和解决办法
- ORA-02409:超时:分布式事务处理等待锁定ORA-02063
- 超时分布式事务处理等待锁 解决办法
- ORA-04021: 等待对象锁超时
- ORA-04021: 等待对象锁超时
- ORA-01591 锁被未决分布式事务处理
- ORA-01591: 锁被未决分布式事务处理解决方案
- ORA-02046: 分布式事务处理已经开始解决方案
- 宋宝华,globalmem在linux 3内核下的一些改变
- php怎么很快的排除错误
- 动态获取系统当前时间
- 第二章第十九题
- Anddroid-使用Fragment的setUserVisibleHint方法实现延时加载
- ORA-02049: 超时: 分布式事务处理等待锁模拟
- 117:Populating Next Right Pointers in Each Node II【树】【DFS】
- 数组越界的一些细节 array[length] & array[length+1]
- 获取系统当前时间
- Google地图百度地图GPS经纬度偏移转换(JAVA)
- MySQL不插入重复记录
- 动态图片切换
- 第六周项目1-深复制体验
- swipeListView 和 PullToRefreshView 合体!