SQL Server database attach failed: Error 5120 and error 950

Source: Internet
Author: User

again knock machine room, want to refer to the previous physical model, the results in the attached database this link appeared some problems, summarized below.

1. Additional database failure, error 5120



For this kind of mistake, I collected on the net, mainly has the following several kinds of solutions:

Method One: Copy the file that you want to attach to the default data directory of SQL Server, C:\ProgramFiles\Microsoft SQL Server\mssql11. Mssqlserver\mssql\data, this time the attach will succeed.

Method Two: When logging on, select Windows Authentication instead of SQL Server authentication.

Method Three: Change the MDF and LDF file settings to Full control.

Method Four: If you must use SQL Server Authentication, change the permissions on the login account to have full operational permissions to attach the file and change the SQL Server service account logon identity to the local service.

I met a third case.


2, database attach failed, error 950



For this mistake, oneself tangled for a long time, in the online check also wood has the solution, finally asked an experienced classmate to be able to solve. The version of the attached database is SQL Server2005, and I am using SQL Server2012,sql Server2012 is compatible with SQL Server2008, but not SQL Server2005.

WORKAROUND: Add the SQL Server2005 database with SQL Server2008 and regenerate the script so that SQL Server2012 can be appended.

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.