Article ID: 973970
When you export a virtual catalog in Microsoft Commerce Server 2007, the catalog is not exported successfully. Additionally, events that resemble the following are logged in the Application log:
Event Type: Error
Event Source: Commerce Server Business UI
Event Category: None
Event ID: 100
Description: Microsoft.CommerceServer.Catalog.CatalogException: Line 0: Violation of PRIMARY KEY constraint 'PK__#Relationships____<string>'. Cannot insert duplicate key in object 'dbo.#Relationships'. The statement has been terminated.
This problem usually occurs in one of the following scenarios.
Event Type: Error
Event Source: Commerce Server Web Services
Event Category: None
Event ID: 1
Description: An exception occurred in the 'ExportCatalog' Web service. Exception details follow: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__#Relationships____<string>'. Cannot insert duplicate key in object 'dbo.#Relationships'. The statement has been terminated.
This problem occurs because of an error in the stored procedure that builds relationships for a category or for a product.
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.
To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
PrerequisitesYou must have Commerce Server 2007 Service Pack 2 installed to apply this hotfix.
Restart requirementYou do not have to restart the computer after you apply this hotfix. However, you must restart Internet Information Services (IIS) and the Commerce Server Catalog Import Host COM+ application after you apply this hotfix. To restart IIS, at a command prompt, type the following command, and then press ENTER:
IISRESET /RESTARTNote This option stops and then restarts all IIS services that are running.
Hotfix replacement informationThis hotfix does not replace any other hotfixes.
File informationThe English version of this fix has the file attributes (or later versions) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Collapse this tableExpand this table
Installation instructionsAfter you extract the hotfix package, you obtain the following files:
Additionally, run the Ctlg_ExportRelationships.sql file against the existing catalog databases to update the problematic stored procedure for existing catalog databases. You must restart IIS by running the following command for the update to take effect:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about how to create category and product relationships, visit the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/ms943034.aspxFor more information about how to manage virtual catalogs, visit the following Microsoft Web site:
Contact us for more help
Connect with Answer Desk for expert help.