During our development, we often back up the database, but sometimes the database will not be attached due to false reasons. Let's take a look at a friend's solution.
During our development, we often back up the database, but sometimes the database will not be attached due to false reasons. Let's take a look at a friend's solution.
Error 15105: I found some solutions from the Internet, which generally refer to insufficient file permissions,
Of course, you must have the attached permission to perform the operation.
Solution 1: grant the Full Control permission to the MDF file. If you do not know which user can go to the configuration center of SQL Server
However, I cannot use the above method.
Solution 2: Try another user. My original database is logged on with sa. I tried to log on with sa and the append was successful !~
If you log on to the server using sa repeatedly but fail to log on, you may not have the permission.
You can set the permission in the logon user option to Allow logon.
You can set the Authentication Mode on the server. You need to select the hybrid logon mode.
In addition, you can try the above method to attach a database with a lower version to a later version.
In fact, I personally prefer to generate scripts to export structures and data.