我创建了一个包,它被加载到我们的 SQL 服务器上。该包进入一个文件夹,读取和 Excel,将 Excel 转储到一个表中,然后将其存档。
正常运行包时(通过BIDS)它工作得很好。
SSMS 但是当我使用以下行运行它时:
exec master.dbo.xp_cmdshell 'C:\"Program Files (x86)"\"Microsoft SQL Server"\100\DTS\Binn\DTExec.exe /DTS "<package location>" /SERVER "<Server>" /CHECKPOINTING OFF /REPORTING V'
提取 Excel 名称(对于包中的每个循环)的部分报告它没有找到任何内容。
Description: The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty.
该包需要在32位模式下运行才能读取excel,这就是我使用32位dtexec位置的原因。
有谁知道怎么回事?