Monday, September 14, 2015

Running SSIS Package From Command Line

 Methods used to execute the ssis package:-

  1. SQL Server data tools(SSDT)/Business Intelligence development studio(BIDS)
  2. Command Line utility 
  3. SQL Server Job Agent

1) SQL Server data tools(SSDT)/Business Intelligence development studio(BIDS)

Step 1:- Go to bids or ssdt whatever you have i have ssdt here, go to solution explorer right click on project name under solution file click on build.
Step 2:- After build successfull click on execute package. if you want make it as startup object click on startup object.  

2) Command Line Utility 

Step 1:- Open your command prompt as administrator (Run as administrator)


Step 2:-  type below text to call package

dtexec /f  <Filepath>
/set \package.variables[Variable]; value

Example:-   dtexec /f E:\test_package\test_package\Package.dtsx
/set \package.variables[id];1




Success.


3)Execution using SQL Server job agent

Step 1:- right click on SQL server job agent in your  SSMS and go to job. in general tab give job name, and go to steps and click on new


Give step name, select type as SQL server integration service package and Run as sql server


select your file system in package source and browse and select package path, and click ok


click on start job. execution will start you will see below window