EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB441947: The store procedures SP_IS_REP_FACT/SP_IS_DOC_FACT fails due to a primary key violation error in MicroStrategy Enterprise Manager 2020 and above


Shugo Sonobe

Principal Consultant • MicroStrategy


This article explains one possible cause of a Primary Key violation error that gets encountered during the stored procedure execution for a data load.

Symptom


When a scheduled data load gets executed, its stored procedure fails due to a primary key violation error and the MAEntMgr.xml log captures the following error entries
[Logger:MAEntMgr][Thread:pool-1-thread-2][Level:INFO] Executing SP_IS_DOC_FACT
[Logger:MAEntMgr][Thread:pool-1-thread-2][Level:ERROR] CALL SP_IS_DOC_FACT()
[Logger:MAEntMgr][Thread:pool-1-thread-2][Level:ERROR] java.sql.SQLException: Execute Query failed. 
Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [23000:1: on SQLHANDLE] [Strategy][ODBC Oracle Wire Protocol driver][Oracle]ORA-00001: unique constraint (PREFIX_XYZ.IS_DOC_FACT_PK) violated
ORA-06512: at " PREFIX.SP_IS_DOC_FACT"
* In this case, the Enterprise Manager repository is hosted on Oracle, so the oracle error ORA-00001 is seen. If other databases are used, the error message can vary.

Cause


One possible cause of this issue is that more than one Enterprise Manager Data Loader services are configured, pointing to the same Enterprise Manager repository. As a result, each service executes the data load at a scheduled time simultaneously. Each service consequently calls the same stored procedure about the same time,  which tries to insert same data into the corresponding fact table concurrently, triggering the primary key violation.

Action


Make sure that only one Enterprise Manager Data Loader service is configured for each Enterprise Manager repository, especially in a clustered environment.


Comment

0 comments

Details

Knowledge Article

Published:

September 26, 2018

Last Updated:

December 31, 2018