简体   繁体   中英

SSIS runs PS1 (powershell) job but SSMS Agent don't

I have a package on SSIS that runs a .BAT file which consequently runs a .PS1 file (powershell). This Powershell file converts an Excel file to CSV, so I can import the data more easily and conveniently.

The problem is that when creating a schedule via SQL Agent Job and running this job, it does not do the step of opening the Excel file and converting it normally. Via SSIS it works, running the package via SSMS (Integration Services Catalog) also works, but via Agent it doesn't.

What I've tried:

I have already given permission in the folder for several SQL and SSIS users (I don't know if I gave it to everyone).

I already activated the functionality to use via SQL window (but the command also doesn't work, it gives an error). As answer: Enable 'xp_cmdshell' SQL Server

I have already given permission for the components through DCOMCNFG. As answer: DCOM , DCOM 2

I have already given permission within the SSMS itself.

I have already created a proxy and used a credential and when running the job with that proxy, it also does not run. As answer: Proxy answer , Proxy answer 2

But I don't know what I could do for the process to run correctly via Agent, manually and via SSIS it works perfectly. But not automatic. Does SSIS have any specific users when running that they have permission and the SSMS Agent does not? (Although I have tried to give permission everywhere).

Thanks!

问题出在 DCOM 配置中的 Excel 应用程序中,因此查看此链接DCOM config ,我能够修复它并正确运行。

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