Practice
), right-click on the folder with the databases (usually "DATA"), select "Properties" from the context menu, then go to the "Security" tab and check the current permissions.
You'll see an entry like "SQLServerMSSQLUser$HOSTNAME$SQLExpress" or something similar (instead of HOSTNAME - your server's name, instead of SQLExpress - the instance name or nothing).
Now head over to where you copied the databases, and add this group with full permissions in the security settings (and yes, by the way, it's a group, not a user).
Now read carefully! Simply typing part of the group name and clicking "Check Names" won't add it! Windows will behave as if no such group exists - not in the system, not in the domain, nowhere at all. Why it's done this way is a mystery (since it doesn't add any security - out of desperation, admins end up adding the "Everyone" group and granting maximum permissions on the folder).
You need to type the group name IN FULL. Every single character! Exactly, character for character, as written on the "Security" tab of the "DATA" folder, where the databases live by default on THIS server. If you miss even one character, the group won't be recognized. And it doesn't matter which object types you select for the search - the OS will keep saying no such object exists until you type it character for character.
So, we've added the group with maximum permissions to the folder where the required databases now sit — and we try attaching them in MS SQL Server again. It should work now.
Comments