unable to attach database

  • hi i have a database which is part of a vb.net project tha database worked fine

    i wanted to change the location of the mdf file to the application folder so i copied it to that folder but then i tried to attach it to the server using the management studio right click database select attach that opened the add dialog box with the tree to locate the mdf file but the tree does not expand into the application folder and i can't get to the mdf file

    so i tried to attach with attach command and i got the error message that access is denied error 5

    i checked the security settings in all files and parent folders and everything seems ok

  • Have you checked to make sure your SQL Server service account has permissions on that file/directory?



    Twitter: @SQLife
    Email: sqlsalt(at)outlook(dot)com

  • yes i checked all permissions everything is ok but i found the solution

    i went to sql server configuration manager and changed the log on as property from network service to local system and after that the tree opened till this file and i attached the database successfully

  • Ok, Local System is a highly privileged account. It is not recommended to be using this as the SQL Server account. If this is in production, I recommend using a domain or Windows account.



    Twitter: @SQLife
    Email: sqlsalt(at)outlook(dot)com

Viewing 4 posts - 1 through 3 (of 3 total)

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