You get “A duplicate attribute key has been found when processing ..” error message when processing a dimension

Article translations Article translations
Close Close
Article ID: 2002757 - View products that this article applies to.
Expand all | Collapse all

Symptoms

In SQL Server Analysis Service 2008, dimension processing and you may receive an error message that resembles the following:

Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'TABLE_NAME', Column: 'ATTRIBUTE_COLUMN_NAME, Value: 'ATTRIBUTE_VALUE'. The attribute is 'ATTRIBUTENAME'.

Cause

The behavior is by design. SQL Server 2008 Analysis services will detect the duplicate attribute key during processing.

The above error can also be triggered when the relational database is case-sensitive and the data values are in mixed-case. In Analysis services, when creating a dimension and its attribute(s), the default collation for the attribute is case-insensitive. The dimension by-default has ErrorConfiguration|KeyDuplicate  set to be "ReportAndStop". So if you have a case-sensitive relational database that for example contains data values ‘BOOKNAME” and “Bookname”, during dimension processing, if the data BOOKNAME first was processed as attribute key, the subsequent processing will fail with the following error

"A duplicate attribute key has been found when processing: Table: 'TABLE_NAME', Column: 'ATTRIBUTE_COLUMN_NAME, Value: 'Bookname'. The attribute is 'ATTRIBUTENAME'." 

Resolution

When designing dimensions, dimension attributes and attribute relationships, you should check the relational data values for duplicates and if  they do exist, use one of the following procedures to address the issue:

Option 1: Edit the named query in Data Source View to select only the data with the desired case. 

For example, you can use UPPER or LOWER case function in the named query.

Option 2: You can workaround the problem using either of the following options:

Note: These options are not usually recommended as they may result in unexpected data, but can be used for troubleshooting purpose.

  • Set KeyDuplicate element's value to ReportAndContinue and KeyErrorLimitAction to StopLogging in ErrorConfiguration.
  • Using the Dimension Editor in Business Intelligence Development Studio (BIDS), open the dimension which the attribute belongs to and set the proper collation for the attribute by using the Collation property of the dimension.
    Note: This will cause the dimension to have a duplicate attribute key (different case values) after processing is complete.

More Information

  • 2001399 Error message when using ProcessAdd on dimensions:"A duplicate attribute key has been found when processing"
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2002757 - Last Review: September 9, 2010 - Revision: 4.0
APPLIES TO
  • Microsoft SQL Server 2008 Analysis Services
Keywords: 
KB2002757

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com