MRP: Error accessing the Database:

Testing 2025.2.10. When running MRP the server logs show this error
Error accessing the database: You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels.

I disabled all of our BPMs manually. Both Method and Data directives. It’s still coming up.

Any ideas what’s causing this?

Here’s the full error

Ice.Common.EpicorServerException: Error accessing the database: You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels.
 ---> Microsoft.Data.SqlClient.SqlException (0x80131904): You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels.
   at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TrySetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean isAsync, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String method)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.SqlClient.SqlCommand.ExecuteReader()
   at Ice.Services.BO.SysAgentSvc.GetByIdForTaskAgentInternal(String agentID) in C:\_releases\ICE\ICE5.1.100.0\Source\Server\Services\BO\SysAgent\SysAgent.cs:line 274
ClientConnectionId:b778e21e-f1d3-4ddc-97c1-eb94b30a4812
Error Number:50000,State:1,Class:16
   --- End of inner exception stack trace ---
   at Ice.Services.BO.SysAgentSvc.GetByIdForTaskAgentInternal(String agentID) in C:\_releases\ICE\ICE5.1.100.0\Source\Server\Services\BO\SysAgent\SysAgent.cs:line 298
   at Ice.Services.BO.SysAgentSvc.Retry[T](Func`1 func) in C:\_releases\ICE\ICE5.1.100.0\Source\Server\Services\BO\SysAgent\SysAgent.cs:line 1455
   at Ice.Services.BO.SysAgentSvcFacade.GetByIdForTaskAgent(String agentID, Boolean firstPass) in C:\_releases\ICE\ICE5.1.100.0\Source\Server\Services\BO\SysAgent\SysAgentSvcFacade.cs:line 124
   at Ice.Controllers.BO.SysAgentController.GetByIdForTaskAgent(GetByIdForTaskAgent_InputModel model) in C:\_releases\ICE\ICE5.1.100.0\Source\Server\Services\BO\SysAgent\Generated\SysAgentController.cs:line 76
   at lambda_method5445(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
CorrelationId: 471626ea-574f-46bf-8e7c-216fe95cc346
1 Like

I would look at the account that your task agent is running under and make sure it able to access kinetic or password hasn’t expired.

I’d regenerate the data model & recycle the app pool.

More on this. I logged this in a ticket with support and they have been extremely helpful…
“Run PDT and send the config results.”
“You should change the user that your task agent runs under just incase they change their password”
“Here’s a bunch of KB articles that have nothing to do with the issue you described in your ticket”
…thanks.

Anyway. The error happens when I run MRP if there are any schedules in the system agent. Doesn’t matter if they’re enabled or if they have any tasks under them.

The issue is that I don’t know if it’s actually causing a problem or not. MRP seems to run fine. Jobs are created, POs are created, etc. But somewhere something is trying to do something it’s not allowed to do and I can’t validate MRP when it actively results in errors.
I’ve uninstalled and reinstalled Task Agent. Upgraded from 2025.2.10 to .13 just incase it was a version error. No erroneous task agents still in the db. I’ve done just about everything I can on my end.

Has anybody else seen this? I’m on 2025.2.13.

1 Like

Google search had a hit on Stack Overflow…but not sure it really helps you out…unless the issue is specifically with a System Agent related table.

1 Like

FWIW we’ve always had our Epicor dBs as read committed. I couldn’t find anything in the Epicor docs about it but I would try switching it. We heavily use MRP and have always had our isolation level as read committed.

Don’t know if it’s a version thing or a local config but that’s what Google search came up with…and if it’s on the internet it has to be true.

We’ve had the same isolation level of read committed since 10.x. And MRP was really bad back in the 10.x days. It’s night and day improved in 24 and newer. Epicor has actually done a good job of improving it.

Maybe it wasn’t fixed yet in “2024.2.15-ish” (that’s the version listed in the profile for @cpilinko)?

I don’t think this is an error with MRP per say. I think you just need to change your isolation level. MRP seems to be dependent on that. May be how they improved the performance of MRP.

Entirely possible…maybe @cpilinko needs to patch up to a higher 2024.2.## to get it resolved?

I’d try changing my SQL config first. That’s quicker and easier than a patch.

Profile shows as on-prem so maybe that’s an option too…

my profile is misleading, I was updating to 2024.2.something when I updated my profile last but never actually got there so now I’m going to 2025.2.
My current live version is 2024.1.13. I don’t have this error on that system. Read Commited Snapshot is on.
I’m currently testing 2025.2.13. completely new app and sql servers. This is the version I get the error in. Read Committed Snapshot is on.
I just shut it off. Regenerating datamodel quick, I’ll recycle and retest when it’s done.

We’ve been using MRP for years. All of our databases are set to Read Committed Snapshot is on.

2 Likes

OK…good luck.

1 Like

That’s pretty much what support said to me :rofl:

2 Likes

How’d you make out with the recycle/retest?

no improvement. Support says they can’t recreate it so it must be environmental.
I have a theory but I need to restore to test it so I’m going to do that now see what happens.

1 Like

If I had $1 for every time I’ve heard that…

2 Likes

You still wouldn’t be able to pay for support. :laughing:

3 Likes