SQL connection error (Microsoft SQL Server, error: 2)

Source: Internet
Author: User

I wrote a piece of code when I used SQL statements to create a table yesterday. I am not sure about the logic and content of the code. I did not hesitate to execute the code, there were several errors in the process. At that time, I didn't care too much about it. I thought it would be a big deal. I wrote another one. The result ...... I had a bad time. From yesterday to now, SQL Server went on strike without discussion! As a result, a long "wrong searching" road begins.

Let's take a look at the error message:

1. from past experiences, I first opened the SQL Server Configuration tool --> Configuration Manager and checked whether the protocol was enabled. Then I made another mistake. Because I don't know what the protocols mean, I simply enabled them. As a result, I can imagine that the database still cannot be opened (but it does not affect the continued troubleshooting ......), In the later process of finding an error, correct VIA here to disable

2. Check the TCP/IP properties --> whether the dynamic TCP port is null and the TCP port is 1433. After the check, there is basically no problem.

3. Some related solutions have been found online through the computer> Management> services and applications. Here, I don't know what the SQL service means. I simply enable all the SQL services for the second time (after I went online to query them, they can all be enabled ), however, when the two services are being started, another problem occurs: the service cannot be started.

Error Message 1) Because VIA is not disabled in 1.

Error Message 2) because it is dependent on 1) and 1) cannot be enabled without enabling it. This logical relationship is simple. The error message is too high. In addition, I did not pay attention to this dependency, which directly leads me to search for it in countless error heaps.

So far, I finally opened My SQL Server2008, so I am so excited! Some people used the DOS command to solve this problem. It gave me the feeling that it was too cool, but I couldn't solve it. What did those commands mean, so let's take a look at the simple interface. These solutions may not be suitable for your problem, but you can refer to them.

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.