Catalog Import Using Commerce Server Staging or Biztalk Adapters Fails due to Deadlock Condition

When you import catalog data using either the Commerce Server Staging (CSS) feature or the Commerce Server 2009 R2 Biztalk Adapters, the import may fail with an error message. For example, the following event is logged when an import using CSS fails:

Event Type: Error

Event Source: Commerce Server Staging

Event Category:   None

Event ID:   61993

Description:

Failed to import business data for 'Catalog' resource for project '<staging project name>' :

Microsoft.CommerceServer.Staging.StagingSubsystemException:

CatalogImport failed. See log for details.3:Transaction (Process ID<id>) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

This error occurs when the ctlg_CreateDropTempIndexes stored procedure of the import process for the catalog data causes a deadlock in SQL Server.

To resolve this problem

Perform the following procedure to create the CatalogProductsIndex registry key and set its DWORD Value. The DWORD Value determines whether or not the ctlg_CreateDropTempIndexes stored procedure is used in the import process for catalog data. When the DWORD Value is set to 1, the ctlg_CreateDropTempIndexes stored procedure is not used in the import process for catalog data.

Warning

As a precaution, always back up the registry before making any modifications to it. This allows you to restore the registry should a problem occur while modifying it. For more information about how to back up and restore the registry, see https://go.microsoft.com/fwlink/?LinkId=216807.

Create the CatalogProductsIndex registry key and set its DWORD value

  1. Open Registry Editorand then start regedit.

  2. Locate and click the following registry subkey:

  • On a x64-based computer, locate and click HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Commerce Server\2009

  • On an x86-based computer, locate and click HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Commerce Server\2009

  1. On the Edit menu, point to New, and then click DWORD Value.

  2. Type CatalogProductsIndex, and then press ENTER.

  3. In the Value data box, type 1 or 0, and then click OK.

    Note

    If you type 1, the ctlg_CreateDropTempIndexes stored procedure is not used in the import process for catalog data. If you type 1, the ctlg_CreateDropTempIndexes stored procedure is used in the import process for catalog data.

  4. Exit Registry Editor.

After performing this procedure, try importing catalog data using either the Commerce Server Staging (CSS) or Commerce Server 2009 R2 Biztalk Adapters.

See Also

Other Resources

Troubleshooting the Catalog System

Troubleshooting Commerce Server Staging