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

KB202580: "Violation of PRIMARY KEY constraint" error message is seen in the DELog when the Transmission Recording table logging is active in MicroStrategy Narrowcast Server


Community Admin

• Strategy


In MicroStrategy Narrowcast Server 9.x, the "Violation of PRIMARY KEY constraint 'PK__MSTRLOGS__50C7B1AA55009F39'. ma. The duplicate key value is (xxxxxxxxxxx)" error is appended to the Delog file when the Transmission Recording table logging is active.

SYMPTOM
The following error message is seen in the DELog in Strategy Narrowcast Server 9.x whenever the Transmission Recording tables logging is active.


[NCS001:: DBLogger]:3040:[THR:0x1140][01/07/2014 09:01:36.011][Level:Minor Error][Code:0x00015100]Possible Data loss. DB Message: "Operation on the database
failed: Execute Query failed. Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [23000:2627: on SQLHANDLE] [Microsoft][ODBC SQL Server Driver]
[SQL Server]Violation of PRIMARY KEY constraint 'PK__MSTRLOGS__50C7B1AA55009F39'. ma. The duplicate key value is (D3A9870F084943819DD88BE752B12457, 199009, 
​93897006D664403F9E1048F70E48517A). [01000:3621: on SQLHANDLE] [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated."

CAUSE
This error message indicates that a primary key value already exists in one of the Transmission Recording tables and is trying to be rewritten. The attempt to do so violates the primary key constraint resulting in a failure of the attemp. One possible cause for this error message is that the the message queue used by the Narrowcast Server to collect the INSERT statements (to be written into the Transmission Recording tables) gets overloaded and some INSERT statements are set to be retried. The occurrence of this issue is very rare and should only happen in environments with very high Narrowcast Server usage.
ACTION
There are 2 registry keys that can help with controlling the number of messages in the message queue and the frequency at which they are written to the Transmission Recording tables. These registry keys are listed below.
HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Strategy Broadcast Server\7.0\Transmission Recorder\MessagesInQueue (default 150) HKEY_LOCAL_MACHINE\SOFTWARE\MicroStrategy\Strategy Broadcast Server\7.0\Transmission Recorder\SecondsBeforeFlush (default 60 secs)

  • "MessagesInQueue" represents the size of the messages bucket that will be able to hold an "n" number of messages in the queue.
  • "SecondsBeforeFlush" controls the frequency with which the message bucket is written to the Transmission Recording tables and then flushed.

In order to ensure that the messages are written to the Transmission Recording tables quickly so that the message bucket does not overload, minimizing the time value for the "SecondsBeforeFlush" registry key is suggested. If the "SecondsBeforeFlush" registry key is set to the default value of 60 seconds, a suggested value of 10-20 seconds should be sufficient.
Note: For additional details on modifying the above mentioned registry settings, refer to the following Strategy Knowledge Base technical note:KB16545: How to control the number and frequency of Transmission Recording messages in MicroStrategy Narrowcast Server 9.x
202580


Comment

0 comments

Details

Knowledge Article

Published:

June 7, 2017

Last Updated:

June 7, 2017