August 24, 2010 at 2:33 am
Hi,
I used task script component(Control flow task) to capture rowcount (no. of records inserted into destination)in logging file.
My question is which will be better in performance wise, adding script task in Data flow task or adding script component in Control flow task.
If adding in data flow task is better I need steps/code to perform logging.
Thanks.
August 24, 2010 at 2:38 am
Why not just use the Row Count transformation?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
August 24, 2010 at 2:45 am
Hi,
I use Row count transformation and get row count in a variable. I need this variable to be logged in log file for later verification.
So let me know if this is possible without a script task to log in log file?
Thanks.
August 24, 2010 at 3:22 am
You can just insert the variable in the log with a simple SQL INSERT statement.
Or, you can write OnInformation events to the log and extract the numbers there.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
August 24, 2010 at 3:27 am
Can u pls. detail me the steps involved.
Performance perspective which would be better?
1. Using script task
2.Using script component
3. using insert SQL
4.Using event handler
August 24, 2010 at 3:30 am
The event handler will only be fired on specific events, and even if you go with the event handler, you still have to choose between SQL or VB.NET scripting 🙂
I would use the Execute SQL Task. Just map the variable to a question mark in your statement. It is fast, simple and easy to understand for developers who will inherite the package from you in the future.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
August 24, 2010 at 3:47 am
Hi,
I just want the rowcount to be captured in log file(.txt file) for reference. So in this case,my execute SQL will not fit in. Right?
Thanks.
August 24, 2010 at 4:14 am
Aarathy (8/24/2010)
Hi,I just want the rowcount to be captured in log file(.txt file) for reference. So in this case,my execute SQL will not fit in. Right?
Thanks.
Ah OK. I thought the log was a table in the database.
If it is a .txt file, you can use the script task (not the script component, the script task is better in just doing one thing, while the script component will be executed for each row) or a flat file destination.
I would go with the script task.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply