We can all any SQL Server Agent job using SP_Start_job System SP. Here we will see how to call an SSIS package which is scheduled in the SQL Server Agent.
Let’s see this demo
I am creating a simple package. This package I so simple, in this package I am inserting a record into a table.
Inserting a table into this package
Now I am running this package
Package executed successfully.
See the record into the table
Now I am creating a job to schedule the SSIS package.
Now I am running this job for test
See records in the table
Writing the SQL script to call this job
USE msdb ;
GO
EXEC dbo.sp_start_job N'TestJob' ;
GO
|
Before running this script record in the table.
Now running this script
Job executed successfully.
See the records in the table
We can see the job execution details in Job History
No comments:
Post a Comment
If you have any doubt, please let me know.