Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / A network-related or i...
Finance forum
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.

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! 

  • Suggested answer
    San Artham Profile Picture
    San Artham 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
    Prajakta 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
    huijij 19,803 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

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... 288,513 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,862 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans