03-11-2014 05:36 PM - edited 03-19-2019 08:00 AM
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
|
Solved! Go to Solution.
07-15-2014 12:01 AM
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.
07-15-2014 12:01 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide