Can't delete database users on development environment


It was woking fine but at some point we become unable to remove users on our development environment having this error:

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSLTM_SYNCUSERS_OSSYS_USER_USERID". The conflict occurred in database "FC062D019", table "dbo.OSLTM_SYNCUSERS", column 'USERID'.

The statement has been terminated.

New users can be created and removed without problem, but the existing ones no. On production all is working fine. 

The table seems to be from LifeTime (https://www.outsystems.com/forums/discussion/26754/delete-constrain/) . Changing the code to not remove users doesn't have sense for us.

Is there a way to access dbo.OSLTM_SYNCUSERS or fix this issue? 

Thank you for any advice.

Rank: #5

Hello Mykola,

Sorry to ask this, but what kind of users are you trying to delete? IT or application users?

The SYNCUSERS table seems to be related to "processes". In fact, if I remember well, LifeTime do some BPT with IT users, and need to keep them synchronized between environments. 

But I would be surprised if it is locking application users.

What the new users have different than the old ones?

Eduardo Jauch

Hello Eduardo,

It is application users. It seems to affect only already existing users. So it might be related to environment update and switching between development and production modes. 

Rank: #25560

I'm having the same issue. Application users that I'm trying to delete getting the same exception. Did you get this resolved?

It was a permissions problem. 

Rank: #14030

I encountered the same problem. Is there a way of accessing dbo.OSLTM_SYNCUSERS ?


Rank: #10981

Is there any update on this issue? I am having the same kind of error while trying to delete an application user (note that the solution pointed in https://www.outsystems.com/forums/discussion/26754/Delete+Constrain/#Post98432 is not enough, as we are required to completely delete the user data from the database).

Platform server: 10.0.708.0

Thank you for your help.

I succeed to deleting , it's because of referenced UserId in other entities with 'protect' Delete Rule.

Just change it to 'Delete' or 'Ignore' depends on which option you want to delete.

Here are the main instructions explain the Delete Rule : 

Rank: #69

Hello Mhammad.

This is not the issue. Just like at the other post, you aren't even referencing the right entity.

This is a table used by Lifetime, so you can't edit foreign keys.

The thing here is, a lot of internal tables refer OSLTM_SYNCUSERS. And you shouldn't delete those logs before analyzing what is done. A better solution would be to redact the undesired personal info and disable accounts.