0 votes

Good afternoon Support,
I've recently reinstalled Adaxes on one of our nodes to update to the 2015.1 version. Upon bringing services online the node is no longer able to write to the database because of the following error.

I can't say that I am very good with MS SQL but have your team seen these issues before?

Adaxes service 'ADAXES02.contoso.com' cannot save log records to the external database.
Error Details: Softerra.Adaxes.Logging.ExternalDatabaseException (0x80072035): Violation of PRIMARY KEY constraint 'PKOperations'. Cannot insert duplicate key in object 'dbo.Operations'. The duplicate key value is (0375804f-6879-4f0d-a8ad-3d605f691d31).
The statement has been terminated.
Database: Adaxes (ADAXESDB.contoso.com)
Username: CONTOSO\svc.Adaxes ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PKOperations'. Cannot insert duplicate key in object 'dbo.Operations'. The duplicate key value is (0375804f-6879-4f0d-a8ad-3d605f691d31).
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
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 #Tk.#Kl.ExecuteNonQuery(String query, IList1 parameters, IDbCommand command) at #Tk.#Ll.ExecuteNonQuery(String query, IList1 parameters)
at #Tk.#Ll.ExecuteNonQuery(String query, IList`1 parameters)
at #tl.#yl.InsertRecord(ISqlQueryExecutor queryExecutor, AdmLogRecord record, Guid initiatorId, Guid targetObjectId)
at Softerra.Adaxes.Logging.DBAccessProvider.InsertRecord(ISqlQueryExecutor queryExecutor, AdmLogRecord record)
at #Tk.#il.#i.#jl.#9ub()
at #Tk.#il.#i.#jl.#8ub()

by (360 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

It looks like there is a time synchronization issue between the local (SQLite) database and the external (Microsoft SQL) databases. Or you've changed some time settings on the computer where Adaxes service is installed so that older log records have more recent time stamps than newer ones.

In any case, the easiest way to resolve the issue is to delete the local database. In this case, you will lose the events that occurred since you've upgraded, but the service will be able to write log records to the external database. If this OK with, you can do as follows:

  1. Stop Softerra Adaxes Service.
  2. Delete the local SQLite database file. It is called AdaxesLog.db3 and located in the LogDB subfolder of the folder where the Adaxes service is installed.
  3. Start Softerra Adaxes Service. When the service starts, it will create a new local logging database file.
0

In the current situation that method acceptable. Thank you very much, worked like a charm!

Related questions

0 votes
1 answer

Our SQL DBAs are working to move most/all our SQL connections to SSL. They have asked if Adaxes can support this.

asked Feb 22, 2021 by ggallaway (300 points)
0 votes
1 answer

So we had 2017 version and we installed a new 2018.2 version and restored the configuration. Everything is going fine, except for external logging. We had an external database to ... : The wait operation timed out --- End of inner exception stack trace ---

asked Mar 1, 2019 by Brajesh (460 points)
0 votes
1 answer

We use TOPdesk as our ITSM solution. Several departments are able to create new users. When a create user task fails we would like to receive the alert as the Adaxes ... Adaxes to sent out the incident to our TOPdesk. Is there a solution for this?

asked Oct 5, 2023 by mrkvd16 (50 points)
0 votes
1 answer

AD is our identity source for Okta. When a user's AD account locks, the corresponding Okta account locks too. When the user self-unlocks the AD account via Adaxes, the ... there a way where Adaxes can also unlock the Okta account by leveraging Okta's API?

asked May 14 by ma4997 (20 points)
0 votes
1 answer

Any advice would be greatly appreciated.

asked Feb 9, 2023 by Homelander90 (350 points)
3,589 questions
3,278 answers
8,303 comments
548,130 users