SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Test Data Generator

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Test Data Generator
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Test Data Generator Reply with quote
I tried to generate some test data into a table in MSSQL 2008 but it failed. With row count set to 1000 and "Commit Inserted Data" disabled it completes successfully but with "Commit Inserted Data" after 100 rows it started generating the data and resulted in the following error message:
Code:
2010.04.26. 15:00:31   Start data generation.
2010.04.26. 15:00:31   Start data generation for table InterfaceDB.dbo.KULCS_INTERFACE.
2010.04.26. 15:00:32   100 records inserted.
2010.04.26. 15:00:32   Error committing records. A database error occurred while executing the following code:
COMMIT

Errors:
Msg 3902, Level 16, State 1,    The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.
2010.04.26. 15:00:32   Finish data generation for table InterfaceDB.dbo.KULCS_INTERFACE.
2010.04.26. 15:00:32   Finish data generation.

I saved the script to see if the "COMMIT TRANSACTION" part is really missing but the saved script contained neither COMMIT nor BEGIN.
Mon Apr 26, 2010 9:12 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
This option is not compatible with SQL Server and Sybase ASE servers when used in a pure form, because they require explicitly started transactions. If this option is checked, SQL Assistant executes COMMIT TRANSACTION after each x rows.

But it can be used with other database server types, for example Oracle and DB2 that start transactions implicitly before each new DML operation, and it can be also used in tricky cases of test data-gen projects invoked from unit testing projects, in which transaction control can be programmatic, e.g. in one test case you start transaction using BEGIN TRANSACTION, in another test case you have invoked data-gen project inserting x-number of rows and then committing all changes on success, or rolling back everything on failure.
Mon Apr 26, 2010 10:30 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
Ohh, I see. It's clear now, thanks.
Mon Apr 26, 2010 3:30 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.