How to remove, from a Niagara R2 Enterprise Server station, data for all logs prior to a specific date with one command.

Issue

How to remove, from a Niagara R2 Enterprise Server station, data for all logs prior to a specific date with one command.

Product Line

TAC I/A Series

Environment

I/A Series R2 Enterprise Server

Cause

Cloudscape database management

Resolution

There is a utility that will allow deleting of records before a certain date of all or specific tables in the cloudscape database. The space from deleted records can also be recovered after deleted. This utility is called CloudscapeAdmin and is downloadable from The Exchange Download Center.

Download cloudscapeAdmin.jar and place in the x:\niagara\[NiagaraRevision]\nre\lib directory (for Builds 431 and higher).

To run this utility the station will need to be stopped. Once the station is stopped, open the console from either the created short cut or x:\niagara\[NiagaraRevision]\nre\bin\console.exe. From here type ‘nre CloudscapeAdmin’ and hit enter to view the commands to use it. 

There are two functions that cloudscapeAdmin can do:

  1. Delete; The delete command deletes records before a certain date but does not reduce the size used on the disk. The empty area of the database will be filled with new archived data.
  2. Compact; The compact command deletes records before a certain date and recovers the space from the disk. This process is slower.

Command:
nre CloudscapeAdmin x:\niagara\[Niagara Revision]\stations\[Station Name] [User Name] [Password] [delete or compact] [tablename or all] [date]

Sample Delete commands:
nre CloudscapeAdmin c:\niagara\r2.301.522a\stations\StationName admin admin delete all 2007-07-01

Sample Compact commands:
nre CloudscapeAdmin c:\niagara\r2.301.522a\stations\StationName admin admin compact all 2007-07-01