dbTalk Databases Forums  

API in VB code is rolling back SQL import but wizard does not

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


Discuss API in VB code is rolling back SQL import but wizard does not in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ezelasky@hotmail.com
 
Posts: n/a

Default API in VB code is rolling back SQL import but wizard does not - 05-09-2005 , 03:14 PM






I have a DTS package in visual basic that was created via the DTS
wizard and it rolls back or empties the SQL table when a laod failure
is encountered even though I have the following property set:

oStep.RollbackFailure = False

This doesn't happen in the DTS wizard, I get a partial load on the
table with the data before the row with the corrupt data is
encountered. I need it to not happen in the VB code and I am wondering
why the wizard generated VB code doesn't do this.

What other properties must I set?

Thanks!


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

Default Re: API in VB code is rolling back SQL import but wizard does not - 05-10-2005 , 05:16 PM






In message <1115669677.267036.93740 (AT) z14g2000cwz (DOT) googlegroups.com>,
ezelasky (AT) hotmail (DOT) com writes
Quote:
I have a DTS package in visual basic that was created via the DTS
wizard and it rolls back or empties the SQL table when a laod failure
is encountered even though I have the following property set:

oStep.RollbackFailure = False

This doesn't happen in the DTS wizard, I get a partial load on the
table with the data before the row with the corrupt data is
encountered. I need it to not happen in the VB code and I am wondering
why the wizard generated VB code doesn't do this.

What other properties must I set?

Thanks!

Do you have different transaction options set? Look at the insert commit
size for the DataPump. If no rows have been committed, then you are not
going to get rows left after failure.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
ezelasky@hotmail.com
 
Posts: n/a

Default Re: API in VB code is rolling back SQL import but wizard does not - 05-17-2005 , 09:45 AM



THANKS! This worked!!! Now, what is an optimal InsertCommitSize?
Some of my input files and databases can be quite large, upto 2 million
records.

Thanks again, Elizabeth


Darren Green wrote:
Quote:
In message <1115669677.267036.93740 (AT) z14g2000cwz (DOT) googlegroups.com>,
ezelasky (AT) hotmail (DOT) com writes
I have a DTS package in visual basic that was created via the DTS
wizard and it rolls back or empties the SQL table when a laod
failure
is encountered even though I have the following property set:

oStep.RollbackFailure = False

This doesn't happen in the DTS wizard, I get a partial load on the
table with the data before the row with the corrupt data is
encountered. I need it to not happen in the VB code and I am
wondering
why the wizard generated VB code doesn't do this.

What other properties must I set?

Thanks!


Do you have different transaction options set? Look at the insert
commit
size for the DataPump. If no rows have been committed, then you are
not
going to get rows left after failure.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org


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

Default Re: API in VB code is rolling back SQL import but wizard does not - 05-17-2005 , 06:07 PM



This will depend on how many rows you can afford to loose when a batch
fails. It will also have a significant effect on performance, but there
is no magic number. You may also want to examine the value set in the
package built by the wizard if that worked for you.

Darren


In message <1116341158.217047.319680 (AT) g49g2000cwa (DOT) googlegroups.com>,
ezelasky (AT) hotmail (DOT) com writes
Quote:
THANKS! This worked!!! Now, what is an optimal InsertCommitSize?
Some of my input files and databases can be quite large, upto 2 million
records.

Thanks again, Elizabeth


Darren Green wrote:
In message <1115669677.267036.93740 (AT) z14g2000cwz (DOT) googlegroups.com>,
ezelasky (AT) hotmail (DOT) com writes
I have a DTS package in visual basic that was created via the DTS
wizard and it rolls back or empties the SQL table when a laod
failure
is encountered even though I have the following property set:

oStep.RollbackFailure = False

This doesn't happen in the DTS wizard, I get a partial load on the
table with the data before the row with the corrupt data is
encountered. I need it to not happen in the VB code and I am
wondering
why the wizard generated VB code doesn't do this.

What other properties must I set?

Thanks!


Do you have different transaction options set? Look at the insert
commit
size for the DataPump. If no rows have been committed, then you are
not
going to get rows left after failure.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.