You can create a job step using T-SQL commands, but the GUI method is more user-friendly. To create a job step to execute an SSIS package:
In the New Job Step dialog:
The error you encountered with the /FILE command is likely due to using a deprecated syntax. To execute an SSIS package correctly, use the following syntax:
EXEC sp_add_jobstep @job_id = @jobid ,@step_name = N'Upload Data' ,@step_id = 1 ,@command=N'/TargetServer "\SSISDB\Upload.dtsx"'
Note that the package path should now be enclosed in double quotes and preceded by /TargetServer.
If you need to execute the SSIS step under a different account than the SQL Agent Service Account:
By following these steps, you can create a job step to run your SSIS package and resolve the incorrect syntax error.
The above is the detailed content of How to Schedule and Run an SSIS Package using SQL Server Agent?. For more information, please follow other related articles on the PHP Chinese website!