I get the following error when running a procedure tree
Process ID 55 attempting to unlock unowned resource PAG:8:1:4889
And in the server log : Error: 1203, Severity: 20, State: 1
This error is referenced more than one before SP3, but newer since.
I saw all KB to see if some query type are similar to mine, without success.
The following query is executed inside a procedure at the 4th level,
without transaction.
I couln't simply reproduce the problem without calling the first, who's
calling the second, ...
Standalone calling the procedure works like a charm.
Thanks in advance for your help.
Involving query :
DECLARE @.i_tou_niveau INT
SELECT @.i_tou_niveau = 6
UPDATE liasse_rq SET
lia_trav1 = @.i_tou_niveau,
lia_trav3 = o.p_ocd_regr
FROM liasse_rq l, ocd_regr o
WHERE l.lia_c_type_vdd = "PTT"
AND l.lia_niveau BETWEEN 1 AND 2
AND l.p_tou_id = 0
AND o.ocd_niveau = @.i_tou_niveau
AND o.ocd_min <= l.lia_ocd
AND o.ocd_max >= l.lia_ocd
Tables:
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[ocd_regr]') and OBJECTPROPERTY(id,
N'IsUserTable') = 1)
drop table [dbo].[ocd_regr]
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[liasse_rq]') and OBJECTPROPERTY(id,
N'IsUserTable') = 1)
drop table [dbo].[liasse_rq]
GO
if exists (select * from dbo.systypes where name =
N't_code')
exec sp_droptype N't_code'
GO
if exists (select * from dbo.systypes where name =
N't_npa')
exec sp_droptype N't_npa'
GO
setuser
GO
EXEC sp_addtype N't_code', N'varchar (4)', N'null'
GO
setuser
GO
setuser
GO
EXEC sp_addtype N't_npa', N'varchar (10)', N'null'
GO
setuser
GO
CREATE TABLE [dbo].[ocd_regr] (
[p_ocd_regr] [varchar] (7) COLLATE French_CI_AI
NOT NULL ,
[ocd_nom] [varchar] (20) COLLATE French_CI_AI NOT
NULL ,
[ocd_min] [int] NOT NULL ,
[ocd_max] [int] NOT NULL ,
[ocd_niveau] [tinyint] NOT NULL ,
[timestamp] [timestamp] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[liasse_rq] (
[p_lia_id] [int] IDENTITY (1, 1) NOT NULL ,
[lia_c_type_vdd] [t_code] NOT NULL ,
[p_tou_id] [int] NOT NULL ,
[p_vdd_id] [int] NOT NULL ,
[p_edi_id] [int] NOT NULL ,
[lia_nom] [varchar] (28) COLLATE French_CI_AI NOT
NULL ,
[lia_mode_encartage] [tinyint] NOT NULL ,
[lia_qte] [int] NOT NULL ,
[lia_pos] [int] NOT NULL ,
[lia_niveau] [tinyint] NOT NULL ,
[p_pay_id] [int] NULL ,
[lia_npa] [t_npa] NULL ,
[lia_b_ptt2plis] [tinyint] NOT NULL ,
[lia_b_mono] [tinyint] NOT NULL ,
[lia_ocd] [int] NULL ,
[lia_circonscription] [int] NULL ,
[p_amb_id] [int] NULL ,
[p_etr_id] [int] NULL ,
[lia_c_achemin_pe] [t_code] NULL ,
[lia_npa_n] [int] NULL ,
[p_ocd_regr] [varchar] (7) COLLATE French_CI_AI
NULL ,
[lia_trav1] [int] NULL ,
[lia_trav2] [int] NULL ,
[lia_trav3] [varchar] (10) COLLATE French_CI_AI
NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ocd_regr] WITH NOCHECK ADD
CONSTRAINT [ocd_regr_pk] PRIMARY KEY CLUSTERED
(
[p_ocd_regr]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[liasse_rq] WITH NOCHECK ADD
CONSTRAINT [liasse_rq_pk] PRIMARY KEY CLUSTERED
(
[p_lia_id]
) ON [PRIMARY]
GO
CREATE UNIQUE INDEX [ocd_regr_u1] ON [dbo].[ocd_regr]
([ocd_niveau], [ocd_min], [ocd_max], [p_ocd_regr]) ON
[PRIMARY]
GO
CREATE INDEX [liasse_rq_i1] ON [dbo].[liasse_rq]
([p_tou_id]) ON [PRIMARY]
GO
Server Info:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: )
Did you able to fix this problem? Plese let me know...
Showing posts with label unlock. Show all posts
Showing posts with label unlock. Show all posts
Sunday, February 19, 2012
Subscribe to:
Posts (Atom)