Symptoms

adTempus logs an Alert and reports a message in the Application log in the Windows Event Viewer indicating that a database error has occurred:

A database error occurred while processing a database command. This may indicate a database problem or software problem. Please contact Arcana Development for assistance and provide the server diagnostic logs. Database error: An exception was caught during the execution of an action query: Violation of UNIQUE KEY constraint 'UQ_ParentGroup_Name'. Cannot insert duplicate key in object 'dbo.jobGroup'.

The statement has been terminated.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.: Violation of UNIQUE KEY constraint 'UQ_ParentGroup_Name'. Cannot insert duplicate key in object 'dbo.jobGroup'.

Additionally, you may find that the Agent is not reflecting configuration updates made on the Master, and may not execute jobs sent by Slave or Load Balance queues.

Cause

This problem occurs if all of the following are true:

  • The Agent is configured to run in "Standalone + Agent" mode (meaning that it receives jobs from the Master, but jobs can also be created and managed locally).
  • You created a Job Group on the Agent, and subsequently created a Job Group on the Master that has the same name and the same parent group.

When the Agent receives the new Job Group from the Master, it treats the group as a different object than the existing group with the same name. This is because adTempus identifies objects using an internal unique identifier, not the name. Even though the groups have the same name, they have different identifiers, and therefore are treated as different objects.

The Agent therefore tries to save the Job Group as a new object, and this results in a database error because of a constraint that prevents two groups from having the same name.

Resolution

To determine the name of the group that is causing the problem, review the "adtempus.service.log" diagnostic log file (see article K00000417 for information on how to locate this file). In the log file you will find the error message shown above, preceded by information similar to the following:

	Query: INSERT INTO [adtempus_test].[dbo].[jobGroup] ([oid], [name], [description], [parentGroupOID], [fullName], [namespaceImports], [assemblyReferences], [holdType], [cycleIDType], [cycleID], [cycleIDPrefix], [cycleIDFormat], [useInheritedResponses]) VALUES (@p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19)
	Parameter: @p7 : Guid. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 3cea552c-db58-41af-b3da-65f5e64e9f13.
	Parameter: @p8 : String. Length: 255. Precision: 0. Scale: 0. Direction: Input. Value: "TEST".
	Parameter: @p9 : String. Length: 2147483647. Precision: 0. Scale: 0. Direction: Input. Value: .
	Parameter: @p10 : Guid. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: b2299ea6-b77a-49af-ae31-67c0aa403cea.

The line shown in bold above (beginning with "Parameter: @p8") gives the name of the Job Group causing the problem: in this case, "TEST".

On either the Master or the Agent, edit the Job Group with this name and change the name to something unique. Once the group has been successfully replicated from the Master to the Agent, you can move jobs from the group on the Agent into the group sent from the Master, if desired.

Status

  • adTempus 4
    This issue has been resolved. Resolved in version 5.0.