Monday, 26 February 2018

Execute SQL Server Agent Job Task in SSIS

This task is use runs SQL Server Agent jobs. SQL Server Agent is a Microsoft Windows service that runs jobs that have been defined in an instance of SQL Server. We can create jobs that execute Transact-SQL statements and ActiveX scripts, perform Analysis Services and Replication maintenance tasks, or run packages.
In one word we can say that This task allows us to execute a SQL Server Agent job.

Let’s see how we use Execute SQL server agent job task in SSIS.


Open SSDT.
In control flow, we need to take SQL server agent job task

Double click on this task. We will get window

Now click on new

Create a connection

Once the connection is established we will see the list of all SQL server agent job.
Currently, I have two jobs on my server.
  
Now I am creating a job on the server to insert records in a table.
   
New refresh the SSIS execute SQL server job task. We will see this job also.

Now we can select the job which we want to execute.

Click ok.
  
Now the package is ready to execute.
Before running this package. Records in the database table.

Now I am executing this package.

Package executed successfully.
Now see the records in database table.


Hope this article is useful for you.

4 comments:

  1. This is really very nice blog to read, thanks for sharing wonderful information. keep share content on MSBI Online Training Hyderabad

    ReplyDelete
  2. It is very good blog and useful for students and developer ,
    Sql server DBA Online Training

    ReplyDelete
  3. there is any way in ssis control flow to wait until job finish and only then move on?

    ReplyDelete

If you have any doubt, please let me know.

Popular Posts