In this Azure tutorial, we will discuss how to fix an error The Server Was Not Found Or Was Not Accessible that I got while working on a migration project where we are migrating the SQL Database to Azure.
Table of Contents
The Server Was Not Found Or Was Not Accessible
Recently, we were working on a project where we were migrating our on-prem SQL database to the Azure SQL Database. Here, as part of the migration activity, I have created an Azure Database Migration Service instance and then I have created a New Migration Project successfully.
Then, I was trying to create a new activity where I had to provide all the below details
- Source SQL Server instance name: Provide your Source SQL Server instance name.
- Authentication Type: Select the authentication type either Windows Authentication or SQL Authentication based on your requirements.
- User Name: You need to provide your User name to connect to the SQL server.
- Password: Same way, you need to provide your Password.
After entering all the above details, and I have clicked on the Next: Select Databases >> to navigate to the Select Databases window, I got the error The Server Was Not Found Or Was Not Accessible.
You can see it as below
The complete error message is as below
Error type failed to connect, please check error details error DetailError -1 – SQL connection failed. Please use this interactive user guide to troubleshoot the connectivity issue: https://support.microsoft.com/en-us/help/4009936/solving-connectivity-errors-to-sql-server
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: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
Now, let’s find out How to fix the error The server was not found or was not accessible.
The Server Was Not Found Or Was Not Accessible [Solved]
Below are a few key points you need to consider to fix the error The Server Was Not Found Or Was Not Accessible.
- Make sure to check, if the Source SQL Server instance name entered by you is correct.
- Make sure your server machine is up and running fine and it is perfectly reachable.
- Another important point is, you will have to verify if the SQL Browser service is running fine on the server machine.
“Make sure SQL Browser service is running on the server. ”
For, me this was the issue, the moment I made the SQL Browser service up and running, then I could able to connect to the server without any issues.
You may also like following the below articles
- The specified module ‘ActiveDirectory’ was not loaded
- Azure SQL Database Vs. SQL Server
- Cannot Open Server Requested By The Login Azure SQL
- How to Export Azure SQL Database
- How To Upload SQL Database To Azure
Well, in this article, we have discussed, how to fix the error The Server Was Not Found Or Was Not Accessible, that I got while working on a migration project where we are migrating the SQL Database to Azure. I hope, this will help to fix your issue as well !!!