dbTalk Databases Forums  

Bulk insert task - getting affected rows rowcount

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


Discuss Bulk insert task - getting affected rows rowcount in the microsoft.public.sqlserver.dts forum.



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

Default Bulk insert task - getting affected rows rowcount - 04-01-2005 , 08:47 AM






Problem:
I need to know the affected rows by the bulk insert task. In my DTS package
I tried to have the ActiveX Script or Exec SQL task to fetch the rowcount
after insertion. But in my scenario there would be simultaneous packages
running sometimes against the same table. Due to which I get different
record counts, rather than actual rowcount done by one Bulk insert.

Is there a way like properties to get hold of affected rows after bulkinsert
completion.

--
Thanks
SatishTL

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Bulk insert task - getting affected rows rowcount - 04-01-2005 , 02:29 PM






Only if you use the DataPump task, the Bulk Insert Task does not have any
such property.

Another alternative would be to wrap the BulkCopy in code and capture the
RowsCopied event which has a suitable parameter.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"SatishTL" <SatishTL (AT) discussions (DOT) microsoft.com> wrote

Quote:
Problem:
I need to know the affected rows by the bulk insert task. In my DTS
package
I tried to have the ActiveX Script or Exec SQL task to fetch the rowcount
after insertion. But in my scenario there would be simultaneous packages
running sometimes against the same table. Due to which I get different
record counts, rather than actual rowcount done by one Bulk insert.

Is there a way like properties to get hold of affected rows after
bulkinsert
completion.

--
Thanks
SatishTL



Reply With Quote
  #3  
Old   
SatishTL
 
Posts: n/a

Default Re: Bulk insert task - getting affected rows rowcount - 04-01-2005 , 03:53 PM



Thanks Darren, but I have to go for Bulkinsert task as the volume of data
being inserted through some of the files are in 1.5Gig sizes. I belive
DataPumptask takes longer duration for such huge files.

- SatishTL

"Darren Green" wrote:

Quote:
Only if you use the DataPump task, the Bulk Insert Task does not have any
such property.

Another alternative would be to wrap the BulkCopy in code and capture the
RowsCopied event which has a suitable parameter.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"SatishTL" <SatishTL (AT) discussions (DOT) microsoft.com> wrote in message
news:1D0C4609-73C0-46CE-A7F4-B9983655B925 (AT) microsoft (DOT) com...
Problem:
I need to know the affected rows by the bulk insert task. In my DTS
package
I tried to have the ActiveX Script or Exec SQL task to fetch the rowcount
after insertion. But in my scenario there would be simultaneous packages
running sometimes against the same table. Due to which I get different
record counts, rather than actual rowcount done by one Bulk insert.

Is there a way like properties to get hold of affected rows after
bulkinsert
completion.

--
Thanks
SatishTL




Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Bulk insert task - getting affected rows rowcount - 04-02-2005 , 04:59 AM



DataPump is slower, but if configured properly it will be very close. What
is the cost of counting rows some other way vs the drop in perf? Make your
choice.

The DataPump will use the same fast load API under the covers, and by
setting optimal batch and buffer counts you can dramatically increase
performance.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"SatishTL" <SatishTL (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thanks Darren, but I have to go for Bulkinsert task as the volume of data
being inserted through some of the files are in 1.5Gig sizes. I belive
DataPumptask takes longer duration for such huge files.

- SatishTL

"Darren Green" wrote:

Only if you use the DataPump task, the Bulk Insert Task does not have
any
such property.

Another alternative would be to wrap the BulkCopy in code and capture
the
RowsCopied event which has a suitable parameter.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

"SatishTL" <SatishTL (AT) discussions (DOT) microsoft.com> wrote in message
news:1D0C4609-73C0-46CE-A7F4-B9983655B925 (AT) microsoft (DOT) com...
Problem:
I need to know the affected rows by the bulk insert task. In my DTS
package
I tried to have the ActiveX Script or Exec SQL task to fetch the
rowcount
after insertion. But in my scenario there would be simultaneous
packages
running sometimes against the same table. Due to which I get
different
record counts, rather than actual rowcount done by one Bulk insert.

Is there a way like properties to get hold of affected rows after
bulkinsert
completion.

--
Thanks
SatishTL






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.