Cannot bulk load because the file




















And then, we will import the data back from the table. Use the following bcp. It was the false and misleading error. But what to do if you specify the correct name and still receive this error? All you need to do is to give SQL Server access to the folder. Here is how you can grant all necessary permissions.

That is all. How do I configure the SQL job to run as your own username? Is that right? I don't have access to SQL Server right now but depending on your version, it might look like this i I tried using a SQL Server Authentication to run the SQL job but I get the following error, The server principal "sqldev01" is not able to access the database "mydatabase" under the current security context.

Please help — user Looks like you are in troubleshooting hell. Can you try one of the other suggestions? Yoosaf Abdulla Yoosaf Abdulla 2, 3 3 gold badges 28 28 silver badges 32 32 bronze badges. That may be something you reconsider..

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 0. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.

To successfully read the source data you must grant the account used by the SQL Server Database Engine, access to the source data. In contrast, if a SQL Server user logs on by using Windows Authentication, the user can read only those files that can be accessed by the user account, regardless of the security profile of the SQL Server process.

For information about how to enable a user account to be trusted for delegation, see Windows Help. The error does not occur when using a local file local to the server running SQL Server. The error does not occur when using a file on the network IF the user logs onto the remote server. When connecting with a Windows Login, there is a security context that can be impersonated and so the bulk operation attempts to do just that.

The problem here is that forwarded security tokens cannot, by default, be re-forwarded. This is why the user gets the error when connecting from their desktop they logged into their desktop to get the security token, and then logged into SQL Server remotely, using a forwarded security token. And it is why the user, when they log in directly to the remote server via Remote Desktop, they get a full security token from that server and connect directly to SQL Server with it, and hence can use it to forward to a networked service, such as a shared folder.

I have not tried this so am not entirely sure if it would do the trick, but the idea is to switch the security context to that of a SQL Server account such that the bulk operation won't both with impersonation and will just use the current security context of the SQL Server service account.

Worth a shot, perhaps. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 4 years, 4 months ago. Active 3 years, 10 months ago.



0コメント

  • 1000 / 1000