我正在尝试在 SQL Server 的 SSIS 包中执行批量插入任务,但在尝试打开文件或尝试查找文件时显示错误。在网上搜索错误可能是:
路径不正确:不是这个,我尝试过使用普通路径和 UNC 路径,如果我在资源管理器中复制路径,它会打开文件。
BD 用户没有权限:执行任务的用户是我的具有管理员权限的用户,DB 用户是 BulkAdmin 和 SysAdmin。
UNC 路径的错误是:
SSIS package "BulkInsert.dtsx" starting.
Error: 0xC002F304 at Bulk Insert Task, Bulk Insert Task: An error occurred with the following error message: "Could not bulk insert because file '\\MyMachine\D$\Pro\Pro Mig\Mig\Filess\XXXXXXX130309.TXT' could not be opened. Operating system error code 53(The network path was not found.).".
Task failed: Bulk Insert Task
SSIS package "BulkInsert.dtsx" finished: Success.
正常路径的错误是:
SSIS package "BulkInsert.dtsx" starting.
Error: 0xC002F304 at Bulk Insert Task, Bulk Insert Task: An error occurred with the following error message: "Could not bulk insert because file 'D:\Pro\Pro Mig\Mig\Filess\XXXXXXX130309.TXT' could not be opened. Operating system error code 3(The system cannot find the path specified.).".
Task failed: Bulk Insert Task
SSIS package "BulkInsert.dtsx" finished: Success.
谢谢你的帮助。