Problem:
Installed a fresh PSIcapture installation. Then, after installation was complete, copied the ProgramData folder from a previous installation. After, Capture Services did not stay started and software would not function in this state.
Capture.Services log had this entry:
[12/5/2013 11:20:16 AM - Error - v5.0.0.23] The following exception(s) occurred loading the Configuration service. The following error(s) occurred: Violation of PRIMARY KEY constraint 'PK__Configur__C41E028836A3156B'. Cannot insert duplicate key in object 'dbo.Configuration_Shared'. The duplicate key value is (psigen.capture.modules.captureserver.mailgatewaysettings). The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at PSIGEN.Capture.Data.Database.ExecuteRowInsert(DbDataReader reader, DbCommand insert) at PSIGEN.Capture.Data.Database.MigrateFrom(Database fromDatabase) at PSIGEN.Capture.Data.ServiceDatabase.MigrateFromSQLCE(String sourcePassword, Boolean deleteSource) at PSIGEN.Capture.Data.Configuration.ConfigurationDataLayer.CreateDatabase(String dataPath) at PSIGEN.Capture.Modules.Configuration.ConfigurationService.Initialize(Dictionary`2 properties) at PSIGEN.Capture.Services.ServiceManager.LoadService(XElement serviceNode)
Solution:
Follow these steps to fix this error.
- Go the the ProgramData folder.
- Within Configuration cut and paste the .sdf, .mdf, and .ldf files into a backup location out of the Configuration folder.
- Go to the backup Folder C:\ProgramData\PSIGEN\Capture.Services\Configuration\Backup
- Copy the latest .sdf file within this location.(If the customer was on an earlier version of the configuration, it will be named, Configuration.xx.sdf) to this location C:\programdata\PSIGEN\Capture.Services\Configuration
- Rename the file to Configuration.sdf.
- Start Capture Services.
- The Capture Service should start rebuilding the .mdf and .ldf files automatically from the 4.6 installation.
- If they created new document types with the .mdf file you copied use the Utility Ken made to extract the document types and re-add them into the installation.
Comments
Please sign in to leave a comment.