New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

SQL Parametric script to "HARD Delete user"

Return to previous page

  • 8/29/2014
  • 6106 Views

Question:

Giuseppe Marraffa long time ago

Hello everybody,

I had a BOT attack.... 94000 USERS on one of my portals of my DNN7 installation (07.00.04 (180)) !!! The good news is I know exactly which user is GOOD and which one is BAD! They have been added all to the same portal within 3 days! So I need a SQL Statement that DELETES all users created between two different dates, that belongs to a given portal. 

I don't need to set "IsDelete"=1 (No soft delete)! I need a proper SQL Statement that ELIMINATES, DELETES the user, from all the related tables!

Is there a standard HARD DELETE SQL script that takes care about all the joins, where the SQL executer can then modify its own parameters! I know that the User tables are complex in DNN, and I dont want to invest time in understanding them into detail and write my own SQL script that could cause damage. But there must be a ready to use, tested SQL SCRIPT to HARD delete users.

My Pseudocode would look something like that:

Delete * Users with PortalID=15, and UserCreationDate between 25/08/2014 and 28/08/2014.

Thank you very much,

Regards,

Giuseppe

SQL Parametric script to "HARD Delete user"

Giuseppe Marraffa
Giuseppe Marraffa long time ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member