Error: 'The DELETE statement conflicted with the REFERENCE constraint "FK_MCVersLnag_Object"' (NETIQKB71729)

  • 7771729
  • 20-Aug-2009
  • 09-Feb-2011

Environment

NetIQ AppManager 7.x

Situation

NetIQ Daily Job Errors with a message stating: The DELETE statement conflicted with the REFERENCE constraint "FK_MCVersLnag_Object"
Error: 'The DELETE statement conflicted with the REFERENCE constraint "FK_MCVersLnag_Object"'

Resolution

The NetIQ Daily SQL job on the AppManager Repository (QDB) machine may fail with the following error message:

The DELETE statement conflicted with the REFERENCE constraint "FK_MCVersLnag_Object". The conflict occurred in database "QDB", table "dbo.MCVersLang"., colmn 'MCMachineOjbID' [SQLSTATE 23000] (Error 5470 the statement has been terminated.  [SQLSTATE 01000] (Error 3621). The step failed.

In order to correct this problem please run the following SQL statement against the QDB in question:

DELETE FROM MCVersLang Where MCMachineObjiD IN (Select Objid FROM Object WHERE Status & 0x08000000 = 0x08000000)

Cause

This problem may occur after an object was deleted from Control Center but not all the references removed.

Additional Information

Formerly known as NETIQKB71729

Before performing the above steps please ensure you have a valid recent backup of the AppManager Repository.