How to run Swingbench

To download the newest version of Swingbench:

http://dominicgiles.com/swingbench.html

Transfer the file to the server:

[oracle@machine1 ~]$ pwd
/home/oracle
[oracle@machine1 ~]$ ls -ltr swingbench261012.zip 
-rw-r–r– 1 oracle oinstall 23247982 Mar  6 22:23 swingbench261012.zip
[oracle@machine1 ~]$ 

Unzip the file:

[oracle@machine1 ~]$ unzip swingbench261012.zip 
Archive:  swingbench261012.zip
   creating: swingbench/
   creating: swingbench/bin/
  inflating: swingbench/bin/bmcompare  
  inflating: swingbench/bin/ccwizard  
  inflating: swingbench/bin/charbench  
  inflating: swingbench/bin/clusteroverview  
  inflating: swingbench/bin/coordinator  
   creating: swingbench/bin/data/
  inflating: swingbench/bin/data/1000mostpopularadjectives.txt  
  inflating: swingbench/bin/data/1000mostpopularwords.txt  
  inflating: swingbench/bin/data/100mostpopularwords.txt  
  inflating: swingbench/bin/data/catalogue.txt  
  inflating: swingbench/bin/data/counties.txt  
  inflating: swingbench/bin/data/countries.txt  
 extracting: swingbench/bin/data/domains.txt  
  inflating: swingbench/bin/data/emails.txt  
  inflating: swingbench/bin/data/lowerfirstnames.txt  
  inflating: swingbench/bin/data/lowerlastnames.txt  
  inflating: swingbench/bin/data/names.txt  
  inflating: swingbench/bin/data/nls.txt  
  inflating: swingbench/bin/data/NonUSAirportCodes.txt  
  inflating: swingbench/bin/data/productids.txt  
  inflating: swingbench/bin/data/titles.txt  
  inflating: swingbench/bin/data/towns.txt  
  inflating: swingbench/bin/data/us_cities.csv  
  inflating: swingbench/bin/data/us_counties.csv  
  inflating: swingbench/bin/data/us_states_abbreviation.csv  
  inflating: swingbench/bin/data/USAirportCodes.txt  
  inflating: swingbench/bin/jsonwizard  
  inflating: swingbench/bin/minibench  
  inflating: swingbench/bin/oewizard  
  inflating: swingbench/bin/results.xml  
  inflating: swingbench/bin/results2pdf  
  inflating: swingbench/bin/sbutil   
  inflating: swingbench/bin/shwizard  
  inflating: swingbench/bin/sqlbuilder  
  inflating: swingbench/bin/swingbench  
  inflating: swingbench/bin/tpcdswizard  
   creating: swingbench/configs/
  inflating: swingbench/configs/Calling_Circle.xml  
  inflating: swingbench/configs/clusteroverview.xml  
  inflating: swingbench/configs/JSON_Workload.xml  
  inflating: swingbench/configs/Sales_History.xml  
  inflating: swingbench/configs/SOE_Client_Side.xml  
  inflating: swingbench/configs/SOE_Server_Side_V1.xml  
  inflating: swingbench/configs/SOE_Server_Side_V2.xml  
  inflating: swingbench/configs/Stored_Procedure_Stubs.xml  
  inflating: swingbench/configs/Stress_Test.xml  
  inflating: swingbench/configs/TPCDS_Like_Workload.xml  
  inflating: swingbench/configs/tpcds_statements.xml  
   creating: swingbench/launcher/
  inflating: swingbench/launcher/commons-launcher.jar  
  inflating: swingbench/launcher/launcher.properties  
  inflating: swingbench/launcher/launcher.xml  
  inflating: swingbench/launcher/LauncherBootstrap.class  
   creating: swingbench/lib/
  inflating: swingbench/lib/javax.json-1.0.4.jar  
   creating: swingbench/lib/launcher/
  inflating: swingbench/lib/launcher/ant-launcher.jar  
  inflating: swingbench/lib/launcher/ant.jar  
  inflating: swingbench/lib/launcher/xercesImpl.jar  
  inflating: swingbench/lib/launcher/xml-apis.jar  
  inflating: swingbench/lib/ojdbc7.jar  
  inflating: swingbench/lib/ons.jar  
  inflating: swingbench/lib/orajsoda.jar  
  inflating: swingbench/lib/swingbench.jar  
  inflating: swingbench/lib/ucp.jar  
   creating: swingbench/log/
  inflating: swingbench/README.txt   
   creating: swingbench/source/
  inflating: swingbench/source/antbuild  
  inflating: swingbench/source/build.xml  
   creating: swingbench/source/com/
   creating: swingbench/source/com/dom/
   creating: swingbench/source/com/dom/benchmarking/
   creating: swingbench/source/com/dom/benchmarking/swingbench/
   creating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/PeriodToPeriodComparison.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/ProductMonthlySalesRollupCube.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/ProductSalesRollupCube.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesByCountryForGivenYear.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesByQuarterCountry.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesByWeekCountry.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesCubeByMonth.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesCubeByWeek.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesHistory.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesMovingAverage.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesRollupByMonth.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SalesRollupByWeek.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/SimpleLookUp.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/TopSalesWithinQuarter.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/TopSalesWithinWeek.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/dsstransactions/WeekToWeekComparison.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/BrowseAndUpdateOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/BrowseProducts.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/NewCustomerProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/NewCustomerProcessV2.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/NewOrderProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/OrderEntryProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/OrdersByCountyQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/ProcessOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/SalesRepsOrdersQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/UpdateCustomerDetailsV2.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/WarehouseActivityQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/plsqltransactions/WarehouseOrdersQuery.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure1.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure2.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure3.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure4.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure5.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/storedprocedures/StoredProcedure6.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTest.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestDelete.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestInsert.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestSelect.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/stresstest/StressTestUpdate.java  
   creating: swingbench/source/com/dom/benchmarking/swingbench/transactions/
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/BrowseAndUpdateOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/BrowseProducts.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/JobTest.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/NewCustomerProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/NewOrderProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/OrderEntryProcess.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/ProcessOrders.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/ProductDetails.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/SalesRepsOrdersQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/UpdateCustomerDetails.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/WarehouseActivityQuery.java  
  inflating: swingbench/source/com/dom/benchmarking/swingbench/transactions/WarehouseOrdersQuery.java  
   creating: swingbench/source/com/mike/
   creating: swingbench/source/com/mike/CallingCircle/
  inflating: swingbench/source/com/mike/CallingCircle/CallingCircleLineIdentifier.java  
  inflating: swingbench/source/com/mike/CallingCircle/CallingCircleProcess.java  
  inflating: swingbench/source/com/mike/CallingCircle/CallingLineIdentifier.java  
  inflating: swingbench/source/com/mike/CallingCircle/CustomerAccount.java  
  inflating: swingbench/source/com/mike/CallingCircle/CustomerCallingLineIdentifier.java  
  inflating: swingbench/source/com/mike/CallingCircle/NewCallingCircleProcess.java  
  inflating: swingbench/source/com/mike/CallingCircle/RetrieveHistoryProcess.java  
  inflating: swingbench/source/com/mike/CallingCircle/UpdateCallingCircleProcess.java  
   creating: swingbench/sql/
  inflating: swingbench/sql/analyzecc.sql  
  inflating: swingbench/sql/CreAppPkgBdy.sql  
  inflating: swingbench/sql/CreAppPkgHdr.sql  
  inflating: swingbench/sql/CreAppPrc.sql  
  inflating: swingbench/sql/CreData1.sql  
  inflating: swingbench/sql/CreData2.sql  
  inflating: swingbench/sql/CreData3.sql  
  inflating: swingbench/sql/CreDataPkgBdy.sql  
  inflating: swingbench/sql/CreDataPkgHdr.sql  
  inflating: swingbench/sql/CreInds.sql  
 extracting: swingbench/sql/CreInds2.sql  
  inflating: swingbench/sql/CreMiscPkgBdy.sql  
  inflating: swingbench/sql/CreMiscPkgHdr.sql  
  inflating: swingbench/sql/CreTabs.sql  
  inflating: swingbench/sql/CreTspc.sql  
  inflating: swingbench/sql/CreUser.sql  
  inflating: swingbench/sql/dd_sh_copy_tables.sql  
 extracting: swingbench/sql/dd_sh_copy_tables_partitioned.sql  
  inflating: swingbench/sql/dd_sh_create_indexes.sql  
  inflating: swingbench/sql/dd_sh_drop_indexes.sql  
  inflating: swingbench/sql/dd_sh_duplicate_data.sql  
  inflating: swingbench/sql/dd_sh_rename_tables.sql  
  inflating: swingbench/sql/dd_sh_sort_data.sql  
  inflating: swingbench/sql/dd_soe_copy_tables.sql  
  inflating: swingbench/sql/dd_soe_copy_tables_partitioned.sql  
  inflating: swingbench/sql/dd_soe_drop_indexes.sql  
  inflating: swingbench/sql/dd_soe_duplicate_data.sql  
  inflating: swingbench/sql/dd_soe_rename_tables.sql  
  inflating: swingbench/sql/dd_soe_sort_data.sql  
  inflating: swingbench/sql/DropTabs.sql  
  inflating: swingbench/sql/DropUser.sql  
  inflating: swingbench/sql/GenData.sql  
  inflating: swingbench/sql/grantv$access.sql  
  inflating: swingbench/sql/json.xml  
  inflating: swingbench/sql/json_analyzeschema.sql  
 extracting: swingbench/sql/json_createsequence.sql  
  inflating: swingbench/sql/json_createtablespace.sql  
  inflating: swingbench/sql/json_createuser.sql  
  inflating: swingbench/sql/json_droptablespace.sql  
  inflating: swingbench/sql/json_dropuser.sql  
  inflating: swingbench/sql/json_rebuildsequence.sql  
  inflating: swingbench/sql/oepostinstall.sql  
  inflating: swingbench/sql/sh.xml   
  inflating: swingbench/sql/sh_dgcreateconstraints_with_indexes.sql  
  inflating: swingbench/sql/shdg_analyzeschema.sql  
  inflating: swingbench/sql/shdg_analyzeschema2.sql  
  inflating: swingbench/sql/shdg_createconstraints.sql  
  inflating: swingbench/sql/shdg_createloadviews.sql  
  inflating: swingbench/sql/shdg_createtablespace.sql  
  inflating: swingbench/sql/shdg_createuser.sql  
  inflating: swingbench/sql/shdg_drop.sql  
  inflating: swingbench/sql/shdg_drop_load_views.sql  
  inflating: swingbench/sql/shdg_drop_range.sql  
  inflating: swingbench/sql/shdg_droptablespace.sql  
  inflating: swingbench/sql/shdg_dropuser.sql  
  inflating: swingbench/sql/shdg_indexes.sql  
  inflating: swingbench/sql/shdg_indexes_none.sql  
  inflating: swingbench/sql/shdg_indexes_part.sql  
  inflating: swingbench/sql/shdg_indexes_part_pk.sql  
  inflating: swingbench/sql/shdg_indexes_pk.sql  
  inflating: swingbench/sql/shdg_localindexes.sql  
  inflating: swingbench/sql/shdg_mergepartitions.sql  
  inflating: swingbench/sql/shdg_modify_indexes.sql  
  inflating: swingbench/sql/shdg_tables.sql  
  inflating: swingbench/sql/shdg_tablesrange.sql  
  inflating: swingbench/sql/shdg_tidyup.sql  
  inflating: swingbench/sql/shdg_timedimension.sql  
  inflating: swingbench/sql/soe.xml  
  inflating: swingbench/sql/soe2.xml  
  inflating: swingbench/sql/soedg_modify_indexes.sql  
  inflating: swingbench/sql/soedganalyzeschema.sql  
  inflating: swingbench/sql/soedganalyzeschema2.sql  
  inflating: swingbench/sql/soedgconstraints.sql  
  inflating: swingbench/sql/soedgconstraints2.sql  
 extracting: swingbench/sql/soedgconstraints_none_2.sql  
  inflating: swingbench/sql/soedgconstraints_pk_2.sql  
  inflating: swingbench/sql/soedgcreatepartitionedtables.sql  
  inflating: swingbench/sql/soedgcreatetables.sql  
  inflating: swingbench/sql/soedgcreatetables2.sql  
  inflating: swingbench/sql/soedgcreatetablescomposite2.sql  
  inflating: swingbench/sql/soedgcreatetableshash2.sql  
  inflating: swingbench/sql/soedgcreatetablespace.sql  
  inflating: swingbench/sql/soedgcreateuser.sql  
  inflating: swingbench/sql/soedgdrop.sql  
  inflating: swingbench/sql/soedgdrop2.sql  
  inflating: swingbench/sql/soedgindexes.sql  
  inflating: swingbench/sql/soedgindexes2.sql  
  inflating: swingbench/sql/soedgindexes_none_2.sql  
  inflating: swingbench/sql/soedgindexes_pk_2.sql  
  inflating: swingbench/sql/soedgpackage.sql  
  inflating: swingbench/sql/soedgpackage2_body.sql  
  inflating: swingbench/sql/soedgpackage2_header.sql  
  inflating: swingbench/sql/soedgsequences.sql  
  inflating: swingbench/sql/soedgsequences2.sql  
  inflating: swingbench/sql/soedgsetupmetadata.sql  
  inflating: swingbench/sql/soedgsqlset.sql  
  inflating: swingbench/sql/soedgviews.sql  
  inflating: swingbench/sql/soedroptablespace.sql  
  inflating: swingbench/sql/soedropuser.sql  
  inflating: swingbench/sql/storedprocedures.sql  
  inflating: swingbench/sql/tpcds_analyzeschema.sql  
  inflating: swingbench/sql/tpcds_createtables.sql  
  inflating: swingbench/sql/tpcds_createtablespace.sql  
  inflating: swingbench/sql/tpcds_createuser.sql  
  inflating: swingbench/sql/tpcds_droptables.sql  
  inflating: swingbench/sql/tpcds_droptablespace.sql  
  inflating: swingbench/sql/tpcds_dropuser.sql  
  inflating: swingbench/sql/tpcds_indexes.sql  
  inflating: swingbench/sql/tpcdsconfig.xml  
   creating: swingbench/utils/
   creating: swingbench/utils/.idea/
 extracting: swingbench/utils/.idea/.name  
  inflating: swingbench/utils/.idea/encodings.xml  
  inflating: swingbench/utils/.idea/misc.xml  
  inflating: swingbench/utils/.idea/modules.xml  
  inflating: swingbench/utils/.idea/utils.iml  
  inflating: swingbench/utils/.idea/workspace.xml  
  inflating: swingbench/utils/parse_results.py  
   creating: swingbench/winbin/
  inflating: swingbench/winbin/bmcompare.bat  
  inflating: swingbench/winbin/ccwizard.bat  
  inflating: swingbench/winbin/charbench.bat  
  inflating: swingbench/winbin/clusteroverview.bat  
  inflating: swingbench/winbin/coordinator.bat  
   creating: swingbench/winbin/data/
  inflating: swingbench/winbin/data/1000mostpopularadjectives.txt  
  inflating: swingbench/winbin/data/1000mostpopularwords.txt  
  inflating: swingbench/winbin/data/100mostpopularwords.txt  
  inflating: swingbench/winbin/data/catalogue.txt  
  inflating: swingbench/winbin/data/counties.txt  
  inflating: swingbench/winbin/data/countries.txt  
 extracting: swingbench/winbin/data/domains.txt  
  inflating: swingbench/winbin/data/emails.txt  
  inflating: swingbench/winbin/data/lowerfirstnames.txt  
  inflating: swingbench/winbin/data/lowerlastnames.txt  
  inflating: swingbench/winbin/data/names.txt  
  inflating: swingbench/winbin/data/nls.txt  
  inflating: swingbench/winbin/data/NonUSAirportCodes.txt  
  inflating: swingbench/winbin/data/productids.txt  
  inflating: swingbench/winbin/data/titles.txt  
  inflating: swingbench/winbin/data/towns.txt  
  inflating: swingbench/winbin/data/us_cities.csv  
  inflating: swingbench/winbin/data/us_counties.csv  
  inflating: swingbench/winbin/data/us_states_abbreviation.csv  
  inflating: swingbench/winbin/data/USAirportCodes.txt  
  inflating: swingbench/winbin/jsonwizard.bat  
  inflating: swingbench/winbin/minibench.bat  
  inflating: swingbench/winbin/oewizard 2.bat  
  inflating: swingbench/winbin/results2pdf.bat  
  inflating: swingbench/winbin/sbutil.bat  
  inflating: swingbench/winbin/shwizard.bat  
  inflating: swingbench/winbin/sqlbuilder.bat  
  inflating: swingbench/winbin/swingbench.bat  
  inflating: swingbench/winbin/tpcdswizard.bat  
   creating: swingbench/wizardconfigs/
  inflating: swingbench/wizardconfigs/ccwizard.xml  
  inflating: swingbench/wizardconfigs/jsonwizard.xml  
  inflating: swingbench/wizardconfigs/oewizard.xml  
  inflating: swingbench/wizardconfigs/shwizard.xml  
  inflating: swingbench/wizardconfigs/tpcdswizard.xml  
[oracle@machine1 ~]$ 

Checking the files that were extracted:

[oracle@machine1 ~]$ ls swingbench
bin  configs  launcher  lib  log  README.txt  source  sql  utils  winbin  wizardconfigs
[oracle@machine1 ~]$ 

Edit the script to create tablespaces:

Swingbench uses a "SCALE" factor to specify how big we want the schema TPCDS. Swingbench creates the datafiles with the total space that will use to store the schema. This means that if you specify a factor of 50G, the tablespace will be created with  60G (or more). I have seen that this is not exact.  I have seen in some cases that the tablespace where the schema TPCDS stores the files is not filled up totally. Sometimes 20% is free, othertimes 40% is free. In order to do not waste space, since the beginning, I recommend to modify the following script and a static initial size of 1G and let the tablespace grow up as needed. So that at the end, the size of the tablespace will be exactly what swingbench needed to store all the data, without wasting space. 

Edit the file:

[oracle@machine1 ~]$ cd swingbench
[oracle@machine1 swingbench]$ vi sql/tpcds_createtablespace.sql 

Before:

create &tablespacemodel tablespace &tablespace datafile &datafile
size &datafilesize
autoextend on next 64M maxsize unlimited
extent management local uniform size 1M
segment space management auto;

— exit;


After:

create &tablespacemodel tablespace &tablespace datafile &datafile
size 1G
autoextend on next 64M maxsize unlimited
extent management local uniform size 1M
segment space management auto;

— exit;

 

Now the script to create the tablespace for indexes:


[oracle@machine1 swingbench]$ vi sql/tpcds_create_index_tablespace.sql

Before:

create &tablespacemodel tablespace &indextablespace datafile &indexdatafile
size &indexdatafilesize
autoextend on next 64M maxsize unlimited
extent management local uniform size 1M
segment space management auto;

— exit;

After
         
create &tablespacemodel tablespace &indextablespace datafile &indexdatafile
size 1G
autoextend on next 64M maxsize unlimited
extent management local uniform size 1M
segment space management auto;

 

Configure the schema with your requirements:

[root@skyler50 swingbench]# vi wizardconfigs/tpcdswizard.xml

    <DefaultParameters>
        <Parameter Value="false"/>
        <Parameter Value="false"/>
        <Parameter Key="indextablespace" Value="tpcds_idx"/>
        <Parameter Key="indexdatafile" Value="/oradata/robin1/tpcds_idx.dbf"/>
        <Parameter Key="username" Value="tpcds"/>
        <Parameter Key="dbapassword" Value="manager1"/>
        <Parameter Key="indextablespacesexists" Value="false"/>
        <Parameter Key="password" Value="tpcds"/>
        <Parameter Key="connectionstring" Value="//localhost:1521/robin1"/>
        <Parameter Key="operation" Value="create"/>
        <Parameter Key="userexists" Value="false"/>
        <Parameter Key="output" Value="Verbose"/>
        <Parameter Key="connectiontype" Value="thin"/>
        <Parameter Key="tablespace" Value="tpcds_data"/>
        <Parameter Key="dbausername" Value="sys as sysdba"/>
        <Parameter Key="datatablespacesexists" Value="false"/>
        <Parameter Key="datafile" Value="/oradata/robin1/tpcds_data.dbf"/>
    </DefaultParameters>

