Невозможно подключиться к sql server ошибка 26

This issue also confused me a few days, after the IT guy changed some security settings on the SQL Server.

I have an EntityFramework for the Web application and for a desktop application.

After I changed some settings on the SQL Server, the Web application comeback to work, but the desktop still facing issue. But I used the same connection string for both applications, it make no sense one is working but the other doesn’t.

Then I searched a lot until I found someone saying here it is needed to add port number 1433 after the $ServerName\$DatabaseInstanceName,1433.

After I added it, the exception became:

System.Data.SqlClient.SqlException: Login failed for user
‘domain\name-PC$’

Then I found this link. It says to add Trusted_Connection=False;.

The whole connection string should be like:

data source=XXXXX\SQLSERVER,1433;initial catalog=XXXDB;user id=UserID;password=PWD;Trusted_Connection=False;MultipleActiveResultSets=True;

Hope this answer will help the ones out off Generic exception:

Error: 26-Error Locating Server/Instance Specified

For me the issue was that the DNS record was wrong…

The following, which proved very helpful, is largely taken from this blog post.

This error message is actually pretty specific and the solution quite simple.

You get this error message only if you are trying to connect to a SQL Server named instance. For a default instance, you never see this 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 default TCP port 1433, default pipe name for Named Pipes.

Every time a 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 this information the client does not know how to connect and it fails with this 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. In order to isolate the exact issue follow these 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. (Be aware that some applications convert \ to ).

  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 the SQL Browser service is running on the server.

  5. If the firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

There is one corner case where you may still fail after you checked steps 1 to 4. It also may happen when:

  1. your server is a named instance on cluster or on a multi-homed machine
  2. your client is a Vista machine with Firewall on.

A tool which could prove useful (it did for me) is PortQry. 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 possible issues such as an incorrect 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].

Microsoft recently released a guided walk through that can serve as a one stop shop to troubleshoot a majority of connectivity issues to SQL Server: Solving Connectivity errors to SQL Server

This issue also confused me a few days, after the IT guy changed some security settings on the SQL Server.

I have an EntityFramework for the Web application and for a desktop application.

After I changed some settings on the SQL Server, the Web application comeback to work, but the desktop still facing issue. But I used the same connection string for both applications, it make no sense one is working but the other doesn’t.

Then I searched a lot until I found someone saying here it is needed to add port number 1433 after the $ServerName\$DatabaseInstanceName,1433.

After I added it, the exception became:

System.Data.SqlClient.SqlException: Login failed for user
‘domain\name-PC$’

Then I found this link. It says to add Trusted_Connection=False;.

The whole connection string should be like:

data source=XXXXX\SQLSERVER,1433;initial catalog=XXXDB;user id=UserID;password=PWD;Trusted_Connection=False;MultipleActiveResultSets=True;

Hope this answer will help the ones out off Generic exception:

Error: 26-Error Locating Server/Instance Specified

Methods to Resolve SQL Server Error 26

SQL network interfaces error 26

Users often see “SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified” error message while connecting to SQL Server. This error 26 SQL server is quite common nowadays as a lot of users are complaining about it.

SQL Server Error 26

SQL Server Error 26 occurs when users trying to connect to a SQL Server named instance. The reason of the SQL Server Error 26 is the client stack could not receive SSRP response UPD packet from SQL Browser. Now, there a few ways to solve SQL network interfaces error 26 in a smart way. Stay tuned to know the best way.

Table of Content

  1. Quick Steps Guide
  2. User Queries
  3. Windows Firewall Method
  4. Other Causes of Error 26
  5. Automated Solution
  6. FAQs

Tip: Fix SQL Server Management Studio Error 40

SQL Error 26 Quick Solution in 5 Steps

  1. Downlaod & Launch tool in your PC
  2. Click on Open to Add database files
  3. Select Quick or Advance Scan mode
  4. Select Settings & Destination Location
  5. Click on Export button to get your results

SQL Network Interfaces Error 26 – User Queries

Now, we can say that this SQL network interfaces error 26 is occurs in the situation when a user tries to connect to an SQL server named instance through SSMS & faces issues with the same. The reasons behind these issues are quite technical & though users are not proficient enough to understand these they feel stuck in the situation.

Fix SQL Server Error 26

You have to create an incoming rule that allows traffic from all promising IP addresses that are configured for the failover cluster instance and from all possible IP addresses of the remote server. For this, just follow the below steps. We’re sure that this way users can easily get rid of this SQL network interfaces error 26 for sure.

    • Open Adminstrative Tools, from Control Panel to begin solving error 26 SQL server
    • In Adminstrative Tools, click on Windows Firewall with Advanced Security
    • Under Windows Firewall with Advanced Security on Local Computer column, click on the Inbound Rule and then select New Rule from the right pane

Windows Firewall with Advanced Security

    • From New Inbound Rule Wizard window, select Custom and then click on the Next button

Select Custom

    • Under Does this rule apply to all programs or a specific program? select All programs then click on Next button

Select All Program

    • Form Protocol type list, select Any and then click on Next button

Select protocol to fix error 26 SQL server

    • Under Which remote OP addresses does this rule apply to? select These IP addresses and then click on Add button

Select These IP Addresses

    • In IP Address dialog box, under This IP address or subnet type the IP address and then click on Ok button

IP Address

    • Under What action should be taken when a connection matches the specified conditions? select Allow the connection and then click on Next button

click next to SQL network interfaces error 26

  • Click on the Next button to complete the New Outbound Rule Wizard steps

Other Possible Causes of SQL Server Error 26 with Solution

SQL Server does not allow remote connections

  • To resolve the SQL Server Error 26 open SQL Server Management Studio, Right click on the database and select properties
  • On Security page, select SQL Server and Windows Authentication mode and click on Ok button
  • Restart SQL Server

If you are still facing the Error 26, then there could be a same name conflict between two systems. Check whether the computer name, system name is same if yes, then try to system using its IP address. In addition this error 26 occurs with several issues that are mentioned below:

  • SQL network interfaces, error: 26 – error locating server/instance specified
  • provider: SQL network interfaces, error: 26 – error locating server/instance specified
  • a network related or instance specific error in SQL server error 26

Experts’ Recommended Solution to Counter Errors Causes Due to Corruption

Now when there is some sort of data corruption issues present in the server, the SQL database might react differently than what it should usually do. Therefore, experts often suggest users to get the automated repair & recovery tool.

Downlaod the tool & then follow easy steps to repair damaged data & solve SQL network interfaces error 26 with ease. In addition, if you want to know how to make SQL server faster then this tool can remove corruption as well. Ultimately resulting in a faster server.

Download Now Purchase Now

Step-1. Launch the Tool in your system & then Click the Open button.

select open button

Step-2. Select the Quick or Advanced Scan Mode as per your need.

Select mode

Step-3. Set the SQL Server database details to continue further.

Set Server

Step-4. Finally, Click on the Export button to finish the task.

export to fix sql server error 26

Frequently Asked Questions

Q-1. What is connection error 26 in SQL Express?

A: It is crucial for users to ensure that the name of their server is correct & no typo on the name is present. Always make sure that your SQL browser service is running on the server in case you are trying to connect SQL instance on another server. Your machine should be reachable.

Q-2. How do I fix error code 26?

A: The device drivers of your system are closely connected to the error 26. Removing all external devices can be a solution too here.

Q-3. What is SQL Server error 26 client unable to establish connection because an error was encountered during handshakes before login?

A: The most common reason for this is when a client connects to a unsupported version of SQL Server. Here the the error occurs because the server is too busy to accept the new connections. In some cases, resource limitation is also an issue where maximum allowed connected are pre defined.

Q-4. How do I fix SQL query error?

A: There are 4 steps to fix SQL query error as mentioned below:

  1. Navigate to the failing line in SQL query.
  2. Check failing SQL syntax in SQL query.
  3. Check query logic in joins, subqueries, or CTEs.
  4. Go to troubleshooting error messages to finish.

Q-5. How to restart SQL Server?

A: Go to SQL Server Configuration Manager >> Select SQL Server Services, Right Click a named instance or SQL Server> Select from Start, Stop, Pause, Resume & Restart options.

Q-6. How do I allow remote access to SQL Server database?

A: 5 Steps to allow remote access to SQL Server database:

  1. Start SSMS (SQL Server Management Studio)
  2. Go to Object Explorer & Right Click on Server
  3. Select Properties & then Click Connections
  4. Enable Allow Remote Connections to this Server
  5. Click on Ok to save & Finish the task.

Error Description:

SQL server error 26- Unable to connect to SQL Express Error: 26-Error Locating Server/Instance Specified

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) (Microsoft SQL Server, Error: -1)

Error Details: this sql server error 26 error locating server instance message is often encountered when connection to a SQL Server is tried and don’t know where to start to solve the problem.

We get this sql server error 26 error message only when we are trying to connect to a SQL Server named instance.

Every time we try to make 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 sql server error 26 error locating server instance.

Other Errors related:

provider: named pipes provider, error: 40 – could not open a connection to sql server which is covered here.

Solution:

7 ways for resolving the sql server error 26 which is for connecting from Windows PC/Client to Windows server/SQL Server (server with SQL Server installed) and are getting the sql error 26 above then we need to check following:

On Windows SQL Server if we are trying to connect to Named instance then 1-2 steps are related. If default instance then all other steps for resolving sql server error 26 error locating server instance

  1. Make sure the the Windows service called “SQL Server Browser” is started.
  2. Make sure Windows Firewall is enabled for incoming port UDP 1434 that is we need to put sqlbrowser.exe and/or UDP port 1434 into exception.
  3. Make sure Windows Firewall is enabled incoming port TCP 1433. Below are steps in general for exceptions in firewall.
    1.  You must build an incoming rule that accepts traffic for SQL Server or from all IP addresses defined for the failover cluster instance, as well as any possible distant server IP addresses. To do so, simply follow the steps below.
      1. From the Control Panel, go to Adminstrative Tools.
      2. Select Windows Firewall with Advanced Security from the Administrative Tools menu.
      3. Click Inbound Rule in the Windows Firewall with Advanced Security on Local Computer column, then New Rule in the right pane.
      4. Advanced Security for Windows Firewall
      5. Select Custom from the New Inbound Rule Wizard box, then click the Next button.
      6. Choose Custom.
      7. Is this regulation applicable to all programmes or just one in particular? After selecting All Programs, click the Next button. All Programs should be selected
      8. Select Any from the list of protocol types, then click the Next button.
      9. Choose a protocol type
      10. Which remote IP addresses are affected by this rule? After selecting these IP addresses, click the Add button.
      11. These IP Addresses Should Be Considered. Type the IP address under This IP address or subnet in the IP Address dialogue box, then click the Ok button.
      12. When a connection meets the required criteria, what action should be taken? Allow the connection to be established, then click the Next button.
      13. Allow the connection to happen. Select Next from the drop-down menu.
  4. Make Sure in SQL Server Configuration Manager that TCP/IP protocol is enabled and is set to to 1433(can be changed if needed)
  5. Make sure your server name is correct that is no typo on the name.
  6. Make sure your instance name is correct and there is actually such an instance on your target machine.
  7. Make sure the server machine is reachable that is DNS can be resolved correctly and we are able to ping the server (not always true as ping is disabled sometimes for security).

Additional Solutions for SQL server error 26

Make sure your database engine is configured to accept remote connection. Right click on instance to go to properties page and make sure its enabled to accept remote connections.

If we are connecting to a named SQL Server instance, make sure that instance name in your connection string is right. Usually the format needed to specify the database server is Servername\instancename or in your connection string is right format with right instance name.

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Невозможно переместить файл код ошибки 146 adobe
  • Невозможно отправить смс мтс ошибка 38
  • Невозможно отправить сообщение ошибка 28 теле2
  • Невозможно открыть набор папок outlook ошибка операции клиента
  • Невозможно открыть файл базы данных системная ошибка 2147287037

  • Добавить комментарий

    ;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: