consider 2 instances I1 (running under user U1) and I2 (running under user U2) of sql server 11.0.2100
I detach DB from I1.
I give full rights to mdf and ldf files to U2
I try to attach DB to I2.
I connect to I2 with SSMS and integrated authentification (domain\U3) => attaching fails with error 5123 : can’t access to mdf file.
I connect to I2 with SSMS and sql authentication (using sa sysadmin) => attaching succesfull
My question is: why the attaching fails with the integrated authentification ? by the way U3 is administrator of the machine running the two instances.
I know it is kind of improper to just paste content from another source, but this pretty much explains your problem. The “domain\U3” apparent may not have access to the database files.
Securing Data and Log Files.
Detaching and Attaching a Database
When you are detaching or attaching a database, the Database Engine tries to impersonate the Windows account of the connection performing the operation to guarantee that the account has permission to access the database and log files. For mixed security accounts that use SQL Server logins, the impersonation might fail.