Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar

delete-scripts.zip

Attached are scripts you can use for ORACLE, PSQL, and MYSQL for deleting users. Directions to how these scripts work are included in the script.

Good practice is to make sure to backup your db before attempting to use and test these scripts.

5,014 Views
Comments
avatar
Expert Contributor

Hello @dvillarreal, 

 

Thank you for the script files, makes life easy! Just a small edit: 
The proc.psql file
 was missing one SQL statement @line 96:

delete from x_user_module_perm where user_id = x_portal_user_id;

 

We were facing the below issue while trying the commands from psql file manually:

 

ERROR:  update or delete on table "x_portal_user" violates foreign key constraint "x_user_module_perm_fk_userid" on table "x_user_module_perm"
DETAIL:  Key (id)=(19) is still referenced from table "x_user_module_perm"

 

Because of the above blocker, the script was not deleting the users from the DB.

 

Once we added the missing SQL statement and ran the deleteRangerUser.sh we were able to use it with successful results.

Version history
Last update:
‎04-13-2017 05:44 PM
Updated by:
Contributors