SQL connection Error ERROR:40

Source: Internet
Author: User

Ready to do a database migration today, open SQL Server 2008 SQL Server Management Studio, enter the password discovery for SA, unable to log into the database? The following error is prompted:

"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 connection to SQL Server) "sometimes error:26

On the internet to see others said to use the server (local) to replace the cost of localhost, but still no, and then reset the IP itself. Specific as follows:

1. Open SQL Server Management Configurator

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/1E/wKiom1SRnqXTz68yAAFvIKXUzRg337.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiom1srnqxtz68yaafvikxuzrg337.jpg "/>

or enter at the command line: sqlservermanager10.msc

2, click on the MSSQLServer protocol, on the right side of the page select TCP/IP protocol 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/57/1E/ Wkiom1srntgyhaz6aafh40f2bve242.jpg "title=" 2.jpg "alt=" Wkiom1srntgyhaz6aafh40f2bve242.jpg "/>

3, right click on the TCP/IP protocol, select "Properties", you need to modify the port address of the connection database

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/1C/wKioL1SRn33iSyw2AAFo6VpVapU862.jpg "title=" 3.jpg " alt= "Wkiol1srn33isyw2aafo6vpvapu862.jpg"/>

4, jump out of the dialog box, there are many TCP/IP ports, find "IP3", change the IP address for their own computer's IP address (or 127.0.0.1) on the TCP port to add 1433, and then select Start

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/1E/wKiom1SRnuyypUh4AALkQ6Zf9UQ227.jpg "title=" 6.jpg " alt= "Wkiom1srnuyypuh4aalkq6zf9uq227.jpg"/>

5, "IPALL" all the ports changed to "1433"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/1C/wKioL1SRn57CS63rAALkQ6Zf9UQ005.jpg "title=" 6.jpg " alt= "Wkiol1srn57cs63raalkq6zf9uq005.jpg"/>

6. Restart the service

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/1E/wKiom1SRnxiQMdRMAAKH0b8t2mM662.jpg "style=" float: none; "title=" 7.jpg "alt=" Wkiom1srnxiqmdrmaakh0b8t2mm662.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/57/1C/wKioL1SRn7mz0jIzAAKlnV5oIuo567.jpg "style=" float: none; "title=" 8.jpg "alt=" Wkiol1srn7mz0jizaaklnv5oiuo567.jpg "/>

7, through the above 1-6 steps to set up a good port, reopen SQL Server Management Studio, the server name input: (local) or 127.0.0.1, you can log into the database.


This article from "Dream Xiang fans" blog, please be sure to keep this source http://dnswan.blog.51cto.com/1929050/1591209

SQL connection Error ERROR:40

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.