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, ...
Answered

Getting error while doing Database Sync

(0) ShareShare
ReportReport
Posted on by 27

Hi,

Getting the below error while doing full db sync. Have done a full build with reference package and it has passed without an error. Its D 365 Finance & Ops PU30 env:

at Microsoft.Dynamics.Ax.MSIL.Interop.createSession(String userId, String company, String language, String partitionKey, Int32 workLoadType)
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue, interpret* ip)
at Microsoft.Dynamics.Ax.MSIL.Interop.createRunAsSession(String userId, String company, String language, String partitionKey, WorkLoadTypeEnum workLoadType)
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync()
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync()
Microsoft.Dynamics.Ax.Xpp.ErrorException: Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics 365 for Finance and Operations.
at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync()
at Microsoft.Dynamics.Ax.MSIL.XppSession.Start(String userId, String company, String language, String partitionKey, Int32 workLoadType)
More Information: Invalid partitionKey parameter arguments passed to the method globalUserGuidCache::getUserGuid
at Microsoft.Dynamics.Ax.MSIL.XppSession.Start()
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider)
Unhandled exception
at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler)
syncengine.exe exited with code -1.

Any help will be appreciated.

Regards,

Sourav

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    moved to the d365 forum

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi,

    Have you refreshed DB recently? Check if admin account is enabled in UserInfo table.

  • Sourav056 Profile Picture
    27 on at

    No I have not refreshed the DB. I will check the admin account . However is there a query which i can run to enable to admin account

  • Sourav056 Profile Picture
    27 on at

    Hi Sergei,

    I checked the admin account in userInfo table, its enabled and i have not refreshed my DB. Check screenshot below:

    pastedimage1581204445023v1.png

    Regards,

    Sourav

  • Sourav056 Profile Picture
    27 on at

    Also to add whenever, i try to open D 365 through the url, I am getting the below error which says: ' The browser session was lost due to an error on the server', screenshot below

    pastedimage1581210998264v1.png

  • Suggested answer
    Pete Alberts Profile Picture
    3,542 on at

    When I get these type of issues I just get a new VM.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi, 

    Try to find more information in Event Viewer. It could help to understand the source of issue. 

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,194 Super User 2025 Season 2 on at

    Hi Sourav,

    This it work before? What changes were done before you got stuck here? Have you tried to do a full sync of your models and eventually all before doing the sync?

  • Verified answer
    Navneeth Nagrajan Profile Picture
    2,438 Super User 2025 Season 2 on at

    Hello Sourav,

    Few questions:
    1. Was there any custom development being done or is this an error inside a new development machine?
    2. Are there any event logs etc (Management reporter related, workflow related etc.)

    Thanks,
    Navneeth Nagrajan | Dynamics 365 Technical Consultant

  • Sourav056 Profile Picture
    27 on at

    Hi  All,

    Thanks for your help. The issue is resolved. It was a data issue with one of the view which we customised. In order to resolve that , we had made a change to the  sysconfiguration table to make changes to TEMPTABLEINAXDB . After some checks on the DB I found out that the sysglobalconfiguration was set to azuresql even though I was working with a local sql server . So after changing the configuration the DBSync was working again. I have also managed to fix our customised view as of now. Over all it was a good learning experience.

    Regards,

    Sourav

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans