![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |