Access Denied when trying to copy a detached database

  • does the account that you are running sql service under have write permissions to that folder?

  • The connection is a trusted connection and the folders where the files are located have full control permissions for Administrators, myself, System, and users on the PC. For some reason I cannot set permissions to the Creator/Owner group/user name

  • Sorry, I meant the account that is running SQL server needs to have permissions to the folder.

    are you running SQL server on a domain account ?

  • I am running SQLExpress on my local PC. I checked in Services for the SQL Server properties and the login is the Local system Account which I presume is me.

    I am connected to a domain network but my application is purely local and not using any network resources.

    Sorry if I sound a bit dumb, but I am pretty new to SQL server and not an expert.

  • Local system account in special account just for SQL server to run, it is a powerful account that should have admin rights to all the folders.

    Ideally you should use a windows network account to run SQL server but as you are running this locally the localsystem account 'should' work, perhaps you could try using a specific account that you know has permissions to run sql to see if this helps.

    When you change the accounts that SQL runs under you should always do this under SQL configuration manager and not through windows services, as there are changes that need to be made that the service manager can not make.

  • I did some digging around and found a tip that suggested that I need to have serveradmin rights in order for the copy to work.

    I assigned the ServerAdmin role to my SQL login name and lo and behold it appears to have solved my problem.

    Thank you for your help.

  • Okay i was unaware of that thanks for sharing the solution and I am glad that you managed to get your problem solved.

Viewing 7 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply