NAME
****
LogDeleter - Adiscon's MonitorWare Data deleter with backup functionallity

SYNOPSIS
********

logdeleter <options> [options]

<-dsn=data service name>
[-user=user name]
[-pass=password]
[-ndays=days as integer]
[-table=table name]
[-delrecpertrip=integer]
[-timecol=column name]
[-debug]
[-sep=csv separator for backup]
[-esc=csv escape sequence for backup]
[-filename=filename prefix for backup]
[-fileex=file extension for backup starts with leading dot]
[-backup=true or false, if backup should be written or not]
[-delete=true or false, if backup should be written or not]

DESCRIPTION
***********

LogDeleter is able to delete records in a database older then a specified days. It works over ODBC database connection. 
You can use this cabability e.g. to run it via Scheduled Task once a week in order to delete your old records. 
LogDeleter can also create a backup of the data before it is deleted into a file.
LogDeleter is part of Adiscon's MonitorWare solution, see http://www.monitorware.com

NOTATION
********

Throughout this document, required options/parameters will be denoted by enclosing the parameter in angle brackets <like this>. 

Optional options/parameters will be denoted by enclosing the parameter in square brackets [like this]. 

Options/Parameters are case sensitive.

All options are in lower case.

OPTIONS
*******

<-dsn=data service name>
	String. Use the specified Data Service Name for the database connection
<-user=user name>
	String. Database User Name
<-pass=password>
	String. Database User Name's Password
<-backup=false> (default)
	Boolean. Specifies if the CSV backupfile will be written or not (True or False).
<-delete=false> (default)
	String. Specifies if the Data should be deleted or not (True or False).

Please note: If both options - '-backup' and '-delete' - are set to false (which is the default) the program will do nothing. 

[-ndays=7] (default)
	Integer. Define records which will keep in database by day. Today is counted as day 1. 
	This means if -ndays=1 is used, all files except files from today will be deleted. 
	Another example if -ndays=7 is used, all files older then 7 days will be deleted. 
	This means is today 2010-01-11, LogDeleter deletes all files older then 2010-01-05. -ndays:0 deletes all records.

[-table=SystemEvents] (default)
	String. Database table name 
[-delrecpertrip=10] (default)
	Integer, "Delete records per trip" define how much records will be deleted with each sql execution. 
	LogDeleter does not use one single statement to delete all selected records in order to take care of system resources. 
[-timecol=ReceivedAt]
	String, define the deleting date criteria by database table's column name. 
	If standard Adiscon Monitor Ware products are used, ReceivedAt and DeviceReportedTime are available.
[-debug]
	No parameter required. Generate a file debug.log with debug information in LogDeleter's program folder.

[-sep=,] (default)
	String. Standard CSV separator for backupfile output
[-esc="] (default)
	String. Standard CSV escape sequence for backupfile output
[-filename=BackupFile] (default)
	String. Standard Filename for CSV backupfile 
[-fileex=.csv] (default)
	String. Standard File extension for CSV backupfile 
[-filepath=C:\] 
	String. Specifies the File Path where the BackupFile is stored to.
[-includedate=0] (default)
	Integer. Defines if the date should be includet into the filename or not (1 or 0).
[-overwrite=0] (default)
	Integer. This is for defining if the BackupFile can be overwritten or not (1 or 0).


EXAMPLES
********
Please note: LogDeleter in command line (command prompt) mode does not display any status message. Even no confirmation if backup/deletion was succesful or not. This behaviour is by design.

Start program with only required options:
c:\LogDeleterFolder\LogDeleter.exe -dsn=monitorware -user=sa -pass=yourdbpassword -backup=true

Or with some optional parameters:
c:\LogDeleterFolder\LogDeleter.exe -dsn=neuedb -user=root -pass= -ndays=3 -backup=true -filename=Log -filepath=C:\alerting

FILES
*****

LogDeleter.exe
LogDeleter-manpage.txt

BUGS
****

Report any bugs to support@adiscon.com

Copyrights
**********
Adiscon GmbH, Germany copyrights this documentation as well as the actual LogDeleter product. 
To learn more about other Adiscon products, please visit www.adiscon.com/en/products/. 
To obtain information on the complete MonitorWare line of products, please visit www.MonitorWare.com. 
NOTE: USE THIS TOOL AT YOUR OWN RISK.