cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1197
Views
5
Helpful
1
Replies

Unity Connection 8.6 - Unable to delete user

Ayaz Khan
Level 1
Level 1

Hello,

I am unable to delete user from GUI, I get the following error;  Object not found User

I tried using the following commands posted on another discussion

 

run cuc dbquery unitydirdb select objectid from tbl_User WHERE DisplayName='d smith'
run cuc dbquery unitydirdb delete from tbl_DtmfAccessId WHERE DtmfAccessId='d smith'

 

Second command doesn't work, first command has the following ouput;

 


admin:run cuc dbquery unitydirdb select objectid from tbl_User Where DisplayName='d smith'

objectid
------------------------------------
3ede294c-e5fb-4713-bacd-853c6361ec87

 

I tried to modify the second command;

admin:run cuc dbquery unitydirdb delete from tbl_User WHERE DisplayName='d smith'

Rows: 0


User can still be found in GUI.  If anyone has encountered this issue or knows the correct command to delete this user please let me know.

Thanks,

AK

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

SMerezhko
Level 1
Level 1

I know this is an old thread, but in case someone is having this problem, here is the correct way to delete users from CLI:

 

run cuc dbquery unitydirdb select objectid from tbl_User where Alias = 'user_alias'

run cuc dbquery unitydirdb EXECUTE PROCEDURE csp_UserDelete (pObjectId = 'id from the previous select')

 

If this procedure returns an error, this means there can be 'broken' references in DB for that user. Here are some other sql statements that could help to chase these references:

run cuc dbquery unitydirdb select * from tbl_DtmfAccessId where DtmfAccessId = 'extension'

run cuc dbquery unitydirdb select * from vw_subscriberreference where objectid IN (select objectid from vw_subscriber where fn_tolower(alias) =fn_tolower('user_alias'))

run cuc dbquery unitydirdb select * from tbl_handler where  objectid='...............'

 

There also could be duplicate records in tbl_alias table. If this statement returns more that 1 record, all duplicates should be manually deleted:

run cuc dbquery unitydirdb select * from tbl_alias where object_globaluserobjectid in (select objectid from tbl_User WHERE Alias = 'user_alias')

 

Once all broken references are removed, execute csp_UserDelete procedure again to delete user.

View solution in original post

1 Reply 1

SMerezhko
Level 1
Level 1

I know this is an old thread, but in case someone is having this problem, here is the correct way to delete users from CLI:

 

run cuc dbquery unitydirdb select objectid from tbl_User where Alias = 'user_alias'

run cuc dbquery unitydirdb EXECUTE PROCEDURE csp_UserDelete (pObjectId = 'id from the previous select')

 

If this procedure returns an error, this means there can be 'broken' references in DB for that user. Here are some other sql statements that could help to chase these references:

run cuc dbquery unitydirdb select * from tbl_DtmfAccessId where DtmfAccessId = 'extension'

run cuc dbquery unitydirdb select * from vw_subscriberreference where objectid IN (select objectid from vw_subscriber where fn_tolower(alias) =fn_tolower('user_alias'))

run cuc dbquery unitydirdb select * from tbl_handler where  objectid='...............'

 

There also could be duplicate records in tbl_alias table. If this statement returns more that 1 record, all duplicates should be manually deleted:

run cuc dbquery unitydirdb select * from tbl_alias where object_globaluserobjectid in (select objectid from tbl_User WHERE Alias = 'user_alias')

 

Once all broken references are removed, execute csp_UserDelete procedure again to delete user.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: