SQL Server CREATE FILE encountered operating system error 5 (Access is denied.)Based on our comment thread it sounds like you may have gotten yourself a bit sideways during install. The installer allows you to choose your default data directory and (I would assume) sets the appropriate permissions on that directory for the service account that you specified. In your CREATE DATABASE statement you're specifying a location, but was that location the one that was specified in the original setup? Has the service account changed?
A way to test this is to just run a generic CREATE DATABASE [test. If you get the same error then perhaps the service account has changed or something about the NTFS permissions has changed. A resolution path (also based on comment string) is to confirm that the service that is running SQL Server has R/W permissions on the path that you're specifying. To do this: Start- > Run- > services. SQL Server- > right- click- > properties- > Log On tab.
Now go and ensure that account has the appropriate permission on that directory to do what it needs to do.
ยท I am trying to do an xcopy from one folder to another in windows 7 but i get. Access Denied. what switch do i need to add to bypass this? If you receive Location is not available - Access is denied error while opening a file, folder or drive, in Windows, then this article will show you how to fix it.
I get the following error message while accessing Windows 7 shares from XP. System error 58 has occurred. The specified server cannot perform the requested operation. Before you start System Restore, save any open files and close all programs. Once you confirm your restore point, System Restore restarts your computer.