Another SQL Server attack

Source: Internet
Author: User

The layer-3 instance indicates the login function of the charging system of the data center. After SQL server2008 is installed, the instance cannot be connected. Neither SA account nor Windows authentication can be used to log on to SQL Server. However, I encountered this problem before and wrote a blog record. (Http://blog.csdn.net/zhuojiajin/article/details/8189367) after this problem is solved, I thought it was done, the result is: Just out of the wolf nest and into the tiger point, I got stuck for two days.

Problem: In vs, Code cannot be used to connect to the SQL server. It cannot be used either ".", "local", "localhost", or an IP address.

The connection string has been checked for countless times and cannot be connected by directly copying the character string of the student. But can connect to his database. So it is inferred that it is a problem with my SQL database service. As a result, the network protocol services TCP/IP and named pipes do not work either. No answer was found in the borrowed book ADO. net2.0 technical insider.

At this time, I connected the database with a connector of Vs and connected it. I checked the connection string and found that my data source is not the default name. I changed the Instance name when installing SQL. Therefore, you can use "database instance name \ Server Name" to connect to the database. However, ".", "local", and "localhost" cannot be connected. Finally, I found a blog post about vs settings. Because vs has the default database instance name, the above fields can be used to replace the database instance name. It also changed the settings and still failed.

So I invited Mr. Shuijing to help me look at it. The final conclusion is that after I changed the Instance name, the default vs items cannot replace data source. Okay, I owe it! Then I discovered that I could connect to the database as follows: ". \ database server name", "Local \ database server name", and "ip address \ database instance name ". It is troublesome, but it is actually usable.

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.