Products
Webtrends Analytics 9.x
Webtrends Analytics 8.7 Webtrends Analytics 8.5
Cause
After creating a new profile, you discover the profile name is listed twice, and you cannot remove the duplicate profile.
Resolution
This can occur if the page refreshes during profile creation, causing the UI to create two lines in wt_profile that will need to be removed. Backup the system database and use this query to remove the unwanted profiles:
DECLARE @ProfileID INT;
DECLARE @GProfileName varchar(255);
/*replace the word “Replace” in the line below with the profile name*/
SET @GProfileName=’Replace’;
DECLARE ProfileList
CURSOR FOR SELECT DISTINCT ProfileID
FROM [wtmaster].[dbo].[wt_Profile] WHERE [ProfileName]=@GProfileName;
OPEN ProfileList
FETCH NEXT FROM ProfileList INTO @ProfileID
WHILE @@FETCH_STATUS = 0
BEGIN
DELETE FROM [wtmaster].[dbo].[wt_DailyProfilePageViews]
WHERE [ProfileID] =@ProfileID;
DELETE FROM [wtmaster].[dbo].[wt_BackupHistory]
WHERE [ProfileID] =@ProfileID;
DELETE FROM [wtmaster].[dbo].[wt_VHExport]
WHERE [ProfileID] =@ProfileID;
DELETE FROM [wtmaster].[dbo].[wt_ProfileDataSource]
WHERE [ProfileID] =@ProfileID;
DELETE FROM [wtmaster].[dbo].[wt_Profile]
WHERE [ProfileID] =@ProfileID;
FETCH NEXT FROM ProfileList INTO @ProfileID
END
CLOSE ProfileList
DEALLOCATE ProfileList
More Information
The profile name used for GProfileName value is not the wrcprofileid, but is rather the real profile name that appears in reports.