Unable to open SQL Server connection

Source: Internet
Author: User

Computer room toll System reconstruction version of the landing knocked for several days, finally the landing form knocked out, code debugging almost, the problem is in the database.

SQL Server in configuration management. SQL Server The service started, but still reported the error: a network-related or instance-specific error occurred while establishing a connection to 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 connections. (provider:named Pipes provider, error:40-Unable to open connection to SQL Server)


There is no connection on the database, depressed, depressed can not solve the problem, check Bai. Finally found a solution.

Steps to resolve:

First step: Start SQL Server network configuration inside the tcp/i, and put IP address change to your own IP address, TCP Port is 1433.



Step two: Open SQL Server , right-click -----> aspects. Change the contents of the server configuration and the perimeter application configurator.

server configuration inside the remoteaccessenabled , remotedaenabled also have remoteproctransenabled set All to True


inside the perimeter application configurator remotedaenabled set to True


The next step is to create an exception in the firewall. The next step is to create an exception in the firewall, open the Control Panel-system and security-Windows Control Panel-allowed programs.

Find yourself SQLServer.exe where the file directory is added (here the path is based on the different and different installation of each person, as long as it can be found)

Add complete.


finally , the pro-boot. SQL Server in configuration management. SQL Server service.

Let's see if my system can connect to the database.


No problem, landing successfully.

A landing, tossing a few days, from three to seven layers, using the appearance mode, abstract Factory, reflection, configuration files, stored procedures and sqlhepler, etc. have all tried again. Big and small problems have a lot, but always toss over. The various functions behind it are still more in-depth understanding of the content and continue to learn.


Related Article

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.