The physical file "D: \ understructuredata _ DAT. MDF" cannot be opened ". Operating System Error 5: "5 (Access denied .) ", Unable to open the physical file
Error message:
Title: Microsoft SQL Server Management Studio ------------------------------ the attached database failed to "HC-PC" on the Server. (Microsoft. SqlServer. Smo) for help information, click: http://go.microsoft.com/fwlink? ProdName = Microsoft + SQL + Server & ProdVer = 10.50.1600.1 + (KJ_RTM ). 100402-1539 +) & EvtSrc = Microsoft. sqlServer. management. smo. predictiontemplates. failedOperationExceptionText & EvtID = additional database + Server & LinkId = 20476 ------------------------------ Other information: an exception occurred when executing a Transact-SQL statement or batch processing. (Microsoft. SqlServer. ConnectionInfo) ------------------------------ unable to open the physical file "D: \ understructuredata _ DAT. MDF ". Operating System Error 5: "5 (Access denied .) ". (Microsoft SQL Server, error: 5120) for help information, click: http://go.microsoft.com/fwlink? ProdName = Microsoft + SQL + Server & ProdVer = 10.50.1600 & EvtSrc = MSSQLServer & EvtID = 5120 & LinkId = 20476 -------------------------- CLICK: OK ------------------------------
Background:
Stop the migration related to the SQL server on the original database server, and copy the corresponding data files (. MDF) and log files (. LDF) from the original database to the server where the target database is located.
Log on to the database and select attach. the following error message is displayed:
Solution:
Grant everyone operations to data files (. MDF) and log files (. LDF), such