Delete all data within Accounts Module? Any quick way?

Hi.

Something has gone a little weird in our system and we’ve gone from 75,000 records to 400,000 plus records… Is there a simple way to delete all of these within the database, or is it just best to do a select all and delete from within accounts and then leave the system along for a couple of hours to let it go away and do the delete?

Without more specifics it is hard to tell, you could have a corrupt DB, or perhaps even an odd customization that caused this to happen.

I would not select all and delete. It will time our and will not complete the action.

You would have to go to the DB and delete records manually to do it quick and efficiently.

1 Like

SQL Workbench helped a lot :slight_smile:

Installed it on the server, as i’m useless so it gave me a nice GUI, just selected the 10 Accounts tables and right clicked and truncated them all. Fanstastic :slight_smile: That was nice n easy. If anyone else has similar issues it works well :slight_smile:

If you delete from the database you have to be very careful because you will leave around lots of orphan data coming from, for example relationships, emails, email addresses, opportunities, calls, custom modules, etc.

It may be quite difficult to find all of these so, if you don’t want to mess your db for once and for all you must know very clearly what you have to delete.

The best way, once you know for each account, all the tables affected and the conditions under which they are affected, is that you write a php script that will loop through all the accounts and does it for you.

Useless to say that before doing anything you have to back everything up.