Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.

RU2 upgrade fails on DB schema - Violation of primary key

Created: 29 Nov 2012 • Updated: 29 Nov 2012 | 6 comments

Trying to upgrade a 12.1 RU1 site to RU2. The SEPM installs fine, but when the second part runs the database schema upgrade, it fails at 3% and returns the following error:
Violation of PRIMARY KEY constraint 'PK_GUIPARMS'. Cannot insert duplicate key in object 'dbo.GUIPARMS'. The duplicate key value is (74).

I had our DBA check and all permissions are OK (full admin) for the account installing. He looked at the table in question, the output from the install script and says that the script is trying to place a new value in that table, which is the failure.

Current entry in the DB:
GUIPARMS_IDX       PARAMETER   VALUE USN    TIME_STAMP DELETED
74      ADJUST_DATABASE_TIME    1328203091521        1        0        0

Script is attempting to write:
IF NOT EXISTS (SELECT PARAMETER FROM GUIPARMS WHERE PARAMETER = 'latest_av_defs_Symantec' )   INSERT INTO GUIPARMS (GUIPARMS_IDX, PARAMETER, VALUE) VALUES (74, 'latest_av_defs_Symantec', '')

I was forced to uninstall the SEPM and reinstall, then relink to the DB. That was successful, so we are working at RU1 stage.

I have run the dbvalidator.bat and receive "database validation passed"

I've attempted to create a support case, but all day it says it can't verify our account (even though I generated a ticket on Friday).
I have attached the data that shows up in the failure box, if it can be of help.

 

 

Comments 6 CommentsJump to latest comment

pete_4u2002's picture

are the only one who has loggde ont othe SEPM? is there any other operation activity on SEPM?

DLFFB's picture

The SEPM is a dedicated box, no other software loaded. We have 2 SEPMs connecting to a shared SQL, hosted on a cluster. I verified that both SEPMs were shutdown (in the attached log, I saw success on those checks) and no other admins were logged in to either box at time of upgrade.

Mick2009's picture

Hi DLFFB,

Odd.  The row with ID 74 in that table is supposed to be 'latest_av_defs_Symantec' - it looksto me like the upgrade is failing because there is a "ADJUST_DATABASE_TIME" associated with 74 in yours. 

I've been in touch with the case owner for your Tech Support case - I believe we have a proposed course of action that will work.  He will be in touch. 

With thanks and best regards,

Mick

With thanks and best regards,

Mick

DLFFB's picture

Odd indeed. This is a 12.1 base install that was upgraded to RU1.

Support has asked to export that table for review, but is unsure how to do so. I admit my SQL knowledge doesn't extend much past spelling it. I do not have access the the SQL host server. Is there a way to get that information via any of the default installation tools with the SEPM/SQL client tools we had to install initially?

Otherwise, I can only provide the database as the SEPM exports (19GB).

Mick2009's picture

Hi again,

 

There are several ways to do it.  This page has details: http://www.sqlservercurry.com/2011/01/sql-server-export-table-to-csv.html

 

HTH,

 

MIck

With thanks and best regards,

Mick

DLFFB's picture

Thanks Mick,

I'll read it over and see if I can get something out of it.
I uploaded the full database backup yesterday, since no one had a way to just pull the table.

I have yet to hear back whether they have found the root cause.