Home Forums SQL Server 2008 SQL Server 2008 - General Strange File issue > "CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file" RE: Strange File issue > "CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file"

  • I had detached a SolarWinds database called NetPerfMon that consisted of three data (mdf) files and one log(ldf) file.

    That might be the problem. Detaching a db in SQL 2005 and later versions changes the permissions on the file. So it might be a permissions issue trying to read the existing files.

    For that reason and others, I suggest using "SET OFFLINE" instead of detaching whenever you can.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.