Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

rowcount in ssis package

Posted on 2015-02-13
3
Medium Priority
?
134 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 66

Accepted Solution

by:
Jim Horn earned 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

660 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