vs or SQL server2012 problems connecting to SQL Server: A connection was successfully made to the server, but an error occurred during login

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

The previous connection was normal, not even on these two days. ( no patience to look at the end of the solution directly)

The error message is as follows:

1. Attempt to read or write protected memory. This usually indicates that other memory is corrupted. (System.Data)

2. The connection to the server was successfully established, but an error occurred during the login process. (Provider:ssl provider,error:0-received a message exception, or is not in the correct format.) ) (Microsoft SQL Server)

Then the management collapsed.

No way, then use the Server Explorer connection in the VS, the results can be imagined, where vs version 2008,2010,2012,2013 all crashed. No words, how to do, contact server customer service, said a half-day, no way, under a SQL server2008 client to try, did not expect to really connect on.

This is not the climax, the climax is I write code found ExecuteNonQuery () execution times the same error, what to do, the eggs are broken ... System.Data.SqlClient are not used. Anger, replaced by System.Data.OleDb, a miracle appeared, OK.

This look reminds me, and then I set up the data source provider in Server Explorer for VS:

The result should be guessed, normal.

See here you must think Tangled finally ended, wrong, SQL Server 2012 or not, ah, landing interface options do not set the data source provider where, how to do? Look at the Internet. Using management to connect to other databases, such as connecting to Oracle, you can use linked server connections to configure ODBC. The Pit Dad is ODBC is all done, the test has been successful, but here is the failure.

Not yet. From SQL Server Management Studio connection, who know to help me under, I updated to the article, I hope the back step on this pit smooth, do not waste time on it.

Long winded so much, I first give a temporary solution, followed by add:

    1. Using SQL Server 2008 clients
    2. Use System.Data.OleDb instead of System.Data.SqlClient in your program

Append:

Thanks to Hedon solution, verified that the thunderbolt caused by the exception, uninstall all the products Thunderbolt, the problem is resolved.

Doubts are also before the use of thunder, perhaps the Thunder automatically updated some components caused, remember when win8 just out, Thunder also caused IE10 collapse. The specific principle is unknown, first of all.

Thanks Jaypgcool: Maybe Thunderbolt changed some of the Winsock settings, reset the Winsock on OK, command: netsh winsock reset

vs or SQL server2012 problems connecting to SQL Server: A connection was successfully made to the server, but an error occurred during login

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.