run scheduled task

Posted on 2012-09-14
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
Question by:johnnyg123
    LVL 9

    Expert Comment

    Yes, you can execute windows scheduled task using ssis package for more details check the following article,

    Author Comment

    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
    LVL 9

    Accepted Solution

    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.
    LVL 21

    Expert Comment

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

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now