web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

SQL Server Connection Failure during Model Build in Dynamics 365 F&O

(0) ShareShare
ReportReport
Posted on by 4

Hi everyone,

I am encountering a SQL Server connection error while performing a full build of a model in Visual Studio for Dynamics 365 Finance & Operations.

I verified that the SQL Server (MSSQLSERVER) service is up and running.

Thanks in advance for any suggestions! 

Categories:
  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    Please give us some context. Did the environment work before? If so, what has changed? Have you tried restarting the machine? Can you access the cross-reference database via SSMS?

  • Jeevan Profile Picture
    4 on at

    Hi Martin,

    Yes, the environment was working fine before. After taking Get Latest from the Dev branch in Azure DevOps for the particular model, I performed a Full Build, and I started getting the SQL Server connection error.

    I also restarted the machine and verified the SQL Server connectivity. SSMS is working fine, and I am able to connect to the database successfully. The issue occurs specifically when performing the Full Build for the model.

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    Okay, does it work if you return code to the original version? Does compilation of different models work?

     

    Also, can you explicitly confirm that you tested access to the cross-reference database? You mentioned a database, but maybe you tried a different database. Can you use Find references in Visual Studio?

     

    The name of the cross-reference (xref) database is defined in DynamicsDevConfig.xml. It's typically not something to worry about, but it's possible that you use multiple xref databases or that your setup got corrupted.

  • Suggested answer
    Anitha Eswaran Profile Picture
    490 on at

    Can you check web.config file to verify if you have the correct database nam/server 

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    @Anitha Eswaran The stack trace (especially SqlDbCrossReferenceProvider) tells me that the problem is about the xRef database, not the actual F&O database with business data. Also, it occurs during a compilation, not during synchronization of the application with F&O database.

  • Anitha Eswaran Profile Picture
    490 on at

    HI @Martin Dráb  - Not sure if the sync was selected when triggering a full build.The error says ‘establishing connection to sql server’- so I would usually check the web.config as well.. 

  • Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    @Anitha Eswaran I understand that you originally thought it might have been about AxDB, but as I already explained, the stack trace reveals that it's actually about the xRef database, not AxDB. Both are SQL databases, but used differently and configured at different places. SqlDbCrossReferenceProvider use the xRef database (taken from dev config), not the actual F&O database configured in the web application.

  • Jeevan Profile Picture
    4 on at

    Hi Martin, Anita,

    We previously changed the computer name from ABC-1 to ABC-01. I checked the Web.config file and found that the server name is still set to ABC-1. This may be the reason I am getting this error.

  • Suggested answer
    Martin Dráb Profile Picture
    241,643 Most Valuable Professional on at

    The information about the computer name change may be critical. Are you saying that you environment stop working when you changed the name?

     

    What kind of environment is it? A local VHD? If so, have you followed Rename a local development (VHD) environment? A CHE? If so, you can simply deploy a new VM instead of spending too much time with getting the renaming done correctly.

     

    If it's a CHE you want to try fix your environment rather then deploying a new one (which I don't recommend), you'll need to fix the application as well, but to address your current problem, you'll need to change CrossReferencesDbServerName property in DynamicsDevConfig.xml.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 265 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 215

#3
Subra Profile Picture

Subra 177 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans