开发者

error 26 on sql server

I have 开发者_运维问答prepared a program with Visual Basic 2010 and am using SQL database. (service based database) it works properly. But sometimes (when i dont use computer for a period like 2 hours) I try to start my program on VB (F5), it waits, and then gives this error:

A network-related or instance-specific error occured while establishing a connection to SQL Server. The server was not found or is not accesible. Verify that the instance name is correct and that SQL Server name is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified.)

However, after restarting my computer one or two times, there is no error: it works well. I have googled it, but nothing helps. I'm afraid this error will be a problem when the user uses the program. How might I solve this?


This might help you SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified


This error occurred due to following possible reasons

SQL Server does not allow remote Connection

Solution: Check the remote connection is enabled for instance.

  1. Right Click on SQL server instance from SSMS > Properties > Connections
  2. Select allow remote connection to this server. Enter the maximum number of concurrent connection you want to allow (0 is for unlimited number of connection to server)
  3. Click ok.
  4. Also Make sure SQL Server Browser services is running

Firewall Settings

Your Firewall may not be turned off or no exception is handled.

SQL server is using UDP port 1434. Consider the following steps to check which UDP port it is utilised by SQL server instances

  1. Click on Start > All Programs > Microsoft SQL Server 2008/R2 > Configuration Tools > SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for SERVERNAME
  2. Right Click on TCP/IP from right hand pane > Properties > Select IP Addresses from the Tab

Check that both systems are getting cross ping.

  • Click Start > Run > Type Ping IP address of remote System
  • On system 1, ping IP address of System 2
  • On system 2, ping IP address of system 1

If both the systems are getting reply then it means there is no problem in network. Else check your antivirus firewall or disable antivirus for few minutes. Now if you still don’t get a reply then network has a problem. Else you will be able to connect to the remote server.

Same name conflict between two systems

There could be a same name conflict between two systems. Check that the remote machine name (you are trying to connect) is not same as your syetem’s name. For Example your system name is Local Remote System name is also Local

Or

Your system name is admin Remote System name is also admin

If this is the case you will get error 26. This problem is due to same name conflict. Try to connect to remote system using IP Address. IP address of each system in network is always unique.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