原文链接:https://blogs.msdn.microsoft.com/sql_protocols/2007/05/13/sql-network-interfaces-error-26-error-locating-serverinstance-specified/

Users often see this error message when connection to a SQL Server and don't know where to start to solve the problem. In most forums, people says this is because remote connection is not enabled on the server. This is not exactly correct. Actually, this error message give customers very specific information and the solution is quite simple.

First of all, you get this error message only if you are trying to connect to a SQL Server named instance. For default instance, you never see this. Why? Because even if we failed at this stage (i.e. error locating server/instance specified), we will continue to try connect using default values, e.g defaul TCP port 1433, default pipe name for Named Pipes. You may see other error message due to failure later, but not this error message.

Every time client makes a connection to SQL Server named instance, we will send a SSRP UDP packet to the server machine UDP port 1434. We need this step to know configuration information of the SQL instance, e.g., protocols enabled, TCP port, pipe name etc. Without these information, client does know how to connect the server and it fails with this specified error message.

In a word, the reason that we get this error message is the client stack could not receive SSRP response UDP packet from SQL Browser. It's easy to isolate the issue. Here are the steps:
1) Make sure your server name is correct, e.g., no typo on the name. 
2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \ to . If you are not sure about your application, please try both ServerInstance and Server\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true). 
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

Once you are done the steps, you should not see this error message anymore. You may still fail to connect your SQL server, but error message should be different and you have a different issue now. [Update: If it still fails, you may replace serverinstance with tcp:serverinstance and/or np:serverinstance and see if it succeeds with either TCP or NP protocol. That way, you can isolate the issue a little bit. ]

There is one corner case where you may still fail after you checked step 1)-4). It happens when a) your server is a named instance on cluster or on a multi-homed machine, and b) your client is a Vista machine with Firewall on. I have explained the details at: Unable to connect to a SQL Server named instance on a cluster

[Update May 2009] My collegue found a good tool online which could be very helpful for users to isolate issues related to this error message. You can download PortQry from http://support.microsoft.com/kb/832919, run "portqry.exe -n yourservername -p UDP -e 1434". If this command returns information and it contains your target instance, then you can rule out possiblity 4) and 5) above, meaning you do have a SQL Browser running and your firewall does not block SQL Browser UDP packet. In this case, you can check other issue, e.g. wrong connection string.

As a final note, the error message for the same issue when you use SNAC is: 
[SQL Native Client]SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

If you still see this error, please post questions at MSDN SQL Server Data Access Forum:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=87&SiteID=1 
Please mention you already read this post and confirm steps you have taken and the results of each step.(e.g. serverinstance,etc)

SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified相关推荐

  1. provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错

    1.错误描述 ===================================无法连接到 SKY-20160824VTF\SQLEXPRESS.========================= ...

  2. provider: SQL Network Interfaces , error: 26 - Error Locating Server / Instance

    在 ASP.NET 中使用了角色管理机制(System.Web.Security.Roles )连接数据库时出现了如下错误: 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误. ...

  3. provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

     https://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error ...

  4. provider:SQL Network Interfaces,error:26 - 定位指定的服务器/实例时出错--错误原因及解决办法

    问题截图: 错误 错误原因一 未启动SQL服务 错误原因二 数据库和VS自带的LocalDB有冲突: 导致远程过程调用失败:(需要卸载VS中的LocalDB) 方法 解决办法一 启动SQL Serve ...

  5. SQL Network Interfaces error: 26

    解决办法:单击windows操作系统"开始"菜单,单击"运行"并输入services.msc 或者进入任务管理器中找到"服务(S)"点击进入 ...

  6. SQL Server 2008 R2:error 26 开启远程连接详解

    远程连接sql server 2008 数据库,出现下面的错误: <--在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误.     未找到或无法访问服务器.请验证实例名称 ...

  7. SQL Server provider: SQL 网络接口, error: 26 - 定位指定的服务器/实例时出错

    在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误.未找到或无法访问服务器.请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接. (provider: SQL ...

  8. Oracle Caused by: java.sql.SQLException: sql injection violation, syntax error: syntax error, expect

    参考:https://blog.csdn.net/qq_36326332/article/details/102938147 https://blog.csdn.net/fly_captain/art ...

  9. 毕业设计Spring boot问题记录(后端三):java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax;

    原创博文,欢迎转载,转载时请务必附上博文链接,感谢您的尊重 报错情况 intell IDEA调试台报错 Caused by: java.sql.SQLSyntaxErrorException: You ...

最新文章

  1. idea显示初始界面_Python基础 PyCharm 的初始设置
  2. 堆排序(基于完全二叉树)
  3. VScode 1.4新版功能
  4. win11如何退出磁贴桌面 Windows11退出磁贴桌面的设置方法
  5. 2021杨铭杰高考成绩查询,谁知道汕头一中2007年高考成绩的概况
  6. Linux命令拆分csv文件,linux – 如何剪切CSV文件
  7. 面试官:你觉得扫码登录应该怎么实现?
  8. Web压缩问题-图片不显示
  9. tbc新服务器没消息,暴雪蓝贴官宣TBC怀旧服2021年内上线,所有服务器直升70级
  10. GPU与CPU的区别
  11. 程序员 不经历风雨,怎么见彩虹
  12. c语言中常量有何作用,正确的C语言常量是什么?
  13. MATLAB 用高斯消元法求解线性方程组
  14. iOS 审核总被拒?如何提升 iOS 审核通过率!
  15. 「认识AI:人工智能如何赋能商业」【10】大数据基本概念
  16. IIS WebDAV安全配置
  17. The 2020 ICPC Asia Shenyang Regional Programming Contest I题 Rise of Shadows(数论)
  18. C# 拼音转换-工具类
  19. 对比学习知识扩展——一堆奇奇怪怪的loss,快把我压死了orz...
  20. excel中如何实现提取汉字的拼音首字母

热门文章

  1. 山东大学软件学院计算机组成原理课程设计整机实验(2)
  2. 计算机显示磁盘0是什么意思,win10磁盘百分百,win10磁盘0是什么意思
  3. 2020年第二届“长安杯”电子数据取证竞赛--学习记录(参考官方复盘)
  4. SJ中的json 及多维json
  5. day2学python 数据类型+深浅拷贝+循环
  6. oracle asm磁盘标签丢失导致整个集群和数据库启动失败
  7. Python解题 - 硬币的面值
  8. Ubuntu16.04 安装配置深度学习配置:GPU加速 Cuda+cudnn+opencv+caffe
  9. Linux 系统设置 : enable 命令详解
  10. 微信小程序轮播图、焦点图-swiper