Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

AX7 database synchronization failure

Posted on by Microsoft Employee

This  is done on AX7 RTW customization.

 

I created one custom table P97GradeMasterTable in Visual studio application Explorer in USR layer and my created model.

 

However, when I try to do the following:

1. Click “Dynamics AX” menu item in Visual Studio, then “Synchronize database…”

2. Click “Synchronize” button on the “Dynamics AX Full database synchronization” dialog

 

I got the following error”

Cannot open database “AXDBRain” requested by the login, The login failed…

 

 

The AOS database is AXDB. But here it complains AXDBRain.

 

Is this a bug since I know in CTP 8, the database is AXDBRain.

  • Tom Treen  Profile Picture
    Tom Treen on at
    RE: AX7 database synchronization failure

    The Config file VS uses is set in the registry - HKEY_CURRENT_USER\Software\Microsoft\Dynamics\AX7\Development\Configurations

    I found on my test system as local admin this was - DynamicsDevConfig.xml. However, when I tested with a domain account, it defaulted to DefaultConfig.xml.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: AX7 database synchronization failure

    The correct resolution is:

    1. Close Visual Studio completely

    2. Edit C:\Users\[Your User Profile]\Documents\Visual Studio 2015\Settings\DefaultConfig.xml (or whatever the config is named)

    3. Change the contents of <BusinessDatabaseName> to the database you're using

    4. Save the file

    5. Restart Visual Studio

    What can cause this:

    - Using a user other than axlocaladmin from the one of the Azure or VHD machines

  • Douglas Noel Profile Picture
    Douglas Noel 3,905 on at
    RE: AX7 database synchronization failure

    Hi all,

    just for information - don't know if this is  the problem:

    Take a look at KB3164395 (5/14/2016) named

    "Developer Downloadable VHD has wrong AX database name"

    But this should (according to description) only 'retail' related.

    regards

    Douglas

  • RE: AX7 database synchronization failure

    Just FYI, I ran into the same issue. After some troubleshooting I found that the reason was that I am running Visual Studio as a different user as the LCS deployment initially occurred. Just as yangzhijun above, I was not able to do DBsync from VS, and I could not find the file DynamicsDevConfig.xml. When I looked at the other user account (axlocaladmin vs axdeployadmin) I found the file and DBSync succeeded.

    Hope this helps someone.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: AX7 database synchronization failure

    I just deployed the environment using LCS. Open the AOS and verify it's working. Then I activated the mPOS from my dev box. After that, I tried to customize one menu item and added this table P97GradeMasterTable. Nothing destructive or anything changing the environment.

    I really don't know what mistake I have made during this process.

    Since that error only occurs if I try to synchronize the database thru visual studio. and the database is synchronized successfully. I will use the command line way to do that from now on.

    Anyway, thanks for the help.

  • Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: AX7 database synchronization failure

    If you're saying that it was deployed correctly and you broke it by yourself by something you did (which you didn't explain), then it's possible that you will break it again. Unfortunately I can't help you to avoid making the same mistake again, unless you tell us what you actually did there.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: AX7 database synchronization failure

    Thanks Martin,

    The problem is when I deployed the environment, everything seemed correct and failures or errors. If I re-deploy a new environment, it will run into the same kind of issues as we currently have.

    But anyway, I will try that as a last resort.

  • Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: AX7 database synchronization failure

    If I was you, I would stop hacking and get a new deployment. You'll never know how many other things are broken in this corrupted installation.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: AX7 database synchronization failure

    I tried to modify the above configure file and start build in Visual Studio. The build does synchronize the database. However, it fails in the end with the following error:

    Resources.AzureAOSWebRoleNotFound.

    The calling stack is as below:

    Resources.AzureAOSWebRoleNotFound

    at MicrosoftDynamics.Framework.Tools.AosAppPoolRecycler.RecycleAppPool()

    at MicrosoftDynamics.Framework.Tools.BuildTasks.SyncEngineWrapper.Sync(CancellationToken cancellationToken)

    at MicrosoftDynamics.Framework.Tools.BuildTasks.SyncEngineWrapper.Sync(CancellationToken cancellationToken, IList'1 localElements, SyncModel syncMode, IDiagnostickSink& diagnosticSinck)

    at MicrosoftDynamics.Framework.Tools.AsycnBuildController.DoDBSyncronization(CancellationToken token, IList'1 elements, SyncMode syncMode, BuildTrigger buildTrigger).

  • Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: AX7 database synchronization failure

    DynamicsDevConfig.xml it's the correct name in my local AX7 VHD. I'm glad you were able to deal with this minor difference in your system.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans