'Deleting User Accounts' wasn't possible due to a 'java.sql.SQLException'

0 Likes

The full SQL Exception thrown when trying to delete a user account will be similar to below:

'Deleting User Accounts' wasn't possible due to a 'java.sql.SQLException':

"The DELETE statement conflicted with the REFERENCE constraint "FK__SCC_Users__UserI__2DE6D218". The conflict occurred in database "SILK_DB", table "dbo.SCC_Users_LoginCookies", column 'UserID_pk_fk'."

This error may happen due to 'reader-writer' blocking scenarios. Snapshot isolation is used to avoid reader-writer blocking scenarios. 

It is recommended to have a backup of the SCTM database and all SCTM services should be stopped prior to performing the following steps. 

It is also recommended to test this procedure in a test environment before attempting on production.

To enable ALLOW_SNAPSHOT_ISOLATION on the database:

  1. Connect to the database server through SQL Server Management Studio 

    Databases | SCTM database | Right Click | New Query 

    You must have administrator rights on the database server to enable the setting
  2. Execute the following command:

    ALTER DATABASE <databasename> SET ALLOW_SNAPSHOT_ISOLATION ON
  3. Restart all SCTM services
  4. Log into SCTM
  5. Delete the user account

Comment List
Anonymous
Related Discussions
Recommended