dcsimg

How do I speed up the Deleted Data Cleanup event in installations which use MySQL for the system database?

Products

Webtrends Analytics 8.1x
Webtrends Analytics 8.0x
Webtrends Enterprise 7.x
Webtrends Professional 7.x
Webtrends Small Business 7.x

Cause

The Deleted Data Cleanup event deletes data from the database and files within Webtrends. Deleting a profile within Webtrends’ user interface ony marks the profile for deletion within the database. The profile and its data are no longer visible, but the files and data are not permanently deleted until 14 days from the day of the deletion request. The analysis event for the profile is still visible in the Scheduled Events but it is disabled. This event will be deleted on the same day the profile and its data are permanently deleted.

Resolution

To shorten the time period before the “Deleted Data Cleanup” event permanently deletes a profile and its data, perform the following steps:

1. Open a command line window and navigate to the following directory:

\Webtrends\common\database\mysql\bin

2. Type the following command to open the MySQL command shell interface:

mysql -u-p

By default, the user name is “Administrator” (without quotes). If a different name was chosen during installation, enter it here. You will be prompted for a password. This is the password entered for the MySQL user account at the time the product was installed.

3. After entering the password, type the following command and press Enter:

use wtmaster

4. Enter the following query. If a row is returned write down the value:

SELECT id FROM wt_app_profiles WHERE profile_name = ‘deletedprofilecleanup.ini’;

5. Enter the following query. If a row is returned write down the value:

SELECT id FROM wt_app_sections WHERE section_name = ‘default’;

6. Enter the following query. If a row is returned write down the value.

SELECT id FROM wt_app_tokens WHERE key_name = ‘daysuntilprofiledeletion’;

7. Enter the following query. Replace with the number of days after a profile is deleted that the data should be deleted and use the values from the previous three steps for the rest of the parameters:

UPDATE wt_app_confdata SET data = ‘‘ WHERE profile_id =AND section_id =AND key_id =;

If is set to 0, deleted profiles, their analysis data and the disabled analysis event will be deleted the next time the “Deleted Data Cleanup” event runs.

8. Type “exit” and press Enter, then close the command line window.

More Information

By default, the “Deleted Data Cleanup” event runs every day. There is no way to manually force this event to run. However, the event is editable, and the “Start Time” in the schedule can be changed so the event occurs within the next minute or two. If the “Start Time” value is changed, this is the time the event will run every day.