Razem z programami graficznymi w folderze SwingBench’a znajduję się też kilka narzędzi tekstowych.
SHWIZARD, OEWIZARD, CCWIZARD, TPCDWIZARD, JSONWIZARD
Wszystkie schematy które uruchamialiśmy w trybie graficznym możemy również uruchomić w trybie tekstowym np
jsonwizard.bat -cs //126.201.26.53/orcl.localdomain -cl -create -scale 0.1 -v
Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
Otrzymaliśmy błąd o zbyt małej ilości pamięci (popracuje nad tym jeszcze później) 🙂
CCWIZARD
usage: parameters: -allindexes build all indexes for schema -bigfile use big file tablespaces -c wizard config file -cf the location of a crendentials file for Oracle Exadata Express -cl run in character mode -compositepart use a composite paritioning model if it exisits -compress use default compression model if it exists -create create benchmarks schema -cs connectring for database -dba dba username for schema creation -dbap password for schema creation -debug turn on debugging output -debugf turn on debugging output to file (debug.log) -df datafile name used to create schema in -drop drop benchmarks schema -dt driver type (oci|thin) -g run in graphical mode (default) -generate generate data for benchmark if available -h,--help print this message -hashpart use hash paritioning model if it exists -hcccompress use HCC compression if it exisits -nocompress don't use any database compression -noindexes don't build any indexes for schema -nopart don't use any database partitioning -normalfile use normal file tablespaces -oltpcompress use OLTP compression if it exisits -p password for benchmark schema -part use default paritioning model if it exists -pkindexes only create primary keys for schema -rangepart use a range paritioning model if it exisits -s run in silent mode -scale mulitiplier for default config -sp the number of softparitions used. Defaults to cpu count -tc the number of threads(parallelism) used to generate data. Defaults to cpus*2 -ts tablespace to create schema in -u username for benchmark schema -v run in verbose mode when running from command line -version version of the benchmark to run
./oewizard -scale 10 -cs //localhost:1521/orcl.localdomain -dbap manager -ts SOE -tc 32 -nopart -u soe -p soe -cl -df /ORACLE/app/oracle/oradata/orcl/soe.dbf
Jeśli chcielibyśmy zdropować istniejące schematy
./oewizard -scale 0.1 -cs //localhost:1521/orcl.localdomain -dbap manager -ts SOE -u soe -p soe -cl -drop
SBUTIL
Jednym z narzędzi które znajdziemy w folderze Swingbencha jest SBUTIL służący do wykonywania kopii i zmiany rozmiaru schematów SOE lub SH (wykonywania duplikatów)
java -cp ../launcher LauncherBootstrap -executablename sbutil sbutil ERROR : [-sh duplicate and expand data in the SH schema , -soe duplicate and expand data in the SOE schema]-p-cs-u is missing or incorrectly specified. usage: parameters: -ac use advanced compression on new tables -cf the location of a crendentials file for Oracle Exadata Express -ci create indexes and constraints -code reload and recompile needed code -cs connect string -debug turn on debug information -delstats purge the stats for the schema -di drop indexes and constraints -dup number of times to duplicate -h,--help print this message -hcc use hcc compression on new tables -its index tablespace -nc use no compression on new tables -nic don't create indexes or constraint after duplication -p password -parallel level of parallelism -seq recreate needed sequences -sh duplicate and expand data in the SH schema -soe duplicate and expand data in the SOE schema -sort sort the initial seed data -stats run stats collection for schema -tables display schema's table info -ts tablespace -u specify config file -val validate schema
Uruchamiamy program SBUTIL z odpowiednimi opcjami aby wyświetlić parametry tabel w podanym schemacie:
sbutil.bat -soe -u soe -p soe -cs //126.201.26.53/orcl.localdomain -tables
Order Entry Schemas Tables ---------------------------------------------------------------------------------------------------------------------- |Table Name | Rows| Blocks| Size| Compressed?| Partitioned?| ---------------------------------------------------------------------------------------------------------------------- |ORDER_ITEMS | 4á309á235| 35á348| 278,0MB| Disabled| No| |INVENTORIES | 899á602| 22á343| 176,0MB| Disabled| No| |ORDERS | 1á429á790| 19á793| 157,0MB| Disabled| No| |ADDRESSES | 1á502á150| 16á988| 134,0MB| Disabled| No| |CUSTOMERS | 1á002á150| 16á606| 131,0MB| Disabled| No| |CARD_DETAILS | 1á502á150| 9á976| 79,0MB| Disabled| No| |LOGON | 2á382á984| 8á191| 65,0MB| Disabled| No| |ORDERENTRY_METADATA | 4| 124| 1024KB| Disabled| No| |STRESSTESTTABLE | 0| 0| 1024KB| Disabled| No| |PRODUCT_INFORMATION | 1á000| 124| 1024KB| Disabled| No| |PRODUCT_DESCRIPTIONS | 1á000| 124| 1024KB| Disabled| No| |WAREHOUSES | 1á000| 124| 1024KB| Disabled| No| ----------------------------------------------------------------------------------------------------------------------
Pod Windowsem zamiast separatorów tysięcy (kropek) wyświetlane są jakieś dziwne krzaczki 🙂
Puszczone na serwerze bazodanowym (linuxie) pokazuje poprawnie.
Order Entry Schemas Tables ---------------------------------------------------------------------------------------------------------------------- |Table Name | Rows| Blocks| Size| Compressed?| Partitioned?| ---------------------------------------------------------------------------------------------------------------------- |ORDER_ITEMS | 4,310,175| 37,632| 294.0MB| Disabled| No| |INVENTORIES | 899,602| 22,343| 176.0MB| Disabled| No| |ORDERS | 1,435,760| 21,248| 166.0MB| Disabled| No| |ADDRESSES | 1,502,252| 18,304| 143.0MB| Disabled| No| |CUSTOMERS | 1,002,252| 17,792| 139.0MB| Disabled| No| |CARD_DETAILS | 1,502,252| 10,880| 85.0MB| Disabled| No| |LOGON | 2,382,984| 8,191| 65.0MB| Disabled| No| |STRESSTESTTABLE | 0| 0| 1024KB| Disabled| No| |PRODUCT_INFORMATION | 1,000| 124| 1024KB| Disabled| No| |PRODUCT_DESCRIPTIONS | 1,000| 124| 1024KB| Disabled| No| |WAREHOUSES | 1,000| 124| 1024KB| Disabled| No| |ORDERENTRY_METADATA | 4| 124| 1024KB| Disabled| No| ----------------------------------------------------------------------------------------------------------------------
Uruchamiamy wykonanie kopii tabel na laptopie pod Windowsem:
sbutil.bat -soe -u soe -p soe -cs //126.201.26.53:1521/orcl.localdomain -dup 1 -ac -sort
lub na serwerze bazodanowym
./sbutil -soe -u soe -p soe -cs //localhost:1521/orcl.localdomain -dup 1 -ac -sort
Rozpoczyna się wykonywania kopii tabel.
Getting table Info Got table information. Completed in : 0:00:01.998 Dropping Indexes Dropped Indexes. Completed in : 0:00:00.526 Creating copies of tables Created copies of tables. Completed in : 0:00:00.138 Sorting Data Sorted Data. Completed in : 0:00:53.437 Begining data duplication Completed Iteration 1. Completed in : 0:01:55.263 Creating Constraints Created Constraints. Completed in : 0:35:52.867 Creating Indexes Created Indexes. Completed in : 1:48:12.824 Updating Metadata and Recompiling Code Updated Metadata. Completed in : 0:00:02.079 Updating Sequences Updated Sequences. Completed in : 0:00:03.280 Determining New Row Counts Got New Row Counts. Completed in : 0:00:04.493 Completed Data Duplication in 2 hour(s) 27 minute(s) 8 second(s) 817 millisecond(s) ---------------------------------------------------------------------------------------------------------- |Table Name | Original Row Count| Original Size| New Row Count| New Size| ---------------------------------------------------------------------------------------------------------- |ORDER_ITEMS | 4,310,175| 294 MB| 4,310,175| 200 MB| |CUSTOMERS | 1,002,252| 139 MB| 1,002,252| 59 MB| |CARD_DETAILS | 1,502,252| 85 MB| 1,502,252| 67 MB| |ORDERS | 1,435,760| 166 MB| 1,435,760| 33 MB| |ADDRESSES | 1,502,252| 143 MB| 1,502,252| 69 MB| ---------------------------------------------------------------------------------------------------------- |Total | | 827 MB| | 428 MB| ----------------------------------------------------------------------------------------------------------
Jak widać rozmiary tabel po przebudowie się zmniejszyły mimo tej samej liczby wierszy.