But how you can test load with your transaction based on your data?
While configuring swingbench you may have troubles to load your own defined transaction into it and then test your load. In this topic I will write how easily you can proceed with swingbench to test load with your defined transaction.
With swingbench to test your own defined transaction there are two approaches. Either by writing PL/SQL procedures or by writing JAVA programs. The steps are discussed below using stored procedures.
1. Unzip swingbench product.
2. Open the file $SWINGHONE/sql/storedprocedures.sql with an vi editor and edit the procedures. There are six stored procedures by defaults. You can add more if you wish. For example here I have edited storedprocedure3 to add a delete statement like below.
function storedprocedure3(min_sleep integer, max_sleep integer) return integer_return_array is
execute immediate 'DELETE FROM TEST where name= ''1''';
3. In this way you can add several procedures like insert , update, delete etc. and save the file. Like save it as stored.sql
4. Log on to the user on which you want to test load and then execute the script. For example,
A typical output is,
Package body created.
If you get any error then try to fix the error.
5.Now edit the $SWINGHONE/bin/swingconfig.xml file and along with username, passowrd etc entry edit the transaction entry to include the StoredProceduren class where n may be from 1 to ... as you ran script in to your database. Like here I added storedprocedure4 in the configuration file.
[ShortName]Update Count Table[/ShortName] [ClassName]com.dom.benchmarking.swingbench.storedprocedures.
Use <> instead of .
Along with class name you can edit ID and shortname for better understanding.
6. Now save the swingconfig.xml file and run the swingbench. If you have syntactically correct in your swingconfig.xml swingbench will run and test your load.
7.You can edit the configuration as your wish. You can give different load in the configuration tab.
Automatic Load Generation tool in Database
Swingbench Exception: Oracle jdbc classes not found