 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
Test Data Generator |
|
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:
 |
 |
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Ohh, I see. It's clear now, thanks.
|
|
Mon Apr 26, 2010 3:30 pm |
|
 |
|
|
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
|
|
|