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.

Source: Internet
Author: User

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. When you use the G2 service, test the server connection, and the results are experiencing this problem.
Problem Detail: Connection Test failed! : 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 pipe provider, ERROR:40-Unable to open a connection to SQL Server). Native configuration: Win7 system, SQL Server R2 database, test database connection using G2 service in 360 browser tests. First, you see that the database has allowed remote connections, and the database connection string is also filled in correctly. PS: Connect friend database is OK. Searched for some answers on the web. One of the first methods: Enter Services.msc in the run to see if the SQL service is all turned on.
Starting all the SQL-related services that can be started is complete, and still does not resolve the issue.
The second method: Set TCP/IP in Configuration Manager, Port set to default of 1433.
After the SQLEXPRESS protocol is set to 1433, an error occurs when restarting SQL Server (SQLEXPRESS).
And then you can't start it again.
Finally found a good friend to help, finally solved the problem. The settings are: Change SQL Server (SQLEXPRESS) TCP/IP
8099 of these are the ports that are set arbitrarily (also in the firewall settings later). You can start SQL Server (SQLEXPRESS)
Open the firewall in the Control Panel and click Advanced Settings. Click Inbound Rules, create a new rule
Select Port, Next
Enter the previous port 8099, next
Allow connections by default, next
Default, Next
Enter a name of 8099 (optionally named) to complete.
Back to the Advanced Settings screen
Database Test succeeded
your support is my inexhaustible motivation. If there is a mistake, please correct it.
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.