Microsoft Windows Server 2003 SP2
RSA Key Manager Server 2.2
Microsoft SQL Server 2005
RSA Key Manager Server 2.5.0.x
How to reseed identity columns?
27 Feb 2009 12:00:01,694 1235764801537 Client 1 (6) ERROR TP-Processor2 - Query error
edge.java.sql.SqlException: com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_STATE_AUDIT'. Cannot insert duplicate key in object 'dbo.STATE_AUDIT'.
at edge.java.sql.DefaultPreparedStatement.executeUpdate(KeyManager:80)
at com.rsa.keymanager.core.database.sql.execute.DefaultSqlExecutor.update(KeyManager:40)
at com.rsa.keymanager.core.database.sql.execute.DefaultSqlExecutor.insert(KeyManager:51)
at com.rsa.keymanager.core.database.sql.cud.DefaultStateAuditCud.create(KeyManager:32)
at com.rsa.keymanager.core.database.sql.cud.DefaultStateTimelineCud.d(KeyManager:64)
at com.rsa.keymanager.core.database.sql.cud.DefaultStateTimelineCud.create(KeyManager:35)
This fix below is good only for RKM Server 2.1.3.x and 2.2.x
If you have one primary and one secondary SQL Server
Verify that the identity columns have values lower than 1000000000. Run the following on both the primary and secondary SQL Servers:
use RKM
SELECT OBJECT_NAME(OBJECT_ID) AS TABLENAME,
NAME AS COLUMNNAME,
SEED_VALUE,
INCREMENT_VALUE,
LAST_VALUE,
IS_NOT_FOR_REPLICATION
FROM SYS.IDENTITY_COLUMNS
WHERE OBJECT_NAME(OBJECT_ID) = 'CRYPTO_POLICY'
OR OBJECT_NAME(OBJECT_ID) = 'IDENT'
OR OBJECT_NAME(OBJECT_ID) = 'IDENTITY_GROUP'
OR OBJECT_NAME(OBJECT_ID) = 'STATE_AUDIT'
Once it is determined that the identity columns have not been reseeded on the secondary, run the following:
USERKM;
GO
DBCCCHECKIDENT('CRYPTO_POLICY', RESEED, 1000000000);
GO
DBCCCHECKIDENT('IDENT', RESEED, 1000000000);
GO
DBCCCHECKIDENT('IDENTITY_GROUP', RESEED, 1000000000);
GO
DBCCCHECKIDENT('STATE_AUDIT', RESEED, 1000000000);
GO
Use the following for RKM Server 2.5.x.x
SELECTOBJECT_NAME(OBJECT_ID) AS TABLENAME,
NAME AS COLUMNNAME,
LAST_VALUE,
SEED_VALUE,
INCREMENT_VALUE,
IS_NOT_FOR_REPLICATION
FROM SYS.IDENTITY_COLUMNS
WHERE OBJECT_NAME(OBJECT_ID) = 'CRYPTO_POLICY'
OR OBJECT_NAME(OBJECT_ID) = 'IDENT'
OR OBJECT_NAME(OBJECT_ID) = 'IDENTITY_GROUP'
OR OBJECT_NAME(OBJECT_ID) = 'STATE_AUDIT'
OR OBJECT_NAME(OBJECT_ID) = 'POLICY'
OR OBJECT_NAME(OBJECT_ID) = 'JOB_DEFINITION'
OR OBJECT_NAME(OBJECT_ID) = 'JOB'
OR OBJECT_NAME(OBJECT_ID) = 'AUTOREG_PROFILE'
OR OBJECT_NAME(OBJECT_ID) = 'AUTOREG_KEYSTORE'
DBCCCHECKIDENT('CRYPTO_POLICY', RESEED, 1000000000);
DBCC CHECKIDENT('IDENT', RESEED, 1000000000);
DBCC CHECKIDENT('IDENTITY_GROUP', RESEED, 1000000000);
DBCC CHECKIDENT('STATE_AUDIT', RESEED, 1000000000);
DBCC CHECKIDENT('POLICY', RESEED, 1000000000);
DBCC CHECKIDENT('JOB_DEFINITION', RESEED, 1000000000);
DBCC CHECKIDENT('AUTOREG_PROFILE', RESEED, 1000000000);
DBCC CHECKIDENT('AUTOREG_KEYSTORE', RESEED, 1000000000);
GO
Related Articles
Unable to install RSA Certificate Manager on a migrated nCipher Security World 26Number of Views A single user has large spacing in the Users display in RSA Identity Governance & Lifecycle 31Number of Views Authentication Manager database services do not to start after power outage 187Number of Views How to identify the deployed version of the HXTT Text JDBC Driver in RSA Identity Governance & Lifecycle 141Number of Views How to determine the version of Oracle WebLogic and dependencies in RSA Authentication Manager 8.x 337Number of Views
Trending Articles
How to manipulate imported RSA SecurID Software Token(s) on an iPhone or iPad device Reporting on RSA Authentication Manager 8.x users with On-Demand Token, a fixed passcode or a hardware/software token assi… How to Download OTP Token Seed Files from myRSA Anomalix idGenius - SAML Relying Party Configuration - RSA Ready Implementation Guide RSA MFA Agent 2.5 for Microsoft Windows Installation and Administration Guide