Lenovo Software Help Center

What does webNetwork send to the SQL server to purge logging data each night?

Each night at midnight the loader sends a SQL command to the SQL server to purge old log information.  That command is as follows :

DELETE FROM LogTable WHERE LogTime < 'some date';

'some date' is formatted like this: yyyy-MM-dd HH:mm:ss

If your database is very large then this command may not be able to finish each night because your database typically has transnational roll back configured.  This makes a copy of the data prior to purging which may fail if you do not have enough space. Each DB system sets this up slightly different so please refer to your DB vendor for how to disable transaction logging for the webNetwork logging database. Transaction logging is a great feature for many types of data, but not needed for the relay log data.

Another way to purge the DB by hand is to add the LIMIT command to limit the number of records being purged.  This is easier than trying to come up with a SQL statement that gives a smaller subset of data.

DELETE FROM LogTable WHERE LogTime < 'some date' LIMIT 10000;

This would limit the delete to 10,000 entries.  If you ran it multiple times it would delete a batch of 10,000 records each time thus getting around the problem with the transaction roll back settings.

As of and higher, we have limited the amount of data that gets logged in the relay request logging.  We filter out things like .gif, .jpg, .png, .css, .js.  This helps to keep the database smaller.

The webNetwork Audit DB does not have an auto purge, thus you will want to periodically purge the data using a command such as : delete FROM auditdata where datetime < '2015-01-01 00:00:00' LIMIT 100000;  This would purge data older than 2015-01-01 and do it in a batch of 100,000 records at a time.

    • Related Articles

    • Move database logging to SQL server.

      Changing / migrating the Logging Database from HSQL to MySQL , MSSQL. By default, the Stoneware Relay logs all transactions to a Java database called HyperSonic SQL. This database is installed as part of the portal installation and automatically ...
    • Move webNetwork to different server

      *** If you are moving to a different OS, please see : https://helpdesk.lenovosoftware.com/portal/kb/articles/migrate-webnetwork-to-windows-linux-22-8-2017 *** Keeping the same OS / version / IP As long as you are keeping the same OS/ version/IP then ...
    • Move SQL Databases to a new SQL Server

      Issue Customer would like to move their UW SQL Databases from older hardware to new hardware. Solution The easiest method is to use the same SQL database type, as this only requires exporting/importing the existing database from the old server to the ...
    • How to setup Analytics in dedicated SQL

      Problem:  Need to move Analytics database to a dedicated SQL server.  It is highly recommended you move this database to a separate dedicated SQL server on any production installations. Cause:  The included Hypersonic SQL (HSQL) is not designed for ...
    • Configuring Enterprise Data Collection on the LCS

      Get even more from your classroom management solution with educator usage data. Determine whether or not LanSchool is effectively incorporated into the classroom on a school- or district-wide scale.  This guide will show you how to enable and ...
    • Popular Articles

    • Can a Teacher see Students outside of school?

      This content has moved! Visit the new LanSchool Classic Help Desk It looks like you may be interested in LanSchool Classic General FAQ.
    • LanSchool Latest Release Notes

      This content has moved! Visit the new LanSchool Classic Help Desk It looks like you may be interested in LanSchool Classic Latest Release Notes.
    • How to uninstall LanSchool Student and WebHelper from Chromebook

      This content has moved! Visit the new LanSchool Classic Help Desk It looks like you may be interested in Mass Deploying LanSchool Student for Chromebook.
    • LanSchool Release Notes

      LanSchool™ Release Notes Updated: December 16, 2019 Component Versions LanSchool, December 16, 2019 Chromebook App, December 16, 2019 Chrome Web Helper:, December 16, 2019iOS TA and Student 8.2.0, December 16, 2019 Android ...
    • Controlling multiple students at once

      Problem: Can I remote control multiple computers at once? Cause: N/A Prerequisite(s): LanSchool Teacher and Student Solution(s): If all of the computers in the lab are the same basic image or configuration (for example. all Windows XP machines with ...
    • Recent Articles

    • Lenovo Software Newsletter

      Question Is there a way I can be notified about product updates? Solution To receive updates from Lenovo Software about product updates, we encourage customers to subscribe to our Lenovo Software Newsletter.
    • Allow Help Desk to reset Image Challenge images

      Issue Customer would like to allow Help Desk users to only be able to reset user Image Challenge images when they have been forgotten by a user. Solution This can be done by assigning specific users in the system the User Group Admin role, as well as ...
    • Troubleshoot RDS

      This is a good article, from Microsoft, on how to troubleshoot RDS/RDP logon issues. https://social.technet.microsoft.com/wiki/contents/articles/37841.remote-desktop-services-rds-logon-connectivity-overview-and-troubleshooting.aspx
    • Building an Employee Phonebook system

      Building a Mini Application Post #20 Can it really be that simple to create a little application with Report and Form Builder?  This tutorial shows you that it is - and actually helps you make a useful application at the same time as learning how to ...
    • Working with Binary Data in Report Services

      Quick Start Guide - Binary Data This tutorial is designed as a quick "How Do I Work With Binary Data" tutorial.  It walks through the steps necessary to upload an image to a database.  Every webNetwork 6.0 installation ships with a database called ...