1

Following error occurs on running sql job.

Cannot bulk load because the file could not be opened. Operating system error code 5(Access is denied.). [SQLSTATE 42000] (Error 4861). The step failed.

Looks like permission error. Scenario is that Source File is located on Server-A and SQL Server is installed on Server-B. How can I give access to file. SQL User is not showing on below window.

enter image description here

  • You need to map the actual account that the OS level uses from Server B. Specifically, the account that actually executed the package. Then, it just be mapped to that Directory/file to be able to read/write. If the file is contained also inside SQL Server, that is another step. – clifton_h Oct 21 '17 at 19:41
1

in-order to access a file in another machine using SQL Server you may give permission to the Account which you have used to start your sql-server instance.

if you have active directory on your environment make sure to start sql-server instance with an active directory user and give required permission to to that user on "Server-A". Change the Service Startup Account for SQL Server

but if you do not have any active directory on your Environment the only way to do this is to have a user with the exact name and password of your sql-server service user on Server-A

enter image description here

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.