System.data.sqlclient.sqlexception
exception : 已超过锁请求的超时时段
.
command:sp_getid
.
.
.
等等错误提示
大侠帮帮该怎么解决 工厂下不了单了.
16 个解决方案
#1
数据库被锁了.原因可能
1、系统本省的设置问题
2、系统的功能性能要求超过系统负荷
3、多路同事炒作一组数据
1、系统本省的设置问题
2、系统的功能性能要求超过系统负荷
3、多路同事炒作一组数据
#2
怎么解决啊 ?????
#3
#4
怎么没人啊?
#5
是否有人一直在占用一个连接,或者说这个问题出错了,没有得到正确的释放,导致这一次的请求不进去?
#6
找用友开发人员支持。。我旁边有两用友开发。。。
#7
sp_getid 这个过程是获取当前单据表最大ID的。用友的表ID不是自动标识的。是将一个最大ID存放在独立的一张表中。
#8
ALTER PROCEDURE [dbo].[sp_GetID] (
@RemoteId nvarchar (2) =N'00',
@cAcc_Id nvarchar(3) ,
@cVouchType nvarchar(50) =N'' ,
@iAmount int =0 ,
@iFatherId int OUTPUT,
@iChildId int OUTPUT )
AS
set lock_timeout 30000
BEGIN TRAN T1
if exists(select * from UFSystem..UA_Identity with (updlock) where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType)
begin
select @iFatherId=iFatherId ,@iChildId=iChildId
from UFSystem..UA_Identity
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
if (len(@iFatherId+1)>7)
set @iFatherId=1
else
set @iFatherId=@iFatherId+1
if (len(@iChildId+@iAmount)>7)
set @iChildId=1
else
set @iChildId=@iChildId+@iAmount
update UFSystem..UA_Identity set iFatherId=@iFatherId,iChildId=@iChildId
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iFatherId),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iChildId),7))
end
else
begin
if @@error <>0
begin
goto ErrHandle
end
if (@iAmount>0)
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,@iAmount)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iAmount),7))
end
else
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,1)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
end
end
if @@error <>0
begin
goto ErrHandle
end
COMMIT TRAN T1
return 0
ErrHandle:
rollback tran T1
return -1
这是sp_getId 的过程。你可以自己根据这里边的表去看看。
@RemoteId nvarchar (2) =N'00',
@cAcc_Id nvarchar(3) ,
@cVouchType nvarchar(50) =N'' ,
@iAmount int =0 ,
@iFatherId int OUTPUT,
@iChildId int OUTPUT )
AS
set lock_timeout 30000
BEGIN TRAN T1
if exists(select * from UFSystem..UA_Identity with (updlock) where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType)
begin
select @iFatherId=iFatherId ,@iChildId=iChildId
from UFSystem..UA_Identity
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
if (len(@iFatherId+1)>7)
set @iFatherId=1
else
set @iFatherId=@iFatherId+1
if (len(@iChildId+@iAmount)>7)
set @iChildId=1
else
set @iChildId=@iChildId+@iAmount
update UFSystem..UA_Identity set iFatherId=@iFatherId,iChildId=@iChildId
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iFatherId),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iChildId),7))
end
else
begin
if @@error <>0
begin
goto ErrHandle
end
if (@iAmount>0)
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,@iAmount)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iAmount),7))
end
else
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,1)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
end
end
if @@error <>0
begin
goto ErrHandle
end
COMMIT TRAN T1
return 0
ErrHandle:
rollback tran T1
return -1
这是sp_getId 的过程。你可以自己根据这里边的表去看看。
#9
帮帮啊 大哥
#10
ERP什么版本的。
#11
u8 90 谢谢你啊
#12
我登陆的时候 把登陆日期改成2011年就可以
日期是2012就不行 保存不了 就报上面的错误
日期是2012就不行 保存不了 就报上面的错误
#13
处理就是重启数据库服务就好了。提高硬件性能。
#14
大哥帮帮忙 两天了
找不到解决办法啊
#15
你的ERP是U890还是U810还是U872?
#16
U8 90
#1
数据库被锁了.原因可能
1、系统本省的设置问题
2、系统的功能性能要求超过系统负荷
3、多路同事炒作一组数据
1、系统本省的设置问题
2、系统的功能性能要求超过系统负荷
3、多路同事炒作一组数据
#2
怎么解决啊 ?????
#3
#4
怎么没人啊?
#5
是否有人一直在占用一个连接,或者说这个问题出错了,没有得到正确的释放,导致这一次的请求不进去?
#6
找用友开发人员支持。。我旁边有两用友开发。。。
#7
sp_getid 这个过程是获取当前单据表最大ID的。用友的表ID不是自动标识的。是将一个最大ID存放在独立的一张表中。
#8
ALTER PROCEDURE [dbo].[sp_GetID] (
@RemoteId nvarchar (2) =N'00',
@cAcc_Id nvarchar(3) ,
@cVouchType nvarchar(50) =N'' ,
@iAmount int =0 ,
@iFatherId int OUTPUT,
@iChildId int OUTPUT )
AS
set lock_timeout 30000
BEGIN TRAN T1
if exists(select * from UFSystem..UA_Identity with (updlock) where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType)
begin
select @iFatherId=iFatherId ,@iChildId=iChildId
from UFSystem..UA_Identity
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
if (len(@iFatherId+1)>7)
set @iFatherId=1
else
set @iFatherId=@iFatherId+1
if (len(@iChildId+@iAmount)>7)
set @iChildId=1
else
set @iChildId=@iChildId+@iAmount
update UFSystem..UA_Identity set iFatherId=@iFatherId,iChildId=@iChildId
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iFatherId),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iChildId),7))
end
else
begin
if @@error <>0
begin
goto ErrHandle
end
if (@iAmount>0)
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,@iAmount)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iAmount),7))
end
else
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,1)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
end
end
if @@error <>0
begin
goto ErrHandle
end
COMMIT TRAN T1
return 0
ErrHandle:
rollback tran T1
return -1
这是sp_getId 的过程。你可以自己根据这里边的表去看看。
@RemoteId nvarchar (2) =N'00',
@cAcc_Id nvarchar(3) ,
@cVouchType nvarchar(50) =N'' ,
@iAmount int =0 ,
@iFatherId int OUTPUT,
@iChildId int OUTPUT )
AS
set lock_timeout 30000
BEGIN TRAN T1
if exists(select * from UFSystem..UA_Identity with (updlock) where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType)
begin
select @iFatherId=iFatherId ,@iChildId=iChildId
from UFSystem..UA_Identity
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
if (len(@iFatherId+1)>7)
set @iFatherId=1
else
set @iFatherId=@iFatherId+1
if (len(@iChildId+@iAmount)>7)
set @iChildId=1
else
set @iChildId=@iChildId+@iAmount
update UFSystem..UA_Identity set iFatherId=@iFatherId,iChildId=@iChildId
where cAcc_Id=@cAcc_Id and cVouchType=@cVouchType
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iFatherId),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iChildId),7))
end
else
begin
if @@error <>0
begin
goto ErrHandle
end
if (@iAmount>0)
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,@iAmount)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),@iAmount),7))
end
else
begin
insert into UFSystem..UA_Identity (cAcc_Id,cVouchType,iFatherId,iChildId)
values (@cAcc_Id,@cVouchType,1,1)
if @@error <>0
begin
goto ErrHandle
end
set @iFatherId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
set @iChildId=convert(int,@RemoteId+right('0000000'+convert(nvarchar(7),1),7))
end
end
if @@error <>0
begin
goto ErrHandle
end
COMMIT TRAN T1
return 0
ErrHandle:
rollback tran T1
return -1
这是sp_getId 的过程。你可以自己根据这里边的表去看看。
#9
帮帮啊 大哥
#10
ERP什么版本的。
#11
u8 90 谢谢你啊
#12
我登陆的时候 把登陆日期改成2011年就可以
日期是2012就不行 保存不了 就报上面的错误
日期是2012就不行 保存不了 就报上面的错误
#13
处理就是重启数据库服务就好了。提高硬件性能。
#14
大哥帮帮忙 两天了
找不到解决办法啊
#15
你的ERP是U890还是U810还是U872?
#16
U8 90