Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A couple of helper scripts have been included with the virtual machines in the $HOME/replicate directory of the oracle user to assist you with running the SwingBench transaction generator and determining the records counts between the source and target schemas.

record_count.bash

In the $HOME/replicate directory of the oracle user on the source machine is a script called record_count.bash. This script performs a row count from all the tables in the REPOE schema from both the source and target databases.

...

No Format
[oracle@source replicate]$ ./record_count.bash
TABLE_NAME                     SOURCE DB   TARGET DB
------------------------------ ----------- -----------
ADDRESSES                      750000      *No Table*
CARD_DETAILS                   750000      *No Table*
CUSTOMERS                      500000      *No Table*
INVENTORIES                    900131      *No Table*
LOGON                          1191492     *No Table*
ORDERENTRY_METADATA            4           *No Table*
ORDERS                         714895      *No Table*
ORDER_ITEMS                    2143687     *No Table*
PRODUCT_DESCRIPTIONS           1000        *No Table*
PRODUCT_INFORMATION            1000        *No Table*
WAREHOUSES                     1000        *No Table*
11 rows selected.

Sum of orders          SOURCE DB          TARGET DB
------------- ------------------ ------------------
ORDERS         $3,572,944,731.00               $.00
[oracle@source replicate]$

 

run_swingbench.bash

In the $HOME/replicate directory of the oracle user on the source machine is a script called run_swingbench.bash. This script is used on the source machine to generate DML transactions against the REPOE schema so Replicate has something to do.

SwingBench is a very configurable utility and it has a large number of parameters. The run_swingbench.bash script looks like:

No Format
#/bin/bash
#  -cs <connect_string>
#  -u <schema_user>
#  -p <schema_user_password>
#  -uc <simulated_user_count>
#  -min <min_transaction_think_time_in_milliseconds>
#  -max <max_transaction_think_time_in_milliseconds>
#  -rt <runtime_hh:mi>
#  -a run automatically
#  -v display run statistics

/u01/app/oracle/swingbench/bin/charbench -cs //source/XE -u repoe -p repoe -uc 10 -min 5 -max 200 -rt 0:10 -a -v

As you can see, it produces a transaction load for 10 minutes, simulating 10 users against the repoe schema in the source database, with a random transaction think time (delay) between 5 and 200 milliseconds.

Tip

If your host machine is powerful enough, you can play around with these parameters to produce a much greater load but beware that it could produce a large amount of redo activity that could fill up the source machine.

 

 

Info

Sounds funny, but the Rep Attack machines don't come with Dbvisit Replicate installed! The first exercise after you have the source and target machines running is to install Replicate.