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.