# Purging

Over a period of time, there may be a lot of data accumulated in the database which is not used on a regular basis. This may relate to data pertaining to closed work orders, work orders completed during the previous years etc. The Purging option is used to move data out of the currently used database into a history database. This database will contain history records for closed work orders.

Before Purging, make sure all users have logged out and Backup has been taken of the database. Please note that the intermediate tables used during Purging must be empty before you start the Purging process.

When the question "Are you sure you want to purge history records?" is displayed. On confirmation, the screen for entering the date prior to which data is to be purged is displayed. On entering the required date, the message "Make sure all users are logged out." is displayed. Click OK after ensuring that all users are logged out.

The question "Are you sure backup is taken of the database?" is then displayed. On confirmation, the directory selection screen for storing the purged records is displayed. Select the required directory.

On completion of the Purging process the message "Purging is completed." is displayed.

The name of the History database will be the current date appended to "ProqmsPurging" e.g. ProqmsPurging27-5-2003.

For Access Database : The database will have the extension .mdb.

For Oracle Database : The database will have the extension .dmp.

For SQL Server Database: Purging will be taken on the server in a backup device. The name of this device will be created will be the current date appended to the database name. This will be created on the server machine itself. You can view the device from the Enterprise manager on server. This file can be transferred to Detachable storage devices manually. For every purged database a new device will be created.

Steps In Purging

Data to be purged is transferred to intermediate tables within the database.

The new history database is created having tables of the same structure as the intermediate tables.

Data is transferred to the history database.

Data is deleted from the actual tables and intermediate tables.

If at any stage during the Purging process, an error is encountered, the database is maintained at the state in which it was before the process began.

See Also: Uploading