April 5, 2010                                                                                                        support@accsyssolutions.com

Archiving, Restoring and Purging Data in SalesAnalysis

As the SalesAnalysis Transaction File grows, the time required to produce any report will increase. To prevent reporting time from becoming too lengthy, you may elect to have Adagio SalesAnalysis archive historical detailed sales information in a separate file. The Archive/Purge/Restore Sales Data function on the Maintenance menu allows you to either archive or purge older data, and also to retrieve information from an archived file or print out summary information for the archive files stored on in your data directory.

Unless you have specific requirements to the contrary we recommend that you keep the current year’s data plus three complete historical years.

Archiving and purging of SalesAnalysis data should be an annual task, as part of your fiscal year end procedures. At year end you should archive and purge the oldest year of transactions.

Before proceeding you must make a backup of your data.

Before we discuss how to use the Archive/Purge/Restore Sales Data function, a basic overview of these three terms is in order:

  • Archiving will save a copy of the specified data in a file, which can then be restored in the event that you lose data and want to restore from a backup. Data that is archived only, and not purged, will still appear in the Edit Sales Data and Online Inquiry functions and on reports.
  • Purging removes the specified data completely. It will no longer appear in the Edit Sales Data and Online Inquiry functions, or on reports. If it is archived before purging, it can be restored from the archive file, but unless it is restored it will not appear in any of the functions or reports throughout SalesAnalysis.
  • Restoring data can be done when you’ve archived data to a file previously. If you’ve archived and then purged data, and decide you still want to report on that data or view it in Online Inquiry, for example, you can restore that data.

When the Archive/Purge/Restore Sales Data function is selected, the following screen will appear:

 

Archiving, purging, and restoration is done through “templates”, and the above window lists any templates that have been created and saved with this SalesAnalysis database.


Step 1.  To create a Template, click the New button.

Enter a name that describes the purpose of this template, and then click the OK button.  E.G., "Items" could be used if you are archiving, purging or restoring items data within the criteria defined in the template.

Step 2.   Enter the criteria that will be used when selecting this template.

Action

Use the radio buttons in the Action section to indicate what you want to do with this template. Your options are:

Archive/Purge: Archives the data to the specified file and then purges it.

Archive: Archives the data to the file specified.

Purge: Only purges the data, which means the data isn’t written to a file and can’t be restored.

Restore: Restores the data from the specified file number, so that the data is included in reports and inquiries again.


Archive to file number

Adagio SalesAnalysis will automatically provide the next available archive file number as a default. Or, you can specify another previously-used archive number.

If you specify a previously used archive number, Adagio SalesAnalysis will look for this file in your database directory and, if found, will place information about that file to the right of this field, along with a Properties button which allows you to print the Archived File Properties report and see what that file contains.

If you are archiving transactions to an existing file, SalesAnalysis will append the transactions to the file; it will not overwrite the contents of the file.

Enter the number of the file you want to archive these transactions to.

Starting

Use these fields to set the date range for the transactions that should be archived and/or purged, or restored.

Select line type

Indicate the line type for the transactions you wish to archive, purge, or restore. Your options are to archive, purge, or restore All line types, or one or a combination of Item, Tax, or Miscellaneous charges.

You may wish to archive only Item lines if you’ve decided to no longer report on tax or miscellaneous charges data, for example, and don’t want to add that information to an archive file.

Select Field Ranges

You can add fields to the Selected Fields list here in order to narrow the range of the archive, purge, or restoration. To do this, first select them in the Available Fields list on the left, and then click the right arrow to add them to the Selected Fields list on the right.

You can add the fields you wish to include one at a time, by clicking the field and then the right arrow; or you can add multiple fields at one time by holding down the Shift key and clicking on the first and last fields in a cluster of fields on the Available Fields list, and then clicking the down arrow to move them all over to the Selected Fields list at once.

Fields can similarly be removed from the Selected Fields list if you’ve added them by mistake or are changing an existing template and have decided to change your field list. They can be removed by first selecting them in the Selected Fields list and then clicking the left arrow.

Once you’ve added your fields for the Selected Fields list, use them to narrow the range of the archive, purge, or restoration by modifying the fields’ Starting range and Ending range in the Field Properties selection below.

You do not need to choose any fields here. If no fields are chosen, it simply means that all transactions in the specified date range will be included in the archive file, the purge process, or the restoration. This is our recommended procedure for your annual purge of historical data.

Field Properties

Depending on the selection made above, these fields will provide you with the ranges of data relating to the specific field. E.g., if the Customer field is selected in the Select Field Range panel, then the Starting customer to Ending customer fields will be displayed.

Step 3.  Once the template parameters have been entered, click the action button that will indicate the selection made in the Action panel.  E.g., if either Archive/Purge or Archive action is selected, the top button on the right had side will be labelled as "Archive".  If Purge has been selected as the action, then this button will be labelled "Purge", and if Restore is selected as the action, this button will be labelled "Restore".

You can also "Save" this template without performing the action selected.

When clicking the action button, the following message will appear:

It is important to Backup your SalesAnalysis data before using this function!

Step 4.  Once the SalesAnalysis data has been backed up click on the Yes button.  You will then see a dialog window similar to the following:

This information window will indicate the number of records archived, purged or restored depending on the action taken.

You will also be provided with the progress of the action being taken:

Note:  Depending on the size of your SalesAnalysis data, this function could take some time to complete.

Once you have completed the Archive / Purge, you will receive the following message:

Step 5.  Once the archive action has been completed, you can preview / print the Archived Files Properties by selecting the Properties button located in the following window:

This information with the Properties button will only appear for the actions that have been completed.


Rebuilding Sales Statistics

Occasionally, you will need to rebuild your sales statistics. While the statistics file gets updated automatically when you retrieve or scan data, there are times when you will need to manually rebuild the statistics file, such as:

When you’ve cleared sales statistics and wish to rebuild the statistics from the previously cleared time period.

When you’ve purged data using the Archive/Purge/Restore Sales Data function and want to remove the statistical information for the purged data from your statistics function as well.

When you’ve restored data using the Archive/Purge/Restore Sales Data function and want to add the restored data’s statistics back in to the statistical data file.

Step 1.  To rebuild your statistics, select Rebuild Sales Statistics from the Statistics menu. The following window appears. Click on the buttons or fields in the screen sample below for more information on working with this window.

It is important to always back up your data before you rebuild statistics, in the event that you make an error or experience a problem during the rebuild process. To back up your data, select Backup from the File menu.

Step 2.  In the Selection range fields, choose the range of dates for the transactions whose statistical data you wish to rebuild. When you’re ready, click Rebuild. The data will be rebuilt, and the following message will appear:

 

Step 3.  Click OK. Adagio SalesAnalysis will close the Rebuild Sales Statistics function and you can now work with the statistics for the date ranges you added in the View/Print Sales Statistics function.


Restoring Sales Data

Restoring Sale Data

After you have archived sales data, you may wish to restore the sales data to SalesAnalysis.  From the Edit Templates window, select Restore from the action panel. 

Note:  You can only restore data that has been archived.  If the data has been purged without archiving first, the sales data is permanently lost and cannot be restored.

Select the archived file containing the sales data that you want to restore from.  Click the Restore button and the following window will appear once the restore has been completed:

Note:  Before restoring sales data, be sure to backup your data.