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 :
Microsoft Dynamics AX (Archived)

dynamics 365 for operations can not sync database after upgrade from 1611 to platform update 4

(0) ShareShare
ReportReport
Posted on by

hi All,

followed the upgrade instruction from WIKI to upgrade our dev server from 1611 to platform update 4

https://ax.help.dynamics.com/en/wiki/upgrade-latest-platform-update/

to unzip, create runbook and install the platform update.

but its failed in DBSync steps.

I try to run DBSync powerscript manually but no luck.

the error message shown "Failed to open SQL connection" in dbsync.log

checked axdbadmin account, it has full rights to access AXDB.

then I skipped the dbsync. all other steps were processed successfully without error.

below is the log I captured from log and event viewer

03/07/2017 19:37:13: Setup mode is "servicesync".
03/07/2017 19:37:13: 2017-03-07T19:37:13.9056959+08:00 Beginning sync step: InitialSchema.
03/07/2017 19:37:18: 2017-03-07T19:37:18.3191471+08:00 InitialSchema finished. Time elapsed: 00:04:413.
03/07/2017 19:37:18: 2017-03-07T19:37:18.3211469+08:00 Beginning sync step: FullIds.
03/07/2017 19:37:18: Using legacy ids where possible.
03/07/2017 19:37:29: 2017-03-07T19:37:29.4842725+08:00 FullIds finished. Time elapsed: 00:11:162.
03/07/2017 19:37:29: 2017-03-07T19:37:29.4872753+08:00 Beginning sync step: PreTableViewSyncActions.
03/07/2017 19:37:29: 2017-03-07T19:37:29.4872753+08:00 Beginning sync step: pre-sync custom action: '<RunFullSync>b__15_0'.
03/07/2017 19:37:59: 2017-03-07T19:37:59.8118618+08:00 pre-sync custom action: '<RunFullSync>b__15_0' finished. Time elapsed: 00:30:324.
03/07/2017 19:37:59: 2017-03-07T19:37:59.8118618+08:00 PreTableViewSyncActions finished. Time elapsed: 00:30:324.
03/07/2017 19:37:59: Failed to open SQL connection
03/07/2017 19:37:59: The operation failed.
03/07/2017 19:48:09: Bindir: J:\AosService\PackagesLocalDirectory
MetadataDir: J:\AosService\PackagesLocalDirectory
Sql scripts:

exceptionDetails:

Microsoft.Dynamics.AX.InitializationException: Failed to open SQL connection at Microsoft.Dynamics.AX.AOS.StartupInternal(String[] Arguments) at Microsoft.Dynamics.AX.AOS.Startup() at Microsoft.Dynamics.AX.AosConfig.?A0x0d73e1d0.GetAosConfig() at Microsoft.Dynamics.AX.AosConfig.Config.InitInternal(Boolean isOfflineMode) at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.StartAosCode(SyncOptions syncOptions, String sqlConnectionString) at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler) at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider) at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync() at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync() at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync(SyncOptions options) at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
  Message:

Failed to open SQL connection

best regards,

Ken

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    The error says that AOS can't start because it can't connect to SQL Server. Start with checking whether you can connect to SQL Server.

    Note that the version numbers belong to different things. Update 4 is the platform version, while 1611 is the application version (it was released together with Platform update 3).

  • Community Member Profile Picture
    on at

    hi Martin,

    thanks for your quick response,

    I am not sure its related to AOS  because it can start and I can login into AX without any issue.

    and still not able to sync database..

    I got below error in Visual Studio.

    2017-03-08T16:41:59.9814759+08:00 Beginning sync step: InitialSchema.

    2017-03-08T16:42:01.4716112+08:00 InitialSchema finished. Time elapsed: 00:01:490.

    2017-03-08T16:42:01.4736107+08:00 Beginning sync step: FullIds.

    2017-03-08T16:42:12.6584219+08:00 FullIds finished. Time elapsed: 00:11:184.

    2017-03-08T16:42:12.7592162+08:00 Beginning sync step: FullTablesAndViews.

    2017-03-08T16:42:37.5695456+08:00 FullTablesAndViews finished. Time elapsed: 00:24:810.

    Failed to open SQL connection

    Database synchronization completed (41441 ms). Errors found.

    Failed to open SQL connection

    syncengine.exe exited with code -1.

    best regards,

    Ken

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    It's what the error (in your question) says: Failed to open SQL connection at [...] Microsoft.Dynamics.AX.AOS.Startup(). And your new error message repeats that it Failed to open SQL connection.

    Failed to open SQL connection indeed sounds to me like a problem with connecting to SQL Server. For example, the user doesn't have permissions to access it. If you run AX in the usual way, AOS used the account of the IIS application pool, not your account, so different behavior is completely possible.

  • Community Member Profile Picture
    on at

    I am getting the same error after using the deployable package https://ax.help.dynamics.com/en/wiki/installing-deployable-package-in-ax7/

    Can you tell me if you found a resolution.

  • acainoon Profile Picture
    5 on at

    This issue is publish in https://support.microsoft.com/de-de/help/4016079

    Customers that applied the package entitled Platform maintenance package for 1611 release V2 for update 3 and build 7.0.4307.29200 or above are not able to update to Dynamics 365 for Operations Platform Update 4 due to a database version mismatch.

  • Andreas Hofmann Profile Picture
    on at

    Running into same issues. The link to support does not really have a solution.  Anything else that can be done to fix this?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hey

    These are the steps I took and have been able to run update and sync.

    I went to sql server configuration ->SQL Server Services-> SQL Server

    : and changed the logon to Axlocaladmin.

    In SQL Server for DB AXDB there is syncrole , that I also granted the axlocaladmin.

    I then logon as that axlocaladmin and run the rest of scripts and it works.

    After making axlocaladmin, Now I can also use VS 2015-> Dynamics 265->FULL BUILD

    VS 2015-> Database Synchronize

  • Suggested answer
    Taylor G Profile Picture
    on at

    If you are on platform 4, downloading the latest binaries from LCS gets it working.  As of 3/23 that version supersedes the 1611 V2 package binaries, and includes KB4016079 for the win.

  • Community Member Profile Picture
    on at

    Hi,

    try the followings: 

    - do a full db sync from VS2015

    - it failed me with event log entry: 

    Object Server Database Synchronizer:
    The internal time zone version number stored in the database is higher than the version supported by the kernel (12/7). Use a newer Microsoft Dynamics 365 for Operations kernel.

    - the problem looks the same when you downgrade your kernel in ax2012 

    - solution: modify the value for column SysTimeZonesVersion in the table SQLSystemVariables (in database AxDb) . In my case it was 12 and have to modify to 7 (I had a successful update4 upgrade before).

    - rerun the axupdateinstaller

    Br,

    Laszlo

  • AB2014 Profile Picture
    on at

    Download and install the hotfix of KB 4016079 via LCS, it'll solve this issue.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans