dbTalk Databases Forums  

Rows Transfered Value

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Rows Transfered Value in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jerry Spivey
 
Posts: n/a

Default Rows Transfered Value - 11-16-2005 , 12:13 PM






Hi,

I'm setting up quite a few DTS packages to transfer in records from remote
sources into local reporting destinations. After a given Transfer Data Task
completes succesfully, I'd like to insert a record into an auditing table to
specify the current date, host names and the number of rows transfered. I
can create and use a custom auditing table, system functions GETDATE(), and
a string for the source and destination names however I'm not sure how to
capture the value of the number of rows that were transfered successfully.
Anyone have any ideas how to do that? Also, I'd like to build in some error
logic for ON FAILURE, any links on where I can find more information on how
to do that?

Thanks

Jerry



Reply With Quote
  #2  
Old   
Wm. Scott Miller
 
Posts: n/a

Default Re: Rows Transfered Value - 11-16-2005 , 02:58 PM






If you are using the DTS data pump, you can use an ActiveX script to read
that. See below:

Function Main()

Dim oPackage
Dim oDataPump

Set oPackage = DTSGlobalVariables.Parent
Set oDataPump = oPackage.Tasks("DTSTask_DTSDataPumpTask_1").Custom Task

MsgBox oDataPump.RowsComplete

Set oDataPump = Nothing
Set oPackage = Nothing

Main = DTSTaskExecResult_Success

End Function

You can simplfy this somewhat, I just kept it this way incase you wanted to
access any other information from the datapump. To see what is available,
view the datapump in the Disconnected Edit... function.

Scott

"Jerry Spivey" <jspivey (AT) vestas-awt (DOT) com> wrote

Quote:
Hi,

I'm setting up quite a few DTS packages to transfer in records from remote
sources into local reporting destinations. After a given Transfer Data
Task completes succesfully, I'd like to insert a record into an auditing
table to specify the current date, host names and the number of rows
transfered. I can create and use a custom auditing table, system
functions GETDATE(), and a string for the source and destination names
however I'm not sure how to capture the value of the number of rows that
were transfered successfully. Anyone have any ideas how to do that? Also,
I'd like to build in some error logic for ON FAILURE, any links on where I
can find more information on how to do that?

Thanks

Jerry




Reply With Quote
  #3  
Old   
Jerry Spivey
 
Posts: n/a

Default Re: Rows Transfered Value - 11-16-2005 , 05:53 PM



Thanks Scott. That was the missing piece in the package and integrating
this with a global variable and a paramertized INSERT statement totally did
the trick.

Jerry
"Wm. Scott Miller" <Scott.Miller (AT) spamkiller (DOT) wvinsurance.gov> wrote in
message news:ODJ0BCv6FHA.3136 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Quote:
If you are using the DTS data pump, you can use an ActiveX script to read
that. See below:

Function Main()

Dim oPackage
Dim oDataPump

Set oPackage = DTSGlobalVariables.Parent
Set oDataPump = oPackage.Tasks("DTSTask_DTSDataPumpTask_1").Custom Task

MsgBox oDataPump.RowsComplete

Set oDataPump = Nothing
Set oPackage = Nothing

Main = DTSTaskExecResult_Success

End Function

You can simplfy this somewhat, I just kept it this way incase you wanted
to access any other information from the datapump. To see what is
available, view the datapump in the Disconnected Edit... function.

Scott

"Jerry Spivey" <jspivey (AT) vestas-awt (DOT) com> wrote in message
news:%23x7R4lt6FHA.1188 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi,

I'm setting up quite a few DTS packages to transfer in records from
remote sources into local reporting destinations. After a given Transfer
Data Task completes succesfully, I'd like to insert a record into an
auditing table to specify the current date, host names and the number of
rows transfered. I can create and use a custom auditing table, system
functions GETDATE(), and a string for the source and destination names
however I'm not sure how to capture the value of the number of rows that
were transfered successfully. Anyone have any ideas how to do that?
Also, I'd like to build in some error logic for ON FAILURE, any links on
where I can find more information on how to do that?

Thanks

Jerry






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.