Mimetis / Dotmim.Sync

A brand new database synchronization framework, multi platform, multi databases, developed on top of .Net Standard 2.0. https://dotmimsync.readthedocs.io/
MIT License
881 stars 191 forks source link

SQL because it is being used by another process #1253

Open dorathoto opened 1 week ago

dorathoto commented 1 week ago

I have a console program that will perform a Sync when it receives a signalR, but it says that the database is already open.

Yes, I use EntityFramework in my console project..

Dotmim.Sync.SyncException: '[InternalApplyChangesAsync]..[InternalApplyCleanErrorsAsync]..The process cannot access the file 'C:\Users....\dbo_Agendamentos_0000_SQLLocalTotem_ERRORS_rjc0yplu_f2y.json' because it is being used by another process.'

What should I do? Would just closing the connection first work? use the SqlSyncChangeTrackingProvider()

Mimetis commented 1 week ago

That's strange. Are you able to produce a small example that can reproduce the bug ?

Seems you have a problem on accessing a file on disk, and not really the database

That's weird coz this file (indeed generated by DMS) is only used by DMS, internally...