Microsoft KB Archive/896101

From BetaArchive Wiki

Article ID: 896101

Article Last Modified on 9/14/2006



APPLIES TO

  • Microsoft Commerce Server 2002, Service Pack 3 (SP3)
  • Microsoft Commerce Server 2002 Standard Edition




SYMPTOMS

When you import the Microsoft Commerce Server 2002 Profile Catalog existing partitions in a data source, the partitions may not be imported in the original order. This behavior may cause the original data to become corrupted. This problem can occur if you have an existing portioned OLEDB data source in your data.

CAUSE

This problem occurs because of behavior that occurs during an import operation. The profile system asynchronously tests each partition in the data source and then inserts the partition information upon success. This process causes the Profile System to write the partitions to the profile database in an indeterminate order. Later, the Profile System reads the partitions in the order that Microsoft SQL Server provided to determine the partition numbers. These new partition numbers may corrupt data, because the order in which the partitions appear may be different from the order of the original partitions.

Note The Profile System writes all partition information in the SourceDef table of the profile database. This table does not contain any indexes.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Commerce Server 2002 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

Note 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.

Prerequisites

No prerequisites are required to apply this hotfix.

Restart requirement

You must restart IIS after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) 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.

File name File version File size Date Time Platform
Addkeytosourcedef.sql Not Applicable 329 30-Mar-2005 14:41 Not Applicable


WORKAROUND

To work around this problem, use one of the following methods.

Do not perform a Profile Catalog import

Do not import the Profile Catalog. This process is impractical and prevents you from being able to modify the Profile System schema in bulk or offline. Additionally, this process runs contrary to the functionality that is stated in the Commerce Server 2002 documentation. For more information, see the "Importing Profile Schema" topic in Commerce Server 2002 Help. This process also raises additional questions, such as how updating a connection string may affect the portioned data source.

Reinsert the partition information

Follow these steps after you import the partitions:

  1. Delete the partition information.
  2. Reinsert the partition information in the SourceDef table in the correct order.

Unfortunately, under some conditions, SQL Server may not return the rows in the same order in which they are entered. SQL Server does not actually delete the rows immediately. Instead, SQL Server marks the rows for deletion and then creates the new rows.

Add a clustered index

Add a clustered index on a column in which the user can modify the contents, such as the SourceName column. The clustered index causes SQL Server to use the index to order the rows physically. The Profile System uses a simple SELECT statement to read the SourceDef table. Therefore, the Profile System would read the partitions in the correct order if a clustered index exists.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


To apply this hotfix, follow these steps:

  1. Back up the existing database.
  2. Determine the current order of the partition by running a SELECT statement on the SourceDef table.
  3. Use Microsoft Management Console (MMC) to export the Profile Catalog.
  4. Rename the name attributes of the SourceInfo elements in the exported XML code so that the elements are in alphabetical order when they are returned by the SELECT statement. For example, change one, two, three to 1_one, 2_two, 3_three.
  5. Use MMC to Import the updated Profile Catalog.
  6. Use the SQL script file that is included in this hotfix package to apply a clustered index to the SourceDef table. This script file is only an SQL script that will help you create the key on the table. The script file is not a complete SQL script, and you must run the script only after you follow steps 1-5. You must rename the script file to AddKeytoSourceDef.SQL. Modify the script, and then replace the section that has brackets ("[ ]") with the correct parameters that are mentioned in the brackets. For example, [SourceName] is the name of the database source.
  7. Use SQL Query Analyzer to open and run the script.


Keywords: kbfix kbbug kbhotfixserver kbqfe kbcommserv2002presp4fix kbpubtypekc KB896101