Attaching database

  • Hi All,

    I downloaded the adventureworks2012 database and followed the normal procedure to attach database. I placed the mdf and ldf files in D: drive. when i am trying to attach .mdf file it is throwing error message: OS error 5 (access denied).What is the reason for this.I changed the path to C: and attempted to attach . It went fine and database is in read only mode. I tried to put in normal mode and i am getting the same error.

  • Most likely to be a security issue. What account is the SQL Server service using? Does the account have the required permission on the D drive?

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • agreed with Abu Dina, Please check in Administrative Tools>>services>> Sql server>> Property >> logon

    Then check which user is used and see the permissions.

  • It is running under NT Service\MSSQLSERVER . How to check permissions

  • Hi m.rajesh

    Go to Control panel>>User Accounts

    and to see permission on D drive >>right click on d:>>property>>security>>Click on user and see the permission.

  • More information on granting appropriate file system permissions here:

    http://msdn.microsoft.com/en-us/library/jj219062.aspx

  • I've had this issue, had to get it working. File came from another machine.

    I granted "everyone" full access to the file attached it (windows permissions) - sledgehammer approach.

    Then removed the permissions afterwards.

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

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