[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

run scheduled task

Posted on 2012-09-14
4
Medium Priority
?
428 Views
Last Modified: 2012-10-03
Can I do the following in an ssis package?

1. Execute windows scheduled task

2. Check status of scheduled task

3. Execute file based on whether sucessful or not
0
Comment
Question by:johnnyg123
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Vijaya Reddy Pinnapa Reddy
ID: 38400380
Yes, you can execute windows scheduled task using ssis package for more details check the following article,

http://geekepisodes.com/sqlbi/2010/schedule-ssis-package-execution-with-windows-task-scheduler/
0
 

Author Comment

by:johnnyg123
ID: 38400459
Hmmm...this shows how to execute an ssis package using windows task scheduler

I was looking to go the other way.    Execute a scheduled task from within an ssis package
0
 
LVL 9

Accepted Solution

by:
Vijaya Reddy Pinnapa Reddy earned 2000 total points
ID: 38400487
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.
Create a new SQL Server Agent 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.
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 38417267
You can do it using WMI Event watcher task.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question