Operational Defect Database

BugZero updated this defect 55 days ago.

VMware | 375280

Smarts SAM: SDI Adapter fails to execute batch update with Primary Key error; Duplicate instances of certain devices found in SDI "SQL DB IC-T_SUMMARY_DEVICE" table

Last update date:

3/25/2024

Affected products:

Smart Assurance - SMARTS

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Symptoms

Smarts Service Assurance Manager (Smarts SAM) SDI Adapters fails to execute batch update with the following Primary Key error: Batch SQL Executions #3 SQIF-E-SQLIF_EXECUTE_FAILED-Execution of the SQL statement INSERT INTO IC_T_Summary_Device (ElementClass, ElementInstance, SummaryStartAt, IsDeleted, InsertDTS, UpdateDTS) Values ('Host', 'abc', '2012-06-22 04:00:00', '0', '2012-06-22 16:38:49', '2012-06-22 16:38:49') failed because of: [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_IC_IC_T_SUMMARY_DEVICE'. Cannot insert duplicate key in object 'IC_T_SUMMARY_DEVICE'. . SQLState is 23000. Duplicate instances of certain devices are found in the Smarts SDI Adapter SQL DB IC-T_SUMMARY_DEVICE table

Cause

This issue can occur when the Primary Keys (PK) are not unique for table enties. The most common reason for this error is that a device with a case sensitive name will not get inserted into the table correctly (for example, HostA versus Hosta).

Resolution

To work around this issue, you can do either of the following (see Note statement): Remove the PK constraint from the tableDelete the duplicate entries from the table The following sections explain how to do each of these workarounds. Removing the PK constraintTo remove the PK constraint from the table, run the following SQL query: alter TABLE IC_T_Summary_Device drop CONSTRAINT PK_IC_IC_T_SUMMARY_DEVICE; Deleting the duplicate entriesTo delete the duplicate entries from the SQL DB IC-T_SUMMARY_DEVICE table, first use the log file to match up the associated error messages related to updating the table to actual table rows. The command to delete the offending entries is as follows: DELETE from IC_Occurrence_servers Where OCCURRENCEIDENTIFIER > '{insert occurrence identifier}'

Related Information

See the following knowledgebase article from Microsoft support site for information related to this issue: http://support.microsoft.com/kb/139444

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Unavailable

Learn More

Search:

...