At the end of the file you can also modify which indexes you want to create. In this example we selected "Primary Keys Only", but you can create those that you want:

    <SQLScript Version="1.0" Valid="Post" Topic="createindexes" Labels="Primary Keys Only,No Partitioning">../sql/tpcds_indexes.sql</SQLScript>

Install Java JDK if required:

The latest version of Swingbench requieres a java version higer than 1.7. I used for this example Java 1.8:

[oracle@machine1 bin]$ export PATH=/usr/java/jdk1.8.0_121/bin:$PATH
[oracle@machine1 bin]$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Move to the bin directory:

[oracle@machine1 swingbench]$ cd bin/
[oracle@machine1 bin]$ ls -ltr tpcdswizard 
-rwxr-xr-x 1 oracle oinstall 146 Oct 24 09:29 tpcdswizard
[oracle@machine1 bin]$ 

Raise the task to create the schema TPCDS: In this example, I have selected the SCALE=50. This means that Swingbench will load 50G of data. This scale doesn't include the Indexes space, so be carefull with that. If you select a big SCALE, I recommend to raise the task with "nohup" because it will take several minutes or hours. 

[oracle@machine1 bin]$ nohup ./tpcdswizard  -c wizardconfigs/tpcdswizard.xml  -cs //localhost:1521/robin1 -create -pkindexes -cl -scale 50 -tc 5 -v &
[1] 30259
[oracle@machine1 bin]$ 

-c          Configuration file
-cs         Connection String
-create     To create the schema TPCDS
-pkindexes  Create only Primary Key Indexes
-cl         Run in silent mode
-scale      1=1G. 50=50G. The size fo the data in the schema that will be created.
-tc         How many threads will be created to load the data
-v          Verbose. Prints details on the progress in the terminal.

Task Summary: When the task is completed, you will see the following summary:

============================================
|           Datagenerator Run Stats        |
============================================
Connection Time                        0:00:00.005
Data Generation Time                   1:40:34.275
DDL Creation Time                      1:08:04.616
Total Run Time                         2:48:38.898
Rows Inserted per sec                       80,953
Data Generated (MB) per sec                    6.7
Actual Rows Generated                  488,332,993


Post Creation Validation Report
===============================
The schema appears to have been created successfully.

Valid Objects
=============
Valid Tables : 'CALL_CENTER','CATALOG_PAGE','CATALOG_RETURNS','CATALOG_SALES','CUSTOMER','CUSTOMER_ADDRESS','CUSTOMER_DEMOGRAPHICS','DATE_DIM','HOUSEHOLD_DEMOGRAPHICS','INCOME_BAND','INVENTORY','ITEM','PROMOTION','REASON','SHIP_MODE','STORE','STORE_RETURNS','STORE_SALES','TIME_DIM','WAREHOUSE','WEB_PAGE','WEB_RETURNS','WEB_SALES'
Valid Indexes : 'CALL_CENTER_PK_IDX','CATALOG_PAGE_PK_IDX','CATALOG_RETURNS_PK_IDX','CATALOG_SALES_PK_IDX','CUSTOMER_PK_IDX','CA_ADDRESS_PK_IDX','CD_DEMO_PK_IDX','D_DATE_PK_IDX','HOUSEHOLD_DEMOGRAPHICS_PK_IDX','INCOME_BAND_PK_IDX','INVENTORY_NUK','ITEM_PK_IDX','PROMOTION_PK_IDX','REASON_PK_IDX','SHIP_MODE_PK_IDX','STORE_PK_IDX','STORE_RETURNS_PK_IDX','STORE_SALES_PK_IDX','TIME_DIM_PK_IDX','W_WAREHOUSE_PK_IDX','WEB_PAGE_PK_IDX','WEB_RETURNS_PK_IDX','WEB_SALES_PK_IDX'
Valid Views : 
Valid Sequences : 
Valid Code : 
Schema Created
[oracle@machine1 bin]$ 

Reviewing the data that was created:

connect to the database and execute the following SQL statements:

SQL> select segment_type, sum(bytes)/1024/1024 from dba_segments where owner='TPCDS' group by segment_type;

SEGMENT_TYPE       SUM(BYTES)/1024/1024
—————— ——————–
INDEX                  12108
TABLE                  45290

SQL> select table_name, num_rows from dba_tables where owner='TPCDS';

TABLE_NAME             NUM_ROWS
—————————— ———-
WEB_SITE                 1500
WEB_SALES             35969200
WEB_RETURNS              3588150
WEB_PAGE                 1060
WAREHOUSE                   13
TIME_DIM                86400
STORE_SALES            144022000
STORE_RETURNS             14375700
STORE                      212
SHIP_MODE                   20
REASON                       35
PROMOTION                  300
ITEM                   106200
INVENTORY            207416700
INCOME_BAND                   20
HOUSEHOLD_DEMOGRAPHICS             7200
DATE_DIM                73049
CUSTOMER_DEMOGRAPHICS          1920800
CUSTOMER_ADDRESS           540000
CUSTOMER              1080000
CATALOG_SALES             72077400
CATALOG_RETURNS           7203350
CATALOG_PAGE                23202
CALL_CENTER                6

24 rows selected.
 

To make workload into the database you can use the following sentence, from the "bin" directory in the linux server:

./charbench -c /home/oracle/TPCDS/swingbench/configs/TPCDS_Like_Workload.xml  -cs //localhost:1521/robin1 -u tpcds -p tpcds -uc 5 -rt 1:0  -dt thin -a -v users,tpm,tps,cpu
 

 

 

 

Facebooktwitterlinkedinmailby feather