dcsimg

Message: Error running SQL Query More than one record found for query: (see SQL in log file)

Products

Webtrends Analytics 9.x
Webtrends Analytics 8.x
Webtrends Legacy

Issue

Certain circumstances can happen where duplicate profiles will show in the UI, and/or when trying to edit/delete those profiles or datasources, the following error message displays:

An internal error occurred
——————————————————————————–
Message: Error running SQL Query More than one record found for query: (see SQL in log file)
——————————————————————————–

Cause

This error occurs when trying to edit or delete a profile.

For OnPremises:

Specifically, there are two identical values stored in the database so the application does not know which one to remove. The portion of the error on which to focus is the value following the string below:


wtobject_id=

…where the value of is a sixteen-digit string beginning in 13-.

Resolution

To remove the duplicate profile, follow the steps below:
1. Download, install and open a database front-end as appropriate for the type of database used by the installation.

2. Once connected, expand the “wt_sched” database in the left hand column.

3. Open a Query window on the right (if SQLYog is being used will already be open) and paste the following query:

SELECT * FROM wt_event WHERE wtobject_id = ‘

…where is the value displayed in the error message.

4. Make note of the EventID value for each result found.

5. Expand “Tables” on the left, then select and open the wt_event table.

6. Select one of the conflicting records and modify the ProfileName value to make it unique.

7. Once one record is unique, delete the other record(s) which conflicted with the now-modified entry.

8. Exit the database editor and log into the Webtrends user interface. It should now be possible to make changes without a recurrence of the error message.