All versions of DirectAudit in environment with Windows 2012R2 Domain Controller
Getting the following error message when trying to add an Audit Store database with console wizard
"A constraint violation occurred"
If the service account of SQL Server hosting the Audit Store database has recently been switched, the step to clear the old SQL SPN (Service Principal Name) entries from the servicePrincipalName attribute of the original service account might be overlooked or forgotten.
If the above is true and DBA has not yet set the required SQL SPN on the new service account, the Audit Manager console will try to stamp the correct SPN entries automatically while creating a new Audit Store database. While doing so, if the Audit Manager console is communicating with a Windows 2012 R2 Domain Controller, this operation will fail because the Windows 2012 R2 Domain Controller verifies whether the SPN being stamped is unique across the forest or not and this check will fail because the old SPN entries have not yet been removed from the old service account.
When switching SQL Server service account, always make sure you update the servicePrincipalName attribute of the old service account and remove all values corresponding to the SQL Server.