dcsimg

The wt_UIPortlet table contains no data

Products

Webtrends Analytics 8.5

Issue

A user is experiencing an error related to the wt_UIPortlet table when upgrading from 8.0d to 8.5x. In other scenarios, the user appears to have upgraded the product successfully but are now receiving an error message similar to the following:

“An internal error occurred. The message sent by the error is: com.webtrends.common.utils.WtException$DatabaseError: The error ‘The INSERT statement conflicted with the FOREIGN KEY constraint “FK2wt_UserUIPortlet”. The conflict occurred in database “wtMaster”, table “dbo.wt_UIPortlet”, column ‘UIPortletID’.’ occurred while running a SQL Query (See SQL in log file)”

Cause

Both of these issues can result from missing columns in the wt_UIPortlet table in the wtmaster section of the database.

Resolution

The following query can be run to populate this table with the expected data:

IF EXISTS (select * from dbo.sysobjects where id = object_id(N'[dbo].[prcTmp_SDC_Insert]’) and OBJECTPROPERTY(id, N’IsProcedure’) = 1) drop procedure [dbo].[prcTmp_SDC_Insert]
GO

CREATE PROCEDURE prcTmp_SDC_Insert(@P1 AS int, @P2 AS varchar (255)) AS
INSERT INTO [dbo].[wt_UIPortlet] ([UIPortletID], [Description]) VALUES (@P1, @P2)
GO

PRINT ‘wt_UIPortlet’
SET IDENTITY_INSERT [dbo].[wt_UIPortlet] ON
EXEC prcTmp_SDC_Insert 1, ‘Recently Viewed Reports’
EXEC prcTmp_SDC_Insert 2, ‘Recently Viewed Profiles’
EXEC prcTmp_SDC_Insert 3, ‘Bookmarks’
EXEC prcTmp_SDC_Insert 4, ‘SmartView Enabled Sites’
EXEC prcTmp_SDC_Insert 5, ‘Getting Started’
EXEC prcTmp_SDC_Insert 6, ‘Recently Viewed Accounts’
EXEC prcTmp_SDC_Insert 7, ‘Notifications from WRC administrator’

SET IDENTITY_INSERT [dbo].[wt_UIPortlet] OFF
DROP PROCEDURE prcTmp_SDC_Insert
GO