卐卍 发表于 2008-12-11 16:15

求Database is currently opened by another user.问题

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次

请帮忙

liaosnet 发表于 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.

卐卍 发表于 2008-12-11 16:45

最开始在计划任务中正常执行 不出这个
后来出了 放两个计划任务一个出错另一个能过去
现在得放三个 有两个出错 最后那个过去
这好像不是正常的锁表

xjfirst 发表于 2008-12-11 22:54

如果你用的是SCO5.0.6的系统,可能是系统的BUG。我以前在SCO下遇到过类似的问题,当时发现定时的程序有锁表的问题。跟踪了一下,发现定时同时起了多次,再后来发现是定时的守护进程有BUG,打完补丁问题解决。

卐卍 发表于 2008-12-12 07:52

aix5.3

test_123 发表于 2008-12-12 14:44

嘿嘿,那就先断掉所有用户,再做定时任务,嘿嘿。。

卐卍 发表于 2008-12-14 13:36

这个主意不好
应该让我查出来哪个用户占用了数据库

koolkite 发表于 2008-12-15 14:19

回复 #1 卐卍 的帖子

使用lock wait mode 试试呢?
页: [1]
查看完整版本: 求Database is currently opened by another user.问题