How to add progress counter in SSIS

南楼画角 提交于 2020-01-16 04:07:33

问题


I am running a package which is extracting data from a single flat file and load it into the SQL Server destination. Flat file has more than 10,000 rows (it changes daily)

Is there any way I can find how much percent the task is completed? Like when developer/Support team execute a select statement on a table at an instance like

Select percentComplete from PackagePerformance Where packageId = 12

they get output like:

60%

which means 60% of data is loaded into SQL table at this instance.

Any suggestion?


回答1:


So you actually can't tell anyone how close the package is to completion since SSIS doesn't know how many records are in the file. It only knows that once it's completely read in.

Here's a few things I'm thinking of

1) if you want to write out progress indicators, then use a script transform in your dataflow. You 'll need to script out the database connectors, etc. Google will be your friend there. You could write out an indicator every 1000 records.

1) If you really want a percentage complete then read the file in completely once. (just read it into a script task) It's really fast and will give you a record count.

2) Look at the import table you are using. 10,000 rows really isn't that many. I'm importing files that have well over 1,000,000 in less than 60 seconds. I'm also not using a bunch of transforms in the dataflow though. That might be one of your issues.



来源:https://stackoverflow.com/questions/11090632/how-to-add-progress-counter-in-ssis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!