Operating system error code 5(Access is denied.)

  • Hi i am using sql server authenticated user 'csvimport' to import a csv file from file server to sql server table.

    i got the following error.

    Msg 4861, Level 16, State 1, Line 1

    Cannot bulk load because the file

    "\\193.169.122.111\c$\folder2009\Client_Requests\attachement\HARD_COPY.csv" could not be opened.

    Operating system error code 5(Access is denied.).

    so many thread with this error but cannot get actual understanding or cause for error.

    any help be needful

    thanks

  • do the foll checks first

    1.Try to open that file on 193.169.122.111.

    2.check the rights on the file HARD_COPY.csv.

    3.Try to access that file from ur sql machine.

    Sanket Ahir
    Don't run behind the success, Try to be eligible & success will run behind u......

  • The SQL Server service account does not have sufficient rights to access that folder. Note, it's the account that SQL runs under that's inportant. Not whatever you're logged in as.

    Check the account that SQL runs under, check what permissions that account has on the share.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • hi,

    if I use sa or windows authentication all is fine but

    i have created one sql server login csvimport and through this sql login i want to import the csv file.

    for your suggestion...

    'Check the account that SQL runs under, check what permissions that account has on the share.'

    i hv no idea how to check.can you please provide more details or any link

  • for your suggestion...

    'Check the account that SQL runs under, check what permissions that account has on the share.'

    i hv no idea how to check.can you please provide more details or any link

    Hi,

    As per Gail told,check the following

    Start-->SQLServerManager.msc-->Right click the server-->property-->log on as.

    Find the account name and check the account name has enough permission to access the UNC path "\\193.169.122.111\c$\folder2009\Client_Requests\attachement\HARD_COPY.csv" .

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • in my server logon as local system thats a problem.......

    if i give network service and give my user name and password it is fine.

    but for this login(i hv created sql server authenticated login) it is fair to give my credential to sql server service to access the file...........

    or there should be a network wise windows login for this special purpose..............?

  • If you want SQL Server to access resources over your network/domain the service will have to be running as a Domain account that has access to those resources.

    You should create a dedicated domain account to use as the service account. I DO NOT recommend using your own login.

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • thats why i am asking...........

    so further i request for a new domain login for sql server

    thanks everyone,.......

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

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