免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 8297 | 回复: 7
打印 上一主题 下一主题

求Database is currently opened by another user.问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-11 16:15 |只看该作者 |倒序浏览
Program stopped at "d_lpcx.4gl", line number 44.
SQL statement error number -425.
Database is currently opened by another user.
SYSTEM error number -107.
ISAM error:  record is locked.

程序直接执行没有问题

原来放在计划任务中可以正常执行
从有一天开始就出上边的错误了
之后需要执行两次计划任务才能执行
现在需要将这个计划任务执行3次

请帮忙

论坛徽章:
11
金牛座
日期:2015-03-19 16:56:22数据库技术版块每日发帖之星
日期:2016-08-02 06:20:00数据库技术版块每日发帖之星
日期:2016-04-24 06:20:00数据库技术版块每日发帖之星
日期:2016-04-13 06:20:00IT运维版块每日发帖之星
日期:2016-04-13 06:20:00数据库技术版块每日发帖之星
日期:2016-02-03 06:20:00数据库技术版块每日发帖之星
日期:2015-08-06 06:20:00季节之章:春
日期:2015-03-27 15:54:57羊年新春福章
日期:2015-03-27 15:54:37戌狗
日期:2015-03-19 16:56:41数据库技术版块每日发帖之星
日期:2016-08-18 06:20:00
2 [报告]
发表于 2008-12-11 16:27 |只看该作者

回复 #1 卐卍 的帖子

其他用户锁表?~?

-107    ISAM error: record is locked.

Another user request has locked the record that you requested or the
file (table) that contains it. This condition is normally transient. A
program can recover by rolling back the current transaction, waiting a
short time, and re-executing the operation. For interactive SQL, redo
the operation. For C-ISAM programs, review the program logic and make
sure that it can handle this case, which is a normal event in
multiprogramming systems. You can obtain exclusive access to a table by
passing the ISEXCLLOCK flag to isopen. For SQL programs, review the
program logic and make sure that it can handle this case, which is a
normal event in multiprogramming systems. The simplest way to handle
this error is to use the statement SET LOCK MODE TO WAIT. For bulk
updates, see the LOCK TABLE statement and the EXCLUSIVE clause of the
DATABASE statement.

论坛徽章:
0
3 [报告]
发表于 2008-12-11 16:45 |只看该作者
最开始在计划任务中正常执行 不出这个
后来出了 放两个计划任务  一个出错另一个能过去
现在得放三个 有两个出错 最后那个过去
这好像不是正常的锁表

论坛徽章:
0
4 [报告]
发表于 2008-12-11 22:54 |只看该作者
如果你用的是SCO5.0.6的系统,可能是系统的BUG。我以前在SCO下遇到过类似的问题,当时发现定时的程序有锁表的问题。跟踪了一下,发现定时同时起了多次,再后来发现是定时的守护进程有BUG,打完补丁问题解决。

论坛徽章:
0
5 [报告]
发表于 2008-12-12 07:52 |只看该作者
aix5.3

论坛徽章:
0
6 [报告]
发表于 2008-12-12 14:44 |只看该作者
嘿嘿,那就先断掉所有用户,再做定时任务,嘿嘿。。

论坛徽章:
0
7 [报告]
发表于 2008-12-14 13:36 |只看该作者
这个主意不好
应该让我查出来哪个用户占用了数据库

论坛徽章:
0
8 [报告]
发表于 2008-12-15 14:19 |只看该作者

回复 #1 卐卍 的帖子

使用lock wait mode 试试呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP