Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Not able to connect to SQL Instance when trying to install CRM 365

Posted on by Microsoft Employee

Hi, 

We have 4 servers for CRM app and 1 SQL Server. We are trying to do the multi-role installation. When trying to do the installation on the first back-end server, we are getting this error:

 

Setup was unable to verify that SQL Server Agent (SQLSERVERAGENT) was running.

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. (provider: TCP Provider, error: 0 - The wait operation timed out.)

The wait operation timed out

 

2084.Image.png

 

The SQL Server is using the port, 1455

the format we put the name of the SQL Server instance is "name,port". We also tried "ip,port". We tried to telnet the server from the back-end server with the CRM Setup user, yet we are facing this issue. 

Need urgent support here. 

*This post is locked for comments

  • netRunner Profile Picture
    netRunner 22 on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    FCB::Open failed: Could not open file D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\MSCRM_CONFIG.mdf for file number 0.  OS error: 2(The system cannot find the file specified.).

    At the same time, the created user of the domain from which the installation is performed is the administrator of the domain, local computer, computer with SQLServer, and also has the right to create a database
    Also, if you go through this user through the Sql Managment tools, create a database

  • netRunner Profile Picture
    netRunner 22 on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Help is needed

    We solved the connection problem, but there was an error related to access

    You can see in the SQL logs that he is trying to create a database, but it fails:

  • Suggested answer
    Milad Hooshyari Profile Picture
    Milad Hooshyari 30 on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Well done..

    I had the same problem, and opening these two ports on destination SQL Server solved the predicament.

  • RM-22040759-0 Profile Picture
    RM-22040759-0 2,014 on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Thanks for the help. In my case we have not enabled firewall rules between APP and DB servers. 

    Best Regards,

    Ravi Theja Madisetty

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Ok so finally after hit and trial on a VM in a Lab environment, we concluded that using the default port of 1433, the installation was going fine. But when we changed the port to 1455, we faced the same issue. Then we tried to put the connection string in the format “Servername\instancename,1455” and we were able to proceed with the setup. Since client has only 1 SQL instance, I used the following on the SQL server instance step of the CRM Setup wizard: 

    SERVERNAME\MSSQLSERVER,1455 

    and we were able to proceed with the setup.

    Hope this help others.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    More updates:

    1. Telnet from CRM app servers to SQL Server - Success
    2. Try to connect to SQL Server with credentials using UDL. - Success
    3. Setup is able read the databases in the SQL Server instance - Checked
    4. Verify that the Service Accounts being used for installation have the necessary permissions defined by MSDN: https://technet.microsoft.com/en-us/library/hh699825.aspx#BKMK_MinimumPermissions - Checked
    5. Give local admin rights to the user running the Setup on the CRM server on both CRM servers and the db server - Checked
    6. Make the Setup user the SYSADMIN on the MS SQL Server - Checked
    7. Open the ports on the firewall suggested by Microsoft https://technet.microsoft.com/en-us/library/hh699823.aspx#BKMK_NetworkPortsSQL - Checked
    8. Check whether SQL is allowed to take remote connections - Checked
    9. Verify that the SQLSERVERAGENT service is up and running on the SQL Server machine - Checked
    10. Verify that the SQLSERVERAGENT service is running under a service account - Checked
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Further to update about the progress:

    1)      Reproduce the error message by running setup Wizard again.

    2)      Check event logs on both CRM server and SQL server and only one event found, where the setup tries to access specific file that does not exist on server (no justification on this until now from Microsoft CRM team).

    3)      Enable firewall rules to allow Any to Any on network firewall.

    4)      Enable SQL browser service and Named pipes network protocol from SQL configuration manager (did not resolve the issue).

    5)      Move CRM server to same VLAN as SQL server (did not resolve the issue).

    6)      Check Windows firewall is off on both servers

    7)      Check TCP connection on port TCP 1455 from CRM to SQL using telnet (connection established).

    8)      Try to choose different SQL server from CRM setup screen (did not resolve the issue and same error generated).

    9)      Try to run setup from different CRM server (failed)

    10)   Use Wireshark network monitor to sniff packets from CRM server to SQL and no suspected traffic found that could be related to CRM installation.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Hi,

    Port details for SQL.

    technet.microsoft.com/.../hh699823.aspx

    Mansoor

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Further updates:

    I created the MSCRM_CONFIG database manually in the MSSQL instance. Now the setup gives me the error that the MSCRM_CONFIG database already exists.

    I detached the database from SQL Server, I get the error that MSCRM_CONFIG.mdf and MSRCM_CONFIG_log.LDF files already exist in the location C:\program files\.......

    This means that the Setup is able to connect to the SQL instance and check the Database name and also to the server itself and browse to the folder.

    In both of the above cases, I got the alert "Setup was unable to verify that SQL Server Agent (SQLSERVERAGENT) was running."

    And the error:

    "The instance XXXXXXXXXX was not found"

    The question is, why setup is not able to verify that the SQLSERVERAGENT service is running though I checked the Db server and the service is up and running?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to connect to SQL Instance when trying to install CRM 365

    Please note that we are doing the installation of the back-end roles first.

    Also, the Setup user has the Sysadmin rights on the SQL Server and is also member of the Local Administrators group on the same server.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans