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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

(0) ShareShare
ReportReport
Posted on by 65

Hello everyone,

I need your help. I have been struggling with this error since days and I don't seem to find the solution.

For a Devops mapping purpose, I had to rename my Virtual Machine (did it with SQL). I made sure the updates were made. 
After since, Whenever I compile a model I get this error in Visual Studio 2019 (see below). On the other hand, Synchronize Database is not showing any erros.

pastedimage1657096583138v2.png

When I open the Log file of the model result compilation, (file name : BuildModelResult) I noticed that it is calling the old name of the VM  : 

<Moniker>Initialization of cross reference database failed. Connection:Data Source=OLDNAME;Initial Catalog=master;Integrated Security=True;Connect Timeout=100;ConnectRetryCount=5;ConnectRetryInterval=10 failed with exception message:System.Data.SqlClient.SqlException (0x80131904)</Moniker>

I will be greatful for any thoughts to help me with this.

Thanks alot! 

I have the same question (0)
  • Suggested answer
    San Artham Profile Picture
    3,175 on at
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
    The file "AosService\PackagesLocalDirectory\bin\DynamicsDevConfig.xml" likely has entries pointing to other VM.
    Check the file and update the entries as needed.
  • Prajakta Profile Picture
    5 on at
    RE: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

    Hello, I am also facing same error. What was the solution to your problem ? I can see below link is marked as answer but there are a lot of things in that. Which specific was the solution to your problem. Appreciate you feedback. Thanks in advance !

  • Verified answer
    huijij Profile Picture
    19,811 on at
    RE: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

    Hi,

    You can follow up the MS document to troubleshoot the errors:

    docs.microsoft.com/.../network-related-or-instance-specific-error-occurred-while-establishing-connection

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 777 User Group Leader

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 602 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans