Deleting access log data

To delete access log data objects from the database, use the Database Cleanup utility.

Before you begin

Run the following SQL statement:
  • DB2insert into cleanconf (objectname, type, statement, namearg, sequence, daysarg) values ('accessLog', 'obsolete', 'delete from acclogmain where (acclogmain.acclogmain_id in (select distinct acclogmain_id from acclogsub where (days(CURRENT TIMESTAMP) - days(logtime)) > ?))', 'no', 1, 'yes')
  • Oracleinsert into cleanconf (objectname, type, statement, namearg, sequence, daysarg) values ('accesslog', 'obsolete', 'delete from acclogmain where (acclogmain.acclogmain_id in (select distinct acclogmain_id from acclogsub where (sysdate - logtime > ?)))', 'no', 1, 'yes')

Procedure

  1. From the WC_installdir/bin directory, run the following script:
    • DB2
      • LinuxAIXFor IBM i OS operating system./dbclean.sh -object accessLog -db dbname -dbuser type obsolete -days daysold -loglevel loglevel
      • Windows dbclean -object accessLog -type obsolete -db dbname -days daysold -loglevel loglevel
    • Oracle
      • AIX./dbclean.sh -object accessLog -dbdbname -type obsolete -days 2 -loglevel 1 -dbtype oracle -dbuser user -dbpasswd password
      • Windows dbclean -object accessLog -dbdbname -type obsolete -days 2 -loglevel 1 -dbtype oracle -dbuser user -dbpasswd password

      Use host:port:sid for the database name for example, myhost:1521:mydb.

  2. Examine the WC_installdir/instances/instance_name/logs/DBClean/DBClean.timestamp.log file.