Results 1 to 6 of 6

Thread: Manual Prune Database

  1. #1
    houlejo is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Qc, Canada
    Posts
    116

    Question Manual Prune Database

    Hi,

    Is it possible to do a manual Prune Database ?
    I don't want to run manual SQL queries, but I would like to call the function :: pruneDatabase when I want.

    Thanks !

  2. #2
    DannyFaak is offline Sugar Community Member
    Join Date
    Jun 2007
    Posts
    18

    Default Re: Manual Prune Database

    Just run the function as seen in:

    modules/schedulers/_AddJobshere.php

    pruneDatabase() is the name.

    You can simple do it by make a new php file in this folder with:

    <?php

    include('_AddJobshere.php');
    pruneDatabase();
    ?>

    Hope it helped,

    Best regards,

    Danny

  3. #3
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Manual Prune Database

    Just curious about the need to prune the DB. Soft deletes cause very little overhead normally unless, of course, you've deleted 90% of the database!!

    What's the motivation here? Your responses can help us understand usage better.

    Thanks,

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  4. #4
    sprunka is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    11

    Default Re: Manual Prune Database

    I have no relation to the OP, but our company would also benfit from this functionality during our testing and data migration phase.

    We are migrating data from SF, and are coming out with a lot of duplicates that would need to be merged, (due to the initial import being done improperly on our part, we think). We would like to wipe the database clean and start anew, but the cron for pruneDatabase failed.

    Also as we experiment with importing and SOAP, we would like to be able to prune, so that new records with duplicate id, or fields do not get mixed in with old data.

    We are in testing, using SugarCRM OS 5.0.0a (currently on a dev server but will be using 5.0.0b on what will be our live server).

    If all goes well, we will be using Sugar and recommending it to all of our clients, including ones to whom we had previous recommended SF.

  5. #5
    kenlyle is offline Sugar Community Member
    Join Date
    Nov 2004
    Posts
    168

    Default Re: Manual Prune Database

    I am slogging through some sync issues, too, and being able to do a manual prune would be just one more variable that might help in solving sync issues.

    I have a guy who has been merged out in Sugar, but still hanging around, Deleted=1, and causing me some confusion, because I have three records for him in Outlook and two in Sugar, and am not sure why I am not getting deletes in Outlook on sync, but, anyway, being rid of deleted records would be nice.

    Ken
    Last edited by kenlyle; 2008-06-08 at 06:07 PM.

  6. #6
    malcolmh's Avatar
    malcolmh is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Aug 2004
    Posts
    1,712

    Default Re: Manual Prune Database

    Hi,

    Another easy way of running the prune database, assuming the cron scheduler is running. Just change the options for the prune database job in the scheduler to something like */5 * * * *, which would get the job running after five minutes.

    Remember to change it back to the original values after you are finished.
    Cheers Malcolm

    Genius4U Limited - Ingenious simple IT solutions for you / Genial einfache IT Lösungen für Sie
    http://www.genius4u.com or http://www.genius4u.de

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. step 3 installation problem
    By voitek in forum Installation and Upgrade Help
    Replies: 10
    Last Post: 2007-02-14, 04:35 PM
  2. Repair Database does not
    By mmakowski in forum Help
    Replies: 1
    Last Post: 2007-01-03, 04:58 AM
  3. Replies: 1
    Last Post: 2006-11-01, 11:42 AM
  4. IMAP and CURL not found
    By khinester in forum Help
    Replies: 10
    Last Post: 2006-10-31, 06:24 AM
  5. Replies: 0
    Last Post: 2006-07-17, 04:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •