Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there a "rows affected" variable ?

0 views
Skip to first unread message

Axel Stallknecht

unread,
Jul 19, 2004, 5:58:09 AM7/19/04
to
Hi,

i have a DTS job that transform records from one database to another. Works
well.
But for my own logging I want to know how many rows affected by the
transformation job.
Is there any global variable that contains this information ?
I think there is one, because if I execute the DTS packet manually, the
enterprise
manager shows the rows transformed.

Thanks for any hints !!

cu
Axel


Allan Mitchell

unread,
Jul 19, 2004, 6:03:25 AM7/19/04
to
There is no Global Variable that holds this information but there is a
property on the DataPump task

Have a look at this in BOL

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\dts
prog.chm::/dtsppropmr_05wp.htm

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Axel Stallknecht" <Axel.Sta...@jm-textile.com> wrote in message
news:40fb9b32$0$297$4d4e...@read.news.de.uu.net...

Axel Stallknecht

unread,
Jul 19, 2004, 9:01:49 AM7/19/04
to
Hi Allan,

first of all, thanks for your answer. That's what I need.
But can I use this in an SQL Statement, insted of a ActiveX script ?
I guess the only way to access this property is in an ActiveX script.
So I make a script which is setting the Rowcount as an Global variable.

Function Main()
Set oPkg = DTSGlobalVariables.Parent
DTSGlobalVariables("GoodRows").Value =
oPkg.Tasks("DTSTask_DTSDataPumpTask_1").Properties("RowsComplete").Value
Main = DTSTaskExecResult_Success
End Function

But how can I use this variable in an SQL Task ?
In example :
execute [dbo].[sp_logTransfer] 'WS', 1,
DTSGlobalVariables("GoodRows").Value, ''

This won't work. I'm not sure if my ActiveX script is working as it should.
Thanks for your help.

cu
Axel


"Allan Mitchell" <al...@no-spam.sqldts.com> schrieb im Newsbeitrag
news:%23Zb0seX...@TK2MSFTNGP11.phx.gbl...

Allan Mitchell

unread,
Jul 19, 2004, 9:26:36 AM7/19/04
to
So you've grabbed your count of rows and want to reuse the Variable

Sure

Global Variables and Stored Procedure Parameters
(http://www.sqldts.com/Default.aspx?234)

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Axel Stallknecht" <Axel.Sta...@jm-textile.com> wrote in message

news:40fbc641$0$294$4d4e...@read.news.de.uu.net...

Axel Stallknecht

unread,
Jul 20, 2004, 5:55:30 AM7/20/04
to
Thanks for your help, Allan. All my problems are gone. ;-)

cu
Axel
"Allan Mitchell" <al...@no-spam.sqldts.com> schrieb im Newsbeitrag

news:ePjFPQZb...@TK2MSFTNGP12.phx.gbl...

0 new messages