An additional database failure occurred while attaching the database, the error number is 5120, and has already encountered this problem two times. Write a solution today.
There are two methods, very simple:
1. Set the permissions of the folder where the MDF file is located, right-click on the folder--Properties--Secure,:
Set according to the diagram, note that authenticated user's permissions.
2. Do not log in to your database with SA and use Windows Authentication to sign in to your database and attach it.
PS: The first method sometimes doesn't work, it takes two to try. Recently encountered a bottleneck do not know how to continue to learn, in the framework of a class of things, but feel good virtual, after all, just see not really hands, do not know when you can write a nearly point of the framework. Hope to get out of this bottleneck as soon as possible.
SQL Server attach Database failure error Number: 5120 solution