As I mentioned in my About page, one of the advantages of my position is that I’m not pigeon-holed into only performing traditional DBA tasks. One of my projects was to manage the implementation and roll-out of BlackBerry devices, which can query the police database, for officers that patrol on foot or bicycles.
The other day, I had to remove a user from the BES and I got the following error message:
The request could not be completed
So, I went back and made sure to remove the assigned BlackBerry device and remove any links to that particular user but I still got the same message when I tried to delete the user. Hence I decided to look at the log file for the BlackBerry Application Server (BAS). That’s where I saw the following errors:
The DELETE statement conflicted with the REFERENCE constraint "FK_BASUserUAMReconciliations_BASUsers".
The conflict occurred in database "someBESDatabaseName", table "dbo.BASUserUAMReconciliations", column 'UserId'.
The DELETE statement conflicted with the REFERENCE constraint
The conflict occurred in database "someBESDatabaseName", table "dbo.BASUserApplicationNonReconciliations", column 'UserId'.
It looked like the BES somehow had some orphaned records that were creating foreign key constraints issues, so I removed the the records from the tables with the correct corresponding UserID and I was able to remove the user successfully afterwards.