Yesterday used SQL statement to build a table when writing a piece of code, for the logic and content of the code I am not sure right, anyway, it is not hesitate to let it execute, the process appeared several errors, then did not care too much, think of a big mistake to rewrite one, the result ... Play broke, from yesterday to now more than 10 hours, SQL Server no discussion for me to strike! Thus, the long road to "finding the wrong" has begun.
First look at the error message:
1. Past experience I first opened the SQL Server Configuration Tool--Configuration Manager, to check if the protocol was turned on, and I made another mistake. Because do not know what those agreements really mean, simply all enabled, the results can be imagined, the database is still open (but does not affect continue to find the wrong ...) ), in the process of finding the error later in this pass correction in order to disable
2. Then look at the TCP/IP properties-->tcp whether the dynamic port is empty, TCP port is 1433, there is basically no problem after checking
3. Find some relevant solutions on the Internet, which is solved by computer----------------with the service and application. Here about the SQL service does not know what the meaning of the second time All open (later on the Internet query, these can be turned on), but in the start of two services when there is a problem: unable to start.
Error message 1) is due to not disabling via in 1.
Error message 2) is because it is dependent on 1), 1) cannot be opened without opening it. This logical relationship is simple, mainly its error message is too big, plus I have not paid attention to this dependency, directly led me in countless wrong heap search.
At this point finally opened my SQL Server2008, the mood is too excited! In solving this problem, there are students with a DOS command to solve, give me the feeling is too cool, but did not solve, those commands are not very clear what meaning, so or from a simple interface to it. These solutions may not be suitable for your problem, but you can refer to them and also welcome to exchange more questions about SQL.
PS: In the process of finding a solution to see a lot about the "Configure SQL Server Authentication method" problem, if you also encounter a similar situation, you can see my blog in NetEase
http://m15369659554.blog.163.com/blog/static/211344045201362384136562/