IP Connection SQL Server failed (configured as string failure) graphic resolution _MSSQL

Source: Internet
Author: User
Tags microsoft sql server 2005
Failed using IP to connect to SQL Server or configured as a connection string

Scenario One: when in Webconfig used in Files

<add key= "ConnectionString" value= "server=127.0.0.1;database= database name uid=sa;pwd=1"/> To connect to the database, and found that the landing is not normal landing, There was a whole bunch of mistakes;

Scenario Two:

Or, when connecting to SQL Server, enter IP as follows:

Hint that you cannot connect or connect incorrectly.

Solution :

First step: Check TCP/IP did the protocol start:

In the Start menu, locate the Configuration tool at Microsoft SQL Server 2005 Open SQL Server Configuration Manager Click, select SQLExpress protocol, on the right "TCP/IP" To see if disabled is displayed, double-click it to enable it:

Step two: Select "MSSQLSERVER protocol" and also enable "TCP/IP"

Step three: Select its child node "client protocol" at SQL Native client configuration to see if the "TCP/IP" protocol on the right is enabled, no, and then enable it:

Fourth step: Double-click the TCP/IP protocol to view the properties panel to see if it listens to the "1433" port

Fifth Step: Finally restart the computer ~ ~ Test Landing ~ ~ ~ ~ ~

Additional:

If you find that you cannot use "local" or "localhost" to log in

Solution :

Open the C:\WINDOWS\SYSTEM32\DRIVERS\ETC path and find

Hosts file;

Then use Notepad to open and see if there is anything like:

Copy Code code as follows:

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost

If not, add it below;

Then restart the computer ~~ok ~ ~

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.