CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Delete All Contacts
Pages: [1]

Author Topic: Delete All Contacts  (Read 5005 times)

Tachikoma

  • Guest
Delete All Contacts
December 18, 2007, 11:56:26 am
What is the best/easiest way to start over with my contact list?
Is it in SQL admin? Or is there a way through CiviCRM Admin?

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Delete All Contacts
December 18, 2007, 01:43:19 pm
You could select all contacts (on "find contacts" page, do a search with no groups or tags selected) and then select delete from the drop down list.


yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Delete All Contacts
December 20, 2007, 11:20:53 pm
How many contacts are to be deleted. I was able to delete 8900 contacts
yesterday but it took about 20 mins to do so.
i've set my
max_execution_time = 3600
to 1 hour in php.ini.


lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Delete All Contacts
December 24, 2007, 11:12:03 am
I would highly recommend twowheelers suggestion (delete through the find contacts tool) rather than through MySQL. Some of the contact's data are scattered throughout multiple tables. Deleting through CiviCRM ensures all related records are also deleted.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: Delete All Contacts
December 27, 2007, 01:47:37 am
in case you want to do it programmatically.. you can use the api's too..

http://wiki.civicrm.org/confluence/display/CRMDOC/Search+APIs
http://wiki.civicrm.org/confluence/display/CRMDOC/Contact+APIs

first search for contacts and delete them.

the crm_delete_contact(&$contact, $userId = null)
does a clean delete (deletes all related data from other tables that depend on the contact).

yashesh


KermitJr

  • Guest
Re: Delete All Contacts
January 05, 2008, 05:28:05 am
I could use some help with this one.  When I go to the find contacts page and attempt to search without adding anything, I get:
Code: [Select]
Sorry. A non-recoverable error has occurred.

Could not find valid Key

Return to home page.

I tried entering % as a wildcard, too.  and custom search with >=A

Drupal 5.3 and Civic latest (1.9?)

Traceback:
backTrace

/home/opentech/public_html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 255
/home/opentech/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 182
/home/opentech/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 136
/home/opentech/public_html/sites/all/modules/civicrm/CRM/Contact/Controller/Search.php, __construct, 59
/home/opentech/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, __construct, 457
/home/opentech/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, search, 378
/home/opentech/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, contact, 92
/home/opentech/public_html/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 319
, civicrm_invoke,
/home/opentech/public_html/includes/menu.inc, call_user_func_array, 418
/home/opentech/public_html/index.php, menu_execute_active_handler, 15

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    Could not find valid Key

    Return to home page.



I want to list all my contacts.
Thanks!
KermitJr
« Last Edit: January 05, 2008, 08:45:17 pm by KermitJr »

penguinhead

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
Re: Delete All Contacts
January 20, 2008, 02:49:01 am
I a having exactly the same problem, has anyone got a resolution to this issue? It seems quite common throughout the forum, but can't see any answers?

mennonot

  • Guest
Re: Sorry. A non-recoverable error has occurred.
July 15, 2009, 11:40:19 am
Kermit and Penguin,

I had this same problem when trying to delete all contacts. I found the solution here:

http://issues.civicrm.org/jira/browse/CRM-1894

I ran this mysql query in the database with my Drupal tables:

ALTER TABLE sessions CONVERT TO CHARACTER SET utf8;

Hope this works for you and anyone else who comes across this topic.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Delete All Contacts

This forum was archived on 2017-11-26.