Error: DbStream::bool Flush(void) error 5004:DbStream Error 1062: INSERT INTO Site (Sitename) VALUES(?)[HY000][TCX][MyODBC]Duplicate entry.


This article applies to:

  • Security Reporting Center 2.0x

Symptoms:

  • Error: DbStream::bool Flush(void) error 5004:DbStream Error 1062: INSERT INTO Site (Sitename) VALUES(?)[HY000][TCX][MyODBC]Duplicate entry.
  • Report stops with duplicate key error.

Causes:

Strings longer than 255 characters are being truncated when they are exported to the database.  Strings that differ only after 255 characters are considered "duplicate".

Information:

In order to resolve this issue please follow the steps below.
 
1.  Upgrade to Security Reporting Center 2.1.  You can find the download and installation instructions here: https://support.trustwave.com/Security-Reporting-Center/upgrade.asp
 
2.  After the upgrade please make sure to delete the existing FastTrends and Content databases.  The easiest way to do this would be to copy your existing profiles and analyze the copied profile.  If you would like to manually delete the databases instead, please follow these steps:
Clearing FastTrends Database
 
     a. Click Firewall Reporting and/or Proxy Reporting > Options > Fast Trends Database Management.
     b. Highlight profile and click Manage Databases for Selected Profile.
     c. Choose Delete all Days.
     d. Click Delete.
     e. Click Done.
     f. Click Save.
 
Clearing the Content Database
 
     a. Click Firewall Reporting and/or Proxy Reporting > Options > Content Database Management > Content DB Maintenance event.
     b. Check Enable Auto-Delete feature.
     c.  Specify today's date in Delete all report data with a time-stamp earlier than.
     d. Click Queue Event Now.
     e. Click Done.
     f. Click Save.
3.  Analyze your profiles to compile the database without the duplicate entries.
 
After the re-analysis you should then be able to view your reports.
 

Notes:

Always make a backup of your current installation before upgrading.

This article was previously published as:
NETIQKB40360

Last Modified 3/21/2006.
https://support.trustwave.com/kb/KnowledgebaseArticle10130.aspx