Log History Purge

appwrightappwright Posts: 62
edited January 5, 2006 2:22PM in SQL Backup Previous Versions
How do you purge the backup history that the GUI interface shows when it comes up? I have about 400 DB's that get backed up every night and my log is so huge it takes forever for the program to come up.

Is there a way to tell the software to only keep 14 days of logs?

Comments

  • peteypetey Posts: 2,358 New member
    There isn't any way to manage the activity history from the GUI.

    I've prepared a small utility, that you can use to purge records older than x days. Note that this is NOT a Red Gate product, and comes with absolutely no warranty whatsoever. I would suggest making a backup of the data file, before running this utility for the first time.

    You can find the data file in C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Data, assuming your system drive is C:.

    Usage is

    trimdata <days to retain>

    To retain the last 14 days of activity history, use

    trimdata 14

    You can download the file from http://www.yohz.com/downloads/trimdata.zip
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Thank you very much!! Is there any way to get this functionality included in the next release that is due out soon?
  • peteypetey Posts: 2,358 New member
    In version 4, there is no longer a separate activity data file. All activity history will be obtained from the regular msdb tables, with SQL Backup specific data embedded in a couple of columns.

    The activity history display will be limited to the first 400 rows each for backup and restore, whether it be for the entire server, or for specific databases.

    Deletion wise, there is an option to run the msdb..sp_delete_backuphistory stored procedure after each SQL Backup process, to manage the msdb database size.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • That's a great way to deal with it. Thanks.
Sign In or Register to comment.