Issue faced when PowerShell script executed through SQL Server Agent Job

V

Verma Rachna

I have a PowerShell script that searches for an excel file at a particular location, if found copies it as a CSV file to another location.

This CSV is used as a source in ADF - Copy Activity.


This script is not interacting with any database, nor performing any db tasks - just reading an excel and converting it to CSV at particular location.

It is working fine as intended, when executed through PowerShell ISE, but when I scheduled it as a SQL server agent job it is not doing anything. The job successfully as per the message in Job History, but it does not do anything. The message says :

=====================================================================================

Message

The job succeeded. The Job was invoked by User PMCI\VermaRachna. The last step to run was step 1 (Load_Radiotherapy_Machine_Utilization_File_Org_Src).


Message

Executed as user: PMCI\SVC_DASH_SQLDevAGT. The step did not generate any output. Process Exit Code 0. The step succeeded.

=====================================================================================


I have scheduled the Job with type as "Powershell" and the script code is pasted in Command area of the Job Step.

Since I am not getting any error message how do I know what is the issue due to which script is not doing anything when run through SQL Server agent job. Can some one help with this please. I can share the script code if required.

Continue reading...
 
Back
Top Bottom