again knock machine room, want to refer to the physical model, the result in the attached database this link appeared some problems, the following summary.
1. Additional database failure, error 5120
For this kind of mistake, I collected on the net, mainly has the following several methods to solve:
Method One: Copy the file you want to attach to SQL Server's default data folder, 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: Assume that you must use SQL Server Authentication, change the permissions of the login account so that it has full operational permissions to attach files and change the account login identity of the SQL Server service 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 only to be able to conquer. The version number 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 SQL Server2005 Database with SQL Server2008 and generate scripts again, so that SQL Server2012 can be appended.
SQL Server database attach failed: Error 5120 and error 950