I am trying to attach the AdventureWorks database with the following query:
CREATE DATABASE AdventureWorks2012
ON (FILENAME = 'C:\AdventureWorks2012_Data.mdf')
FOR ATTACH_REBUILD_LOG ;
But I get the following error:
Create file encountered operating system error 5 (access is denied.) while attempting to open the physical file blah
Note: I am using Windows auth mode.
Any pointers as to what to do?