Attach database failed for server xxx

Source: Internet
Author: User

? ? ? ?? recently in learning Mvc+ef, watch the video demo. EF this piece needs to involve the connection of the database, the example in the video is similar to the previous Beef Brisket news system database.

So, just steal a lazy, use this database, but in the attach time error.

???? errors such as the following:

??

?

??? At the beginning, there was a problem with the location of the database. So once again, a position is placed. is still invalid.

At last. Search the Internet for solutions.

Fortunately, this kind of problem is actually met, and there are several ways to solve it. I took two ways to share it:

? ? Method One:

Copy the file you want to attach to the default Data folder in SQL Server, and the attach will succeed. The path that you installed

? ? Method Two:

???? Use window to log in, do not use the SQL Mixed authentication mode login, also can attach the database.


? ? Both of these methods can be achieved, and as for the other methods, we can try them out.



Attach database failed for server xxx

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.