r_pat72
asked on
SQL SCRIPT for SQL Job (sql 2008)
Hi,
I have created a SSIS package.I need to run this SSIS package inside a sql job nightly under a service account.
Could someone give me sample sql script for creating sql job. I don't want to create job from sql server management studio. The reason for sql script is that I can deploy this script to any server.
Name of SSIS Package : datarefresh.dtsx
Name of service account : test
Thanks for help.
I have created a SSIS package.I need to run this SSIS package inside a sql job nightly under a service account.
Could someone give me sample sql script for creating sql job. I don't want to create job from sql server management studio. The reason for sql script is that I can deploy this script to any server.
Name of SSIS Package : datarefresh.dtsx
Name of service account : test
Thanks for help.
If you want to run the SSIS (DTSX) as file then create a new SQL Job like screenshot below and hit SCRIPT buton not the OK and keep in mind that ANY SQL Job unless specified runs under the SQL Agent Service account - in other words whatever starts SQL Server Agent under services. If you need to store the DTSX in Integration Servvices (SSIS server) then you can Reight Click the package and schedule it from there and hit the script buton not the OK.
SSISJob.png
SSISJob.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this will give you the script you need
another option is to create the job with management studio, and the right click it and choose the generate ddl option
then once you have the ddl, delete the job