sql - Cannot bulk load because the file "\\<UC Path>\\Test.csv" could not be opened. Operating system error code 1240 -
i running sql 2014. trying execute bulk insert unc path , receiving error below. script runs fine if execute bulk insert local path. security wise, have granted myself , sql service account full access file on remote disk.
tsql:
bulk insert exclusionlist_bp '\\test_server\test.csv'with (fieldterminator =',',rowterminator='\n' ,firstrow=2)
error:
msg 4861, level 16, state 1, procedure test, line 33 cannot bulk load because file "\test_server\test.csv" not opened. operating system error code 1240(the account not authorized log in station.).
any idea appreciated.
cheers shrestha
i know pretty old, if else need it, need map drive in server, following command:
exec xp_cmdshell 'net use \\server\shared_folder yourpassword /user:domain\yourusername /persistent:yes'
to perform must have admin permissions on server, if not, contact dba.
once, map network folder, should able read file.
Comments
Post a Comment