Solved

rowcount in ssis package

Posted on 2015-02-13
3
104 Views
Last Modified: 2016-02-11
How do i modify a ssis package to add a rowcount of how many files were processed?
Thank you.
0
Comment
Question by:shwelopo
3 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40609650
Hi,
that depends on where in the SSIS package you want to count.
In the control flow area you will have to use a variable with type INT and a default of 0 and update this either through a script task or executing some kind of dummy SQL using expressions to set the variable.
If you want to count inside data flows you can use the built-in row count transformation where you also need a INT variable.
In the latter case you have to use script/execute SQL tasks in the control flow if you have your data flow run in a loop to get an overall count as the next dataflow loop will overwrite the RowCount variable.
HTH
Rainer
0
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40609835
>How do i modify a ssis package to add a rowcount of how many files were processed?
1  Create a variable called iFileCount (or whatever floats your boat), and set it to zero.
2  In your For..Each File Loop create a Script task, with iFileCount as a read-write variable, that goes like this...

Dts.Variables("iFileCount").Value = Dts.Variables("iFileCount").Value + 1

Open in new window


3  If your package doesn't use a For..Each file loop, then spell out what you're doing.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

743 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

10 Experts available now in Live!

Get 1:1 Help Now