Attaching .MDF File Without .LDF file in SqlServer – An Error-Fix Approach

I was trying to attach a .MDF file without a .LDF which i downloaded from codeplex using the query below [sourcecode language=”SQL”] USE [master] CREATE DATABASE Adventure ON (FILENAME = N’C:\Program Files\Microsoft SQL Server\MSSQL11.SQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Data.mdf’) FOR ATTACH_REBUILD_LOG GO [/sourcecode] Problem “Access Denied” Initially,I have placed the .MDF file in D:\.It was throwing Operating system error 5: […]