Duplicates are displaying in all the collections

Article:TECH4517  |  Created: 2005-08-26  |  Updated: 2006-03-29  |  Article URL http://www.symantec.com/docs/TECH4517
Article Type
Technical Solution


Issue



I am seeing duplicate entries in collections, reports, etc., but if one of the duplicates is deleted, both are removed. If the computer is then brought back in, the duplicate entry shows up again.

Cause



It turns out that the StringCache table is no longer a table at all, but is a view. The table that caused the view to have duplicates was the KnownCulture table. The table only has one column Culture which had the following four records: en, , en-US, and en-US. This extra en-US caused duplicates in the StringCache view which cascaded to cause duplicates within almost every resource list within the product.

The theory is that if there is some type of database problem when the query to find the KnownCulture fails, it inserts a new record for the culture that the user was set to which was still en-US, thus causing the duplicate entry.

Solution



One of the entries for en-US needs to be removed. It can't be easily done directly, so the following SQL code takes care of the issue by removing any extra entry.

/* Select each item distinctly into a temporary location */
select distinct Culture into #tmp_knownculture
from KnownCulture
truncate table KnownCulture

/* Rebuild the KnownCulture table from the temporary location */
insert into KnownCulture
select * from #tmp_KnownCulture
drop table #tmp_KnownCulture

/* Finally display the newly built table to verify the data */
select * from KnownCulture

Legacy ID



1079


Article URL http://www.symantec.com/docs/TECH4517


Terms of use for this information are found in Legal Notices