简体   繁体   中英

bulk insert sql server

When using the T-SQL Bulk insert command from SQL Server Management Stuidio, I am getting this error randomly. Not everytime. Sometimes it would work completely fine and sometimes it throws me the below error.

Error: Cannot bulk load because the file "\\xxxxx\\xxxxxx\\xxxxxx\\xxxxxxx\\xxxxxxx.xsd" could not be opened. Operating system error code 1326(Logon failure: unknown user name or bad password.).

I can access the share drive from my machine and in fact, I was the one who kept that file in that particular share drive.

Use UNC paths:

\\yourcomputername\sharename\filename.xsd

Bulk inserts use delegation, so make sure your share can be accessed by the user that performs the BULK INSERT command in SQL Server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM