0

I'm trying to access a SQL Server installed in remote server (within the same LAN)

below the code in appsettings.json file

"server=ip\name;database=..;User Id=.." with filling the IP and database name, I'm getting the below error :

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: SNI_PN11, error: 26 - Error Locating Server/Instance Specified)

any idea ?

  • your SQL Server Instance are configured for remote access ? if not configure like here https://knowledgebase.apexsql.com/configure-remote-access-connect-remote-sql-server-instance-apexsql-tools/ – thisisnabi May 17 '22 at 06:29
  • Either the server or IP is wrong, or the database isn't configured to allow remote connections. Perhaps the database server is down. The duplicate question has 458 upvotes and 54 answers that cover almost every possibility – Panagiotis Kanavos May 17 '22 at 07:26
  • `ip\name` is used to connect to a named instance, eg `10.0.0.10\SQLEXPRESS` or `10.0.0.10\MyInstance`. Are you trying to connect to a named instance? Or a regular one? Have you tried using only the IP? – Panagiotis Kanavos May 17 '22 at 07:28
  • From Catherine_Koch: `Have you checked the connection parameters or the network cable? If the parameters are wrong or the cable is twisted/broken it can cause this error.` – Panagiotis Kanavos May 17 '22 at 07:28
  • From Kumaresan Madhaiyan: `Have you checked the firewall side any issue? Because even with same network you might need to allow sql server port to access` – Panagiotis Kanavos May 17 '22 at 07:29
  • Have you checked the firewall side any issue? Because even with same network you might need to allow sql server port to access – Kumaresan Madhaiyan May 17 '22 at 07:24

0 Answers0