Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® Enterprise Service 10

Reply
New Contributor
bysdontcry
Posts: 8
Registered: ‎04-16-2013
My Device: Blackberry Z10
My Carrier: Verizon

Re: User stuck in database and unable to delete him to re-create

Sorry.  Meant to post back.  So Blackberry support never got back to me for a solid week.  They did say it was a bug in the BES10 server software.  I installed SQL Management Studio software on the server, connected to the BDSMgmt (not BESMgmt as was the name in BES5), navigated to the dbo.DeviceUser table, found my userid and deleted myself.  My user account was back in the system after that, created a new activation passcode and activated myself again.

Please use plain text.
Contributor
rameokirby
Posts: 15
Registered: ‎08-02-2012
My Device: Z10
My Carrier: Telus

Re: User stuck in database and unable to delete him to re-create

Fantastic. Thanks for the info. Did the same and it worked !
Please use plain text.
New Contributor
bysdontcry
Posts: 8
Registered: ‎04-16-2013
My Device: Blackberry Z10
My Carrier: Verizon

Re: User stuck in database and unable to delete him to re-create

Anytime.  Saved my butt.  I'm the lead IT administrator and I didn't have a working mobile device with my emails.  Glad it got sorted out.  Had to do it with another user actually afterwards.  Same good result.  Glad it worked out for you. 

Please use plain text.
Contributor
taltemeier
Posts: 26
Registered: ‎04-30-2013
My Device: Z10 & Q10
My Carrier: Vodafone

Re: User stuck in database and unable to delete him to re-create

Still can't delete user even with the "Immediate removal" workaround.

 

this error occures:

 

Caused by: org.hibernate.exception.ConstraintViolationException: could not delete: [com.rim.bes.bas.deviceperimetermanager.entity.DevicePerimeterEntity#4]
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2559)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2715)
    at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:96)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:278)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:262)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:171)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
    at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:999)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1185)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:94)
    ... 667 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The DELETE statement conflicted with the REFERENCE constraint "FK_BASUserApplicationReconciliations_DevicePerimeter". The conflict occurred in database "BDSMgmt", table "dbo.BASUserApplicationReconciliations", column 'DevicePerimeterKey'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314)
    at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:96)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
    at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2541)
    ... 678 more

Please use plain text.
Contributor
taltemeier
Posts: 26
Registered: ‎04-30-2013
My Device: Z10 & Q10
My Carrier: Vodafone

Re: User stuck in database and unable to delete him to re-create

[ Edited ]

Will try to edit database manualy....

Please use plain text.
Contributor
taltemeier
Posts: 26
Registered: ‎04-30-2013
My Device: Z10 & Q10
My Carrier: Vodafone

Re: User stuck in database and unable to delete him to re-create

After deleting the user in the SQL Database, the User Account is back in the system but does not work any more - it can not be assigned to the current BES Server. It can not be deleted either....

 

 

Please use plain text.
New Developer
geh_dirt
Posts: 31
Registered: ‎12-14-2009
My Device: Bold (9650), Playbook, Z10
My Carrier: Sprint and AT&T

Re: User stuck in database and unable to delete him to re-create

I highly recommend that you never try to manually delete any records from the BDSmgmt tables.

 

This is a known bug and I was able to resolve it by using the KB18404 document.

 

This is the part that is specific to the BDS environment.

 

For BlackBerry Enterprise Service 10

  1. Under BlackBerry Solution Management.
  2. Click Manage Users.
  3. Click View more criteria.
  4. In the Device criteria, find the Device Status drop-down list and select Pending delete.
  5. Click Search.

or

  1. Under BlackBerry Solution Management.
  2. Click Manage Users.
  3. Click View more criteria
  4. In the User criteria, find the  Queued to delete the user drop-down list and select True.
  5. Click Search.


The user can be purged from the database or removed immediately from the BlackBerry Enterprise Server services by performing the following steps:

  1. Click the Display name of the user that is displayed when searching for user accounts that are queued for removal of BlackBerry Enterprise Server services.
  2. Click Immediate removal of BlackBerry services.
****
I love it when things don't work the way they are supposed to, because then I get to fix them.
****
Please use plain text.
Visitor
henry1138
Posts: 1
Registered: ‎05-08-2013
My Device: Blackberry Z10
My Carrier: Rogers

Re: User stuck in database and unable to delete him to re-create

I came across this thread when I searched an error from my BBAS AS log:
"The DELETE statement conflicted with the REFERENCE constraint "FK_BASUserApplicationReconciliations_DevicePerimeter". The conflict occurred in database "BDSMgmt", table "dbo.BASUserApplicationReconciliations", column 'DevicePerimeterKey'"

 

We had a user in BDS6.2 that just couldn't be deleted. Someone deleted him and wanted to re-add them to activate another device. I followed what bysdontcry posted and deleted the users entry from the dbo.deviceuser table.


At first I wasn't able to add the user back, but then I noticed they were still in the BDS, but as an Adminstrator User. After clicking "Add to Blackberry Device Service" the user was able to be activated again.

 

Props, and I hope this helps others.

Please use plain text.