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 25Number of Views A single user has large spacing in the Users display in RSA Identity Governance & Lifecycle 29Number of Views Key Manager Server migration appears to hang after logging 'Migrating AUTH_INTERNAL...' in migrate.log 26Number of Views Authentication Manager database services do not to start after power outage 179Number of Views RSA Authentication Manager 8.2 SP1 Bulk Administration 1.6.0 Custom Application Guide (AMBA) 27Number of Views
Trending Articles
RSA Authentication Manager Upgrade Process RSA Release Notes for RSA Authentication Manager 8.8 RSA RADIUS Server service failed to start in the RSA Authentication Manager 8.1 Operations Console Microsoft Entra ID External MFA - Relying Party Configuration Using OIDC - RSA Ready Implementation Guide RSA Release Notes: Cloud Access Service and RSA Authenticators