问题
How do I schedule SSIS to automatically execute a package from a file at a given time every day?
回答1:
You have a few options, but I'll give you something that will allow you to get up and running quickly...
- Open SQL Server Management Studio and connect to the Database Engine of the SQL Server that will run the job. This SQL Server should have SQL Server Agent installed and running.
- Expand SQL Server Agent, expand Jobs.
- Right-click, select New Job.
- When you create your package step, for Type choose SQL Server Integration Services Package. For the Package source, choose File system. Then for the Package you can use the browse button (...) to browse for the DTSX file on the file system.
- Go to Schedules and create job schedules as you normally would for any other SQL Server Agent job. In your case, set the Frequency to Daily, and set the value of Occurs once at to whatever time the job should run.
A couple of things to keep in mind...
- Make sure that the SQL Server Agent service account (this is the default, you can choose an alternative security context if needed) has the permission to access the dtsx package on the filesystem.
- This will only work if the server on which you're scheduling the job is also the Integration Services server. There are plenty of ways to handle remote package execution if you require it.
For additional information, please see https://msdn.microsoft.com/en-us/library/ms191439%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396
回答2:
I prefer the above anwser but it is also possible with the windows Task Scheduler and start your ssis package with dtexec. (Only possible on the SSIS server) Check also execution with dtexec
回答3:
First choice - if possible is to to schedule the package:
1) using the SQL Server Agent for the standard jobs
2) non-standard windows task scheduling, depends on what the package is doing
3) dtexec can play nicely but it depends on what ssis tasks the package runs
4) the more the ssis package does, the more it may require of the dtexec config and set up to play nicely with the windows scheduler
来源:https://stackoverflow.com/questions/846135/schedule-ssis-package-execution