'SQL Server does not exist or access denied' is a general Microsoft Data Access Components (MDAC) message that indicates that the computer running Microsoft SQL Server is not reachable.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix SQL related errors.
In this context, we shall look into the main causes of this error and how to get rid of it.
What triggers 'SQL Server does not exist or access denied' error ?
This error occurs due to different reasons that include a server or client-related reasons.
Some of them are outlined below:
1. Server related issues:
If none of the client machines are able to access the SQL server, then there is an issue in the server end itself.
Some of the problems from the server end are as below:
i. Installation of the SQL server is not done in the computer that is specified in the connection string.
ii. SQL Server is not started.
iii. The SQL Server name is different from the name of the computer.
iv. The database is offline.
v. Renaming of database files.
vi. The database is moved to a new server.
2. Client related issues:
If one specific client or a few clients are not able to access the SQL Server then the issue is on the client-side itself.
Some of the problems from the client end are as below:
i. In-existence of the name of the computer on the SQL Server
ii. Ensure to specify the correct occurrence name if you are trying to access a named occurrence of SQL Server.
iii. Using incorrect protocol.
iv. The presence of any cluster in SQL Server may lead the network adapters to get configured incorrectly or might have an incorrect name.
v. It might just be the side effect of an MDAC mismatch.
How to fix 'SQL Server does not exist or access denied' error ?
You can follow the steps below to resolve this error;
1. If the firewall on the server is blocking any incoming connections then check the firewall settings for the server operating system. However, in case if it is enabled then verify the port number the SQL Server is using is open in the firewall. Also, verify the UDP port 1434(if you are using dynamic ports).
2. Check whether the TCP/IP and Named Pipes are enabled or not using the SQL Server configuration tools.
3. Ensure that the database is attached and online. If not, then attach the database. In case, if the database is offline then bring it online.
4. Verify that the SQL Server service is started. Also, verify that the SQL Server Browser service is started on the application server if using a dynamic port for SQL Server.