Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You receive a deadlock in Commerce Server 2002 in the catalogproducts_upd_tr trigger


View products that this article applies to.

Symptoms

When you update or delete items in the catalog programmatically in Microsoft Commerce Server 2002, you may notice that your application does not respond. Additional investigation indicates that a deadlock occurred on the Microsoft SQL Server. In a deadlock, various threads cannot continue because they are waiting on a set of resources that are held by each other or that are held by other threads.

↑ Back to the top


Cause

Catalog tables have a trigger that is named catalogproducts_upd_tr. This trigger has a section that updates the global catalog information with a date that the catalog was last updated. This behavior occurs to support the DeltaExportXML method. With the DeltaExportXML method, you can export just the updated sections of the catalog.

↑ Back to the top


Resolution

To resolve this behavior, edit the name_catalogproducts_upd_tr catalog trigger, where name is the name of your catalog. Then, remove the sections that are marked with braces ("{ }"):
CREATE TRIGGER [name_catalogproducts_upd_tr] ON [name_catalogproducts] FOR UPDATE
AS
BEGIN
SET NOCOUNT ON
UPDATE [Ad_catalogproducts]
SET LastModified=getdate()
from [Ad_catalogproducts] P, INSERTED I
where P.oid = I.oid 
{UPDATE Catalogglobal}
{SET ProductTableUpdated = getdate()}
{Where catalogname = N'name' }
END

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


Keywords: KB828524, kbprb

↑ Back to the top

Article Info
Article ID : 828524
Revision : 2
Created on : 7/15/2004
Published on : 7/15/2004
Exists online : False
Views : 365