SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Operating system error code 5(Access is denied.)


Operating system error code 5(Access is denied.)

Author
Message
mayank jarsaniya
mayank jarsaniya
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 427
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
sanketahir1985
sanketahir1985
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1959 Visits: 1274
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......
GilaMonster
GilaMonster
SSC Guru
SSC Guru (461K reputation)SSC Guru (461K reputation)SSC Guru (461K reputation)SSC Guru (461K reputation)SSC Guru (461K reputation)SSC Guru (461K reputation)SSC Guru (461K reputation)SSC Guru (461K reputation)

Group: General Forum Members
Points: 461426 Visits: 47313
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


mayank jarsaniya
mayank jarsaniya
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 427
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
muthukkumaran Kaliyamoorthy
muthukkumaran Kaliyamoorthy
SSCrazy Eights
SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)

Group: General Forum Members
Points: 8869 Visits: 4997
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

Helping SQL DBAs and Developers >>>SqlserverBlogForum

mayank jarsaniya
mayank jarsaniya
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 427
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..............?
Shawn Melton
Shawn Melton
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11581 Visits: 3586
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: blog.wsmelton.info
mayank jarsaniya
mayank jarsaniya
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 427
thats why i am asking...........


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

thanks everyone,.......
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search