web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Full Database Sync Error: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.

(0) ShareShare
ReportReport
Posted on by 70

Hi fellow F&O pros,

im having an issue with a local VM of Dynamcis 365 F&O.

I'm getting an error on every databse sync I perform on this machine:

Unable to create/retrieve table DBSyncExecStats to sync execution status: System.Data.SqlClient.SqlException (0x80131904): The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Dynamics.AX.Data.Management.DBSyncSyncStepExecutionStatusSync.InsertCurrentExecutionStatus(SqlCommand command)
   at Microsoft.Dynamics.AX.Data.Management.DBSyncSyncStepExecutionStatusSync.SetupExecutionStatusTable(Boolean logFailure)
ClientConnectionId:601c9323-9895-4667-ae45-392599ee805c
Error Number:242,State:3,Class:16
The execution status will not be persisted in the database.

However, after the synchronisation, the db sync tool says, that the Database synchronization was successfull.

Since this is an environment ehere a Azure DevOps Build Agent is installed, every build performed on this Agent is failing.

Has somebody an ideo how to fix this? Any hint would be very helpful.

Cheers

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Erik,

    Are you aware if a certain field type got changed in the table design? If so, this is the root cause of the error. Otherwise, you need to find which table is raising this error. Then it would be possible to check if you can delete the table and access data loss or just remove a single column from the SQL database.

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    PS. I have move the question to the Dynamics 365 Finance forum.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Erik Dwornik,

    Do you use contoso DB on build VM or it's something specially created for customers?

    I remember I had similar issues in the dev environment and the reason was that the admin user (environment admin) had non-en-us datetime and number format settings.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans