User Profile Management - While building indices for profile UserObject

This is Interesting: Free IT Magazines  
Home > Archive > User Profile Management > July 2004 > While building indices for profile UserObject





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author While building indices for profile UserObject
Karamba

2004-06-09, 5:01 pm

I am baffled, my error message is:

A duplicate value for unique key member AccountInfo.org_id found while
building indices for profile UserObject. Check the underlying store
for uniqueness of the property.

Exception Details: System.Runtime.InteropServices.COMException: A
duplicate value for unique key member AccountInfo.org_id found while
building indices for profile UserObject. Check the underlying store
for uniqueness of the property.


[COMException (0xc1004043): A duplicate value for unique key member
AccountInfo.org_id found while building indices for profile
UserObject.
Check the underlying store for uniqueness of the property.
]

Microsoft.CommerceServer.Interop.Profiles.ProfileServiceClass.GetProfileByKe
y(String bstrKeyMemberName, Object sValue, String bstrType, Boolean
bReturnError) +0
Microsoft.CommerceServer.Runtime.Profiles.Profile..ctor(ProfileContext
profileService, String keyName, String keyValue, String profileType)
+74

[CommerceProfileSystemException: Failed to retrieve profile.]
Microsoft.CommerceServer.Runtime.Profiles.Profile..ctor(ProfileContext
profileService, String keyName, String keyValue, String profileType)
+279

Microsoft.CommerceServer.Runtime.Profiles.ProfileContext.GetProfile(String
keyName, String keyValue, String profileType) +181
Microsoft.CommerceServer.Runtime.CommerceContext.get_UserProfile()
+201
AdultCommerce.Classes.Session.AuthenticatedPage.Page_Load(Object
sender, EventArgs e)
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +714



I remove all users and have an empty UserObject table, restart IIS and
start from scratch. I sign up, create an account and everything works
fine. Then if for some reason I empty out my cookies (after all some
users might do
this) and try to re-log in and get that annoying problem. My
refreshinterval
is:

<cache name="QueryCatalogInfoCache" type="QCI"
loaderProgId="Commerce.LRUCacheFlush" refreshInterval="0"
retryInterval="300" maxSize="10000">

<userProfile profileDefinition="UserObject"
userIdProperty="GeneralInfo.user_id"
organizationIdProperty="AccountInfo.org_id"
catalogSetIdProperty="AccountInfo.user_catalog_set"/>

I don't even use AccountInfo.org_id, its always set to null everytime
a user is added.

Please, if you have any further explanation as to why this is
happening, please let me know.

Thanks
Vinod Kumar[MSFT]

2004-07-01, 5:53 pm

CAUSE
=====

Commerce Server will find a duplicate key when a user enters
a value and the same value exists in the database with spaces padded at the
end
of the character string. This can happen if the data type of the column
designated as a join key is configured in SQL to be a CHAR data type.

If the Profile database that the Commerce Server site uses contains a
value that has spaces appended to its character string, and you enter the
same
value without the appended spaces, Commerce Server determines that you have
entered a duplicate key. This behavior may occur if the column of the data
member that the profile property references, and that is designated as a
join
key, is configured in SQL Server to use a char data type.

RESOLUTION
==========

To resolve this problem, change the value of the data type
from char to nvarchar for the column of the data member that the profile
property
references. To do this, follow these steps:


1. In Commerce Server Manager, expand "Commerce Server Manager", expand
"Global Resources", expand the profile resource of the site, expand
"Profile Catalog", and then expand "Profile Definition".

2. Open the profile definition that appears in the error message, and
then expand "General Information Group".

3. In the left pane, click the profile property that appears in the
error message, and then expand "Advanced Attributes".

4. Click the button next to the "Mapped Data" value.

5. In the "Data Source Picker -- Web Page" dialog box, notice the name
of the table and the name of the column. Click "Cancel".

6. In the left tree view, locate "Microsoft SQL Servers", expand "SQL
Server Groups", expand the name of the server, expand "Databases", and
then expand "Profile Database".

7. Locate the table name that you viewed in step 6. Right-click this
table name, and then click "Design Table".

8. In the "Design Table" dialog box, locate the column name that you
viewed in step 6, and then change the data type of the column from char
to nvarchar.

9. Close the "Design Table" dialog box.

10. Close Commerce Server Manager.

11. Click "Start", and then click "Run".

12. In the "Open" box, type "IISRESET" (without the quotation marks),
and then click "OK".

This behavior is by design. Because the char data type is not suitable for
international characters, Commerce Server profiles were designed to use
the nvarchar data type.



This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2002 Microsoft Corporation. All rights
reserved.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com