Recently the home computer has been upgraded from WIN7 to WIN10. After installing common software and SQL Server, attach some test databases and report the following errors:
FIGURE-1: Error attaching database file using SSMs
Try a script with an error:
Figure-2: Append database file with SQL script error
From the error point of view, it is estimated that the user being manipulated has insufficient access to the file. However, either using Windows Authentication login or the sa login, the same error is reported. Strangely enough, your computer is using administrator privileges. Again to check the permissions of the database file, found:
FIGURE-3: Security attributes for database files
Even the administrator does not have Read permission to this file! Click on the "Advanced" option:
Figure-4: Security properties for database files-Advanced
At this time I was impressed, should be this file owner is another administrator user (WIN10 installation must specify a user), I am accustomed to use administrator this user, after installation, I put the installation of the user created by the deletion, Use administrator instead. The file owner is modified to administrator and the startup user is modified in SQL Server Configuration Manager:
Figuer-5:sql Server Configuration Manager-log on
Then restarting the instance, using Windows Authentication to attach the database, succeeded. Re-testing using the SA attached database was also successful. Although the problem is solved, but for SQL Server, the security of the security of the program depends on the secure configuration of Windows, I am not very proficient in this aspect and understanding, so the Internet search under the same problem, found that there are the following articles can be consulted, and hope that their own experience can help other people.
Http://www.cnblogs.com/xuruiming/articles/2964507.html
Additional Datagram 5123 Error