dcsimg

While attempting a VDM import, you receive the error There is already an object named ‘wt_SchemaVersion’ in the database

Products

Webtrends Visitor Data Mart

Issue

During an import after installation of Visitor Data Mart (VDM), an error occurs in the profile’s import log stating the following exception:

Log is found in .\logs\eventdatabase\[profile GUID]-20110728-[machine name].log

2011-07-28 12:33:12 Standard Exception: Line 8, File D:\Program Files (x86)\Webtrends\modules\eventdatabase\Tmp\[Profile GUID]\Script.sql
… Standard Exception: Error executing SQL: CREATE TABLE [dbo].[wt_SchemaVersion]
(Version VARCHAR(15) NOT NULL,
Description VARCHAR(50) NOT NULL)
ON [PRIMARY]
… Standard Exception: ODBC error: 2714, [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named ‘wt_SchemaVersion’ in the database.

Resolution

1. Shut all services down
2. Backup the database, wtmaster (just in case)
3. Run the following query on the wtmaster database:

DELETE FROM wt_EDBManifest

4. Run the attached script.
5. Restart the services.

The problem stems from upgrades causing erroneous entries in the wt_EDBManifest table. The attached script recreates the entries in this table correctly once the table has been cleared.

Note: This can also happen in 9.2a Warehouse, however a script has not been created yet. If you encounter this in 9.2a, contact support and reference this KB. One will be created if/when there’s a need.