How do I delete scheduled events in the database for profiles that have been deleted?


Webtrends Analytics 9.x
Webtrends Analytics 8.x


You have scheduled events for profiles that have been deleted.


You can remove the scheduled events associated with the deleted profiles.

For MySQL:

1) Stop the services-some may not be installed in your version:
Webtrends – Scheduler Agent
Webtrends – User Interface
Webtrends – Report Cache Server
Webtrends – Express Data Mover
Webtrends – Express Analysis Engine
Webtrends – GeoTrends
Webtrends – Email Notification Service
Webtrends – System Monitor
Webtrends – MySQL

2) Make backups of your MySQL or SQL database. One method is making a copy the following folders:

For MySQL Server

C:\program files\webtrends\common\database\mysql\data\wt_sched
C:\program files\webtrends\common\database\mysql\data\wtmaster

For MSSQL Server:

C:\Program Files\WebTrends\common\database\SQLExpress\MSSQL.1\MSSQL\Data\wt_sched.mdf
C:\Program Files\WebTrends\common\database\SQLExpress\MSSQL.1\MSSQL\Data\wt_sched_log.LDF
C:\Program Files\WebTrends\common\database\SQLExpress\MSSQL.1\MSSQL\Data\wtMaster.mdf
C:\Program Files\WebTrends\common\database\SQLExpress\MSSQL.1\MSSQL\Data\wtMaster_log.LDF

3) Restart the Database Services.

4) Download and installyour Database Administration tool.

5) Openyour Database Administration tooland create a new connection to open the database. Foryour Database Administration toolfor mysql leave the database name blank, and use the default “localhost” for the Hostname/IP. (Alternatively, the administration application for myql can be installed on a remote system, at which point that system name would need to be used for the Hostname/IP field. Port 3306 needs to be open between the system running your Database Administration tool and the Webtrends server in order to make a remote connection.)

6) Once the databases are open, open the wt_sched database and find the wt_event table.

7) Find the “Description” field in the wt_event table. The descriptions will match the “Event” description in the Scheduled Events list. Find the description that matches the one Scheduled Event to be deleted. Make note of the number in the “EventID” field for this event (be sure not to confuse this with the “EventTypeID”.

8) Below are examples of MSSQL and Mysql. Replace the record with the number 25 and process the query:

For aMSSQL Server:

delete from wt_sched.dbo.wt_Monitoralertresolvehistory;
delete from wt_sched.dbo.wt_MonitorResultAction;
delete from wt_sched.dbo.wt_MonitorResult;
delete from wt_sched.dbo.wt_eventstatus;
delete from wt_sched.dbo.wt_Parameter where eventid=25;
delete from wt_sched.dbo.wt_schedule where eventid=25;
delete from wt_sched.dbo.wt_taskstatus;
delete from wt_sched.dbo.wt_TaskChronicle where eventid=25;
delete from wt_sched.dbo.wt_event where eventid=25;

For aMySQL Server:

delete from wt_sched.wt_Monitoralertresolvehistory;
delete from wt_sched.wt_MonitorResultAction;
delete from wt_sched.wt_MonitorResult;
delete from wt_sched.wt_eventstatus;
delete from wt_sched.wt_Parameter where eventid=25;
delete from wt_sched.wt_schedule where eventid=25;
delete from wt_sched.wt_taskstatus;
delete from wt_sched.wt_TaskChronicle where eventid=25;
delete from wt_sched.wt_event where eventid=25;

9) Exit your Database Administration tool and restart the Database services.

At this point, the event will be removed and should no longer appear in the Scheduled Events within Webtrends.