dcsimg

Data source cannot be deleted even though the number of profiles it is shown to be associated with shows 0

Products

Webtrends Analytics 9.x
Webtrends Analytics 8.x

Summary

Profile Count can show 0 and you will be prevented from deleting the data source if the data source’s WRCDataSourceProfileID shows in the logdatasources = line of any wlp file of any profile in the system. This situation can occur when a profile has been recently deleted but not cleaned up.

Issue

You cannot delete a data source despite the Profile Count being listed in the UI as 0.

Cause

Profile Count can show 0 and you will be prevented from deleting the data source if the data source’s WRCDataSourceProfileID shows in the logdatasources = line of any wlp file of any profile in the system. This situation can occur when a profile has been recently deleted but not cleaned up.

This situation can occur when a profile has been recently deleted but not cleaned up. The datasource GUID appears in a profile’s wlp file, but the wlp file has not yet been cleaned up through the normal process.

Resolution

To resolve this issue, mouse over the data source name and select “Show Uses” from the Action menu. This should show you the profiles the data source is still tied to. Some or all of these profiles may be in a deleted state, and therefore not visible in the user interface. Waiting 14 days for the profile clean up cycle to take place should resolve this issue.
If it has been 14 days since the profile has been deleted and the issue still is not resolved, stop the Webtrends Scheduler Agent service and run Microsoft SQL Management Studio and connect to the webtrends system database on the webtrends server (typically under the wtsystemdb instance). Run this query to get the wrcprofileid of the profile name:
SELECT [WRC_ProfileID]
,[ProfileName]
FROM [wtmaster].[dbo].[wt_Profile]
WHERE [ProfileName]=’the name you saw under show uses’;
Then use this query to find the WRCDataSourceProfileID of the data source in question:
SELECT TOP 1000 [Name]
,[WRCDataSourceProfileID]
FROM [wtmaster].[dbo].[wt_DataSource]
where [Name]=’the name of the data source you wish to delete’;
Do no run any delete queries. This query is just to give you the associated file name of the profile still linked to the data source and the data source ID you need to remove. Do not attempt to remove any entries from the system database to resolve this issue.
Then open the following storage folder location: \storage\config\wtm_wtx\datfiles\profiles\ You will find a file there named after the profile file name with a wlp file name extension. Open this file in Notepad. Find the logdatasources = line and delete the WRCDataSourceProfileID you found in the previous query from that line and then save the wlp file.
You should now be able to immediately remove the data source from the user interface.