【YashanDB知识库】YAS-02024 lock wait timeout, wait time 0 milliseconds
【标题】错误码处理
【问题分类】锁等待超时
【关键字】YAS-02024
【问题描述】执行语句时候,因锁等待超时执行语句失败
【问题原因分析】数据库默认锁等待时间为0秒,如果执行语句存在锁等待过长会执行失败
【解决/规避方法】
1、调整锁等待的时间
SQL
alter system set DDL_LOCK_TIMEOUT = x;
单位是s, 默认是0, 修改为300
确认持久化到config/yasdb.ini文件
2、找出导致锁等待的session ,并根据实际情况确认能不能先使其退出
- .查dv$lock确定sid
SQL
select * from v$lock;
- 再关联dv$session确定serial
SQL
alter system kill session '30,918';
- 再执行alter system kill session 命令kill引起锁超时的会话
Shell
SQLSTATE[HY000]:General error:202 [YashanDB][ODBC Driver][Yas][YAS-00202]invalid string,reason:invalid indicator value
- 如果会话比较多,可以使用如下语句批量杀死线程
SQL
select 'ALTER SYSTEM kill SESSION '''||SID||','||SERIAL# || '''' || ';' from v$session t1, v$locked_object t2 where t1.sid = t2.SESSION_ID
--查询哪些表锁死 记录下SID和serial#
杀掉对应的会话进程
【影响范围】所有版本
【修复版本】无
【YashanDB知识库】YAS-02024 lock wait timeout, wait time 0 milliseconds的更多相关文章
- SQL性能优化常见措施(Lock wait timeout exceeded)
SQL性能优化常见措施 目 录 1.mysql中explain命令使用 2.mysql中mysqldumpslow的使用 3.mysql中修改my.ini配置文件记录日志 4.mysql中如何加索引 ...
- Caused by: java.sql.BatchUpdateException: Transaction error, need to rollback. errno:1205 Lock wait timeout exceeded; try restarting transaction
更新的时候报 Caused by: java.sql.BatchUpdateException: Transaction error, need to rollback. errno:1205 Loc ...
- innodb Lock wait timeout exceeded;
当出现:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction,要解决是一件麻烦的事情:特别是当一个SQL ...
- 【MySQL】事务没有提交导致 锁等待Lock wait timeout exceeded异常
异常:Lock wait timeout exceeded; try restarting transaction 解决办法:(需要数据库最高权限) 执行select * from informati ...
- magento后台登陆被锁定 索引报错的解决:General error: 1205 Lock wait timeout
1. magento在索引的时候用shell,有时候会报错: General error: 1205 Lock wait timeout exceeded 这个时候,是因为行锁的原因,在表中您直接用s ...
- mysql死锁,等待资源,事务锁,Lock wait timeout exceeded; try restarting transaction解决
前面已经了解了InnoDB关于在出现锁等待的时候,会根据参数innodb_lock_wait_timeout的配置,判断是否需要进行timeout的操作,本文档介绍在出现锁等待时候的查看及分析处理: ...
- Lock wait timeout exceeded; try restarting transaction
What gives this away is the word transaction. It is evident by the statement that the query was atte ...
- ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
测试库一条update语句报错:ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction mysql> ...
- java.sql.SQLException: Lock wait timeout exceeded --转
org.springframework.dao.CannotAcquireLockException 的解决> 直接上 bug 的详细信息: 2012-03-12 15:20:31 XmlBea ...
- pymysql.err.InternalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')错误处理
问题描述: 在使用pymysql库时,利用游标执行插入操作,产生错误,会出现pymysql.err.InternalError: (1205, 'Lock wait timeout exceeded; ...
随机推荐
- Me-and-My-Girlfriend-1靶机渗透流程
Me-and-My-Girlfriend-1 靶机下载 Description: This VM tells us that there are a couple of lovers namely A ...
- 1. 介绍一下 CSS 的盒子模型?
1. 盒模型: 内容(content).填充(padding).边界(margin). 边框(border) 2. 类型: IE 盒子模型.标准 W3C 盒子模型: 3. 两种盒模型的主要区别是:标准 ...
- SpringBoot 2.5.5整合SpringSecurity+JWT
目录结构 添加依赖 <!-- SpringSecurity --> <dependency> <groupId>org.springframework.boot&l ...
- Vue查询传参
通过修改 getWK005 函数来实现这一点.这里的 query 参数就是发送 GET 请求时的查询参数.你可以将需要的条件作为 query 对象的属性传递进去.比如,如果你想要按照特定的条件查询信息 ...
- oeasy教您玩转vim - 91 - # vim脚本编程展望
vim脚本编程展望 回忆 上次我们彻底研究了vim高亮的原理 各种语法项syntax item 关键字keyword 匹配模式match 区域region 定义好了之后还可以设置链接成组 hi d ...
- Miniconda 切换python版本
要在 Miniconda 中切换 Python 版本,可以按照以下步骤进行操作: 打开命令提示符或者 Anaconda Prompt(如果已经安装了). 输入 conda info --envs 查看 ...
- vue3源码学习api-vue-sfc文件编译
vue 最有代表性质的就是.VUE 的文件,每一个vue文件都是一个组件,那么vue 组件的编译过程是什么样的呢 Vue 单文件组件 (SFC)和指令 ast 语法树 一个 Vue 单文件组件 (SF ...
- 【Spring-Cloud】Nacos2.0.3 单系统集群部署问题汇总
1.强制要求JDK8版本 且 64位 C:\Users\Administrator\Desktop\Nacos-Server\Nacos-2.0.3-8848\bin>java -version ...
- 【H5】05 高阶文字排版
摘自: https://developer.mozilla.org/zh-CN/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formattin ...
- 【Tutorial C】04 基本输入输出
输出单个字符 putchar('a'); // 字符输出函数,其功能是在终端(显示器)输出单个字符. putchar('\n'); // 支持转义换行 putchar(77); // 可以直接注入AS ...