Friday 20 September 2013

EXECUTE PROCESS TASK in BIDS(SSIS)

EXECUTE PROCESS TASK  and FOREACH LOOP CONTAINERNin BIDS(SSIS)

STEP 1: Create a winRAR file on windows explorer, ONE empty folder for achieve extracted files from zip file.

STEP 2:Drag and drop Execute Process Task, then connect to Foreach Loop Container 


STEP 3: Double click on execute Process Task ,select process -->Executable -->Browse the winRAR.exe ,Arguments e -rar D:\sour.rar (D:\sour.rar---is a zip file path)  after that Working Directory--> browse Folder path  (i.e., empty folder) -->press OK again OK.


step 4: Right click on connection manager (my connection manager is loop) select properties--> go to property expression editor -->select connection string-->in expression  browse fullpath (variable name)  from variables--> press OK, again OK.



STEP 5:
Now debug package .
This is Other Option


FOR EACH LOOP in SSIS


FOR EACH LOOP CONTAINER  IN SSRS-2008R2

STEP1: Create source on windows Explorer

STEP2: Create multiple Text files inside source folder



STEP3: Create a package and add DATA FLOW TASK in control flow, and add a variable by right clicking outside the dataflow task and name it as filepath  .











STEP4: Name=filepath, Scope=package, data Type=String;









STEP 5: drag data flow task inside to For each loop.



















STEP 6: double Click on For Each Loop and choose collection -->Browse-->select Source Folder And press OK



STEP 7:  Select Filepath From drop down list then Click OK



STEP 8:  Add flat file source and OLE DB Destination , connect together





































STEP 9: DOUBLE click on flat file source then give connection name connection1 -->browse folder and any one text file inside it.




STEP 10: click on columns and it will show preview, and press OK 




 STEP 10: next go to COLUMNS and pres OK




STEP 11: Click on new and in the NEW WINDOW again NEW, then select server name and DATA SOURCE name -->test your connection -->press ok again OK.




STEP 12: name of the table or view: select a table from SSMS ,then go to mappings set columns then press ok



step 13: Now debug it.



EMP, DEPT Sample script

/****** Object:  Table [dbo].[DEPT]    Script Date: 19-05-2016 06:58:37 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET A...