Network-related or instance-specific errors that occur when a connection to SQL Server is established

Source: Internet
Author: User
Tags microsoft sql server

The client encountered a problem when connecting to another named instance remotely with "server name \ Instance Name" The connection failed, reporting "a network-related or instance-specific error occurred while establishing a connection with SQL Server, the server was not found or could not be accessed." Verify that the instance name is correct, and that SQL Server is configured to allow remote access connections. (Error provider:sql Network interfaces,error:26-locating the specified server/instance) ".

    1. First, the attempt to connect with the IP and port number, found that can be connected, indicating that the instance is running properly, not because the instance is not open to prevent the connection, if this connection fails, you need to check whether the instance started and whether to open allow remote connection;
    2. Try to use "server name, port number" to connect, can still connect, you can determine not because the server name resolution IP caused the connection failure, if the connection fails with this method, you need to add the corresponding server name and IP in the host record;
    3. Then this can be locked because the "server name \ Instance Name" Connection to the remote named instance cannot be resolved to the other's port number, resulting in the inability to connect.

Well, in SQL Server, we usually use "server name \ Instance name" When connecting a DB instance, how to connect. Here you have to mention a service: SQL Server Browser service. The client is connecting to SQL Server, and if you are using the TCP/IP protocol, you must specify the port that SQL Server is listening on. After SQL Server Browser is started, it starts and uses UDP 1434 ports. The SQL Server Browser reads the registry (all HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL. X\mssqlserver\super-socketnetlib), identify all instances of SQL Server on the computer, and indicate the ports and named pipes they use. When a server has two or more network cards, SQL Server Browser returns the first enabled port it encounters for SQL Server.

When a SQL Server client requests a SQL Server resource, the client data driver uses port 1434 to send a UDP message to the server, and SQL Server Browser responds to the TCP/IP port or named pipe name of the request instance. The client data driver then sends a request to the server to complete the connection using the port of the desired instance or a named pipe. When the SQL

When the Server Browser service is not running, you can still connect to SQL Server if you provide the correct port number or named pipe. If the default instance of SQL Server is running on port 1433, you can use TCP/IP to connect to this default instance.

After understanding how SQL Server Browser is running, let the customer see if the service is not enabled, but the client is still unable to connect with "server name \ Instance Name" When it is enabled, and again it is inferred that the UDP 1434 port is disabled and the connection is OK after the port is opened.

Network-related or instance-specific errors that occur when a connection to SQL Server is established

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.