October 13, 2016 at 12:11 pm
Access is denied when
running BULK INSERT.
Using Windows Authentication.
running from SSMS.
My account is in bulkadmin.
BULK
INSERT Scene.TempStore
FROM '\\10.150.173.2\User_Share\Scene\In-Files\Scotia\ksmtzo2mseg08'
WITH
(
ROWTERMINATOR = '\\'
)
GO
---------------------------------------------
Msg 4861, Level 16, State 1, Line 3
Cannot bulk load because the file "\\10.150.173.2\User_Share\Scene\In-Files\Scotia\ksmtzo2mseg08" could not be opened. Operating system error code 5(Access is denied.)
Troubleshooting steps:
1. Added SQL service account to \\10.150.173.2\User_Share\Scene\In-Files\Scotia\ (read/write)
2. Added my Windows Account to \\10.150.173.2\User_Share\Scene\In-Files\Scotia\ (read/write)
October 13, 2016 at 12:25 pm
RVO (10/13/2016)
Access is denied whenrunning BULK INSERT.
Using Windows Authentication.
running from SSMS.
My account is in bulkadmin.
BULK
INSERT Scene.TempStore
FROM '\\10.150.173.2\User_Share\Scene\In-Files\Scotia\ksmtzo2mseg08'
WITH
(
ROWTERMINATOR = '\\'
)
GO
---------------------------------------------
Msg 4861, Level 16, State 1, Line 3
Cannot bulk load because the file "\\10.150.173.2\User_Share\Scene\In-Files\Scotia\ksmtzo2mseg08" could not be opened. Operating system error code 5(Access is denied.)
Troubleshooting steps:
1. Added SQL service account to \\10.150.173.2\User_Share\Scene\In-Files\Scotia\ (read/write)
2. Added my Windows Account to \\10.150.173.2\User_Share\Scene\In-Files\Scotia\ (read/write)
Is the service account trusted for delegation?
Are the SPNs created for the service account? If you type this at the command line:
setspn –L Account YourDomain\YourSQLServiceAccount
you should get two SPNs back - one by host name and one by fully qualified domain name.
Sue
October 13, 2016 at 6:51 pm
This sounds like the Kerberos Double-Hop problem. What happens when someone with sysadmin privs runs the code from the server itself?
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply