I built a Java plugin which runs a SQL script. This does a bulk load to read from xml files on a server, using a SQL login. To get it to work a SQL credential to a domain account was linked to that user. The remote servers were moved to a HyperV environment a few months back and ever since the bulk load fails, with the error 'Msg 4860, Level 16, State 1, Line 1 Cannot bulk load. The file "blah" does not exist.' I am told permissions would not have changed. What else could have caused this to stop working?

  • When you say the server was moved, what did they actually do? If they installed new instances and moved your databases, it is possible the link between the database user and the server user was broken. – Reaces Aug 31 '17 at 5:53
  • The remote server was moved to HyperV, not the physical server. Apparently that means nothing else changed. It is just that this stopped working during this time. If a Domain account has access to a folder and that is a linked credential to a SQL user, shouldn't that allow bulk load to work? Bulk admin rights are set on both the SQL user and Domain login. – Joshua J Geoghegan Aug 31 '17 at 22:21

Solved. When Java copied the files across the permissions weren't inheriting the folders permission, possibly from a Windows update. I now run a batch file from Java to apply these permissions to the domain user and it works.

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.